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
iv
gitlab-ce
Commits
9114cfbb
Commit
9114cfbb
authored
Feb 28, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-improve-ui' into 'master'
Issue Improve Ui
parents
f4b2cee6
6dcfc104
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 @
9114cfbb
...
...
@@ -10,9 +10,61 @@
.issue-box
{
color
:
#666
;
margin
:
20px
0
;
background
:
#F
AFAFA
;
background
:
#F
FF
;
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
{
margin-bottom
:
0
;
}
...
...
@@ -55,20 +107,5 @@
text-align
:
center
;
text-shadow
:
none
;
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 @
9114cfbb
...
...
@@ -85,11 +85,15 @@ module IssuesHelper
options_from_collection_for_select
(
@project
.
milestones
.
active
,
'id'
,
'title'
,
object
.
milestone_id
)
end
def
issue_alert_class
(
issue
)
if
issue
.
closed?
'alert-danger'
def
issue_box_class
(
item
)
if
item
.
respond_to?
(
:expired?
)
&&
item
.
expired?
'issue-box-expired'
elsif
item
.
respond_to?
(
:merged?
)
&&
item
.
merged?
'issue-box-merged'
elsif
item
.
closed?
'issue-box-closed'
else
'
alert-success
'
'
issue-box-open
'
end
end
end
app/helpers/merge_requests_helper.rb
View file @
9114cfbb
...
...
@@ -42,14 +42,4 @@ module MergeRequestsHelper
"Branches:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_branch
}
"
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
app/views/projects/issues/show.html.haml
View file @
9114cfbb
...
...
@@ -29,12 +29,13 @@
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
@issue
.
milestone
.
title
.issue-box
.state
{
class:
issue_alert_class
(
@issue
)
}
.issue-box
{
class:
issue_box_class
(
@issue
)
}
.state
%span
.state-label
-
if
@issue
.
closed?
%span
.state-label.state-label-red
Closed
Closed
-
else
%span
.state-label.state-label-green
Open
Open
%span
.creator
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 @
9114cfbb
.issue-box
.state
{
class:
merge_request_alert_class
(
@merge_request
)
}
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
.state
%span
.state-label
-
if
@merge_request
.
merged?
%span
.state-label.state-label-blue
Merged
-
elsif
@merge_request
.
closed?
%span
.state-label.state-label-red
Closed
-
else
%span
.state-label.state-label-green
Open
%span
.creator
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 @
9114cfbb
...
...
@@ -22,14 +22,15 @@
←
To milestones list
.issue-box
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
.state
%span
.state-label
-
if
@milestone
.
closed?
%span
.state-label.state-label-red
Closed
Closed
-
elsif
@milestone
.
expired?
%span
.state-label.state-label-red
Expired
Expired
-
else
%span
.state-label.state-label-green
Open
Open
%h4
.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