Commit 83797265 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1683 from riyad/fix-events-for-deleted-things-again

Fix displaying events for deleted things on the dashboard (again)
parents 4083d01a 19560a4b
module EventsHelper module EventsHelper
def link_to_author(event) def link_to_author(event)
project = event.project project = event.project
tm = project.team_member_by_id(event.author_id) tm = project.team_member_by_id(event.author_id) if project
if tm if tm
link_to event.author_name, project_team_member_path(project, tm) link_to event.author_name, project_team_member_path(project, tm)
......
.event-title .event-title
%span.author_name= link_to_author event %span.author_name= link_to_author event
%span.event_label{class: event.action_name}= event_action_name(event) %span.event_label{class: event.action_name}= event_action_name(event)
- if event.target
= link_to [event.project, event.target] do = link_to [event.project, event.target] do
%strong= truncate event.target_title %strong= truncate event.target_title
- else
%strong= truncate event.target_title
at at
- if event.project
= link_to_project event.project = link_to_project event.project
- else
= event.project_name
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment