Sha256: 7d65240bea5015e41b2a0cad4cab63815d3f27f8c632d23b405b56957ea7f5b8

Contents?: true

Size: 1.5 KB

Versions: 16

Compression:

Stored size: 1.5 KB

Contents

<%= title t("product", scope: "activerecord.models.mechanize_store").pluralize %>

<% content_for :right do -%>
  <li class="active">
    <%= link_to t("new_product"), new_product_path %>
  </li>
<% end -%>

<table class="table table-striped">
  <thead>
    <tr>
      <th><%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th>
      <th><%= sort_link @search, :name, t(:name, scope: "activerecord.attributes.product") %></th>
      <th><%= sort_link @search, :price, t(:price, scope: "activerecord.attributes.product") %></th>
      <th><%= sort_link @search, :product_category, t(:product_category, scope: "activerecord.attributes.product") %></th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>

    <% @products.each do |product| %>
      <tr>
        <td><%= product.id %></td>
        <td><%= product.name %></td>
        <td><%= number_to_currency(product.price) %></td>
        <td><%= product.product_category.name unless product.product_category.nil? %></td>
        <td>
          <%= link_to product do %>
            <i class="fa fa-file"></i>
          <% end -%>
        </td>
        <td>
          <%= link_to edit_product_path(product) do %>
            <i class="fa fa-edit"></i>
          <% end -%>
        </td>
        <td>
          <%= link_to product, method: :delete, data: { confirm: t(:are_you_sure) } do %>
            <i class="fa fa-trash"></i>
          <% end -%>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= will_paginate @products %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mechanize_store-0.0.19 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.18 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.17 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.16 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.15 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.14 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.13 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.12 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.11 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.10 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.8 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.7 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.6 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.5 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.4 app/views/mechanize_store/products/index.html.erb
mechanize_store-0.0.3 app/views/mechanize_store/products/index.html.erb