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,95 +1,131 @@
1
+ = error_messages_for @product
2
+
1
3
  - url = comable.admin_products_path if @product.new_record?
2
4
  - url ||= comable.admin_product_path(@product)
5
+
3
6
  = form_for @product, url: url, html: { multipart: true } 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
15
-
16
- .form-group
17
- .col-sm-3.control-label
18
- = f.label :name
19
- .col-sm-6
20
- = f.text_field :name
21
-
22
- .form-group
23
- .col-sm-3.control-label
24
- = f.label :caption
25
- .col-sm-6
26
- = f.text_field :caption
27
-
28
- .form-group
29
- .col-sm-3.control-label
30
- = f.label :price
31
- .col-sm-6
32
- = f.text_field :price
33
-
34
- = stylesheet_link_tag 'http://rawgithub.com/aehlke/tag-it/master/css/jquery.tagit.css', media: 'all'
35
- = stylesheet_link_tag 'http://rawgithub.com/aehlke/tag-it/master/css/tagit.ui-zendesk.css', media: 'all'
36
- = javascript_include_tag 'http://rawgithub.com/aehlke/tag-it/master/js/tag-it.min.js'
37
-
38
- / TODO: Refactoring
39
- javascript:
40
- comable_tagit_available_tags = #{raw Comable::Category.all.map(&:path).map { |path| path.map(&:name).join(' > ') }.sort.to_json};
41
- coffee:
42
- $(document).ready(->
43
- $("#comable-tagit").tagit({
44
- fieldName: 'product[category_path_names][]',
45
- availableTags: comable_tagit_available_tags,
46
- autocomplete: { delay: 0, minLength: 0 },
47
- showAutocompleteOnFocus: true,
48
- removeConfirmation: true,
49
- # Only allow available tags
50
- beforeTagAdded: (event, ui) -> (comable_tagit_available_tags.indexOf(ui.tagLabel) != -1)
51
- })
52
- )
53
-
54
- .form-group
55
- .col-sm-3.control-label
56
- = f.label :categories
57
- .col-sm-6
58
- ul#comable-tagit
59
- - @product.categories.each do |category|
60
- li
61
- = category.path.map(&:name).join(' > ')
62
-
63
- fieldset
64
- legend.text-center.text-muted
65
- | SKU
66
-
67
- .form-group
68
- .col-sm-3.control-label
69
- = f.label :sku_h_item_name
70
- .col-sm-6
71
- = f.text_field :sku_h_item_name
72
- span.help-block
73
- = Comable.t('admin.please_fill_when_using_sku')
14
+ .help-block
74
15
 
75
- .form-group
76
- .col-sm-3.control-label
77
- = f.label :sku_v_item_name
78
- .col-sm-6
79
- = f.text_field :sku_v_item_name
16
+ .col-sm-9
17
+ .form-group
18
+ = f.label :code
19
+ = f.text_field :code
20
+
21
+ .form-group
22
+ = f.label :name
23
+ = f.text_field :name
24
+
25
+ .form-group
26
+ = f.label :caption
27
+ = f.text_field :caption
28
+
29
+ .form-group
30
+ = f.label :price
31
+ = f.text_field :price
32
+
33
+ = stylesheet_link_tag 'http://rawgithub.com/aehlke/tag-it/master/css/jquery.tagit.css', media: 'all'
34
+ = stylesheet_link_tag 'http://rawgithub.com/aehlke/tag-it/master/css/tagit.ui-zendesk.css', media: 'all'
35
+ = javascript_include_tag 'http://rawgithub.com/aehlke/tag-it/master/js/tag-it.min.js'
36
+
37
+ / TODO: Refactoring
38
+ javascript:
39
+ comable_tagit_available_tags = #{raw Comable::Category.all.map(&:path).map { |path| path.map(&:name).join(' > ') }.sort.to_json};
40
+ coffee:
41
+ $(document).ready(->
42
+ $("#comable-tagit").tagit({
43
+ fieldName: 'product[category_path_names][]',
44
+ availableTags: comable_tagit_available_tags,
45
+ autocomplete: { delay: 0, minLength: 0 },
46
+ showAutocompleteOnFocus: true,
47
+ removeConfirmation: true,
48
+ # Only allow available tags
49
+ beforeTagAdded: (event, ui) -> (comable_tagit_available_tags.indexOf(ui.tagLabel) != -1)
50
+ })
51
+ )
80
52
 
81
- .panel-footer
82
- = link_to Comable.t('admin.actions.cancel'), comable.admin_products_path, class: 'btn btn-default'
83
- .pull-right
84
- = f.submit
53
+ .form-group
54
+ = f.label :categories
55
+ ul#comable-tagit
56
+ - @product.categories.each do |category|
57
+ li
58
+ = category.path.map(&:name).join(' > ')
85
59
 
86
- .panel.panel-inverse
87
- .panel-heading
88
- .panel-title
60
+ hr
61
+
62
+ fieldset
63
+ .col-sm-3
64
+ legend
65
+ = Comable.t('admin.stocks')
66
+ .help-block
67
+ - if @product.sku? || (@product.persisted? && @product.stocks.empty?)
68
+ = Comable.t('admin.link_to_add_new_stock')
69
+ = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path(@product)
70
+
71
+ .col-sm-9
72
+ - if @product.stocks.any?
73
+ table.table.table-striped
74
+ thead
75
+ th
76
+ = @product.stocks.human_attribute_name(:code)
77
+ th
78
+ = @product.stocks.human_attribute_name(:quantity)
79
+ - if @product.sku?
80
+ - if @product.sku_h?
81
+ th
82
+ = @product.sku_h_item_name
83
+ - if @product.sku_v?
84
+ th
85
+ = @product.sku_v_item_name
86
+ th
87
+ = Comable.t('admin.operation')
88
+ tbody
89
+ - @product.stocks.each do |stock|
90
+ tr
91
+ td
92
+ = stock.code
93
+ td
94
+ strong class="#{(stock.quantity <= 0) ? 'text-danger' : (stock.quantity <= 10) ? 'text-warning' : 'text-success'}"
95
+ = number_with_delimiter stock.quantity
96
+ - if @product.sku?
97
+ - if @product.sku_h?
98
+ td
99
+ = stock.sku_h_choice_name
100
+ - if @product.sku_v?
101
+ td
102
+ = stock.sku_v_choice_name
103
+ td
104
+ = link_to comable.admin_stock_path(stock), class: 'btn btn-default'
105
+ i.fa.fa-edit>
106
+ = Comable.t('admin.actions.edit')
107
+
108
+ .form-group
109
+ = f.label :sku_h_item_name
110
+ = f.text_field :sku_h_item_name
111
+ .help-block
112
+ = Comable.t('admin.please_fill_when_using_sku')
113
+
114
+ .form-group
115
+ = f.label :sku_v_item_name
116
+ = f.text_field :sku_v_item_name
117
+
118
+ hr
119
+
120
+ fieldset
121
+ .col-sm-3
122
+ legend
89
123
  = Comable.t('admin.images')
90
- .panel-body
91
- - images = @product.images + [@product.images.build]
92
- - main_image = images.first
124
+ .help-block
125
+
126
+ .col-sm-9
127
+ - images = @product.images
128
+ - main_image = images.first || @product.images.build
93
129
  - sub_images = images - [main_image]
94
130
 
95
131
  .row
@@ -111,20 +147,7 @@
111
147
  .row
112
148
  - sub_images.each.with_index(1) do |image, index|
113
149
  = f.fields_for :images, image do |ff|
114
- .col-sm-6
115
- label
116
- | #{Comable.t('admin.sub_image')} ##{index}
117
- p
118
- = ff.file_field :file
119
- - if ff.object.url
120
- .thumbnail
121
- = image_tag ff.object.url
122
- - if ff.object.persisted?
123
- label.remove
124
- span> = ff.check_box :_destroy
125
- span> = Comable.t('admin.actions.destroy')
126
-
127
- .panel-footer
128
- = link_to Comable.t('admin.actions.cancel'), comable.admin_products_path, class: 'btn btn-default'
129
- .pull-right
130
- = f.submit
150
+ = render 'image_fields', ff: ff, index: index
151
+
152
+ .col-sm-6
153
+ = link_to_add_fields Comable.t('admin.add_sub_image'), f, :images
@@ -0,0 +1,15 @@
1
+ .col-sm-6
2
+ label
3
+ | #{Comable.t('admin.sub_image')}
4
+ - if local_assigns[:index]
5
+ span<
6
+ | ##{index}
7
+ p
8
+ = ff.file_field :file
9
+ - if ff.object.url
10
+ .thumbnail
11
+ = image_tag ff.object.url
12
+ - if ff.object.persisted?
13
+ label.remove
14
+ span> = ff.check_box :_destroy
15
+ span> = Comable.t('admin.actions.destroy')
@@ -1,40 +1,41 @@
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.active
8
- = @product.name
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.product_path(@product) do
11
+ span.fa.fa-external-link>
12
+ = Comable.t('admin.check_this_product_in_frontend')
13
+ - if @product.sku? || @product.stocks.empty?
14
+ li.divider
15
+ li.dropdown-header
16
+ = Comable.t('admin.nav.stock')
17
+ li
18
+ = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path(@product)
19
+ li
20
+ = link_to_save
9
21
 
10
- h1.page-header
11
- = @product.name
12
- small< = @product.code
22
+ h1.page-header
23
+ ol.breadcrumb
24
+ li>
25
+ = link_to Comable.t('admin.nav.product'), comable.admin_products_path
26
+ li.active
27
+ = @product.name
13
28
 
14
- .row
15
- section.col-sm-8
16
- = render 'form'
17
- hr
18
- .panel.panel-danger
19
- .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger" aria-expanded="false" aria-controls="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_product_path(@product), method: :delete, class: 'btn btn-danger'
28
-
29
- nav.col-sm-4
30
- #comable-affix data-spy="affix"
31
- .panel
32
- .list-group
33
- = link_to Comable.t('admin.nav.products.detail'), comable.admin_product_path(@product), class: 'list-group-item disabled'
34
- = link_to Comable.t('admin.nav.products.stock'), comable.admin_product_stocks_path(@product), class: 'list-group-item'
35
-
36
- .panel
37
- .list-group
38
- = link_to comable.product_path(@product), class: 'list-group-item' do
39
- span.fa.fa-external-link>
40
- = Comable.t('admin.check_this_product_in_frontend')
29
+ .comable-page-body
30
+ = render 'form'
31
+ hr
32
+ .panel.panel-danger
33
+ .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
34
+ strong
35
+ span.fa.fa-angle-down>
36
+ = Comable.t('admin.actions.destroy')
37
+ #comable-danger.collapse
38
+ .panel-body
39
+ p
40
+ = Comable.t('admin.confirmation_to_remove_product')
41
+ = link_to Comable.t('admin.actions.destroy'), comable.admin_product_path(@product), method: :delete, class: 'btn btn-danger'
@@ -1,76 +1,70 @@
1
- #comable-product
2
- ol.breadcrumb
3
- li
4
- = link_to Comable.t('admin.nav.dashboard'), comable.admin_root_path
5
- li.active
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 @products, '<', class: 'btn btn-default' do
7
+ .btn.btn-default disabled="disabled"
8
+ | <
9
+ = link_to_next_page @products, '>', class: 'btn btn-default' do
10
+ .btn.btn-default disabled="disabled"
11
+ | >
12
+ li
13
+ = link_to comable.root_path do
14
+ = link_to Comable.t('admin.actions.new'), comable.new_admin_product_path, class: 'btn btn-default'
15
+
16
+ h1.page-header
6
17
  = Comable.t('admin.nav.product')
18
+ small<
19
+ = @products.total_count
20
+ = Comable.t('admin.results')
7
21
 
8
- h1.page-header
9
- = Comable.t('admin.nav.product')
10
- small<
11
- = @products.total_count
12
- = Comable.t('admin.results')
22
+ .comable-page-body
23
+ .comable-search
24
+ = search_form_for @q, url: comable.admin_products_path do |f|
25
+ .input-group
26
+ span.input-group-btn
27
+ button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown"
28
+ i.fa.fa-search
29
+ span.caret<
30
+ ul.dropdown-menu role="menu"
31
+ li
32
+ = link_to Comable.t('admin.clear_search_conditions'), comable.admin_products_path
33
+ = f.text_field :code_or_name_cont, class: 'form-control'
34
+ span.input-group-btn
35
+ = f.submit Comable.t('admin.search'), class: 'btn btn-default'
13
36
 
14
- .row
15
- section.col-sm-8
16
- .panel.panel-inverse
17
- .panel-heading
18
- .panel-title
19
- = Comable.t('admin.index')
20
- - if @products.empty?
21
- .panel-body
22
- = Comable.t('admin.not_found')
23
- - else
24
- table.table.table-striped
25
- thead
26
- th
27
- th
28
- = sort_link [:comable, @q], :code
29
- th
30
- = sort_link [:comable, @q], :name
31
- th
32
- = sort_link [:comable, @q], :price
33
- th
34
- = sort_link [:comable, @q], :stocks_quantity
35
- tbody
36
- - @products.each do |product|
37
- - quantity = product.stocks.to_a.sum(&:quantity)
38
- tr
39
- td.comable-image
40
- = link_to comable.admin_product_path(product), class: 'thumbnail' do
41
- = image_tag product.image_url
42
- td
43
- = link_to product.code, comable.admin_product_path(product)
44
- td
45
- = product.name
46
- td
47
- = number_to_currency product.price
48
- td
49
- strong class="#{(quantity <= 0) ? 'text-danger' : (quantity <= 10) ? 'text-warning' : 'text-success'}"
50
- = number_with_delimiter product.stocks.to_a.sum(&:quantity)
37
+ section
38
+ - if @products.empty?
39
+ = Comable.t('admin.not_found')
40
+ - else
41
+ table.table.table-striped
42
+ thead
43
+ th
44
+ th
45
+ = sort_link [:comable, @q], :code
46
+ th
47
+ = sort_link [:comable, @q], :name
48
+ th
49
+ = sort_link [:comable, @q], :price
50
+ th
51
+ = sort_link [:comable, @q], :stocks_quantity
52
+ tbody
53
+ - @products.each do |product|
54
+ - quantity = product.stocks.to_a.sum(&:quantity)
55
+ tr
56
+ td.comable-image
57
+ = link_to comable.admin_product_path(product), class: 'thumbnail' do
58
+ = image_tag product.image_url, width: '100%'
59
+ td
60
+ = link_to product.code, comable.admin_product_path(product)
61
+ td
62
+ = product.name
63
+ td
64
+ = number_to_currency product.price
65
+ td
66
+ strong class="#{(quantity <= 0) ? 'text-danger' : (quantity <= 10) ? 'text-warning' : 'text-success'}"
67
+ = number_with_delimiter product.stocks.to_a.sum(&:quantity)
51
68
 
52
69
  .text-center
53
70
  = paginate @products, theme: :comable_backend
54
-
55
- nav.col-sm-4
56
- #comable-affix
57
- .panel
58
- .list-group
59
- = link_to Comable.t('admin.actions.new'), comable.new_admin_product_path, class: 'list-group-item'
60
-
61
- .panel
62
- .panel-body
63
- = search_form_for @q, url: comable.admin_products_path do |f|
64
- .form-horizontal
65
- .form-group
66
- .col-sm-3.control-label
67
- = f.label :code
68
- .col-sm-9
69
- = f.text_field :code_cont
70
- .form-group
71
- .col-sm-3.control-label
72
- = f.label :name
73
- .col-sm-9
74
- = f.text_field :name_cont
75
- .text-right
76
- = f.submit Comable.t('admin.search'), class: 'btn btn-default'
@@ -1,17 +1,16 @@
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.product'), comable.admin_products_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'
@@ -0,0 +1,8 @@
1
+ footer
2
+ ul.list-inline
3
+ li
4
+ | Comable v#{Comable::VERSION::STRING}
5
+ li
6
+ = link_to 'GitHub', 'https://github.com/hyoshida/comable'
7
+ li
8
+ = link_to 'License', 'https://github.com/hyoshida/comable/blob/master/MIT-LICENSE'
@@ -0,0 +1,31 @@
1
+ header.navbar.navbar-default.navbar-fixed-top
2
+ .container-fluid
3
+ .navbar-header
4
+ = link_to comable.admin_root_path, class: 'navbar-brand' do
5
+ | Comable
6
+
7
+ button.navbar-toggle type="button" data-click="sidebar-toggled" onclick='$(".sidebar").toggleClass("sidebar-open");'
8
+ span.icon-bar
9
+ span.icon-bar
10
+ span.icon-bar
11
+
12
+ ul.nav.navbar-nav.navbar-right
13
+ li
14
+ = link_to comable.root_path do
15
+ = Comable.t('admin.back_to_store')
16
+ li.dropdown.navbar-user
17
+ a href="#" class="dropdown-toggle" data-toggle="dropdown"
18
+ span.hidden-xs
19
+ = current_customer.email
20
+ span.caret<
21
+ ul.dropdown-menu.animated.fadeInLeft
22
+ li.arrow
23
+ li
24
+ = link_to comable.edit_admin_customer_path(current_customer) do
25
+ span.fa.fa-edit>
26
+ = Comable.t('admin.edit_profile')
27
+ li.divider
28
+ li
29
+ = link_to comable.destroy_customer_session_path, method: :delete do
30
+ span.fa.fa-sign-in>
31
+ = Comable.t('admin.sign_out')
@@ -0,0 +1,5 @@
1
+ - if flash[:alert] || flash[:notice]
2
+ #comable-notifier
3
+ javascript:
4
+ #{add_gritter(flash[:alert], image: :error) if flash[:alert]}
5
+ #{add_gritter(flash[:notice], image: :success) if flash[:notice]}
@@ -0,0 +1,52 @@
1
+ .sidebar
2
+ .vnavigation
3
+ ul
4
+ li class="#{'active' if controller_name == 'dashboard'}"
5
+ = link_to comable.admin_root_path do
6
+ i.fa.fa-dashboard
7
+ = Comable.t('admin.nav.dashboard')
8
+ li class="#{'active' if controller_name == 'orders'}"
9
+ = link_to comable.admin_orders_path do
10
+ i.fa.fa-shopping-cart
11
+ = Comable.t('admin.nav.order')
12
+ li class="#{'active' if controller_name == 'products'}"
13
+ = link_to comable.admin_products_path do
14
+ i.fa.fa-cube
15
+ = Comable.t('admin.nav.product')
16
+ li class="#{'active' if controller_name == 'stocks'}"
17
+ = link_to comable.admin_stocks_path do
18
+ i.fa.fa-archive
19
+ = Comable.t('admin.nav.stock')
20
+ li class="#{'active' if controller_name == 'categories'}"
21
+ = link_to comable.admin_categories_path do
22
+ i.fa.fa-tag
23
+ = Comable.t('admin.nav.category')
24
+ /
25
+ li
26
+ = link_to '#' do
27
+ i.fa.fa-bar-chart
28
+ = Comable.t('admin.nav.analytics')
29
+ li
30
+ = link_to '#' do
31
+ i.fa.fa-bullhorn
32
+ = Comable.t('admin.nav.promotion')
33
+ ul
34
+ li
35
+ = Comable.t('admin.nav.static_page')
36
+ li
37
+ = Comable.t('admin.nav.static_content')
38
+ li class="#{'active' if controller_name == 'customers'}"
39
+ = link_to comable.admin_customers_path do
40
+ i.fa.fa-user
41
+ = Comable.t('admin.nav.customer')
42
+ li class="#{'active' if controller_name.in? %w( store shipment_methods payment_methods )}"
43
+ = link_to '#' do
44
+ i.fa.fa-cog
45
+ = Comable.t('admin.nav.general_settings')
46
+ ul
47
+ li class="#{'active' if controller_name == 'store'}"
48
+ = link_to Comable.t('admin.nav.store'), comable.admin_store_path
49
+ li class="#{'active' if controller_name == 'shipment_methods'}"
50
+ = link_to Comable.t('admin.nav.shipment_method'), comable.admin_shipment_methods_path
51
+ li class="#{'active' if controller_name == 'payment_methods'}"
52
+ = link_to Comable.t('admin.nav.payment_method'), comable.admin_payment_methods_path