mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 00:49:07 +08:00
28 lines
No EOL
819 B
Text
28 lines
No EOL
819 B
Text
<% link_to_page = :root 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.organization) and can_restore_project(project) %>
|
|
<a href="<%= projects_archive_path(organization: project.organization) %>">
|
|
<%= text %>
|
|
</a>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|
|
<% else %>
|
|
<% if can_view_project(project) %>
|
|
<% if link_to_page == :show %>
|
|
<a href="<%= project_path(project) %>">
|
|
<%= text %>
|
|
</a>
|
|
<% else %>
|
|
<a href="<%= root_path %>">
|
|
<%= text %>
|
|
</a>
|
|
<% end %>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|
|
<% end %> |