2016-07-28 19:29:26 +08:00
|
|
|
<% link_to_page = :canvas if local_assigns[:link_to_page].nil? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% query ||= nil %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% text = query.present? ? highlight(project.name, query.strip.split(/\s+/)) : project.name %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
<% if project.archived? %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<span class="label label-warning"><%=t 'search.index.archived' %></span>
|
|
|
|
<% if can_view_projects(project.team) and can_restore_project(project) %>
|
|
|
|
<%= route_to_other_team projects_archive_path(team: project.team),
|
|
|
|
project.team,
|
|
|
|
text %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if can_view_project(project) %>
|
2016-07-27 22:28:18 +08:00
|
|
|
<% if link_to_page == :show %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= route_to_other_team project_path(project),
|
|
|
|
project.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= route_to_other_team root_path,
|
|
|
|
project.team,
|
|
|
|
text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|
2016-10-11 22:16:48 +08:00
|
|
|
<% end %>
|