mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-05 23:17:33 +08:00
28 lines
972 B
Text
28 lines
972 B
Text
<% link_to_page = :canvas if local_assigns[:link_to_page].nil? %>
|
|
<% query ||= nil %>
|
|
<% text = query.present? ? highlight(project.name, query.strip.split(/\s+/)) : project.name %>
|
|
|
|
<% if project.archived? %>
|
|
<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 %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|
|
<% else %>
|
|
<% if can_view_project(project) %>
|
|
<% if link_to_page == :show %>
|
|
<%= route_to_other_team project_path(project),
|
|
project.team,
|
|
text %>
|
|
<% else %>
|
|
<%= route_to_other_team root_path,
|
|
project.team,
|
|
text %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|
|
<% end %>
|