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
75cf927d
Commit
75cf927d
authored
Jun 21, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues & MR legend
parent
b64ceadb
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
158 additions
and
9 deletions
+158
-9
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+89
-0
app/assets/stylesheets/sections/issues.scss
app/assets/stylesheets/sections/issues.scss
+2
-0
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+8
-0
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+8
-0
app/models/merge_request.rb
app/models/merge_request.rb
+4
-0
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+9
-0
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+4
-6
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+15
-0
app/views/merge_requests/_merge_request.html.haml
app/views/merge_requests/_merge_request.html.haml
+4
-2
app/views/merge_requests/index.html.haml
app/views/merge_requests/index.html.haml
+15
-1
No files found.
app/assets/stylesheets/common.scss
View file @
75cf927d
...
@@ -606,3 +606,92 @@ li.note {
...
@@ -606,3 +606,92 @@ li.note {
.mr_show_all_commits
{
.mr_show_all_commits
{
cursor
:pointer
;
cursor
:pointer
;
}
}
/**
* Issues, MRs legend
*
*/
.list_legend
{
float
:left
;
margin-right
:
20px
;
.icon
{
width
:
16px
;
height
:
16px
;
float
:left
;
margin-right
:
5px
;
@include
border-radius
(
4px
);
&
.critical
{
background
:
#EAA
;
border
:
1px
solid
#B88
;
}
&
.today
{
background
:
#ADA
;
border
:
1px
solid
#8B8
;
}
&
.closed
{
background
:
#DDD
;
border
:
1px
solid
#BBB
;
}
&
.yours
{
background
:
#AAD
;
border
:
1px
solid
#88B
;
}
&
.merged
{
background
:
#DAD
;
border
:
1px
solid
#B8B
;
}
}
.text
{
padding-bottom
:
10px
;
float
:left
;
}
}
.merge_request
,
.issue
{
.list_legend
{
margin-right
:
5px
;
margin-top
:
10px
;
.icon
{
width
:
16px
;
height
:
16px
;
float
:left
;
margin-right
:
5px
;
@include
border-radius
(
4px
);
border
:
1px
solid
#ddd
;
}
}
&
.critical
{
.icon
{
background
:
#EAA
;
border
:
1px
solid
#B88
;
}
}
&
.today
{
.icon
{
background
:
#ADA
;
border
:
1px
solid
#8B8
;
}
}
&
.closed
{
.icon
{
background
:
#DDD
;
border
:
1px
solid
#BBB
;
}
}
&
.yours
{
.icon
{
background
:
#AAD
;
border
:
1px
solid
#88B
;
}
}
&
.merged
{
.icon
{
background
:
#DAD
;
border
:
1px
solid
#B8B
;
}
}
}
app/assets/stylesheets/sections/issues.scss
View file @
75cf927d
...
@@ -25,3 +25,5 @@
...
@@ -25,3 +25,5 @@
@extend
.bottom_box_content
;
@extend
.bottom_box_content
;
}
}
}
}
app/helpers/issues_helper.rb
View file @
75cf927d
...
@@ -25,4 +25,12 @@ module IssuesHelper
...
@@ -25,4 +25,12 @@ module IssuesHelper
issue
.
author_name
issue
.
author_name
end
end
end
end
def
issue_css_classes
issue
classes
=
"issue"
classes
<<
" critical"
if
issue
.
critical
classes
<<
" closed"
if
issue
.
closed
classes
<<
" today"
if
issue
.
today?
classes
end
end
end
app/helpers/merge_requests_helper.rb
View file @
75cf927d
...
@@ -31,4 +31,12 @@ module MergeRequestsHelper
...
@@ -31,4 +31,12 @@ module MergeRequestsHelper
}
}
)
)
end
end
def
mr_css_classes
mr
classes
=
"merge_request"
classes
<<
" closed"
if
mr
.
closed
classes
<<
" merged"
if
mr
.
merged?
classes
<<
" today"
if
mr
.
today?
classes
end
end
end
app/models/merge_request.rb
View file @
75cf927d
...
@@ -93,6 +93,10 @@ class MergeRequest < ActiveRecord::Base
...
@@ -93,6 +93,10 @@ class MergeRequest < ActiveRecord::Base
self
.
save
self
.
save
end
end
def
today?
Date
.
today
==
created_at
.
to_date
end
def
new?
def
new?
today?
&&
created_at
==
updated_at
today?
&&
created_at
==
updated_at
end
end
...
...
app/views/dashboard/issues.html.haml
View file @
75cf927d
...
@@ -4,6 +4,15 @@
...
@@ -4,6 +4,15 @@
%small
.right
#{
@issues
.
total_count
}
issues
%small
.right
#{
@issues
.
total_count
}
issues
%br
%br
.issues_legend
.list_legend
.icon.critical
.text
Critical
.list_legend
.icon.today
.text
Today
.clearfix
-
if
@issues
.
any?
-
if
@issues
.
any?
-
@issues
.
group_by
(
&
:project
).
each
do
|
group
|
-
@issues
.
group_by
(
&
:project
).
each
do
|
group
|
%div
.ui-box
%div
.ui-box
...
...
app/views/issues/_show.html.haml
View file @
75cf927d
%li
.wll
{
:id
=>
dom_id
(
issue
),
:class
=>
"issue #{issue.critical ? "
critical
" : ""}"
,
:url
=>
project_issue_path
(
issue
.
project
,
issue
)
}
%li
.wll
{
:id
=>
dom_id
(
issue
),
:class
=>
issue_css_classes
(
issue
),
:url
=>
project_issue_path
(
issue
.
project
,
issue
)
}
.list_legend
.icon
.right
.right
-
if
issue
.
notes
.
any?
-
if
issue
.
notes
.
any?
%span
.btn.small.disabled.padded
=
pluralize
issue
.
notes
.
count
,
'note'
%span
.btn.small.disabled.padded
=
pluralize
issue
.
notes
.
count
,
'note'
...
@@ -15,12 +17,8 @@
...
@@ -15,12 +17,8 @@
%span
.update-author
%span
.update-author
assigned to
assigned to
%strong
=
issue
.
assignee_name
%strong
=
issue
.
assignee_name
-
if
issue
.
critical
%span
.label.important
critical
-
if
issue
.
today?
%span
.label.success
today
-
if
issue
.
upvotes
>
0
-
if
issue
.
upvotes
>
0
%span
.
label.
success
=
"+
#{
issue
.
upvotes
}
"
%span
.
badge.badge-
success
=
"+
#{
issue
.
upvotes
}
"
=
link_to
project_issue_path
(
issue
.
project
,
issue
)
do
=
link_to
project_issue_path
(
issue
.
project
,
issue
)
do
%p
.row_title
=
truncate
(
issue
.
title
,
:length
=>
100
)
%p
.row_title
=
truncate
(
issue
.
title
,
:length
=>
100
)
app/views/issues/index.html.haml
View file @
75cf927d
...
@@ -14,6 +14,21 @@
...
@@ -14,6 +14,21 @@
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search span3 right neib'
}
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search span3 right neib'
}
%br
%br
.issues_legend
.list_legend
.icon.critical
.text
Critical
.list_legend
.icon.closed
.text
Closed
.list_legend
.icon.today
.text
Today
.clearfix
%div
#issues-table-holder
.ui-box
%div
#issues-table-holder
.ui-box
.title
.title
.row
.row
...
...
app/views/merge_requests/_merge_request.html.haml
View file @
75cf927d
%li
.wll
%li
.wll
{
:class
=>
mr_css_classes
(
merge_request
)
}
.list_legend
.icon
.right
.right
.left
.left
-
if
merge_request
.
notes
.
any?
-
if
merge_request
.
notes
.
any?
...
@@ -14,6 +16,6 @@
...
@@ -14,6 +16,6 @@
=
time_ago_in_words
(
merge_request
.
created_at
)
=
time_ago_in_words
(
merge_request
.
created_at
)
ago
ago
-
if
merge_request
.
upvotes
>
0
-
if
merge_request
.
upvotes
>
0
%span
.
label.
success
=
"+
#{
merge_request
.
upvotes
}
"
%span
.
badge.badge-
success
=
"+
#{
merge_request
.
upvotes
}
"
=
link_to
project_merge_request_path
(
merge_request
.
project
,
merge_request
)
do
=
link_to
project_merge_request_path
(
merge_request
.
project
,
merge_request
)
do
%p
.row_title
=
truncate
(
merge_request
.
title
,
:length
=>
80
)
%p
.row_title
=
truncate
(
merge_request
.
title
,
:length
=>
80
)
app/views/merge_requests/index.html.haml
View file @
75cf927d
...
@@ -6,6 +6,20 @@
...
@@ -6,6 +6,20 @@
%br
%br
.mrs_legend
.list_legend
.icon.today
.text
Today
.list_legend
.icon.merged
.text
Merged
.list_legend
.icon.closed
.text
Closed
.clearfix
.ui-box
.ui-box
.title
.title
%ul
.nav.nav-pills
%ul
.nav.nav-pills
...
@@ -26,7 +40,7 @@
...
@@ -26,7 +40,7 @@
=
render
@merge_requests
=
render
@merge_requests
-
if
@merge_requests
.
blank?
-
if
@merge_requests
.
blank?
%li
%li
%
p
.padded
Nothing to show here
%
h4
.nothing_here_message
Nothing to show here
-
if
@merge_requests
.
present?
-
if
@merge_requests
.
present?
%li
.bottom
%li
.bottom
.row
.row
...
...
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