Skip to content

Commit

Permalink
openfoodfoundation#11068, add delete dropdown option
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/views/admin/products_v3/components/_product_actions.html.haml
  • Loading branch information
chahmedejaz committed Nov 28, 2023
1 parent 4b070f8 commit 542ad82
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/spree/admin/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def clone
redirect_to spree.admin_products_url
end

def destroy; end

def group_buy_options
@url_filters = ::ProductFilters.new.extract(request.query_parameters)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vertical-ellipsis-menu{ "data-controller": "vertical-ellipsis-menu" }
%i.fa.fa-ellipsis-v{ "data-action": "click->vertical-ellipsis-menu#toggle" }
.vertical-ellipsis-menu-content{ "data-vertical-ellipsis-menu-target": "content" }
- if defined?(variant)
= link_to t('admin.products_page.actions.edit'), edit_admin_product_variant_path(product, variant), class: "vertical-ellipsis-menu-content-item"
- else
= link_to t('admin.products_page.actions.edit'), edit_admin_product_path(product), class: "vertical-ellipsis-menu-content-item"
= link_to t('admin.products_page.actions.clone'), clone_admin_product_path(product), class: "vertical-ellipsis-menu-content-item"
= link_to t('admin.products_page.actions.delete'), admin_product_path(product), method: :delete, class: "vertical-ellipsis-menu-content-item"
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ en:
actions:
edit: Edit
clone: Clone
delete: Delete
adjustments:
skipped_changing_canceled_order: "You can't change a cancelled order."
# Common properties / models
Expand Down

0 comments on commit 542ad82

Please sign in to comment.