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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/comable/admin/application.coffee +21 -14
- data/app/assets/stylesheets/comable/admin/_common.scss +264 -0
- data/app/assets/stylesheets/comable/admin/_dashboard.scss +81 -0
- data/app/assets/stylesheets/comable/admin/_errors.scss +18 -0
- data/app/assets/stylesheets/comable/admin/_mixins.scss +16 -0
- data/app/assets/stylesheets/comable/admin/_orders.scss +54 -0
- data/app/assets/stylesheets/comable/admin/_overrides.scss +4 -0
- data/app/assets/stylesheets/comable/admin/_products.scss +18 -0
- data/app/assets/stylesheets/comable/admin/_user_sessions.scss +57 -0
- data/app/assets/stylesheets/comable/admin/_variables.scss +44 -0
- data/app/assets/stylesheets/comable/admin/application.scss +15 -597
- data/app/assets/stylesheets/comable/admin/overrides/bootstrap.scss +83 -0
- data/app/assets/stylesheets/comable/admin/overrides/jstree.scss +71 -0
- data/app/assets/stylesheets/comable/admin/overrides/pace.scss +4 -0
- data/app/assets/stylesheets/comable/admin/overrides/tagit.scss +22 -0
- data/app/controllers/comable/admin/application_controller.rb +3 -0
- data/app/controllers/comable/admin/categories_controller.rb +3 -0
- data/app/controllers/comable/admin/customers_controller.rb +6 -0
- data/app/controllers/comable/admin/orders_controller.rb +3 -0
- data/app/controllers/comable/admin/payment_methods_controller.rb +7 -1
- data/app/controllers/comable/admin/products_controller.rb +10 -4
- data/app/controllers/comable/admin/shipment_methods_controller.rb +7 -1
- data/app/controllers/comable/admin/stocks_controller.rb +16 -20
- data/app/controllers/comable/admin/store_controller.rb +3 -0
- data/app/controllers/comable/admin/user_sessions_controller.rb +7 -0
- data/app/helpers/comable/admin/application_helper.rb +16 -0
- data/app/views/comable/admin/categories/index.slim +83 -86
- data/app/views/comable/admin/customers/edit.slim +64 -79
- data/app/views/comable/admin/customers/index.slim +60 -59
- data/app/views/comable/admin/customers/show.slim +83 -88
- data/app/views/comable/admin/dashboard/show.slim +59 -57
- data/app/views/comable/admin/orders/_google_map.slim +22 -0
- data/app/views/comable/admin/orders/index.slim +67 -70
- data/app/views/comable/admin/orders/show.slim +98 -68
- data/app/views/comable/admin/payment_methods/_form.slim +26 -41
- data/app/views/comable/admin/payment_methods/edit.slim +25 -26
- data/app/views/comable/admin/payment_methods/index.slim +38 -50
- data/app/views/comable/admin/payment_methods/new.slim +14 -15
- data/app/views/comable/admin/products/_form.slim +124 -101
- data/app/views/comable/admin/products/_image_fields.slim +15 -0
- data/app/views/comable/admin/products/edit.slim +39 -38
- data/app/views/comable/admin/products/index.slim +64 -70
- data/app/views/comable/admin/products/new.slim +14 -15
- data/app/views/comable/admin/shared/_footer.slim +8 -0
- data/app/views/comable/admin/shared/_header.slim +31 -0
- data/app/views/comable/admin/shared/_notifier.slim +5 -0
- data/app/views/comable/admin/shared/_sidebar.slim +52 -0
- data/app/views/comable/admin/shipment_methods/_form.slim +23 -43
- data/app/views/comable/admin/shipment_methods/edit.slim +25 -26
- data/app/views/comable/admin/shipment_methods/index.slim +35 -47
- data/app/views/comable/admin/shipment_methods/new.slim +14 -15
- data/app/views/comable/admin/stocks/_form.slim +27 -33
- data/app/views/comable/admin/stocks/edit.slim +35 -44
- data/app/views/comable/admin/stocks/index.slim +57 -76
- data/app/views/comable/admin/stocks/new.slim +16 -15
- data/app/views/comable/admin/store/_form.slim +26 -42
- data/app/views/comable/admin/store/edit.slim +10 -11
- data/app/views/comable/admin/user_sessions/new.slim +25 -0
- data/app/views/layouts/comable/admin/application.slim +14 -96
- data/config/routes.rb +4 -1
- data/lib/comable/backend/engine.rb +2 -1
- metadata +93 -53
- data/app/assets/stylesheets/comable/admin/products.css +0 -4
|
@@ -1,49 +1,29 @@
|
|
|
1
|
-
=
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
= f.text_field :fee
|
|
12
|
+
.col-sm-9
|
|
13
|
+
.form-group
|
|
14
|
+
= f.label :name
|
|
15
|
+
= f.text_field :name
|
|
32
16
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.panel
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
=
|
|
18
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
.
|
|
14
|
-
|
|
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.
|
|
4
|
+
- url ||= comable.admin_stock_path(@stock)
|
|
5
|
+
|
|
3
6
|
= form_for @stock, url: url do |f|
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
+
.hidden
|
|
8
|
+
= f.submit
|
|
9
|
+
|
|
10
|
+
fieldset
|
|
11
|
+
.col-sm-3
|
|
12
|
+
legend
|
|
7
13
|
= Comable.t('admin.general')
|
|
8
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
= f.text_field :quantity
|
|
16
|
+
.col-sm-9
|
|
17
|
+
.form-group
|
|
18
|
+
= f.label :code
|
|
19
|
+
= f.text_field :code
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.panel
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
h1.page-header
|
|
14
|
+
= Comable.t('admin.nav.stock')
|
|
15
|
+
small<
|
|
16
|
+
= @stocks.total_count
|
|
17
|
+
= Comable.t('admin.results')
|
|
17
18
|
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
=
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
=
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
.
|
|
14
|
-
|
|
15
|
-
= render 'form'
|
|
16
|
-
|
|
17
|
-
nav.col-sm-4
|
|
17
|
+
.comable-page-body
|
|
18
|
+
= render 'form'
|
|
@@ -1,50 +1,34 @@
|
|
|
1
|
-
|
|
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
|
-
.
|
|
12
|
-
.
|
|
13
|
-
.panel-title
|
|
14
|
-
= Comable.t('admin.nav.stores.edit')
|
|
4
|
+
.hidden
|
|
5
|
+
= f.submit
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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)
|