Skip to content

Commit

Permalink
Merge pull request #6076 from samvera/file_set-show-descriptions
Browse files Browse the repository at this point in the history
add extension behavior for FileSet show view partials
  • Loading branch information
dlpierce committed Jun 15, 2023
2 parents 014fe61 + 45f4ed8 commit 8aa6379
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions app/presenters/hyrax/file_set_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def user_can_perform_any_action?
current_ability.can?(:edit, id) || current_ability.can?(:destroy, id) || current_ability.can?(:download, id)
end

##
# @return [Array<String>]
def show_partials
['show_details']
end

private

def link_presenter_class
Expand Down
8 changes: 5 additions & 3 deletions app/views/hyrax/file_sets/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
<%= render 'file_set_title', presenter: @presenter %>
</header>

<%# TODO: render 'show_descriptions' See https://github.com/samvera/hyrax/issues/1481 %>
<%= render 'show_details' %>
<% @presenter.show_partials.each do |partial_path| %>
<%= render partial_path %>
<% end %>
<%= render 'hyrax/users/activity_log', events: @presenter.events %>
</div><!-- /columns second -->
</div> <!-- /.row -->
Expand All @@ -22,4 +24,4 @@
<span class='hide analytics-event' data-category="file-set-in-collection" data-action="file-set-in-collection-view" data-name="<%= collection_id %>" >
<% end %>
<span class='hide analytics-event' data-category="file-set-in-work" data-action="file-set-in-work-view" data-name="<%= @presenter.parent.id %>" >
<span class='hide analytics-event' data-category="file-set" data-action="file-set-view" data-name="<%= @presenter.id %>" >
<span class='hide analytics-event' data-category="file-set" data-action="file-set-view" data-name="<%= @presenter.id %>" >

0 comments on commit 8aa6379

Please sign in to comment.