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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
03369a91
Commit
03369a91
authored
Dec 13, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use one helper for linking to team member. More clear title for Issue and MR
parent
57e210f6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
84 deletions
+55
-84
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+9
-13
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
+9
-0
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+0
-22
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+0
-22
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+22
-0
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+6
-12
app/views/merge_requests/show/_mr_box.html.haml
app/views/merge_requests/show/_mr_box.html.haml
+8
-14
app/views/merge_requests/show/_mr_title.html.haml
app/views/merge_requests/show/_mr_title.html.haml
+1
-1
No files found.
app/assets/stylesheets/common.scss
View file @
03369a91
...
@@ -426,25 +426,21 @@ p.time {
...
@@ -426,25 +426,21 @@ p.time {
}
}
.status_info
{
.status_info
{
font-size
:
1
4
px
;
font-size
:
1
8
px
;
padding
:
5px
15px
;
padding
:
5px
15px
;
line-height
:
24px
;
line-height
:
48px
;
width
:
60px
;
text-align
:
center
;
text-align
:
center
;
float
:
left
;
float
:
right
;
margin-right
:
20px
;
position
:
relative
;
top
:
-15px
;
left
:
15px
;
background
:
#F5F5F5
;
&
.success
{
&
.success
{
background
:
#5BB75B
;
color
:
white
;
text-shadow
:
0
1px
#111
;
border-color
:
#9A9
;
}
}
&
.error
{
&
.error
{
background
:
#DA4E49
;
color
:
#C32
;
border-color
:
#BD362F
;
border-bottom
:
5px
solid
#C32
;
color
:
white
;
text-shadow
:
0
1px
#111
;
}
}
}
}
...
...
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
View file @
03369a91
...
@@ -41,6 +41,15 @@
...
@@ -41,6 +41,15 @@
}
}
}
}
.top_box_content
{
.box-title
{
color
:
$style_color
;
font-size
:
18px
;
font-weight
:
normal
;
line-height
:
28px
;
}
}
.middle_box_content
{
.middle_box_content
{
@include
border-radius
(
0
);
@include
border-radius
(
0
);
border
:
none
;
border
:
none
;
...
...
app/helpers/issues_helper.rb
View file @
03369a91
...
@@ -4,28 +4,6 @@ module IssuesHelper
...
@@ -4,28 +4,6 @@ module IssuesHelper
project_issues_path
project
,
params
project_issues_path
project
,
params
end
end
def
link_to_issue_assignee
(
issue
)
project
=
issue
.
project
tm
=
project
.
team_member_by_id
(
issue
.
assignee_id
)
if
tm
link_to
issue
.
assignee_name
,
project_team_member_path
(
project
,
tm
),
class:
"author_link"
else
issue
.
assignee_name
end
end
def
link_to_issue_author
(
issue
)
project
=
issue
.
project
tm
=
project
.
team_member_by_id
(
issue
.
author_id
)
if
tm
link_to
issue
.
author_name
,
project_team_member_path
(
project
,
tm
),
class:
"author_link"
else
issue
.
author_name
end
end
def
issue_css_classes
issue
def
issue_css_classes
issue
classes
=
"issue"
classes
=
"issue"
classes
<<
" closed"
if
issue
.
closed
classes
<<
" closed"
if
issue
.
closed
...
...
app/helpers/merge_requests_helper.rb
View file @
03369a91
module
MergeRequestsHelper
module
MergeRequestsHelper
def
link_to_merge_request_assignee
(
merge_request
)
project
=
merge_request
.
project
tm
=
project
.
team_member_by_id
(
merge_request
.
assignee_id
)
if
tm
link_to
merge_request
.
assignee_name
,
project_team_member_path
(
project
,
tm
),
class:
"author_link"
else
merge_request
.
assignee_name
end
end
def
link_to_merge_request_author
(
merge_request
)
project
=
merge_request
.
project
tm
=
project
.
team_member_by_id
(
merge_request
.
author_id
)
if
tm
link_to
merge_request
.
author_name
,
project_team_member_path
(
project
,
tm
),
class:
"author_link"
else
merge_request
.
author_name
end
end
def
new_mr_path_from_push_event
(
event
)
def
new_mr_path_from_push_event
(
event
)
new_project_merge_request_path
(
new_project_merge_request_path
(
event
.
project
,
event
.
project
,
...
...
app/helpers/projects_helper.rb
View file @
03369a91
...
@@ -20,6 +20,28 @@ module ProjectsHelper
...
@@ -20,6 +20,28 @@ module ProjectsHelper
end
end
end
end
def
link_to_member
(
project
,
author
)
return
"(deleted)"
unless
author
# Build avatar image tag
avatar
=
image_tag
(
gravatar_icon
(
author
.
try
(
:email
)),
width:
16
,
class:
"lil_av"
)
# Build name strong tag
name
=
content_tag
:strong
,
author
.
name
,
class:
'author'
author_html
=
avatar
+
name
tm
=
project
.
team_member_by_id
(
author
)
content_tag
:span
,
class:
'member-link'
do
if
tm
link_to
author_html
,
project_team_member_path
(
project
,
tm
),
class:
"author_link"
else
author_html
end
end
end
def
tm_path
team_member
def
tm_path
team_member
project_team_member_path
(
@project
,
team_member
)
project_team_member_path
(
@project
,
team_member
)
end
end
...
...
app/views/issues/show.html.haml
View file @
03369a91
...
@@ -26,22 +26,16 @@
...
@@ -26,22 +26,16 @@
.main_box
.main_box
.top_box_content
.top_box_content
%h4
%h4
.box-title
-
if
@issue
.
closed
-
if
@issue
.
closed
.alert-message.error.status_info
Closed
.error.status_info
Closed
-
else
.alert-message.success.status_info
Open
=
gfm
escape_once
(
@issue
.
title
)
=
gfm
escape_once
(
@issue
.
title
)
.middle_box_content
.middle_box_content
%cite
.cgray
Created by
%cite
.cgray
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
width:
16
,
class:
"lil_av"
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
%strong
.author
=
link_to_issue_author
(
@issue
)
-
if
@issue
.
assignee
\ and currently assigned to
#{
link_to_member
(
@project
,
@issue
.
assignee
)
}
-
if
@issue
.
assignee
%cite
.cgray
and currently assigned to
=
image_tag
gravatar_icon
(
@issue
.
assignee_email
),
width:
16
,
class:
"lil_av"
%strong
.author
=
link_to_issue_assignee
(
@issue
)
-
if
@issue
.
milestone
-
if
@issue
.
milestone
-
milestone
=
@issue
.
milestone
-
milestone
=
@issue
.
milestone
...
...
app/views/merge_requests/show/_mr_box.html.haml
View file @
03369a91
.main_box
.main_box
.top_box_content
.top_box_content
%h4
%h4
.box-title
-
if
@merge_request
.
closed
-
if
@merge_request
.
closed
.alert-message.error.status_info
Closed
.error.status_info
Closed
-
else
.alert-message.success.status_info
Open
=
gfm
escape_once
(
@merge_request
.
title
)
=
gfm
escape_once
(
@merge_request
.
title
)
.middle_box_content
.middle_box_content
%div
%div
%cite
.cgray
Created at
#{
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011"
)
}
by
%cite
.cgray
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
width:
16
,
class:
"lil_av"
Created at
#{
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011"
)
}
by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
%strong
.author
=
link_to_merge_request_author
(
@merge_request
)
-
if
@merge_request
.
assignee
\, currently assigned to
#{
link_to_member
(
@project
,
@merge_request
.
assignee
)
}
-
if
@merge_request
.
assignee
%cite
.cgray
, currently assigned to
=
image_tag
gravatar_icon
(
@merge_request
.
assignee_email
),
width:
16
,
class:
"lil_av"
%strong
.author
=
link_to_merge_request_assignee
(
@merge_request
)
-
if
@merge_request
.
milestone
-
if
@merge_request
.
milestone
-
milestone
=
@merge_request
.
milestone
-
milestone
=
@merge_request
.
milestone
%cite
.cgray
and attached to milestone
%cite
.cgray
and attached to milestone
...
@@ -27,10 +21,10 @@
...
@@ -27,10 +21,10 @@
.bottom_box_content
.bottom_box_content
-
if
@merge_request
.
merged?
-
if
@merge_request
.
merged?
%span
%span
Merged by
#{
@merge_request
.
merge_event
.
author_name
}
Merged by
#{
link_to_member
(
@project
,
@merge_request
.
merge_event
.
author
)
}
%small
#{
time_ago_in_words
(
@merge_request
.
merge_event
.
created_at
)
}
ago.
%small
#{
time_ago_in_words
(
@merge_request
.
merge_event
.
created_at
)
}
ago.
-
elsif
@merge_request
.
closed_event
-
elsif
@merge_request
.
closed_event
%span
%span
Closed by
#{
@merge_request
.
closed_event
.
author_name
}
Closed by
#{
link_to_member
(
@project
,
@merge_request
.
closed_event
.
author
)
}
%small
#{
time_ago_in_words
(
@merge_request
.
closed_event
.
created_at
)
}
ago.
%small
#{
time_ago_in_words
(
@merge_request
.
closed_event
.
created_at
)
}
ago.
app/views/merge_requests/show/_mr_title.html.haml
View file @
03369a91
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
%span
.right
%span
.right
-
if
@merge_request
.
merged?
-
if
@merge_request
.
merged?
%span
.btn.small.disabled.grouped
%span
.btn.small.disabled.grouped
.success
%strong
%strong
%i
.icon-ok
%i
.icon-ok
=
"MERGED"
=
"MERGED"
...
...
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