diff options
author | Jan Christophersen <jan@ruken.pw> | 2017-02-14 16:56:25 +0300 |
---|---|---|
committer | Jan Christophersen <jan@ruken.pw> | 2017-02-14 20:44:27 +0300 |
commit | fa810e4f85a2f30535af44538428866b09d630a4 (patch) | |
tree | 4b098791f133366fdaa6716ce9ef877e4843b45c /app/views/users | |
parent | f802ad370e625e7aa2f3023f73c24a8b6f009821 (diff) |
Add Links to Branches in Calendar Activity
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/calendar_activities.html.haml | 14 |
1 files changed, 9 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 |