Sha256: 20dbc7a6598800279ef66b04ccd037f373041568193dc066134579b284d1b2d9

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

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

<% admin_breadcrumb(Spree.t(:settings)) %>
<% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
<% admin_breadcrumb(plural_resource_name(Spree::State)) %>


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

<div class="row">
  <div class="col-12">
    <div data-hook="country" class="field">
      <%= 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>
</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

5 entries across 5 versions & 1 rubygems

Version Path
solidus_backend-2.2.2 app/views/spree/admin/states/index.html.erb
solidus_backend-2.2.1 app/views/spree/admin/states/index.html.erb
solidus_backend-2.2.0 app/views/spree/admin/states/index.html.erb
solidus_backend-2.2.0.rc1 app/views/spree/admin/states/index.html.erb
solidus_backend-2.2.0.beta1 app/views/spree/admin/states/index.html.erb