Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Use coverage renderer on MapSet show page
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan committed May 10, 2017
1 parent 10d6587 commit 48486c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/presenters/map_set_show_presenter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
class MapSetShowPresenter < HyraxShowPresenter
include PlumAttributes

def attribute_to_html(field, options = {})
if field == :coverage
GeoWorks::CoverageRenderer.new(field, send(field), options).render
else
super field, options
end
end
end
2 changes: 1 addition & 1 deletion app/views/hyrax/map_sets/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<% editor = can?(:edit, @presenter.id) %>
<%= render '/hyrax/base/representative_media', presenter: @presenter %>
<%= render "/hyrax/base/attributes", presenter: @presenter %>
<%= render 'geo_works/metadata', presenter: @presenter %>
<%= render "/hyrax/base/items", presenter: @presenter %>
<%= render 'workflow_actions', presenter: @presenter if @presenter.workflow.actions.present? %>
<%= render "show_actions", collector: collector, editor: editor%>

0 comments on commit 48486c1

Please sign in to comment.