Sha256: d4e2f5ff820ade105f117193fc404d65015b7b7e283ef7839b83c25388a2b328

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

<%= render 'spree/admin/shared/areas_tabs' %>

<% content_for :page_title do %>
  <%= Spree::State.model_name.human(count: :other) %>
<% end %>

<% content_for :page_actions do %>
  <% if can?(:create, Spree::State) %>
    <li>
      <%= button_link_to Spree.t(:new_state), new_admin_country_state_url(@country), { :icon => 'plus', :id => 'new_state_link' } %>
    </li>
  <% end %>
<% end %>

<div data-hook="country" class="field row">
  <%= label_tag :country, Spree::Country.model_name.human %>
  <select id="country" class='observe_field select2 fullwidth' data-base-url="<%=admin_states_path(:format => :js) %>?country_id=" data-update="#state-list">
  <%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
  </select>
</div>

<div id="new_state" data-hook>
  <%= form_for [:admin, @country, Spree::State.new] do |f| %>
    <fieldset>
      <legend><%= Spree.t(:new_state) %></legend>
      <%= render :partial => 'form', :locals => { :f => f } %>
      <%= render :partial => 'spree/admin/shared/new_resource_links' %>
    </fieldset>
  <% end %>
</div>

<div id="state-list" data-hook>
  <%= render :partial => 'state_list'%>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
solidus_backend-1.3.2 app/views/spree/admin/states/index.html.erb
solidus_backend-1.3.1 app/views/spree/admin/states/index.html.erb
solidus_backend-1.3.0 app/views/spree/admin/states/index.html.erb
solidus_backend-1.3.0.rc2 app/views/spree/admin/states/index.html.erb
solidus_backend-1.3.0.rc1 app/views/spree/admin/states/index.html.erb
solidus_backend-1.3.0.beta1 app/views/spree/admin/states/index.html.erb