summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Christophersen <jan@ruken.pw>2017-02-14 14:56:25 +0100
committerJan Christophersen <jan@ruken.pw>2017-02-14 18:44:27 +0100
commitfa810e4f85a2f30535af44538428866b09d630a4 (patch)
tree4b098791f133366fdaa6716ce9ef877e4843b45c
parentf802ad370e625e7aa2f3023f73c24a8b6f009821 (diff)
downloadgitlab-ce-fa810e4f85a2f30535af44538428866b09d630a4.tar.gz
Add Links to Branches in Calendar Activity
-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