Commit 26045d7a2ce7f40becd179aa3b4222e2df8f5426

Authored by Dmitriy Zaporozhets
2 parents a635b9da 93bc1ff1

Merge pull request #1596 from riyad/fix-messages-for-deleted-things

Fix messages for deleted things on dashboard
app/models/event.rb
... ... @@ -54,7 +54,7 @@ class Event < ActiveRecord::Base
54 54 if project
55 55 project.name
56 56 else
57   - "(deleted)"
  57 + "(deleted project)"
58 58 end
59 59 end
60 60  
... ...
app/roles/push_event.rb
... ... @@ -70,7 +70,7 @@ module PushEvent
70 70 if new_ref?
71 71 "pushed new"
72 72 elsif rm_ref?
73   - "removed #{ref_type}"
  73 + "deleted"
74 74 else
75 75 "pushed to"
76 76 end
... ...
app/views/events/event/_push.html.haml
1 1 .event-title
2 2 %span.author_name= link_to_author event
3 3 %span.event_label.pushed #{event.push_action_name} #{event.ref_type}
4   - = link_to project_commits_path(event.project, event.ref_name) do
  4 + - if event.rm_ref?
5 5 %strong= event.ref_name
  6 + - else
  7 + = link_to project_commits_path(event.project, event.ref_name) do
  8 + %strong= event.ref_name
6 9 at
7 10 %strong= link_to event.project.name, event.project
8 11  
... ...