Skip to content

Commit

Permalink
Update UI to match look-n-feel of current admin
Browse files Browse the repository at this point in the history
Solidus admin v4.4 does not use icon links or delete buttons
  • Loading branch information
boomer196 committed Dec 16, 2024
1 parent 14f6855 commit 078ee20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- insert_bottom "[data-hook='admin_order_tabs']" -->
<% if can?(:update, @order) && @order.digital? %>
<li>
<%= link_to_with_icon 'icon-cloud', I18n.t('spree.digitals.reset_downloads'), reset_digitals_admin_order_url(@order) %>
<%= link_to I18n.t('spree.digitals.reset_downloads'), reset_digitals_admin_order_url(@order) %>
</li>
<% end %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- insert_bottom "[data-hook='admin_product_tabs'], #admin_product_tabs[data-hook]" -->

<li<%= ' class=\"active\"' if current == 'Digital Versions' %>>
<%= link_to_with_icon 'cloud', I18n.t('spree.digitals.digital_versions'), admin_product_digitals_path(@product) %>
</li>
<%= content_tag :li, class: ('active' if current == 'Digital Versions') do %>
<%= link_to t('spree.digitals.digital_versions'), admin_product_digitals_path(@product) %>
<% end if can?(:admin, Spree::Digital) %>
2 changes: 1 addition & 1 deletion app/views/spree/admin/digitals/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<td><%= render digital %></td>
<td class="actions text-right">
<% if can?(:destroy, Spree::Digital) %>
<%= link_to_with_icon 'delete', I18n.t('spree.digitals.delete_file'), admin_product_digital_url(@product, digital), data: {confirm: I18n.t('spree.digitals.delete_file_confirmation', filename: digital.attachment_file_name)}, method: :delete, class: 'btn btn-danger btn-sm delete-resource' %>
<%= link_to_delete nil, url: admin_product_digital_url(@product, digital), no_text: true, confirm: I18n.t('spree.digitals.delete_file_confirmation', filename: digital.attachment_file_name) %>
<% end %>
</td>
</tr>
Expand Down

0 comments on commit 078ee20

Please sign in to comment.