tienda 1.1.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tienda/application.coffee +114 -84
  3. data/app/assets/javascripts/tienda/custom-scripts.js +182 -0
  4. data/app/assets/javascripts/tienda/custom.js +200 -0
  5. data/app/assets/javascripts/tienda/jquery.metisMenu.js +45 -0
  6. data/app/assets/javascripts/tienda/morris.js +1913 -0
  7. data/app/assets/javascripts/tienda/raphael-2.1.0.min.js +10 -0
  8. data/app/assets/stylesheets/tienda/application.scss +2 -577
  9. data/app/assets/stylesheets/tienda/custom-styles.scss +518 -0
  10. data/app/assets/stylesheets/tienda/morris-0.4.3.min.css +2 -0
  11. data/app/controllers/tienda/dashboard_controller.rb +11 -1
  12. data/app/controllers/tienda/products_controller.rb +7 -3
  13. data/app/controllers/tienda/sessions_controller.rb +1 -1
  14. data/app/controllers/tienda/stock_level_adjustments_controller.rb +1 -5
  15. data/app/helpers/tienda/application_helper.rb +10 -4
  16. data/app/models/tienda/country.rb +3 -5
  17. data/app/models/tienda/delivery_service.rb +5 -7
  18. data/app/models/tienda/order/actions.rb +3 -3
  19. data/app/models/tienda/order/delivery.rb +1 -1
  20. data/app/models/tienda/order.rb +8 -8
  21. data/app/models/tienda/order_item.rb +11 -11
  22. data/app/models/tienda/product.rb +38 -54
  23. data/app/models/tienda/stock_level_adjustment.rb +9 -7
  24. data/app/models/tienda/tax_rate.rb +5 -7
  25. data/app/models/tienda/user.rb +4 -4
  26. data/app/validators/permalink_validator.rb +1 -1
  27. data/app/views/layouts/tienda/application.html.haml +29 -22
  28. data/app/views/layouts/tienda/sub.html.haml +44 -6
  29. data/app/views/tienda/application/_navbar.html.haml +164 -0
  30. data/app/views/tienda/application/_sidebar.html.haml +6 -0
  31. data/app/views/tienda/countries/_form.html.haml +40 -34
  32. data/app/views/tienda/countries/edit.html.haml +12 -3
  33. data/app/views/tienda/countries/index.html.haml +31 -21
  34. data/app/views/tienda/countries/new.html.haml +11 -3
  35. data/app/views/tienda/dashboard/home.html.haml +156 -0
  36. data/app/views/tienda/delivery_service_prices/_form.html.haml +53 -39
  37. data/app/views/tienda/delivery_service_prices/edit.html.haml +12 -3
  38. data/app/views/tienda/delivery_service_prices/index.html.haml +28 -19
  39. data/app/views/tienda/delivery_service_prices/new.html.haml +12 -3
  40. data/app/views/tienda/delivery_services/_form.html.haml +48 -35
  41. data/app/views/tienda/delivery_services/edit.html.haml +11 -5
  42. data/app/views/tienda/delivery_services/index.html.haml +34 -24
  43. data/app/views/tienda/delivery_services/new.html.haml +12 -3
  44. data/app/views/tienda/orders/_form.html.haml +78 -53
  45. data/app/views/tienda/orders/_order_details.html.haml +57 -54
  46. data/app/views/tienda/orders/_order_items.html.haml +5 -3
  47. data/app/views/tienda/orders/_payments_form.html.haml +18 -14
  48. data/app/views/tienda/orders/_payments_table.html.haml +6 -5
  49. data/app/views/tienda/orders/_search_form.html.haml +40 -24
  50. data/app/views/tienda/orders/_status_bar.html.haml +36 -32
  51. data/app/views/tienda/orders/index.html.haml +41 -34
  52. data/app/views/tienda/orders/new.html.haml +22 -11
  53. data/app/views/tienda/orders/show.html.haml +24 -18
  54. data/app/views/tienda/product_categories/_form.html.haml +34 -22
  55. data/app/views/tienda/product_categories/edit.html.haml +12 -4
  56. data/app/views/tienda/product_categories/index.html.haml +26 -16
  57. data/app/views/tienda/product_categories/new.html.haml +11 -3
  58. data/app/views/tienda/products/_form.html.haml +163 -126
  59. data/app/views/tienda/products/_table.html.haml +49 -40
  60. data/app/views/tienda/products/edit.html.haml +14 -6
  61. data/app/views/tienda/products/index.html.haml +35 -7
  62. data/app/views/tienda/sessions/new.html.haml +8 -6
  63. data/app/views/tienda/sessions/reset.html.haml +5 -5
  64. data/app/views/tienda/settings/edit.html.haml +20 -14
  65. data/app/views/tienda/stock_level_adjustments/_table.html.haml +33 -0
  66. data/app/views/tienda/stock_level_adjustments/index.html.haml +20 -39
  67. data/app/views/tienda/tax_rates/form.html.haml +41 -25
  68. data/app/views/tienda/tax_rates/index.html.haml +23 -13
  69. data/app/views/tienda/users/_form.html.haml +36 -24
  70. data/app/views/tienda/users/edit.html.haml +12 -3
  71. data/app/views/tienda/users/index.html.haml +23 -13
  72. data/app/views/tienda/users/new.html.haml +10 -3
  73. data/app/views/tienda/variants/form.html.haml +98 -57
  74. data/app/views/tienda/variants/index.html.haml +47 -29
  75. data/config/initializers/assets.rb +9 -0
  76. data/config/locales/en.yml +3 -2
  77. data/config/routes.rb +1 -1
  78. data/db/migrate/20150517191600_add_stock_counter_cache.rb +5 -0
  79. data/db/migrate/20150517195800_remove_stock_level_item_polymorphism.rb +6 -0
  80. data/db/migrate/20150517212100_update_stock_counter_cache.rb +5 -0
  81. data/db/migrate/20150603235417_add_document_to_orders.rb +5 -0
  82. data/lib/tienda/default_navigation.rb +9 -8
  83. data/lib/tienda/navigation_manager.rb +2 -5
  84. data/lib/tienda/version.rb +1 -1
  85. data/lib/tienda.rb +2 -6
  86. metadata +54 -65
@@ -1,8 +1,16 @@
1
1
  - @page_title = t('tienda.products.products')
2
- = content_for :header do
3
- %p.buttons
4
- = link_to t('tienda.products.variants') , [@product, :variants], :class => 'button'
5
- = link_to t('tienda.products.stock_levels') , stock_level_adjustments_path(:item_id => @product.id, :item_type => @product.class), :class => 'button', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
6
- = link_to t('tienda.products.back_to_products') , :products, :class => 'button'
7
- %h2.products= t('tienda.products.products')
2
+
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.products.products')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ .pull-right
12
+ = link_to t('tienda.products.variants') , [@product, :variants], class: 'btn btn-default'
13
+ = link_to t('tienda.products.stock_levels') , stock_level_adjustments_path(item_id: @product.id), class: 'btn btn-default', rel: 'dialog', data: {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
14
+ = link_to t('tienda.products.back_to_products') , :products, class: 'btn btn-default'
15
+ %br
8
16
  = render 'form'
@@ -1,9 +1,37 @@
1
1
  - @page_title = t('tienda.products.products')
2
2
 
3
- = content_for :header do
4
- %p.buttons
5
- = link_to t('tienda.products.new_product'), :new_product, :class => 'button green'
6
- = link_to t('tienda.products.import_products'), :import_products, :class => 'button gray'
7
- %h2.products= t('tienda.products.products')
8
-
9
- = render 'table', :products => @products
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.products.products')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ .pull-left
12
+ .btn-group
13
+ %button.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown"}
14
+ = "Filter#{': ' + params[:filter].humanize unless params[:filter].blank?}"
15
+ %span.caret
16
+ %ul.dropdown-menu
17
+ %li
18
+ %a{href: products_path(filter: :active)} Active
19
+ %li
20
+ %a{href: products_path(filter: :inactive)} Inactive
21
+ %li.divider
22
+ %li
23
+ %a{href: products_path(filter: :in_stock)} In stock
24
+ %li
25
+ %a{href: products_path(filter: :no_stock)} Not in stock
26
+ %li.divider
27
+ %li
28
+ %a{href: products_path} All products
29
+ .pull-right
30
+ = link_to t('tienda.products.new_product'), :new_product, class: 'btn btn-primary'
31
+ = link_to t('tienda.products.import_products'), :import_products, class: 'btn btn-default'
32
+ %br
33
+ .panel.panel-default
34
+ .panel-heading
35
+ Listing products
36
+ .panel-body
37
+ = render 'table', products: @products
@@ -1,12 +1,14 @@
1
1
  - @page_title = t('tienda.sessions.admin_login')
2
+
2
3
  = display_flash
4
+
3
5
  .loginArea
4
- = form_tag :login, :class => 'login' do
5
- %p.field
6
- = text_field_tag 'email_address', params[:email_address], :class => 'focus', :placeholder => t('tienda.sessions.email')
7
- %p.field
8
- = password_field_tag 'password', params[:password], :class => '', :placeholder => t('tienda.sessions.password')
6
+ = form_tag :login, class: 'login' do
7
+ .form-group
8
+ = text_field_tag 'email_address', params[:email_address], class: 'form-control focus', placeholder: t('tienda.sessions.email')
9
+ .form-group
10
+ = password_field_tag 'password', params[:password], class: 'form-control ', placeholder: t('tienda.sessions.password')
9
11
  %p.submit
10
- = submit_tag t('tienda.sessions.login'), :class => 'button green'
12
+ = submit_tag t('tienda.sessions.login'), class: 'btn btn-primary'
11
13
  %p.reset
12
14
  = link_to t('tienda.sessions.reset_password?'), login_reset_path
@@ -1,12 +1,12 @@
1
1
  - @page_title = t('tienda.sessions.reset_password')
2
2
 
3
3
  = display_flash
4
+
4
5
  .loginArea
5
- %h2= t('tienda.sessions.reset_password')
6
6
  = form_tag :login_reset, :class => 'login' do
7
- %p.field
8
- = text_field_tag 'email_address', params[:email_address], :class => 'focus', :placeholder => t('tienda.sessions.email')
7
+ .form-group
8
+ = text_field_tag 'email_address', params[:email_address], class: 'form-control focus', placeholder: t('tienda.sessions.email')
9
9
  %p.submit
10
- = submit_tag t('tienda.sessions.reset') , :class => 'button green'
10
+ = submit_tag t('tienda.sessions.reset'), class: 'btn btn-primary'
11
11
  %p.reset
12
- = link_to t('tienda.sessions.back_to_login') , login_path
12
+ = link_to t('tienda.sessions.back_to_login'), login_path
@@ -1,19 +1,25 @@
1
1
  - @page_title = t("tienda.settings.settings")
2
2
 
3
- = content_for :header do
4
- %h2.settings= t("tienda.settings.settings")
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t("tienda.settings.settings")
7
+ %small Lorem ipsum dolor
8
+ / /. ROW
5
9
 
6
- = form_tag :url => settings_path do |f|
10
+ .panel.panel-default
11
+ .panel-body
12
+ = form_tag({url: settings_path}, {class: 'form-horizontal'}) do |f|
7
13
 
8
- - Tienda.settings_groups.each do |group, fields|
9
- = field_set_tag t("tienda.settings.#{group}") do
10
- - fields.each do |f|
11
- %dl.sided
12
- %dt= settings_label f
13
- %dd
14
- = settings_field f
15
- - if v = t("tienda.settings.help")[f]
16
- %p.help= v
14
+ - Tienda.settings_groups.each do |group, fields|
15
+ = field_set_tag t("tienda.settings.#{group}") do
16
+ - fields.each do |f|
17
+ .form-group
18
+ = settings_label f, 'control-label col-md-3'
19
+ .col-md-9
20
+ = settings_field f, class: 'form-control'
21
+ - if v = t("tienda.settings.help")[f]
22
+ %span.help-block= v
17
23
 
18
- %p.submit.sided
19
- = submit_tag t("tienda.settings.save_settings"), :class => 'button green'
24
+ %p.submit.sided
25
+ = submit_tag t("tienda.settings.save_settings"), class: 'btn btn-primary'
@@ -0,0 +1,33 @@
1
+ .table
2
+ .alert.alert-info
3
+ = t('tienda.stock_level_adjustments.current_stock_level_html', item_stock: @item.stock_count).html_safe
4
+ %span.float-right= page_entries_info @stock_level_adjustments
5
+
6
+ .alert.alert-danger.hidden
7
+ Probando
8
+
9
+ = form_for @new_sla, remote: request.xhr? do |f|
10
+ = hidden_field_tag 'item_id', params[:item_id]
11
+ %table.table.table-hover
12
+ %thead
13
+ %tr
14
+ %th{:width => '25%'}= t('tienda.stock_level_adjustments.date')
15
+ %th{:width => '50%'}= t('tienda.stock_level_adjustments.description')
16
+ %th{:width => '25%'}= t('tienda.stock_level_adjustments.adjustment')
17
+ %tbody
18
+ %tr.form
19
+ %td= Date.today.to_s(:long)
20
+ %td.desc= f.text_field :description, class: 'form-control'
21
+ %td.adjustment
22
+ .form-group.input-group
23
+ = f.text_field :adjustment, class: 'form-control'
24
+ %span.input-group-btn
25
+ = f.submit t('tienda.stock_level_adjustments.add'), class: 'btn btn-success'
26
+
27
+ - for sla in @stock_level_adjustments
28
+ %tr
29
+ %td= l(sla.created_at, format: :long)
30
+ %td= sla.description
31
+ %td= sla.adjustment > 0 ? "+#{sla.adjustment}" : sla.adjustment
32
+
33
+ = paginate @stock_level_adjustments
@@ -1,40 +1,21 @@
1
- - @page_title = t('tienda.stock_level_adjustments.stock_levels_title', item_name: @item.name)
1
+ - @page_title = t('tienda.stock_level_adjustments.stock_levels_for', item_name: @item.name)
2
2
 
3
- = content_for :header do
4
- %p.buttons
5
- - case @item
6
- - when Tienda::Product
7
- - @active_nav = :products
8
- = link_to t('tienda.stock_level_adjustments.edit_product'), [:edit, @item], :class => 'button'
9
- = link_to t('tienda.stock_level_adjustments.back_to_product'), :products, :class => 'button'
10
-
11
- %h2.products= t('tienda.stock_level_adjustments.stock_levels_for', item_name: @item.name)
12
-
13
- .table
14
- %p.info
15
- = t('tienda.stock_level_adjustments.current_stock_level_html', item_stock: @item.stock).html_safe
16
- %span.float-right= page_entries_info @stock_level_adjustments
17
-
18
- = form_for @new_sla do |f|
19
- = hidden_field_tag 'item_type', params[:item_type]
20
- = hidden_field_tag 'item_id', params[:item_id]
21
- %table.data
22
- %thead
23
- %tr
24
- %th{:width => '25%'}= t('tienda.stock_level_adjustments.date')
25
- %th{:width => '50%'}= t('tienda.stock_level_adjustments.description')
26
- %th{:width => '25%'}= t('tienda.stock_level_adjustments.adjustment')
27
- %tbody
28
- %tr.form
29
- %td
30
- %td.desc= f.text_field :description
31
- %td.adjustment
32
- = f.text_field :adjustment
33
- = f.submit t('tienda.stock_level_adjustments.add'), :class => 'button button-mini green'
34
- - for sla in @stock_level_adjustments
35
- %tr
36
- %td= l(sla.created_at, format: :long)
37
- %td= sla.description
38
- %td= sla.adjustment > 0 ? "+#{sla.adjustment}" : sla.adjustment
39
-
40
- = paginate @stock_level_adjustments
3
+ - if request.xhr?
4
+ .modal-header
5
+ %button.close{aria: {hidden: 'true', dismiss: 'modal'}, type: 'button'} ×
6
+ %h4.modal-title= t('tienda.stock_level_adjustments.stock_levels_for', item_name: @item.name)
7
+ .modal-body
8
+ = render 'table'
9
+ .modal-footer
10
+ %button.btn.btn-default{data: {dismiss: 'modal'}, type: 'button'} Close
11
+ - else
12
+ .row
13
+ .col-md-12
14
+ %h1.page-header
15
+ = t('tienda.stock_level_adjustments.stock_levels_for', item_name: @item.name)
16
+ %br
17
+ .panel.panel-default
18
+ .panel-heading
19
+ Stock Level Adjustments
20
+ .panel-body
21
+ = render 'table'
@@ -1,28 +1,44 @@
1
1
  - @page_title = t('tienda.tax_rates.tax_rates')
2
- = content_for :header do
3
- %p.buttons= link_to t('tienda.tax_rates.back_to_tax_rates'), :tax_rates, :class => 'button grey'
4
- %h2.tax_rates= t('tienda.tax_rates.tax_rates')
5
2
 
6
- = form_for @tax_rate do |f|
7
- = f.error_messages
8
- = field_set_tag t('tienda.tax_rates.rate_details') do
9
- .splitContainer
10
- %dl.half
11
- %dt= f.label :name, t('tienda.tax_rates.name')
12
- %dd= f.text_field :name, :class => 'focus text'
13
- %dl.half
14
- %dt= f.label :rate, t('tienda.tax_rates.rate')
15
- %dd= f.text_field :rate, :class => 'text'
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.tax_rates.tax_rates')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.tax_rates.back_to_tax_rates'), :tax_rates, class: 'btn btn-default'
16
13
 
17
- = field_set_tag t('tienda.tax_rates.country_restriction') do
18
- %dl
19
- %dd
20
- = f.select :address_type, Tienda::TaxRate::ADDRESS_TYPES.map { |a| [t('tienda.tax_rates.address_type_option', address: t("tienda.tax_rates.#{a}")).html_safe, a]}, {}, :class => 'chosen-basic'
21
- %dl
22
- %dd
23
- = f.collection_select :country_ids, Tienda::Country.ordered, :id, :name, {}, {:class => 'chosen', :multiple => true, :data => {:placeholder => t('tienda.tax_rates.all_countries') }}
24
- %p.submit
25
- - unless @tax_rate.new_record?
26
- %span.right= link_to t('tienda.delete'), @tax_rate, :class => 'button purple', :method => :delete, :data => {:confirm => t('tienda.tax_rates.delete_confirmation') }
27
- = f.submit t('tienda.submit'), :class => 'button green'
28
- = link_to t('tienda.cancel'), :tax_rates, :class => 'button'
14
+ .panel.panel-default
15
+ .panel-body
16
+ = form_for @tax_rate do |f|
17
+ = f.error_messages
18
+ = field_set_tag t('tienda.tax_rates.rate_details') do
19
+ .row
20
+ .col-md-6
21
+ .form-group
22
+ = f.label :name, t('tienda.tax_rates.name')
23
+ = f.text_field :name, class: 'focus form-control'
24
+ .col-md-6
25
+ .form-group
26
+ = f.label :rate, t('tienda.tax_rates.rate')
27
+ = f.text_field :rate, class: 'form-control'
28
+
29
+ = field_set_tag t('tienda.tax_rates.country_restriction') do
30
+ .row
31
+ .col-md-12
32
+ .form-group
33
+ = f.select :address_type, Tienda::TaxRate::ADDRESS_TYPES.map { |a| [t('tienda.tax_rates.address_type_option', address: t("tienda.tax_rates.#{a}")).html_safe, a]}, {}, class: 'form-control'
34
+ .row
35
+ .col-md-12
36
+ .form-group
37
+ = f.collection_select :country_ids, Tienda::Country.ordered, :id, :name, {}, {class: 'form-control', multiple: true, data: {placeholder: t('tienda.tax_rates.all_countries') }}
38
+ .row
39
+ .col-md-12
40
+ .form-group
41
+ - unless @tax_rate.new_record?
42
+ %span.pull-right= link_to t('tienda.delete'), @tax_rate, class: 'btn btn-danger', method: :delete, data: {confirm: t('tienda.tax_rates.delete_confirmation') }
43
+ = f.submit t('tienda.submit'), class: 'btn btn-primary'
44
+ = link_to t('tienda.cancel'), :tax_rates, class: 'btn btn-default'
@@ -1,17 +1,27 @@
1
1
  - @page_title = t('tienda.tax_rates.tax_rates')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.tax_rates.new_tax_rate'), :new_tax_rate, :class => 'button green'
5
- %h2.tax_rates= t('tienda.tax_rates.tax_rates')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.tax_rates.tax_rates')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.tax_rates.new_tax_rate'), :new_tax_rate, class: 'btn btn-primary'
6
13
 
7
- .table
8
- %table.data
9
- %thead
10
- %tr
11
- %th= t('tienda.tax_rates.name')
12
- %th= t('tienda.tax_rates.rate')
13
- %tbody
14
- - for tax_rate in @tax_rates
14
+ .panel.panel-default
15
+ .panel-heading
16
+ Listing tax rates
17
+ .panel-body
18
+ %table.table.table-hover
19
+ %thead
15
20
  %tr
16
- %td= link_to tax_rate.name, [:edit, tax_rate]
17
- %td= tax_rate.rate
21
+ %th= t('tienda.tax_rates.name')
22
+ %th= t('tienda.tax_rates.rate')
23
+ %tbody
24
+ - for tax_rate in @tax_rates
25
+ %tr
26
+ %td= link_to tax_rate.name, [:edit, tax_rate]
27
+ %td= tax_rate.rate
@@ -1,27 +1,39 @@
1
1
  = form_for @user do |f|
2
2
  = f.error_messages
3
- = field_set_tag t('tienda.users.user_details') do
4
- .splitContainer
5
- %dl.half
6
- %dt= f.label :first_name, t('tienda.users.first_name')
7
- %dd= f.text_field :first_name, :class => 'focus text'
8
- %dl.half
9
- %dt= f.label :last_name, t('tienda.users.last_name')
10
- %dd= f.text_field :last_name, :class => 'text'
11
- = field_set_tag t("tienda.users.login") do
12
- .splitContainer
13
- %dl.third
14
- %dt= f.label :email_address, t('tienda.users.email')
15
- %dd= f.text_field :email_address, :class => 'text'
16
- %dl.third
17
- %dt= f.label :password, t('tienda.users.password')
18
- %dd= f.password_field :password, :class => 'text'
19
- %dl.third
20
- %dt= f.label :password_confirmation, t('tienda.users.password_confirmation')
21
- %dd= f.password_field :password_confirmation, :class => 'text'
3
+ .panel.panel-default
4
+ .panel-heading
5
+ = t('tienda.users.user_details')
6
+ .panel-body
7
+ .row
8
+ .col-md-6
9
+ .form-group
10
+ = f.label :first_name, t('tienda.users.first_name')
11
+ = f.text_field :first_name, class: 'focus form-control'
12
+ .col-md-6
13
+ .form-group
14
+ = f.label :last_name, t('tienda.users.last_name')
15
+ = f.text_field :last_name, class: 'form-control'
16
+ .panel.panel-default
17
+ .panel-heading
18
+ = t("tienda.users.login")
19
+ .panel-body
20
+ .row
21
+ .col-md-4
22
+ .form-group
23
+ = f.label :email_address, t('tienda.users.email')
24
+ = f.text_field :email_address, class: 'form-control'
25
+ .col-md-4
26
+ .form-group
27
+ = f.label :password, t('tienda.users.password')
28
+ = f.password_field :password, class: 'form-control'
29
+ .col-md-4
30
+ .form-group
31
+ = f.label :password_confirmation, t('tienda.users.password_confirmation')
32
+ = f.password_field :password_confirmation, class: 'form-control'
22
33
 
23
- %p.submit
24
- - unless @user.new_record?
25
- %span.right= link_to t('tienda.delete'), @user, :class => 'button purple', :method => :delete, :data => {:confirm => t('tienda.users.delete_confirmation')}
26
- = f.submit t('tienda.submit'), :class => 'button green'
27
- = link_to t('tienda.cancel'), :users, :class => 'button'
34
+ .panel.panel-default
35
+ .panel-body
36
+ - unless @user.new_record?
37
+ %span.pull-right= link_to t('tienda.delete'), @user, class: 'btn btn-danger', method: :delete, data: {confirm: t('tienda.users.delete_confirmation')}
38
+ = f.submit t('tienda.submit'), class: 'btn btn-primary'
39
+ = link_to t('tienda.cancel'), :users, class: 'btn btn-default'
@@ -1,5 +1,14 @@
1
1
  - @page_title = t('tienda.users.users')
2
- = content_for :header do
3
- %p.buttons= link_to t('tienda.users.back_to_users'), :users, :class => 'button'
4
- %h2.users= t('tienda.users.users')
2
+
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.users.users')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.users.back_to_users'), :users, class: 'btn btn-default'
13
+
5
14
  = render 'form'
@@ -1,17 +1,27 @@
1
1
  - @page_title = t('tienda.users.users')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.users.new_user'), :new_user, :class => 'button green'
5
- %h2.users= t('tienda.users.users')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.users.users')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.users.new_user'), :new_user, class: 'btn btn-primary'
6
13
 
7
- .table
8
- %table.data
9
- %thead
10
- %tr
11
- %th= t('tienda.users.name')
12
- %th= t('tienda.users.email')
13
- %tbody
14
- - for user in @users
14
+ .panel.panel-default
15
+ .panel-heading
16
+ Listing users
17
+ .panel-body
18
+ %table.table.table-hover
19
+ %thead
15
20
  %tr
16
- %td= link_to user.full_name, [:edit, user]
17
- %td= user.email_address
21
+ %th= t('tienda.users.name')
22
+ %th= t('tienda.users.email')
23
+ %tbody
24
+ - for user in @users
25
+ %tr
26
+ %td= link_to user.full_name, [:edit, user]
27
+ %td= user.email_address
@@ -1,7 +1,14 @@
1
1
  - @page_title = t('tienda.users.users')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.users.back_to_users'), :users, :class => 'button'
5
- %h2.users= t('tienda.users.users')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.users.users')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.users.back_to_users'), :users, class: 'btn btn-default'
6
13
 
7
14
  = render 'form'