Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
6dcfc104
Commit
6dcfc104
authored
Feb 27, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue box restyle
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
27c3d529
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
51 deletions
+83
-51
app/assets/stylesheets/generic/issue_box.scss
app/assets/stylesheets/generic/issue_box.scss
+53
-16
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+8
-4
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+0
-10
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+7
-6
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+7
-8
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+8
-7
No files found.
app/assets/stylesheets/generic/issue_box.scss
View file @
6dcfc104
...
@@ -10,9 +10,61 @@
...
@@ -10,9 +10,61 @@
.issue-box
{
.issue-box
{
color
:
#666
;
color
:
#666
;
margin
:
20px
0
;
margin
:
20px
0
;
background
:
#F
AFAFA
;
background
:
#F
FF
;
border
:
1px
solid
#EEE
;
border
:
1px
solid
#EEE
;
&
.issue-box-closed
{
border-color
:
#DA4E49
;
.state
{
background-color
:
#f2dede
;
border-color
:
#ebccd1
;
color
:
#a94442
;
.state-label
{
background
:
#DA4E49
;
color
:
#FFF
;
}
}
}
&
.issue-box-merged
{
border-color
:
#31708f
;
.state
{
background-color
:
#d9edf7
;
border-color
:
#bce8f1
;
color
:
#31708f
;
.state-label
{
background
:
#31708f
;
color
:
#FFF
;
}
}
}
&
.issue-box-open
{
border-color
:
#4A4
;
.state
{
background-color
:
#dff0d8
;
border-color
:
#d6e9c6
;
color
:
#3c763d
;
.state-label
{
background
:
#4A4
;
color
:
#FFF
;
}
}
}
&
.issue-box-expired
{
border-color
:
#cea61b
;
.state
{
background-color
:
#fcf8e3
;
border-color
:
#faebcc
;
color
:
#8a6d3b
;
.state-label
{
background
:
#cea61b
;
color
:
#FFF
;
}
}
}
.control-group
{
.control-group
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
...
@@ -55,20 +107,5 @@
...
@@ -55,20 +107,5 @@
text-align
:
center
;
text-align
:
center
;
text-shadow
:
none
;
text-shadow
:
none
;
margin-right
:
20px
;
margin-right
:
20px
;
&
.state-label-blue
{
background
:
#31708f
;
color
:
#FFF
;
}
&
.state-label-green
{
background
:
#4A4
;
color
:
#FFF
;
}
&
.state-label-red
{
background
:
#DA4E49
;
color
:
#FFF
;
}
}
}
}
}
app/helpers/issues_helper.rb
View file @
6dcfc104
...
@@ -85,11 +85,15 @@ module IssuesHelper
...
@@ -85,11 +85,15 @@ module IssuesHelper
options_from_collection_for_select
(
@project
.
milestones
.
active
,
'id'
,
'title'
,
object
.
milestone_id
)
options_from_collection_for_select
(
@project
.
milestones
.
active
,
'id'
,
'title'
,
object
.
milestone_id
)
end
end
def
issue_alert_class
(
issue
)
def
issue_box_class
(
item
)
if
issue
.
closed?
if
item
.
respond_to?
(
:expired?
)
&&
item
.
expired?
'alert-danger'
'issue-box-expired'
elsif
item
.
respond_to?
(
:merged?
)
&&
item
.
merged?
'issue-box-merged'
elsif
item
.
closed?
'issue-box-closed'
else
else
'
alert-success
'
'
issue-box-open
'
end
end
end
end
end
end
app/helpers/merge_requests_helper.rb
View file @
6dcfc104
...
@@ -42,14 +42,4 @@ module MergeRequestsHelper
...
@@ -42,14 +42,4 @@ module MergeRequestsHelper
"Branches:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_branch
}
"
"Branches:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_branch
}
"
end
end
end
end
def
merge_request_alert_class
(
merge_request
)
if
merge_request
.
merged?
'alert-info'
elsif
merge_request
.
closed?
'alert-danger'
else
'alert-success'
end
end
end
end
app/views/projects/issues/show.html.haml
View file @
6dcfc104
...
@@ -29,12 +29,13 @@
...
@@ -29,12 +29,13 @@
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
@issue
.
milestone
.
title
=
@issue
.
milestone
.
title
.issue-box
.issue-box
{
class:
issue_box_class
(
@issue
)
}
.state
{
class:
issue_alert_class
(
@issue
)
}
.state
%span
.state-label
-
if
@issue
.
closed?
-
if
@issue
.
closed?
%span
.state-label.state-label-red
Closed
Closed
-
else
-
else
%span
.state-label.state-label-green
Open
Open
%span
.creator
%span
.creator
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
time_ago_with_tooltip
(
@issue
.
created_at
)
}
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
time_ago_with_tooltip
(
@issue
.
created_at
)
}
...
...
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
6dcfc104
.issue-box
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
.state
{
class:
merge_request_alert_class
(
@merge_request
)
}
.state
%span
.state-label
-
if
@merge_request
.
merged?
-
if
@merge_request
.
merged?
%span
.state-label.state-label-blue
Merged
Merged
-
elsif
@merge_request
.
closed?
-
elsif
@merge_request
.
closed?
%span
.state-label.state-label-red
Closed
Closed
-
else
-
else
%span
.state-label.state-label-green
Open
Open
%span
.creator
%span
.creator
Created by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
created_at
)
}
Created by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
created_at
)
}
...
...
app/views/projects/milestones/show.html.haml
View file @
6dcfc104
...
@@ -22,14 +22,15 @@
...
@@ -22,14 +22,15 @@
←
To milestones list
←
To milestones list
.issue-box
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
.state
.state
%span
.state-label
-
if
@milestone
.
closed?
-
if
@milestone
.
closed?
%span
.state-label.state-label-red
Closed
Closed
-
elsif
@milestone
.
expired?
-
elsif
@milestone
.
expired?
%span
.state-label.state-label-red
Expired
Expired
-
else
-
else
%span
.state-label.state-label-green
Open
Open
%h4
.title
%h4
.title
=
gfm
escape_once
(
@milestone
.
title
)
=
gfm
escape_once
(
@milestone
.
title
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment