Skip to content

Commit

Permalink
Merge pull request #2252 from samvera/fix-add-child-link
Browse files Browse the repository at this point in the history
🐛 Fix Add Child link
  • Loading branch information
kirkkwang authored Jun 21, 2024
2 parents 7fff868 + 00214fc commit 8adfdc6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/views/hyrax/base/_show_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%# OVERRIDE Hyrax v5.0.0rc2 Adjust permission checks for delete and add analytics button and add ENV to control turbolinks %>
<%# OVERRIDE Hyrax v5.0.1 Adjust permission checks for delete and add analytics button and add ENV to control turbolinks %>
<div class="row show-actions button-row-top-two-column">
<div class="col-sm-6">
<% if !workflow_restriction?(presenter) %>
Expand Down Expand Up @@ -35,13 +35,12 @@
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= t('.attach_child') %>
<ul class="dropdown-menu">
<% presenter.valid_child_concerns.each do |concern| %>
<li class="dropdown-item">
<%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id) %>
</li>
<% end %>
</ul>
</button>
<div class="dropdown-menu">
<% presenter.valid_child_concerns.each do |concern| %>
<%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id), class: "dropdown-item" %>
<% end %>
</div>
</div>
<% end %>
<%# OVERRIDE to validate delete permission %>
Expand Down

0 comments on commit 8adfdc6

Please sign in to comment.