Sha256: 4a97ba00da67b6a2b48c1d4247a0fd72251f8bb095a4894af4ac93a48396c55d

Contents?: true

Size: 1.24 KB

Versions: 6

Compression:

Stored size: 1.24 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 custom-select 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

6 entries across 6 versions & 1 rubygems

Version Path
solidus_backend-2.3.1 app/views/spree/admin/states/index.html.erb
solidus_backend-2.3.0 app/views/spree/admin/states/index.html.erb
solidus_backend-2.3.0.rc3 app/views/spree/admin/states/index.html.erb
solidus_backend-2.3.0.rc2 app/views/spree/admin/states/index.html.erb
solidus_backend-2.3.0.rc1 app/views/spree/admin/states/index.html.erb
solidus_backend-2.3.0.beta1 app/views/spree/admin/states/index.html.erb