% 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? %>
<%=t "search.index.archived" %>
<% if can_view_projects(project.organization) and can_restore_project(project) %>
<%= text %>
<% else %>
<%= text %>
<% end %>
<% else %>
<% if can_view_project(project) %>
<% if link_to_page == :show %>
<%= text %>
<% else %>
<%= text %>
<% end %>
<% else %>
<%= text %>
<% end %>
<% end %>