<%= @query %> results from your notebook

<% @matched_attributes.each do |attribute| %> <% seen_key = "#{attribute.entity_type}-#{attribute.entity_id}" next if @seen_result_pages.key?(seen_key) @seen_result_pages[seen_key] = true %> <% entity = content_class_from_name(attribute.entity_type).find_by(id: attribute.entity_id) %> <% next unless entity %> <% next unless entity.user_id == current_user.id %>
<%= link_to entity, class: "#{entity.class.text_color}" do %> <%= entity.class.icon %> <%= entity.name %> <% end %>

Last edited <%= time_ago_in_words entity.updated_at %> ago

<%= attribute.attribute_field.label %>: <%= ContentFormatterService.show( text: truncate(attribute.value, length: 180, separator: ' '), viewing_user: current_user ).gsub( /#{@query}/i, "#{@query}".html_safe ).gsub("

", ' ').gsub("

", ' ').html_safe %>

<%= link_to polymorphic_path(entity.page_type.downcase, id: entity.id), class: 'black-text' do %> <%= entity.class.icon %> View <% end %> <%= link_to edit_polymorphic_path(entity.page_type.downcase, id: entity.id), class: 'black-text' do %> edit Edit <% end %> <% entity_universe = entity.try(:universe) %> <% if entity_universe %> <%= link_to entity_universe, class: "black-text right", style: 'padding: 0 10px' do %> <%= Universe.icon %> <%= entity_universe.name %> <% end %> <% end %>
<% end %>
<% if @matched_attributes.empty? %>

Sorry, nothing matched your search query!

Think this is a bug? <%= link_to 'Please report it!', 'https://docs.google.com/forms/d/e/1FAIpQLSe0jnqJlcPJDqwogGere5j8-8F1nSGGYkzbsI-XkOeMnGwLrA/viewform' %>

<% else %>

<%= pluralize @seen_result_pages.keys.count, 'match' %> found

<% end %>