comable_backend 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/comable/admin/application.coffee +21 -14
  3. data/app/assets/stylesheets/comable/admin/_common.scss +264 -0
  4. data/app/assets/stylesheets/comable/admin/_dashboard.scss +81 -0
  5. data/app/assets/stylesheets/comable/admin/_errors.scss +18 -0
  6. data/app/assets/stylesheets/comable/admin/_mixins.scss +16 -0
  7. data/app/assets/stylesheets/comable/admin/_orders.scss +54 -0
  8. data/app/assets/stylesheets/comable/admin/_overrides.scss +4 -0
  9. data/app/assets/stylesheets/comable/admin/_products.scss +18 -0
  10. data/app/assets/stylesheets/comable/admin/_user_sessions.scss +57 -0
  11. data/app/assets/stylesheets/comable/admin/_variables.scss +44 -0
  12. data/app/assets/stylesheets/comable/admin/application.scss +15 -597
  13. data/app/assets/stylesheets/comable/admin/overrides/bootstrap.scss +83 -0
  14. data/app/assets/stylesheets/comable/admin/overrides/jstree.scss +71 -0
  15. data/app/assets/stylesheets/comable/admin/overrides/pace.scss +4 -0
  16. data/app/assets/stylesheets/comable/admin/overrides/tagit.scss +22 -0
  17. data/app/controllers/comable/admin/application_controller.rb +3 -0
  18. data/app/controllers/comable/admin/categories_controller.rb +3 -0
  19. data/app/controllers/comable/admin/customers_controller.rb +6 -0
  20. data/app/controllers/comable/admin/orders_controller.rb +3 -0
  21. data/app/controllers/comable/admin/payment_methods_controller.rb +7 -1
  22. data/app/controllers/comable/admin/products_controller.rb +10 -4
  23. data/app/controllers/comable/admin/shipment_methods_controller.rb +7 -1
  24. data/app/controllers/comable/admin/stocks_controller.rb +16 -20
  25. data/app/controllers/comable/admin/store_controller.rb +3 -0
  26. data/app/controllers/comable/admin/user_sessions_controller.rb +7 -0
  27. data/app/helpers/comable/admin/application_helper.rb +16 -0
  28. data/app/views/comable/admin/categories/index.slim +83 -86
  29. data/app/views/comable/admin/customers/edit.slim +64 -79
  30. data/app/views/comable/admin/customers/index.slim +60 -59
  31. data/app/views/comable/admin/customers/show.slim +83 -88
  32. data/app/views/comable/admin/dashboard/show.slim +59 -57
  33. data/app/views/comable/admin/orders/_google_map.slim +22 -0
  34. data/app/views/comable/admin/orders/index.slim +67 -70
  35. data/app/views/comable/admin/orders/show.slim +98 -68
  36. data/app/views/comable/admin/payment_methods/_form.slim +26 -41
  37. data/app/views/comable/admin/payment_methods/edit.slim +25 -26
  38. data/app/views/comable/admin/payment_methods/index.slim +38 -50
  39. data/app/views/comable/admin/payment_methods/new.slim +14 -15
  40. data/app/views/comable/admin/products/_form.slim +124 -101
  41. data/app/views/comable/admin/products/_image_fields.slim +15 -0
  42. data/app/views/comable/admin/products/edit.slim +39 -38
  43. data/app/views/comable/admin/products/index.slim +64 -70
  44. data/app/views/comable/admin/products/new.slim +14 -15
  45. data/app/views/comable/admin/shared/_footer.slim +8 -0
  46. data/app/views/comable/admin/shared/_header.slim +31 -0
  47. data/app/views/comable/admin/shared/_notifier.slim +5 -0
  48. data/app/views/comable/admin/shared/_sidebar.slim +52 -0
  49. data/app/views/comable/admin/shipment_methods/_form.slim +23 -43
  50. data/app/views/comable/admin/shipment_methods/edit.slim +25 -26
  51. data/app/views/comable/admin/shipment_methods/index.slim +35 -47
  52. data/app/views/comable/admin/shipment_methods/new.slim +14 -15
  53. data/app/views/comable/admin/stocks/_form.slim +27 -33
  54. data/app/views/comable/admin/stocks/edit.slim +35 -44
  55. data/app/views/comable/admin/stocks/index.slim +57 -76
  56. data/app/views/comable/admin/stocks/new.slim +16 -15
  57. data/app/views/comable/admin/store/_form.slim +26 -42
  58. data/app/views/comable/admin/store/edit.slim +10 -11
  59. data/app/views/comable/admin/user_sessions/new.slim +25 -0
  60. data/app/views/layouts/comable/admin/application.slim +14 -96
  61. data/config/routes.rb +4 -1
  62. data/lib/comable/backend/engine.rb +2 -1
  63. metadata +93 -53
  64. data/app/assets/stylesheets/comable/admin/products.css +0 -4
@@ -1,49 +1,29 @@
1
- = form_for [comable, :admin, @shipment_method] do |f|
2
- / TODO: Standardize
3
- - if @shipment_method.errors.any?
4
- #error_explanation
5
- h2
6
- = pluralize(@shipment_method.errors.count, 'error')
7
- | prohibited this shipment_method from being saved:
8
-
9
- ul
10
- - @shipment_method.errors.full_messages.each do |message|
11
- li = message
1
+ = error_messages_for @shipment_method
12
2
 
13
- .panel.panel-inverse
14
- .panel-heading
15
- .panel-title
16
- = Comable.t('admin.nav.shipment_methods.edit')
3
+ = form_for [comable, :admin, @shipment_method] do |f|
4
+ .hidden
5
+ = f.submit
17
6
 
18
- .panel-body
19
- .form-horizontal
20
- fieldset
21
- .form-group
22
- .col-sm-3.control-label
23
- = f.label :name
24
- .col-sm-6
25
- = f.text_field :name
7
+ fieldset
8
+ .col-sm-3
9
+ legend
10
+ = Comable.t('admin.general')
26
11
 
27
- .form-group
28
- .col-sm-3.control-label
29
- = f.label :fee
30
- .col-sm-6
31
- = f.text_field :fee
12
+ .col-sm-9
13
+ .form-group
14
+ = f.label :name
15
+ = f.text_field :name
32
16
 
33
- .form-group
34
- .col-sm-3.control-label
35
- = f.label :traking_url
36
- .col-sm-6
37
- = f.text_field :traking_url, placeholder: 'http://'
17
+ .form-group
18
+ = f.label :fee
19
+ = f.text_field :fee
38
20
 
39
- .form-group
40
- .col-sm-offset-3.col-sm-6
41
- .checkbox
42
- = f.label :activate_flag do
43
- = f.check_box :activate_flag
44
- = f.object.class.human_attribute_name(:activate_flag)
21
+ .form-group
22
+ = f.label :traking_url
23
+ = f.text_field :traking_url, placeholder: 'http://'
45
24
 
46
- .panel-footer
47
- = link_to Comable.t('admin.actions.cancel'), comable.admin_shipment_methods_path, class: 'btn btn-default'
48
- .pull-right
49
- = f.submit
25
+ .form-group
26
+ .checkbox
27
+ = f.label :activate_flag do
28
+ = f.check_box :activate_flag
29
+ = f.object.class.human_attribute_name(:activate_flag)
@@ -1,28 +1,27 @@
1
- #comable-shipment-method
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li
6
- = link_to Comable.t('admin.nav.shipment_method'), comable.admin_shipment_methods_path
7
- li.active
8
- = @shipment_method.name
1
+ .comable-page
2
+ .comable-main-fixed-top
3
+ .comable-page-heading
4
+ ul.pull-right.list-inline
5
+ li
6
+ = link_to_save
9
7
 
10
- h1.page-header
11
- = @shipment_method.name
8
+ h1.page-header
9
+ ol.breadcrumb
10
+ li>
11
+ = link_to Comable.t('admin.nav.shipment_method'), comable.admin_shipment_methods_path
12
+ li.active
13
+ = @shipment_method.name
12
14
 
13
- .row
14
- section.col-sm-8
15
- = render 'form'
16
- hr
17
- .panel.panel-danger
18
- .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger" aria-expanded="false" aria-controls="comable-danger"
19
- strong
20
- span.fa.fa-angle-down>
21
- = Comable.t('admin.actions.destroy')
22
- #comable-danger.collapse
23
- .panel-body
24
- p
25
- = Comable.t('admin.confirmation_to_remove_product')
26
- = link_to Comable.t('admin.actions.destroy'), comable.admin_shipment_method_path(@shipment_method), method: :delete, class: 'btn btn-danger'
27
-
28
- nav.col-sm-4
15
+ .comable-page-body
16
+ = render 'form'
17
+ hr
18
+ .panel.panel-danger
19
+ .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
20
+ strong
21
+ span.fa.fa-angle-down>
22
+ = Comable.t('admin.actions.destroy')
23
+ #comable-danger.collapse
24
+ .panel-body
25
+ p
26
+ = Comable.t('admin.confirmation_to_remove_product')
27
+ = link_to Comable.t('admin.actions.destroy'), comable.admin_shipment_method_path(@shipment_method), method: :delete, class: 'btn btn-danger'
@@ -1,50 +1,38 @@
1
- #comable-shipment-method
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li.active
6
- = Comable.t('admin.nav.shipment_method')
7
-
8
- h1.page-header
9
- = Comable.t('admin.nav.shipment_method')
10
- small<
11
- = @shipment_methods.total_count
12
- = Comable.t('admin.results')
1
+ .comable-page
2
+ .comable-page-heading
3
+ ul.pull-right.list-inline
4
+ li
5
+ = link_to Comable.t('admin.actions.new'), comable.new_admin_shipment_method_path, class: 'btn btn-default'
13
6
 
14
- .row
15
- section.col-sm-8
16
- - if @shipment_methods.empty?
17
- = Comable.t('admin.not_found')
18
- - else
19
- .panel.panel-inverse
20
- .panel-heading
21
- .panel-title
22
- = Comable.t('admin.index')
23
- table.table.table-striped
24
- thead
25
- th
26
- = @shipment_methods.klass.human_attribute_name(:name)
27
- th
28
- = @shipment_methods.klass.human_attribute_name(:fee)
29
- th
30
- = @shipment_methods.klass.human_attribute_name(:traking_url)
31
- tbody
32
- - @shipment_methods.each do |shipment_method|
33
- tr
34
- td
35
- = link_to shipment_method.name, comable.admin_shipment_method_path(shipment_method)
36
- - unless shipment_method.activate_flag
37
- span.fa.fa-eye-slash.text-muted<
38
- td
39
- = number_to_currency shipment_method.fee
40
- td
41
- = truncate shipment_method.traking_url
7
+ h1.page-header
8
+ = Comable.t('admin.nav.shipment_method')
9
+ small<
10
+ = @shipment_methods.total_count
11
+ = Comable.t('admin.results')
42
12
 
43
- .text-center
44
- = paginate @shipment_methods, theme: :comable_backend
13
+ .comable-page-body
14
+ - if @shipment_methods.empty?
15
+ = Comable.t('admin.not_found')
16
+ - else
17
+ table.table.table-striped
18
+ thead
19
+ th
20
+ = @shipment_methods.klass.human_attribute_name(:name)
21
+ th
22
+ = @shipment_methods.klass.human_attribute_name(:fee)
23
+ th
24
+ = @shipment_methods.klass.human_attribute_name(:traking_url)
25
+ tbody
26
+ - @shipment_methods.each do |shipment_method|
27
+ tr
28
+ td
29
+ = link_to shipment_method.name, comable.admin_shipment_method_path(shipment_method)
30
+ - unless shipment_method.activate_flag
31
+ span.fa.fa-eye-slash.text-muted<
32
+ td
33
+ = number_to_currency shipment_method.fee
34
+ td
35
+ = truncate shipment_method.traking_url
45
36
 
46
- nav.col-sm-4
47
- #comable-affix
48
- .panel
49
- .list-group
50
- = link_to Comable.t('admin.actions.new'), comable.new_admin_shipment_method_path, class: 'list-group-item'
37
+ .text-center
38
+ = paginate @shipment_methods, theme: :comable_backend
@@ -1,17 +1,16 @@
1
- #comable-shipment-method
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li
6
- = link_to Comable.t('admin.nav.shipment_method'), comable.admin_shipment_methods_path
7
- li.active
8
- = Comable.t('admin.actions.new')
1
+ .comable-page
2
+ .comable-main-fixed-top
3
+ .comable-page-heading
4
+ ul.pull-right.list-inline
5
+ li
6
+ = link_to_save
9
7
 
10
- h1.page-header
11
- = Comable.t('admin.actions.new')
8
+ h1.page-header
9
+ ol.breadcrumb
10
+ li>
11
+ = link_to Comable.t('admin.nav.shipment_method'), comable.admin_shipment_methods_path
12
+ li.active
13
+ = Comable.t('admin.actions.new')
12
14
 
13
- .row
14
- section.col-sm-8
15
- = render 'form'
16
-
17
- nav.col-sm-4
15
+ .comable-page-body
16
+ = render 'form'
@@ -1,40 +1,34 @@
1
+ = error_messages_for @stock
2
+
1
3
  - url = comable.admin_product_stocks_path(@product) if @stock.new_record?
2
- - url ||= comable.admin_product_stock_path(@product, @stock)
4
+ - url ||= comable.admin_stock_path(@stock)
5
+
3
6
  = form_for @stock, url: url do |f|
4
- .panel.panel-inverse
5
- .panel-heading
6
- .panel-title
7
+ .hidden
8
+ = f.submit
9
+
10
+ fieldset
11
+ .col-sm-3
12
+ legend
7
13
  = Comable.t('admin.general')
8
- .panel-body
9
- .form-horizontal
10
- .form-group
11
- .col-sm-3.control-label
12
- = f.label :code
13
- .col-sm-6
14
- = f.text_field :code
14
+ .help-block
15
15
 
16
- .form-group
17
- .col-sm-3.control-label
18
- = f.label :quantity
19
- .col-sm-6
20
- = f.text_field :quantity
16
+ .col-sm-9
17
+ .form-group
18
+ = f.label :code
19
+ = f.text_field :code
21
20
 
22
- - if @product.sku?
23
- - if @product.sku_h?
24
- .form-group
25
- .col-sm-3.control-label
26
- = f.label :sku_h_choice_name, @product.sku_h_item_name
27
- .col-sm-6
28
- = f.text_field :sku_h_choice_name
21
+ .form-group
22
+ = f.label :quantity
23
+ = f.text_field :quantity
29
24
 
30
- - if @product.sku_v?
31
- .form-group
32
- .col-sm-3.control-label
33
- = f.label :sku_v_choice_name, @product.sku_v_item_name
34
- .col-sm-6
35
- = f.text_field :sku_v_choice_name
25
+ - if @stock.sku?
26
+ - if @stock.sku_h?
27
+ .form-group
28
+ = f.label :sku_h_choice_name, @stock.sku_h_item_name
29
+ = f.text_field :sku_h_choice_name
36
30
 
37
- .panel-footer
38
- = link_to Comable.t('admin.actions.cancel'), comable.admin_product_stocks_path(@product), class: 'btn btn-default'
39
- .pull-right
40
- = f.submit
31
+ - if @stock.sku_v?
32
+ .form-group
33
+ = f.label :sku_v_choice_name, @stock.sku_v_item_name
34
+ = f.text_field :sku_v_choice_name
@@ -1,46 +1,37 @@
1
- #comable-product
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li
6
- = link_to Comable.t('admin.nav.product'), comable.admin_products_path
7
- li
8
- = link_to @product.name, comable.admin_product_path(@product)
9
- li
10
- = link_to Comable.t('admin.nav.products.stock'), comable.admin_product_stocks_path(@product)
11
- li.active
12
- = @stock.name_with_sku
1
+ .comable-page
2
+ .comable-main-fixed-top
3
+ .comable-page-heading
4
+ ul.pull-right.list-inline
5
+ li.dropdown
6
+ = link_to '#', class: 'btn btn-default', 'data-toggle' => 'dropdown' do
7
+ i.fa.fa-bars
8
+ ul.dropdown-menu.dropdown-menu-right
9
+ li
10
+ = link_to Comable.t('admin.nav.products.detail'), comable.admin_product_path(@stock.product)
11
+ - if @stock.sku?
12
+ li.divider
13
+ li
14
+ = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path(@stock.product)
15
+ li
16
+ = link_to_save
13
17
 
14
- h1.page-header
15
- = @stock.name_with_sku
16
- small< = @stock.code
18
+ h1.page-header
19
+ ol.breadcrumb
20
+ li>
21
+ = link_to Comable.t('admin.nav.stock'), comable.admin_stocks_path
22
+ li.active
23
+ = @stock.name_with_sku
17
24
 
18
- .row
19
- section.col-sm-8
20
- = render 'form'
21
- hr
22
- .panel.panel-danger
23
- .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger" aria-expanded="false" aria-controls="comable-danger"
24
- strong
25
- span.fa.fa-angle-down>
26
- = Comable.t('admin.actions.destroy')
27
- #comable-danger.collapse
28
- .panel-body
29
- p
30
- = Comable.t('admin.confirmation_to_remove_stock')
31
- = link_to Comable.t('admin.actions.destroy'), comable.admin_product_stock_path(@product, @stock), method: :delete, class: 'btn btn-danger'
32
-
33
- nav.col-sm-4
34
- #comable-affix data-spy="affix"
35
- .panel
36
- .list-group
37
- = link_to Comable.t('admin.nav.products.detail'), comable.admin_product_path(@product), class: 'list-group-item'
38
- = link_to Comable.t('admin.nav.products.stock'), comable.admin_product_stocks_path(@product), class: 'list-group-item disabled'
39
-
40
- .panel
41
- .list-group
42
- - if @product.sku?
43
- = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path, class: 'list-group-item'
44
- = link_to comable.product_path(@product), class: 'list-group-item' do
45
- span.fa.fa-external-link>
46
- = Comable.t('admin.check_this_product_in_frontend')
25
+ .comable-page-body
26
+ = render 'form'
27
+ hr
28
+ .panel.panel-danger
29
+ .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
30
+ strong
31
+ span.fa.fa-angle-down>
32
+ = Comable.t('admin.actions.destroy')
33
+ #comable-danger.collapse
34
+ .panel-body
35
+ p
36
+ = Comable.t('admin.confirmation_to_remove_stock')
37
+ = link_to Comable.t('admin.actions.destroy'), comable.admin_stock_path(@stock), method: :delete, class: 'btn btn-danger'
@@ -1,81 +1,62 @@
1
- #comable-stock
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li
6
- = link_to Comable.t('admin.nav.product'), comable.admin_products_path
7
- li
8
- = link_to @product.name, comable.admin_product_path(@product)
9
- li.active
10
- = Comable.t('admin.nav.products.stock')
1
+ .comable-page
2
+ .comable-page-heading
3
+ ul.pull-right.list-inline
4
+ li
5
+ .btn-group role="group"
6
+ = link_to_previous_page @stocks, '<', class: 'btn btn-default' do
7
+ .btn.btn-default disabled="disabled"
8
+ | <
9
+ = link_to_next_page @stocks, '>', class: 'btn btn-default' do
10
+ .btn.btn-default disabled="disabled"
11
+ | >
11
12
 
12
- h1.page-header
13
- = Comable.t('admin.nav.products.stock')
14
- small<
15
- = @stocks.total_count
16
- = Comable.t('admin.results')
13
+ h1.page-header
14
+ = Comable.t('admin.nav.stock')
15
+ small<
16
+ = @stocks.total_count
17
+ = Comable.t('admin.results')
17
18
 
18
- .row
19
- section.col-sm-8
20
- .panel.panel-inverse
21
- .panel-heading
22
- .panel-title
23
- = Comable.t('admin.index')
24
- - if @stocks.empty?
25
- .panel-body
26
- = Comable.t('admin.not_found')
27
- - else
28
- table.table.table-striped
29
- thead
30
- th
31
- = sort_link [:comable, @q], :code, product_id: @product.id
32
- th
33
- = sort_link [:comable, @q], :quantity, product_id: @product.id
34
- - if @product.sku?
35
- - if @product.sku_h?
36
- th
37
- = sort_link [:comable, @q], :sku_h_choice_name, @product.sku_h_item_name, product_id: @product.id
38
- - if @product.sku_v?
39
- th
40
- = sort_link [:comable, @q], :sku_v_choice_name, @product.sku_v_item_name, product_id: @product.id
41
- tbody
42
- - @stocks.each do |stock|
43
- tr
44
- td
45
- = link_to stock.code, comable.admin_product_stock_path(@product, stock)
46
- td
47
- strong class="#{(stock.quantity <= 0) ? 'text-danger' : (stock.quantity <= 10) ? 'text-warning' : 'text-success'}"
48
- = number_with_delimiter stock.quantity
49
- - if @product.sku?
50
- - if @product.sku_h?
51
- td
52
- = stock.sku_h_choice_name
53
- - if @product.sku_v?
54
- td
55
- = stock.sku_v_choice_name
19
+ .comable-page-body
20
+ .comable-search
21
+ = search_form_for @q, url: comable.admin_stocks_path do |f|
22
+ .input-group
23
+ span.input-group-btn
24
+ button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown"
25
+ i.fa.fa-search
26
+ span.caret<
27
+ ul.dropdown-menu role="menu"
28
+ li
29
+ = link_to Comable.t('admin.clear_search_conditions'), comable.admin_stocks_path
30
+ = f.text_field :code_cont, class: 'form-control'
31
+ span.input-group-btn
32
+ = f.submit Comable.t('admin.search'), class: 'btn btn-default'
33
+
34
+ section
35
+ - if @stocks.empty?
36
+ = Comable.t('admin.not_found')
37
+ - else
38
+ table.table.table-striped
39
+ thead
40
+ th
41
+ = sort_link [:comable, @q], :code
42
+ th
43
+ = sort_link [:comable, @q], :quantity
44
+ th
45
+ = sort_link [:comable, @q], :sku_h_choice_name
46
+ th
47
+ = sort_link [:comable, @q], :sku_v_choice_name
48
+ tbody
49
+ - @stocks.each do |stock|
50
+ tr
51
+ td
52
+ = link_to stock.code, comable.admin_stock_path(stock)
53
+ td
54
+ strong class="#{(stock.quantity <= 0) ? 'text-danger' : (stock.quantity <= 10) ? 'text-warning' : 'text-success'}"
55
+ = number_with_delimiter stock.quantity
56
+ td
57
+ = stock.sku_h_choice_name
58
+ td
59
+ = stock.sku_v_choice_name
56
60
 
57
61
  .text-center
58
62
  = paginate @stocks, theme: :comable_backend
59
-
60
- nav.col-sm-4
61
- #comable-affix
62
- .panel
63
- .list-group
64
- = link_to Comable.t('admin.nav.products.detail'), comable.admin_product_path(@product), class: 'list-group-item'
65
- = link_to Comable.t('admin.nav.products.stock'), comable.admin_product_stocks_path(@product), class: 'list-group-item disabled'
66
-
67
- .panel
68
- .list-group
69
- = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path(@product), class: 'list-group-item'
70
-
71
- .panel
72
- .panel-body
73
- = search_form_for @q, url: comable.new_admin_product_stock_path(@product) do |f|
74
- .form-horizontal
75
- .form-group
76
- .col-sm-3.control-label
77
- = f.label :code
78
- .col-sm-9
79
- = f.text_field :code_cont
80
- .text-right
81
- = f.submit Comable.t('admin.search'), class: 'btn btn-default'
@@ -1,17 +1,18 @@
1
- #comable-product
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li.active
6
- = link_to Comable.t('admin.nav.product'), comable.admin_products_path
7
- li.active
8
- = Comable.t('admin.actions.new')
1
+ .comable-page
2
+ .comable-main-fixed-top
3
+ .comable-page-heading
4
+ ul.pull-right.list-inline
5
+ li
6
+ = link_to_save
9
7
 
10
- h1.page-header
11
- = Comable.t('admin.actions.new')
8
+ h1.page-header
9
+ ol.breadcrumb
10
+ li>
11
+ = link_to Comable.t('admin.nav.stock'), comable.admin_stocks_path
12
+ li>
13
+ = link_to @product.name, comable.admin_product_path(@product)
14
+ li.active
15
+ = Comable.t('admin.actions.new')
12
16
 
13
- .row
14
- section.col-sm-8
15
- = render 'form'
16
-
17
- nav.col-sm-4
17
+ .comable-page-body
18
+ = render 'form'
@@ -1,50 +1,34 @@
1
- - if @store.errors.any?
2
- #error_explanation
3
- h2
4
- = pluralize(@store.errors.count, "error")
5
- | prohibited this store from being saved:
6
- ul
7
- - @store.errors.full_messages.each do |message|
8
- li = message
1
+ = error_messages_for @store
9
2
 
10
3
  = form_for @store, url: comable.admin_store_path, method: :patch do |f|
11
- .panel.panel-inverse
12
- .panel-heading
13
- .panel-title
14
- = Comable.t('admin.nav.stores.edit')
4
+ .hidden
5
+ = f.submit
15
6
 
16
- .panel-body
17
- .form-horizontal
18
- .form-group
19
- .col-sm-3.control-label
20
- = f.label :name
21
- .col-sm-6
22
- = f.text_field :name, placeholder: f.object.class.default_name
7
+ fieldset
8
+ .col-sm-3
9
+ legend
10
+ = Comable.t('admin.general')
11
+ .help-block
23
12
 
24
- .form-group
25
- .col-sm-3.control-label
26
- = f.label :meta_keywords
27
- .col-sm-6
28
- = f.text_field :meta_keywords
13
+ .col-sm-9
14
+ .form-group
15
+ = f.label :name
16
+ = f.text_field :name, placeholder: f.object.class.default_name
29
17
 
30
- .form-group
31
- .col-sm-3.control-label
32
- = f.label :meta_description
33
- .col-sm-6
34
- = f.text_field :meta_description
18
+ .form-group
19
+ = f.label :meta_keywords
20
+ = f.text_field :meta_keywords
35
21
 
36
- .form-group
37
- .col-sm-3.control-label
38
- = f.label :email_sender
39
- .col-sm-6
40
- = f.email_field :email_sender
22
+ .form-group
23
+ = f.label :meta_description
24
+ = f.text_field :meta_description
41
25
 
42
- .form-group
43
- .col-sm-offset-3.col-sm-6
44
- .checkbox
45
- = f.label :email_activate_flag do
46
- = f.check_box :email_activate_flag
47
- = f.object.class.human_attribute_name(:email_activate_flag)
26
+ .form-group
27
+ = f.label :email_sender
28
+ = f.email_field :email_sender
48
29
 
49
- .panel-footer.text-right
50
- = f.submit Comable.t('admin.actions.update')
30
+ .form-group
31
+ .checkbox
32
+ = f.label :email_activate_flag do
33
+ = f.check_box :email_activate_flag
34
+ = f.object.class.human_attribute_name(:email_activate_flag)