summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-14 20:32:05 +0000
committerRémy Coutable <remy@rymai.me>2017-02-14 20:32:05 +0000
commit6f720ce262e5207f3e11ad95f0c265b318d37931 (patch)
treeb4509ce74f4403fe8abc155a0c0786c0ee0b1f79
parentaa4e9f867e03381b0e10ee3b791733f65fa9c17d (diff)
parentfa810e4f85a2f30535af44538428866b09d630a4 (diff)
downloadgitlab-ce-6f720ce262e5207f3e11ad95f0c265b318d37931.tar.gz
Merge branch '26287-link-branch-in-calendar-activity' into 'master'
Add Links to Branches in Calendar Activity Closes #26287 See merge request !9224
-rw-r--r--app/views/users/calendar_activities.html.haml14
-rw-r--r--changelogs/unreleased/26287-link-branch-in-calendar-activity.yml4
2 files changed, 13 insertions, 5 deletions
diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml
index dae147ca8be..4afd31f788b 100644
--- a/app/views/users/calendar_activities.html.haml
+++ b/app/views/users/calendar_activities.html.haml
@@ -10,13 +10,17 @@
%i.fa.fa-clock-o
= event.created_at.to_s(:time)
- if event.push?
- #{event.action_name} #{event.ref_type} #{event.ref_name}
+ #{event.action_name} #{event.ref_type}
+ %strong
+ - commits_path = namespace_project_commits_path(event.project.namespace, event.project, event.ref_name)
+ = link_to_if event.project.repository.branch_exists?(event.ref_name), event.ref_name, commits_path
- else
= event_action_name(event)
- - if event.note?
- %strong= link_to event.note_target.to_reference, event_note_target_path(event)
- - elsif event.target
- %strong= link_to event.target.to_reference, [event.project.namespace.becomes(Namespace), event.project, event.target]
+ %strong
+ - if event.note?
+ = link_to event.note_target.to_reference, event_note_target_path(event)
+ - elsif event.target
+ = link_to event.target.to_reference, [event.project.namespace.becomes(Namespace), event.project, event.target]
at
%strong
diff --git a/changelogs/unreleased/26287-link-branch-in-calendar-activity.yml b/changelogs/unreleased/26287-link-branch-in-calendar-activity.yml
new file mode 100644
index 00000000000..35855578d21
--- /dev/null
+++ b/changelogs/unreleased/26287-link-branch-in-calendar-activity.yml
@@ -0,0 +1,4 @@
+---
+title: Add Links to Branches in Calendar Activity
+merge_request: 9224
+author: Jan Christophersen