diff --git a/app/views/spree/admin/payment_methods/index.html.erb b/app/views/spree/admin/payment_methods/index.html.erb deleted file mode 100644 index ae51e60da5..0000000000 --- a/app/views/spree/admin/payment_methods/index.html.erb +++ /dev/null @@ -1,52 +0,0 @@ -<%= render :partial => 'spree/admin/shared/configuration_menu' %> - -<% content_for :page_title do %> - <%= Spree.t(:payment_methods) %> -<% end %> - -<% content_for :page_actions do %> -
  • - <%= button_link_to Spree.t(:new_payment_method), new_object_url, :icon => 'icon-plus', :id => 'admin_new_payment_methods_link' %> -
  • -<% end %> - -<% if @payment_methods.any? %> - - - - - - - - - - - - - - - - - - - - - <% @payment_methods.each do |method|%> - - - - - - - - - <% end %> - -
    <%= Spree.t(:name) %><%= Spree.t(:provider) %><%= Spree.t(:environment) %><%= Spree.t(:display) %><%= Spree.t(:active) %>
    <%= method.name %><%= method.type %><%= method.environment.to_s.titleize %><%= method.display_on.blank? ? Spree.t(:both) : Spree.t(method.display_on) %><%= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) %> - <%= link_to_edit method, :no_text => true %> - <%= link_to_delete method, :no_text => true %> -
    -<% else %> -
    <%= Spree.t(:no_payment_methods_found) %>
    -<% end %> - diff --git a/app/views/spree/admin/payment_methods/index.html.haml b/app/views/spree/admin/payment_methods/index.html.haml new file mode 100644 index 0000000000..fe1350d690 --- /dev/null +++ b/app/views/spree/admin/payment_methods/index.html.haml @@ -0,0 +1,39 @@ += render partial: 'spree/admin/shared/configuration_menu' + +- content_for :page_title do + = Spree.t(:payment_methods) + +- content_for :page_actions do + %li + = button_link_to Spree.t(:new_payment_method), new_object_url, icon: 'icon-plus', id: 'admin_new_payment_methods_link' + +- if @payment_methods.any? + %table#listing_payment_methods.index + %colgroup + %col{style: "width: 15%"}/ + %col{style: "width: 35%"}/ + %col{style: "width: 15%"}/ + %col{style: "width: 10%"}/ + %col{style: "width: 10%"}/ + %col{style: "width: 15%"}/ + %thead + %tr{"data-hook" => "admin_payment_methods_index_headers"} + %th= Spree.t(:name) + %th= Spree.t(:provider) + %th= Spree.t(:environment) + %th= Spree.t(:display) + %th= Spree.t(:active) + %th.actions{"data-hook" => "admin_payment_methods_index_header_actions"} + %tbody + - @payment_methods.each do |method| + %tr{class: "#{cycle('odd', 'even')}", "data-hook" => "admin_payment_methods_index_rows", id: "#{spree_dom_id method}"} + %td.align-center= method.name + %td= method.type + %td.align-center= method.environment.to_s.titleize + %td.align-center= method.display_on.blank? ? Spree.t(:both) : Spree.t(method.display_on) + %td.align-center= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) + %td.actions{"data-hook" => "admin_payment_methods_index_row_actions"} + = link_to_edit method, no_text: true + = link_to_delete method, no_text: true +- else + .alpha.twelve.columns.no-objects-found= Spree.t(:no_payment_methods_found)