app/views/spree/admin/properties/index.html.erb in spree_backend-2.4.10 vs app/views/spree/admin/properties/index.html.erb in spree_backend-3.0.0.rc1

- old
+ new

@@ -1,78 +1,68 @@ <% content_for :page_title do %> - <%= Spree.t(:properties) %> + <%= Spree::Property.model_name.human(count: :many) %> <% end %> <% content_for :page_actions do %> - <li id="new_property_link"> - <%= button_link_to Spree.t(:new_property), new_admin_property_url, { :remote => true, :icon => 'plus', 'data-update' => 'new_property', :id => 'new_property_link' } %> - </li> + <%= button_link_to Spree.t(:new_property), new_object_url, { :class => "btn-success", :icon => 'add', 'data-update' => 'new_property', :id => 'new_property_link' } %> <% end %> -<%= render 'spree/admin/shared/product_sub_menu' %> - -<% content_for :table_filter_title do %> - <%= Spree.t(:search) %> -<% end %> - <% content_for :table_filter do %> <div data-hook="admin_property_sidebar"> - <%= search_form_for [:admin, @search] do |f| %> - <%- locals = {:f => f} %> + <%- locals = {:f => f} %> - <div data-hook="admin_property_index_search"> - <div class="alpha eight columns"> - <div class="field"> - <%= f.label :name_cont, Spree.t(:name) %> - <%= f.text_field :name_cont, :size => 15 %> - </div> + <div class="row"> + <div class="col col-md-6"> + <div data-hook="admin_property_index_search" class="form-group"> + <%= f.label :name_cont, Spree.t(:name) %> + <%= f.text_field :name_cont, :class => "form-control js-quick-search-target" %> </div> </div> - <div class="clear"></div> - - <div class="form-buttons actions filter-actions" data-hook="admin_pproperties_index_search_buttons"> - <%= button Spree.t(:search), 'search' %> + <div class="col-md-6"> + <div class="form-group"> + <%= f.label :presentation_cont, Spree.t(:presentation) %> + <%= f.text_field :presentation_cont, :class => "form-control" %> + </div> </div> + </div> + + <div class="form-actions" data-hook="admin_pproperties_index_search_buttons"> + <%= button Spree.t(:search), 'search' %> + </div> + <% end %> </div> <% end %> -<div id="new_property"></div> - <% if @properties.any? %> -<table class="index" id='listing_properties' data-hook> - <colgroup> - <col style="width: 40%"> - <col style="width: 45%"> - <col style="width: 15%"> - </colgroup> - <thead> - <tr data-hook="listing_properties_header"> - <th><%= Spree.t(:name) %></th> - <th><%= Spree.t(:presentation) %></th> - <th class="actions"></th> - </tr> - </thead> - <tbody> - <% @properties.each do |property| %> - <tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row" class="<%= cycle('odd', 'even')%>"> - <td style="padding-left:1em"><%= property.name %></td> - <td style="padding-left:1em"><%= property.presentation %></td> - <td class="actions"> - <%= link_to_edit(property, :no_text => true) %> - <%= link_to_delete(property, :no_text => true) %> - </td> + <table class="table" id='listing_properties' data-hook> + <thead> + <tr data-hook="listing_properties_header"> + <th><%= Spree.t(:name) %></th> + <th><%= Spree.t(:presentation) %></th> + <th class="actions"></th> </tr> - <% end %> - </tbody> -</table> + </thead> + <tbody> + <% @properties.each do |property| %> + <tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row"> + <td><%= property.name %></td> + <td><%= property.presentation %></td> + <td class="actions actions-2 text-right"> + <%= link_to_edit(property, :no_text => true) %> + <%= link_to_delete(property, :no_text => true) %> + </td> + </tr> + <% end %> + </tbody> + </table> <% else %> - <div class="alpha twelve columns no-objects-found"> - <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/property')) %>, - <%= link_to Spree.t(:add_one), spree.new_admin_property_path %>! + <div class="alert alert-info no-objects-found"> + <%= Spree.t(:no_resource_found, resource: Spree::Property.model_name.human(count: :many)) %>, + <%= link_to Spree.t(:add_one), new_object_url %>! </div> <% end %> <%= paginate @collection %>