Skip to content

Commit

Permalink
Change the structure of work show, add child link
Browse files Browse the repository at this point in the history
Since the bootstrap upgrade the structure of ul > il > a doesn't seem to
work like before.  The <a> tag was only clickable when you hover over
the text.  This change will make the whole <li> clickable much like the
nav dropdown menu for the My Profile/Dashboard/Logout links on the top
right of the masthead.
  • Loading branch information
Kirk Wang committed Jun 21, 2024
1 parent cfdc1ec commit 00214fc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 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 @@ -36,13 +36,11 @@
<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') %>
</button>
<ul class="dropdown-menu">
<div 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>
<%= 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 %>
</ul>
</div>
</div>
<% end %>
<%# OVERRIDE to validate delete permission %>
Expand Down

0 comments on commit 00214fc

Please sign in to comment.