diff options
author | Phil Hughes <me@iamphill.com> | 2016-02-23 14:59:37 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-01 16:03:39 +0300 |
commit | aff5e73f2a1daedbbff148274ad9222d377280b2 (patch) | |
tree | 6e529f9351c8d96b153576b524927b91b8c2c3fd | |
parent | 7d41e4dc9d3365c68f7e54b545fd115e8455eae5 (diff) |
Changed # to ! on merge requests on activity view
Closes #9082
-rw-r--r-- | app/helpers/events_helper.rb | 11 | ||||
-rw-r--r-- | app/views/events/event/_common.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_merge_request.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show/_mr_title.html.haml | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 31bf45baeb7..0cb3223c0e1 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -155,6 +155,13 @@ module EventsHelper def event_note_title_html(event) if event.note_target + link_prefix = + if event.note_target.class.name == "Issue" + "#" + else + "!" + end + if event.note_commit? link_to( namespace_project_commit_path(event.project.namespace, event.project, @@ -168,11 +175,11 @@ module EventsHelper link_to(namespace_project_snippet_path(event.project.namespace, event.project, event.note_target)) do - "#{event.note_target_type} ##{truncate event.note_target_id}" + "#{event.note_target_type} #{link_prefix}#{truncate event.note_target_id}" end else link_to event_note_target_path(event) do - "#{event.note_target_type} ##{truncate event.note_target_iid}" + "#{event.note_target_type} #{link_prefix}#{truncate event.note_target_iid}" end end else diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index 4ecf1c33d2a..2f531e08a91 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -4,7 +4,7 @@ = event_action_name(event) - if event.target - %strong= link_to "##{event.target_iid}", [event.project.namespace.becomes(Namespace), event.project, event.target] + %strong= link_to "!#{event.target_iid}", [event.project.namespace.becomes(Namespace), event.project, event.target] = event_preposition(event) diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index b9d5982a56f..e1de023e9be 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -48,7 +48,7 @@ = note_count .merge-request-info - \##{merge_request.iid} · + \#{merge_request.iid} · opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} by #{link_to_member(@project, merge_request.author, avatar: false)} - if merge_request.target_project.default_branch != merge_request.target_branch diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml index 14ea7b17786..94b49baadf5 100644 --- a/app/views/projects/merge_requests/show/_mr_title.html.haml +++ b/app/views/projects/merge_requests/show/_mr_title.html.haml @@ -2,7 +2,7 @@ .status-box{ class: status_box_class(@merge_request) } = @merge_request.state_human_name %span.identifier - Merge Request ##{@merge_request.iid} + Merge Request !#{@merge_request.iid} %span.creator · by #{link_to_member(@project, @merge_request.author, size: 24)} |