Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

Commit

Permalink
Display useful title information. Closes #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
redlibrarian committed Jun 9, 2016
1 parent a0ec93e commit 7e1ace1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/catalog/_index_header_default.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
</span>
<% end %>
<% @url = "#{Rails.application.config.wayback_endpoint}#{Rails.application.config.wayback_collection}/#{document.to_h['wayback_date']}/#{document.to_h['url']}" %>
<%=link_to document.to_h['title'], @url %>
<% document.to_h['title'] ? @title = document.to_h['title'] : @title = "#{document.to_h['content_type'].first.split(/\//).first.upcase}: #{document.to_h['host']} [crawled on: #{document.to_h['crawl_date'].split(/T/).first}]" %>
<%=link_to @title, @url %>
</h5>
<%= document_actions %>
Expand Down

0 comments on commit 7e1ace1

Please sign in to comment.