Skip to content

Commit

Permalink
Add an "Add Product" button to the products/index component
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Jul 20, 2023
1 parent c7fa524 commit 83fd9cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
<h1 class="body-title">
<%= Spree::Product.model_name.human.pluralize %>
</h1>

<div class="ml-auto">
<%= render component("ui/button").new(
tag: :a,
text: t('.add_product'),
href: spree.new_admin_product_path,
icon: "plus-line",
classes: "ml-auto"
) %>
</div>
</header>

<%= render component("ui/table").new(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
en:
product_image: 'Image'
add_product: 'Add Product'
status:
available: 'Available'
discontinued: 'Discontinued'
Expand Down

0 comments on commit 83fd9cf

Please sign in to comment.