BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
84 deletions
+55
-84
common.scss
app/assets/stylesheets/common.scss
+9
-13
blocks.scss
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
+9
-0
issues_helper.rb
app/helpers/issues_helper.rb
+0
-22
merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+0
-22
projects_helper.rb
app/helpers/projects_helper.rb
+22
-0
show.html.haml
app/views/issues/show.html.haml
+6
-12
_mr_box.html.haml
app/views/merge_requests/show/_mr_box.html.haml
+8
-14
_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 {
}
.status_info
{
font-size
:
1
4
px
;
font-size
:
1
8
px
;
padding
:
5px
15px
;
line-height
:
24px
;
width
:
60px
;
line-height
:
48px
;
text-align
:
center
;
float
:
left
;
margin-right
:
20px
;
float
:
right
;
position
:
relative
;
top
:
-15px
;
left
:
15px
;
background
:
#F5F5F5
;
&
.success
{
background
:
#5BB75B
;
color
:
white
;
text-shadow
:
0
1px
#111
;
border-color
:
#9A9
;
}
&
.error
{
background
:
#DA4E49
;
border-color
:
#BD362F
;
color
:
white
;
text-shadow
:
0
1px
#111
;
color
:
#C32
;
border-bottom
:
5px
solid
#C32
;
}
}
...
...
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
View file @
03369a91
...
...
@@ -41,6 +41,15 @@
}
}
.top_box_content
{
.box-title
{
color
:
$style_color
;
font-size
:
18px
;
font-weight
:
normal
;
line-height
:
28px
;
}
}
.middle_box_content
{
@include
border-radius
(
0
);
border
:
none
;
...
...
app/helpers/issues_helper.rb
View file @
03369a91
...
...
@@ -4,28 +4,6 @@ module IssuesHelper
project_issues_path
project
,
params
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
classes
=
"issue"
classes
<<
" closed"
if
issue
.
closed
...
...
app/helpers/merge_requests_helper.rb
View file @
03369a91
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
)
new_project_merge_request_path
(
event
.
project
,
...
...
app/helpers/projects_helper.rb
View file @
03369a91
...
...
@@ -20,6 +20,28 @@ module ProjectsHelper
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
project_team_member_path
(
@project
,
team_member
)
end
...
...
app/views/issues/show.html.haml
View file @
03369a91
...
...
@@ -26,22 +26,16 @@
.main_box
.top_box_content
%h4
%h4
.box-title
-
if
@issue
.
closed
.alert-message.error.status_info
Closed
-
else
.alert-message.success.status_info
Open
.error.status_info
Closed
=
gfm
escape_once
(
@issue
.
title
)
.middle_box_content
%cite
.cgray
Created by
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
width:
16
,
class:
"lil_av"
%strong
.author
=
link_to_issue_author
(
@issue
)
-
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
)
%cite
.cgray
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
-
if
@issue
.
assignee
\ and currently assigned to
#{
link_to_member
(
@project
,
@issue
.
assignee
)
}
-
if
@issue
.
milestone
-
milestone
=
@issue
.
milestone
...
...
app/views/merge_requests/show/_mr_box.html.haml
View file @
03369a91
.main_box
.top_box_content
%h4
%h4
.box-title
-
if
@merge_request
.
closed
.alert-message.error.status_info
Closed
-
else
.alert-message.success.status_info
Open
.error.status_info
Closed
=
gfm
escape_once
(
@merge_request
.
title
)
.middle_box_content
%div
%cite
.cgray
Created at
#{
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011"
)
}
by
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
width:
16
,
class:
"lil_av"
%strong
.author
=
link_to_merge_request_author
(
@merge_request
)
-
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
)
%cite
.cgray
Created at
#{
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011"
)
}
by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
-
if
@merge_request
.
assignee
\, currently assigned to
#{
link_to_member
(
@project
,
@merge_request
.
assignee
)
}
-
if
@merge_request
.
milestone
-
milestone
=
@merge_request
.
milestone
%cite
.cgray
and attached to milestone
...
...
@@ -27,10 +21,10 @@
.bottom_box_content
-
if
@merge_request
.
merged?
%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.
-
elsif
@merge_request
.
closed_event
%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.
app/views/merge_requests/show/_mr_title.html.haml
View file @
03369a91
...
...
@@ -7,7 +7,7 @@
%span
.right
-
if
@merge_request
.
merged?
%span
.btn.small.disabled.grouped
%span
.btn.small.disabled.grouped
.success
%strong
%i
.icon-ok
=
"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