Sha256: 4daeae562968d5bb450e1601b08a58823506d95a21e60fb540ee8045dedd4a47

Contents?: true

Size: 1.87 KB

Versions: 22

Compression:

Stored size: 1.87 KB

Contents

<% content_for :page_title do %>
  <%= link_to Spree.t(:products), admin_products_path %> /
  <%= @product.name %>
<% end %>

<% content_for :sidebar do %>
  <ul class="nav flex-column nav-pills" data-hook="admin_product_tabs">
    <%= content_tag :li do %>
      <%= link_to_with_icon 'edit.svg',
        Spree.t(:details),
        edit_admin_product_url(@product),
        class: "nav-link #{'active' if current == :details}" %>

    <% end if can?(:admin, Spree::Product) %>

    <%= content_tag :li do %>
      <%= link_to_with_icon 'images.svg',
        Spree.t(:images),
        spree.admin_product_images_url(@product),
        class: "nav-link #{'active' if current == :images}" %>

    <% end if can?(:admin, Spree::Image) && !@product.deleted? %>

    <%= content_tag :li do %>
      <%= link_to_with_icon 'adjust.svg',
        Spree.t(:variants),
        spree.admin_product_variants_url(@product),
        class: "nav-link #{'active' if current == :variants}" %>

    <% end if can?(:admin, Spree::Variant) && !@product.deleted? %>

    <%= content_tag :li do %>
      <%= link_to_with_icon 'list.svg',
        Spree.t(:properties),
        spree.admin_product_product_properties_url(@product),
        class: "nav-link #{'active' if current == :properties}" %>

    <% end if can?(:admin, Spree::ProductProperty) && !@product.deleted? %>

    <%= content_tag :li do %>
      <%= link_to_with_icon 'items.svg',
        Spree.t(:stock),
        stock_admin_product_url(@product),
        class: "nav-link #{'active' if current == :stock}" %>

    <% end if can?(:admin, Spree::StockItem) && !@product.deleted? %>

    <%= content_tag :li do %>
      <%= link_to_with_icon 'money.svg',
        Spree.t(:prices),
        admin_product_prices_path(@product),
        class: "nav-link #{'active' if current == :prices}" %>

    <% end if can?(:admin, Spree::Price) && !@product.deleted? %>
  </ul>
<% end %>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
spree_backend-4.2.7 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.3 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.6 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.2 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.1 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.0 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.0.rc3 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.0.rc2 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.3.0.rc1 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.5 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.4 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.3.1 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.3 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.2 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.1 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.0 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.0.rc5 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.0.rc4 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.0.rc3 app/views/spree/admin/shared/_product_tabs.html.erb
spree_backend-4.2.0.rc2 app/views/spree/admin/shared/_product_tabs.html.erb