Sha256: 1cebb688bce0a1d01e320715fb32438e8c5e7f9d30a0e0f8fb96bbf017c392d1

Contents?: true

Size: 1.92 KB

Versions: 2

Compression:

Stored size: 1.92 KB

Contents

<%= render :partial => 'spree/admin/shared/product_sub_menu' %>

<%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Add On Mall Price Variants'} %>

<% content_for :page_title do %>
  <%= t('add_on.add_on_mall_price') %>
<% end %>

<% content_for :page_actions do %>
  <li>
    <%= button_link_to t('add_on.back_to_product_add_on_mall_prices_list'), admin_product_add_on_mall_prices_path, :icon => 'icon-arrow-left' %>
  </li>  
<% end %>

<% if @add_on_malls.empty? %>
  <%= t('add_on.mall_is_not_registered_yet') %><br>
  <%= link_to t('add_on.please_create_add_on_malls'), new_admin_add_on_mall_path %>
<% else %>

  <%= form_tag(admin_product_variant_add_on_mall_prices_path(:variant_id => params[:variant_id]), {method: 'post'}) do %>
  <table class='index'>
    <thead>
      <tr>
        <th><%= t("activerecord.attributes.add_on_mall.name") %></th>
        <th><%= t("activerecord.attributes.add_on_mall_price.amount") %></th>
        <th><%= t("activerecord.attributes.add_on_mall_price.currency") %></th>
      </tr>
    </thead>
    <tbody>
      <% @add_on_malls.each_with_index do |add_on_mall,index| %>
      <% @add_on_mall_prices = add_on_mall.add_on_mall_prices.build(:currency => Spree::Config[:currency], :variant_id => params[:variant_id]) %>
      <tr class="<%= cycle('odd', 'even') %>">
      <td class="align-center">
      <%= hidden_field_tag "[add_on_mall_prices]#{index}[variant_id]", params[:variant_id] %>
      <%= hidden_field_tag "[add_on_mall_prices]#{index}[add_on_mall_id]", add_on_mall.id %>
      <%= add_on_mall.name %>
      </td>
      <td>
          <%= text_field_tag "[add_on_mall_prices]#{index}[amount]",@add_on_mall_prices.amount, :autofocus => true %>
      </td>
      <td>
          <%= text_field_tag "[add_on_mall_prices]#{index}[currency]",@add_on_mall_prices.currency %>
      </td>
      </tr>
    <% end %>
    </tbody>
  </table>
  <%= submit_tag "Save" %>
  <% end %>

<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_malls-0.1.1 app/views/spree/admin/add_on_mall_prices/new.html.erb
spree_malls-0.1.0 app/views/spree/admin/add_on_mall_prices/new.html.erb