Sha256: 63ac5f55c91c1c8e5f0b97ba567b46334fd197bd9383c9926139240b3f77de9f

Contents?: true

Size: 1.99 KB

Versions: 1

Compression:

Stored size: 1.99 KB

Contents

<% content_for :page_title do %>
  <%= Spree.t(:editing_resource, resource: Spree::OptionType.model_name.human) %> <span class="green">"<%= @option_type.name %>"</span>
<% end %>

<% content_for :page_actions do %>
  <span id="new_add_option_value" data-hook>
    <%= button_link_to Spree.t(:add_option_value), "javascript:;", { :icon => 'add', :'data-target' => "tbody#option_values", :class => 'btn-success spree_add_fields' } %>
  </span>

  <%= back_to_list_button(Spree::OptionType.model_name.human, admin_option_types_path) %>
<% end %>

<%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @option_type } %>

<%= form_for [:admin, @option_type] do |f| %>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h1 class="panel-title">
        <%= Spree.t(:option_values) %>
      </h1>
    </div>
    <div class="panel-body">
      <%= render :partial => 'form', :locals => { :f => f } %>
    </div>
    <table class="table table-condensed table-bordered sortable" data-hook data-sortable-link="<%= update_values_positions_admin_option_types_url %>">
      <thead data-hook="option_header">
        <tr>
          <th colspan="2"><%= Spree.t(:name) %> <span class="required">*</span></th>
          <th><%= Spree.t(:display) %> <span class="required">*</span></th>
          <th class="actions"></th>
        </tr>
      </thead>
      <tbody id="option_values">
        <% if @option_type.option_values.empty? %>
          <tr id="none" data-hook="option_none">
            <td colspan="2"><%= Spree.t(:none) %></td>
            <td class="actions text-center"></td>
          </tr>
        <% else %>
          <%= f.fields_for :option_values do |option_value_form| %>
            <%= render :partial => 'option_value_fields', :locals => { :f => option_value_form } %>
          <% end %>
        <% end %>
      </tbody>
    </table>
    <div class="panel-footer text-center">
      <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
    </div>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_backend-3.1.0.rc1 app/views/spree/admin/option_types/edit.html.erb