comable-backend 0.6.0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +97 -0
- data/app/assets/javascripts/comable/admin/application.coffee +76 -0
- data/app/assets/javascripts/comable/admin/categories.coffee +59 -0
- data/app/assets/javascripts/comable/admin/dashboard.coffee +32 -0
- data/app/assets/javascripts/comable/admin/dispatcher.coffee +21 -0
- data/app/assets/javascripts/comable/admin/orders.coffee +44 -0
- data/app/assets/javascripts/comable/admin/pages.coffee +69 -0
- data/app/assets/javascripts/comable/admin/products.coffee +21 -0
- data/app/assets/javascripts/comable/admin/search.coffee +35 -0
- data/app/assets/javascripts/comable/admin/themes.coffee +64 -0
- data/app/assets/stylesheets/comable/admin/_common.scss +153 -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/_flow.scss +149 -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/_pages.scss +30 -0
- data/app/assets/stylesheets/comable/admin/_products.scss +18 -0
- data/app/assets/stylesheets/comable/admin/_themes.scss +71 -0
- data/app/assets/stylesheets/comable/admin/_user_sessions.scss +57 -0
- data/app/assets/stylesheets/comable/admin/_variables.scss +38 -0
- data/app/assets/stylesheets/comable/admin/application.scss +26 -0
- data/app/assets/stylesheets/comable/admin/overrides/awesome_admin_layout.scss +25 -0
- data/app/assets/stylesheets/comable/admin/overrides/bootstrap.scss +81 -0
- data/app/assets/stylesheets/comable/admin/overrides/jstree.scss +71 -0
- data/app/assets/stylesheets/comable/admin/overrides/tagit.scss +22 -0
- data/app/controllers/comable/admin/application_controller.rb +58 -0
- data/app/controllers/comable/admin/categories_controller.rb +17 -0
- data/app/controllers/comable/admin/dashboard_controller.rb +19 -0
- data/app/controllers/comable/admin/orders_controller.rb +102 -0
- data/app/controllers/comable/admin/pages_controller.rb +72 -0
- data/app/controllers/comable/admin/payment_methods_controller.rb +59 -0
- data/app/controllers/comable/admin/products_controller.rb +82 -0
- data/app/controllers/comable/admin/shipment_methods_controller.rb +57 -0
- data/app/controllers/comable/admin/stocks_controller.rb +81 -0
- data/app/controllers/comable/admin/store_controller.rb +42 -0
- data/app/controllers/comable/admin/themes_controller.rb +101 -0
- data/app/controllers/comable/admin/trackers_controller.rb +58 -0
- data/app/controllers/comable/admin/user_sessions_controller.rb +8 -0
- data/app/controllers/comable/admin/users_controller.rb +47 -0
- data/app/helpers/comable/admin/application_helper.rb +53 -0
- data/app/helpers/comable/admin/orders_helper.rb +30 -0
- data/app/helpers/comable/admin/pages_helper.rb +6 -0
- data/app/helpers/comable/admin/products_helper.rb +6 -0
- data/app/helpers/comable/admin/shipment_methods_helper.rb +6 -0
- data/app/helpers/comable/admin/stores_helper.rb +6 -0
- data/app/helpers/comable/admin/themes_helper.rb +69 -0
- data/app/views/comable/admin/categories/index.slim +40 -0
- data/app/views/comable/admin/dashboard/_widget.slim +13 -0
- data/app/views/comable/admin/dashboard/show.slim +43 -0
- data/app/views/comable/admin/orders/_google_map.slim +39 -0
- data/app/views/comable/admin/orders/_payment_state.slim +40 -0
- data/app/views/comable/admin/orders/_shipment_state.slim +44 -0
- data/app/views/comable/admin/orders/edit.slim +170 -0
- data/app/views/comable/admin/orders/index.slim +95 -0
- data/app/views/comable/admin/orders/show.slim +177 -0
- data/app/views/comable/admin/pages/_form.slim +69 -0
- data/app/views/comable/admin/pages/edit.slim +31 -0
- data/app/views/comable/admin/pages/index.slim +55 -0
- data/app/views/comable/admin/pages/new.slim +16 -0
- data/app/views/comable/admin/payment_methods/_form.slim +35 -0
- data/app/views/comable/admin/payment_methods/edit.slim +27 -0
- data/app/views/comable/admin/payment_methods/index.slim +40 -0
- data/app/views/comable/admin/payment_methods/new.slim +16 -0
- data/app/views/comable/admin/products/_form.slim +137 -0
- data/app/views/comable/admin/products/edit.slim +41 -0
- data/app/views/comable/admin/products/index.slim +95 -0
- data/app/views/comable/admin/products/new.slim +16 -0
- data/app/views/comable/admin/shared/_advanced_search.slim +7 -0
- data/app/views/comable/admin/shared/_condition_fields.slim +15 -0
- data/app/views/comable/admin/shared/_footer.slim +8 -0
- data/app/views/comable/admin/shared/_grouping_fields.slim +8 -0
- data/app/views/comable/admin/shared/_image_fields.slim +15 -0
- data/app/views/comable/admin/shared/_notifier.slim +5 -0
- data/app/views/comable/admin/shared/_value_fields.slim +1 -0
- data/app/views/comable/admin/shared/export.xlsx.axlsx +17 -0
- data/app/views/comable/admin/shipment_methods/_form.slim +29 -0
- data/app/views/comable/admin/shipment_methods/edit.slim +27 -0
- data/app/views/comable/admin/shipment_methods/index.slim +37 -0
- data/app/views/comable/admin/shipment_methods/new.slim +16 -0
- data/app/views/comable/admin/stocks/_form.slim +34 -0
- data/app/views/comable/admin/stocks/edit.slim +37 -0
- data/app/views/comable/admin/stocks/index.slim +81 -0
- data/app/views/comable/admin/stocks/new.slim +18 -0
- data/app/views/comable/admin/store/_form.slim +32 -0
- data/app/views/comable/admin/store/edit.slim +12 -0
- data/app/views/comable/admin/themes/_editor.slim +8 -0
- data/app/views/comable/admin/themes/_form.slim +31 -0
- data/app/views/comable/admin/themes/edit.slim +35 -0
- data/app/views/comable/admin/themes/index.slim +37 -0
- data/app/views/comable/admin/themes/new.slim +16 -0
- data/app/views/comable/admin/themes/show_file.slim +93 -0
- data/app/views/comable/admin/trackers/_form.slim +109 -0
- data/app/views/comable/admin/trackers/edit.slim +27 -0
- data/app/views/comable/admin/trackers/index.slim +37 -0
- data/app/views/comable/admin/trackers/new.slim +16 -0
- data/app/views/comable/admin/user_sessions/new.slim +25 -0
- data/app/views/comable/admin/users/edit.slim +79 -0
- data/app/views/comable/admin/users/index.slim +71 -0
- data/app/views/comable/admin/users/show.slim +88 -0
- data/app/views/kaminari/comable_backend/_first_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_gap.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_last_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_next_page.html.slim +2 -0
- data/app/views/kaminari/comable_backend/_page.html.slim +3 -0
- data/app/views/kaminari/comable_backend/_paginator.html.slim +15 -0
- data/app/views/kaminari/comable_backend/_prev_page.html.slim +2 -0
- data/app/views/layouts/comable/admin/application.slim +36 -0
- data/config/initializers/awesome_admin_layout.rb +110 -0
- data/config/routes.rb +63 -0
- data/lib/comable/backend.rb +1 -0
- data/lib/comable/backend/engine.rb +67 -0
- data/lib/tasks/comable_backend_tasks.rake +4 -0
- metadata +514 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
= content_tag :fieldset, { class: 'fields', 'data-object-name' => f.object_name } do
|
|
2
|
+
= f.condition_fields do |c|
|
|
3
|
+
= render 'comable/admin/shared/condition_fields', f: c
|
|
4
|
+
|
|
5
|
+
- if f.object.conditions.empty?
|
|
6
|
+
= build_fields f, :condition
|
|
7
|
+
|
|
8
|
+
= button_to_add_fields Comable.t('admin.add_search_condition'), f, :condition, class: 'btn btn-link'
|
|
@@ -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')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= content_tag(:span, f.text_field(:value), { class: 'fields value', 'data-object-name' => f.object_name }, false)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
wb = xlsx_package.workbook
|
|
2
|
+
|
|
3
|
+
header_style = Comable::Config.export_xlsx_header_style
|
|
4
|
+
header_style_handle = wb.styles.add_style(header_style) if header_style
|
|
5
|
+
|
|
6
|
+
style = Comable::Config.export_xlsx_style
|
|
7
|
+
style_handle = wb.styles.add_style(style) if style
|
|
8
|
+
|
|
9
|
+
wb.add_worksheet(name: records.klass.model_name.human) do |sheet|
|
|
10
|
+
sheet.add_row records.klass.new.to_comma_headers
|
|
11
|
+
sheet.row_style 0, header_style_handle if header_style_handle
|
|
12
|
+
|
|
13
|
+
records.each do |record|
|
|
14
|
+
sheet.add_row record.to_comma
|
|
15
|
+
end
|
|
16
|
+
sheet.row_style (1..-1), style_handle if style_handle
|
|
17
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
= error_messages_for @shipment_method
|
|
2
|
+
|
|
3
|
+
= form_for [comable, :admin, @shipment_method] do |f|
|
|
4
|
+
.hidden
|
|
5
|
+
= f.submit
|
|
6
|
+
|
|
7
|
+
fieldset
|
|
8
|
+
.col-md-3
|
|
9
|
+
legend
|
|
10
|
+
= Comable.t('admin.general')
|
|
11
|
+
|
|
12
|
+
.col-md-9
|
|
13
|
+
.form-group
|
|
14
|
+
= f.label :name
|
|
15
|
+
= f.text_field :name
|
|
16
|
+
|
|
17
|
+
.form-group
|
|
18
|
+
= f.label :fee
|
|
19
|
+
= f.text_field :fee
|
|
20
|
+
|
|
21
|
+
.form-group
|
|
22
|
+
= f.label :traking_url
|
|
23
|
+
= f.text_field :traking_url, placeholder: 'http://'
|
|
24
|
+
|
|
25
|
+
.form-group
|
|
26
|
+
.checkbox
|
|
27
|
+
= f.label :activated_flag do
|
|
28
|
+
= f.check_box :activated_flag
|
|
29
|
+
= f.object.class.human_attribute_name(:activated_flag)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.comable-page
|
|
2
|
+
.comable-main-fixed-top
|
|
3
|
+
.comable-page-heading
|
|
4
|
+
ul.pull-right.list-inline
|
|
5
|
+
li
|
|
6
|
+
= link_to_save
|
|
7
|
+
|
|
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
|
|
14
|
+
|
|
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'
|
|
@@ -0,0 +1,37 @@
|
|
|
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'
|
|
6
|
+
|
|
7
|
+
h1.page-header
|
|
8
|
+
= Comable.t('admin.nav.shipment_method')
|
|
9
|
+
small<
|
|
10
|
+
| #{@shipment_methods.total_count} #{Comable.t('admin.results')}
|
|
11
|
+
|
|
12
|
+
.comable-page-body
|
|
13
|
+
- if @shipment_methods.empty?
|
|
14
|
+
= Comable.t('admin.not_found')
|
|
15
|
+
- else
|
|
16
|
+
table.table.table-striped
|
|
17
|
+
thead
|
|
18
|
+
th
|
|
19
|
+
= @shipment_methods.klass.human_attribute_name(:name)
|
|
20
|
+
th
|
|
21
|
+
= @shipment_methods.klass.human_attribute_name(:fee)
|
|
22
|
+
th
|
|
23
|
+
= @shipment_methods.klass.human_attribute_name(:traking_url)
|
|
24
|
+
tbody
|
|
25
|
+
- @shipment_methods.each do |shipment_method|
|
|
26
|
+
tr
|
|
27
|
+
td
|
|
28
|
+
= link_to shipment_method.name, comable.admin_shipment_method_path(shipment_method)
|
|
29
|
+
- unless shipment_method.activated_flag
|
|
30
|
+
span.fa.fa-eye-slash.text-muted<
|
|
31
|
+
td
|
|
32
|
+
= number_to_currency shipment_method.fee
|
|
33
|
+
td
|
|
34
|
+
= truncate shipment_method.traking_url
|
|
35
|
+
|
|
36
|
+
.text-center
|
|
37
|
+
= paginate @shipment_methods, theme: :comable_backend
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.comable-page
|
|
2
|
+
.comable-main-fixed-top
|
|
3
|
+
.comable-page-heading
|
|
4
|
+
ul.pull-right.list-inline
|
|
5
|
+
li
|
|
6
|
+
= link_to_save
|
|
7
|
+
|
|
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')
|
|
14
|
+
|
|
15
|
+
.comable-page-body
|
|
16
|
+
= render 'form'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
= error_messages_for @stock
|
|
2
|
+
|
|
3
|
+
- url = comable.admin_product_stocks_path(@product) if @stock.new_record?
|
|
4
|
+
- url ||= comable.admin_stock_path(@stock)
|
|
5
|
+
|
|
6
|
+
= form_for @stock, url: url do |f|
|
|
7
|
+
.hidden
|
|
8
|
+
= f.submit
|
|
9
|
+
|
|
10
|
+
fieldset
|
|
11
|
+
.col-md-3
|
|
12
|
+
legend
|
|
13
|
+
= Comable.t('admin.general')
|
|
14
|
+
.help-block
|
|
15
|
+
|
|
16
|
+
.col-md-9
|
|
17
|
+
.form-group
|
|
18
|
+
= f.label :code
|
|
19
|
+
= f.text_field :code
|
|
20
|
+
|
|
21
|
+
.form-group
|
|
22
|
+
= f.label :quantity
|
|
23
|
+
= f.text_field :quantity
|
|
24
|
+
|
|
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
|
|
30
|
+
|
|
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
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
17
|
+
|
|
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
|
|
24
|
+
|
|
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'
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
| >
|
|
12
|
+
li.dropdown
|
|
13
|
+
= link_to '#', class: 'btn btn-default', 'data-toggle' => 'dropdown' do
|
|
14
|
+
= Comable.t('admin.more')
|
|
15
|
+
i.fa.fa-angle-down<
|
|
16
|
+
ul.dropdown-menu.dropdown-menu-right
|
|
17
|
+
li
|
|
18
|
+
= link_to Comable.t('admin.export_to_csv'), comable.export_admin_stocks_path(format: :csv, q: params[:q])
|
|
19
|
+
li
|
|
20
|
+
= link_to Comable.t('admin.export_to_excel'), comable.export_admin_stocks_path(format: :xlsx, q: params[:q])
|
|
21
|
+
li.divider
|
|
22
|
+
li
|
|
23
|
+
a.btn-file
|
|
24
|
+
span>
|
|
25
|
+
= Comable.t('admin.import')
|
|
26
|
+
= form_tag comable.import_admin_stocks_path, multipart: true do
|
|
27
|
+
= file_field_tag :file
|
|
28
|
+
|
|
29
|
+
h1.page-header
|
|
30
|
+
= Comable.t('admin.nav.stock')
|
|
31
|
+
small<
|
|
32
|
+
| #{@stocks.total_count} #{Comable.t('admin.results')}
|
|
33
|
+
|
|
34
|
+
.comable-page-body
|
|
35
|
+
.comable-search
|
|
36
|
+
= search_form_for @q, url: comable.admin_stocks_path do |f|
|
|
37
|
+
.input-group
|
|
38
|
+
span.input-group-btn
|
|
39
|
+
button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown"
|
|
40
|
+
i.fa.fa-search
|
|
41
|
+
span.caret<
|
|
42
|
+
ul.dropdown-menu role="menu"
|
|
43
|
+
li
|
|
44
|
+
= link_to Comable.t('admin.advanced_search'), 'javascript:void(0)', 'data-toggle' => 'collapse', 'data-target' => '#comable-advanced-search'
|
|
45
|
+
li
|
|
46
|
+
= link_to Comable.t('admin.clear_search_conditions'), comable.admin_stocks_path
|
|
47
|
+
= f.text_field :code_cont, class: 'form-control'
|
|
48
|
+
span.input-group-btn
|
|
49
|
+
= f.submit Comable.t('admin.search'), class: 'btn btn-default'
|
|
50
|
+
|
|
51
|
+
= render 'comable/admin/shared/advanced_search', f: f
|
|
52
|
+
|
|
53
|
+
section
|
|
54
|
+
- if @stocks.empty?
|
|
55
|
+
= Comable.t('admin.not_found')
|
|
56
|
+
- else
|
|
57
|
+
table.table.table-striped
|
|
58
|
+
thead
|
|
59
|
+
th
|
|
60
|
+
= sort_link [:comable, @q], :code
|
|
61
|
+
th
|
|
62
|
+
= sort_link [:comable, @q], :quantity
|
|
63
|
+
th
|
|
64
|
+
= sort_link [:comable, @q], :sku_h_choice_name
|
|
65
|
+
th
|
|
66
|
+
= sort_link [:comable, @q], :sku_v_choice_name
|
|
67
|
+
tbody
|
|
68
|
+
- @stocks.each do |stock|
|
|
69
|
+
tr
|
|
70
|
+
td
|
|
71
|
+
= link_to stock.code, comable.admin_stock_path(stock)
|
|
72
|
+
td
|
|
73
|
+
strong class="#{(stock.quantity <= 0) ? 'text-danger' : (stock.quantity <= 10) ? 'text-warning' : 'text-success'}"
|
|
74
|
+
= number_with_delimiter stock.quantity
|
|
75
|
+
td
|
|
76
|
+
= stock.sku_h_choice_name
|
|
77
|
+
td
|
|
78
|
+
= stock.sku_v_choice_name
|
|
79
|
+
|
|
80
|
+
.text-center
|
|
81
|
+
= paginate @stocks, theme: :comable_backend
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.comable-page
|
|
2
|
+
.comable-main-fixed-top
|
|
3
|
+
.comable-page-heading
|
|
4
|
+
ul.pull-right.list-inline
|
|
5
|
+
li
|
|
6
|
+
= link_to_save
|
|
7
|
+
|
|
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')
|
|
16
|
+
|
|
17
|
+
.comable-page-body
|
|
18
|
+
= render 'form'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
= error_messages_for @store
|
|
2
|
+
|
|
3
|
+
= form_for @store, url: comable.admin_store_path, method: :patch do |f|
|
|
4
|
+
.hidden
|
|
5
|
+
= f.submit
|
|
6
|
+
|
|
7
|
+
fieldset
|
|
8
|
+
.col-md-3
|
|
9
|
+
legend
|
|
10
|
+
= Comable.t('admin.general')
|
|
11
|
+
.help-block
|
|
12
|
+
|
|
13
|
+
.col-md-9
|
|
14
|
+
.form-group
|
|
15
|
+
= f.label :name
|
|
16
|
+
= f.text_field :name, placeholder: f.object.class.default_name
|
|
17
|
+
|
|
18
|
+
.form-group
|
|
19
|
+
= f.label :meta_keywords
|
|
20
|
+
= f.text_field :meta_keywords
|
|
21
|
+
|
|
22
|
+
.form-group
|
|
23
|
+
= f.label :meta_description
|
|
24
|
+
= f.text_field :meta_description
|
|
25
|
+
|
|
26
|
+
.form-group
|
|
27
|
+
= f.label :email
|
|
28
|
+
= f.email_field :email
|
|
29
|
+
|
|
30
|
+
.help-block
|
|
31
|
+
p
|
|
32
|
+
= Comable.t('admin.help_of_store_email')
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#comable-theme-editor
|
|
2
|
+
.comable-theme-editor-filename
|
|
3
|
+
= params[:path]
|
|
4
|
+
.comable-theme-editor-window
|
|
5
|
+
= code
|
|
6
|
+
|
|
7
|
+
= form_tag comable.file_admin_theme_path(@theme, path: params[:path]), id: 'comable-theme-editor-form', method: :put do
|
|
8
|
+
= hidden_field_tag :code, nil
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
= error_messages_for @theme
|
|
2
|
+
|
|
3
|
+
= form_for [comable, :admin, @theme] do |f|
|
|
4
|
+
.hidden
|
|
5
|
+
= f.submit
|
|
6
|
+
|
|
7
|
+
fieldset
|
|
8
|
+
.col-md-3
|
|
9
|
+
legend
|
|
10
|
+
= Comable.t('admin.general')
|
|
11
|
+
|
|
12
|
+
.col-md-9
|
|
13
|
+
.form-group
|
|
14
|
+
= f.label :name
|
|
15
|
+
= f.text_field :name, disabled: f.object.persisted?
|
|
16
|
+
|
|
17
|
+
.form-group
|
|
18
|
+
= f.label :display
|
|
19
|
+
= f.text_field :display
|
|
20
|
+
|
|
21
|
+
.form-group
|
|
22
|
+
= f.label :version
|
|
23
|
+
= f.text_field :version
|
|
24
|
+
|
|
25
|
+
.form-group
|
|
26
|
+
= f.label :homepage
|
|
27
|
+
= f.text_field :homepage
|
|
28
|
+
|
|
29
|
+
.form-group
|
|
30
|
+
= f.label :author
|
|
31
|
+
= f.text_field :author
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.comable-page
|
|
2
|
+
.comable-main-fixed-top
|
|
3
|
+
.comable-page-heading
|
|
4
|
+
ul.pull-right.list-inline
|
|
5
|
+
- if current_store.theme != @theme
|
|
6
|
+
= link_to comable.use_admin_theme_path(@theme), class: 'btn btn-default', method: 'put'
|
|
7
|
+
i.fa.fa-paint-brush>
|
|
8
|
+
= Comable.t('admin.use_this_theme')
|
|
9
|
+
li
|
|
10
|
+
= link_to comable.tree_admin_theme_path(@theme), class: 'btn btn-default'
|
|
11
|
+
i.fa.fa-files-o>
|
|
12
|
+
= Comable.t('admin.files')
|
|
13
|
+
li
|
|
14
|
+
= link_to_save
|
|
15
|
+
|
|
16
|
+
h1.page-header
|
|
17
|
+
ol.breadcrumb
|
|
18
|
+
li>
|
|
19
|
+
= link_to Comable.t('admin.nav.theme'), comable.admin_themes_path
|
|
20
|
+
li.active
|
|
21
|
+
= @theme.display_name
|
|
22
|
+
|
|
23
|
+
.comable-page-body
|
|
24
|
+
= render 'form'
|
|
25
|
+
hr
|
|
26
|
+
.panel.panel-danger
|
|
27
|
+
.panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
|
|
28
|
+
strong
|
|
29
|
+
span.fa.fa-angle-down>
|
|
30
|
+
= Comable.t('admin.actions.destroy')
|
|
31
|
+
#comable-danger.collapse
|
|
32
|
+
.panel-body
|
|
33
|
+
p
|
|
34
|
+
= Comable.t('admin.confirmation_to_remove_product')
|
|
35
|
+
= link_to Comable.t('admin.actions.destroy'), comable.admin_theme_path(@theme), method: :delete, class: 'btn btn-danger'
|