comable_backend 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- 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,79 +1,76 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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 @orders, '<', class: 'btn btn-default' do
|
7
|
+
.btn.btn-default disabled="disabled"
|
8
|
+
| <
|
9
|
+
= link_to_next_page @orders, '>', class: 'btn btn-default' do
|
10
|
+
.btn.btn-default disabled="disabled"
|
11
|
+
| >
|
12
|
+
|
13
|
+
h1.page-header
|
6
14
|
= Comable.t('admin.nav.order')
|
15
|
+
small<
|
16
|
+
= @orders.total_count
|
17
|
+
= Comable.t('admin.results')
|
7
18
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
19
|
+
.comable-page-body
|
20
|
+
.comable-search
|
21
|
+
= search_form_for @q, url: comable.admin_orders_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_orders_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
|
+
.hidden
|
34
|
+
= f.label :customer_id
|
35
|
+
= f.text_field :customer_id_eq
|
13
36
|
|
14
|
-
|
15
|
-
section.col-sm-8
|
37
|
+
section
|
16
38
|
- if @orders.empty?
|
17
39
|
= Comable.t('admin.not_found')
|
18
40
|
- else
|
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
|
-
td
|
53
|
-
= number_to_currency order.total_price
|
54
|
-
td
|
55
|
-
= l order.completed_at
|
41
|
+
table.table.table-striped
|
42
|
+
thead
|
43
|
+
th
|
44
|
+
= sort_link [:comable, @q], :code
|
45
|
+
th
|
46
|
+
/ TODO: Change to shipment_state and payment_state
|
47
|
+
= sort_link [:comable, @q], :state
|
48
|
+
th
|
49
|
+
= @orders.klass.human_attribute_name(:bill_full_name)
|
50
|
+
th
|
51
|
+
= @orders.klass.human_attribute_name(:order_details)
|
52
|
+
th
|
53
|
+
= sort_link [:comable, @q], :total_price
|
54
|
+
th
|
55
|
+
= sort_link [:comable, @q], :completed_at
|
56
|
+
tbody
|
57
|
+
- @orders.each do |order|
|
58
|
+
tr
|
59
|
+
td
|
60
|
+
= link_to order.code, comable.admin_order_path(order)
|
61
|
+
td
|
62
|
+
= order.human_state_name
|
63
|
+
td
|
64
|
+
= order.bill_full_name
|
65
|
+
td
|
66
|
+
ul.list-unstyled
|
67
|
+
- order.order_details.each do |order_detail|
|
68
|
+
li
|
69
|
+
| #{order_detail.name_with_sku} x #{order_detail.quantity}
|
70
|
+
td
|
71
|
+
= number_to_currency order.total_price
|
72
|
+
td
|
73
|
+
= l order.completed_at
|
56
74
|
|
57
75
|
.text-center
|
58
76
|
= paginate @orders, theme: :comable_backend
|
59
|
-
|
60
|
-
nav.col-sm-4
|
61
|
-
#comable-affix
|
62
|
-
.panel
|
63
|
-
.panel-body
|
64
|
-
= search_form_for @q, url: comable.admin_orders_path do |f|
|
65
|
-
.form-horizontal
|
66
|
-
.form-group
|
67
|
-
.col-sm-3.control-label
|
68
|
-
= f.label :code
|
69
|
-
.col-sm-9
|
70
|
-
= f.text_field :code_cont
|
71
|
-
|
72
|
-
.form-group
|
73
|
-
.col-sm-3.control-label
|
74
|
-
= f.label :customer_id
|
75
|
-
.col-sm-9
|
76
|
-
= f.text_field :customer_id_eq
|
77
|
-
|
78
|
-
.text-right
|
79
|
-
= f.submit Comable.t('admin.search'), class: 'btn btn-default'
|
@@ -1,57 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
.comable-page
|
2
|
+
.comable-page-heading
|
3
|
+
ul.pull-right.list-inline
|
4
|
+
li.btn-group
|
5
|
+
/ TODO: Comment out after implemented.
|
6
|
+
/ = link_to Comable.t('admin.nav.orders.cart'), '#', class: 'btn btn-default'
|
7
|
+
/ = link_to Comable.t('admin.nav.orders.shipment'), '#', class: 'btn btn-default'
|
8
|
+
/ = link_to Comable.t('admin.nav.orders.payment'), '#', class: 'btn btn-default'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
h1.page-header
|
11
|
+
ol.breadcrumb
|
12
|
+
li>
|
13
|
+
= link_to Comable.t('admin.nav.order'), comable.admin_orders_path
|
14
|
+
li.active
|
15
|
+
= @order.code
|
16
|
+
small< data-toggle="tooltip" data-placement="right" title="#{l @order.completed_at}"
|
17
|
+
= time_ago_in_words @order.completed_at
|
14
18
|
|
15
|
-
.row
|
19
|
+
.comable-page-body.row
|
16
20
|
section.col-sm-8
|
17
|
-
.panel.panel-
|
18
|
-
.panel-heading
|
19
|
-
.panel-title
|
20
|
-
= Comable.t('admin.nav.orders.detail')
|
21
|
-
.panel-body
|
22
|
-
dl.dl-horizontal
|
23
|
-
dt
|
24
|
-
= @order.class.human_attribute_name(:code)
|
25
|
-
dd
|
26
|
-
= @order.code
|
27
|
-
dt
|
28
|
-
= @order.class.human_attribute_name(:completed_at)
|
29
|
-
dd
|
30
|
-
= l @order.completed_at
|
31
|
-
dt
|
32
|
-
= @order.class.human_attribute_name(:bill_address)
|
33
|
-
dd
|
34
|
-
ul.list-unstyled
|
35
|
-
li = @order.bill_address.zip_code
|
36
|
-
li = @order.bill_address.full_name
|
37
|
-
li = @order.bill_address.state_name
|
38
|
-
li = @order.bill_address.city
|
39
|
-
li = @order.bill_address.detail
|
40
|
-
li = "#{@order.bill_address.class.human_attribute_name(:phone_number)}: #{@order.bill_address.phone_number}"
|
41
|
-
dt
|
42
|
-
= @order.class.human_attribute_name(:email)
|
43
|
-
dd
|
44
|
-
= @order.email
|
45
|
-
dt
|
46
|
-
= @order.class.human_attribute_name(:shipment_method)
|
47
|
-
dd
|
48
|
-
= @order.shipment_method.name
|
49
|
-
dt
|
50
|
-
= @order.class.human_attribute_name(:payment_method)
|
51
|
-
dd
|
52
|
-
= @order.payment_method.name
|
53
|
-
|
54
|
-
.panel.panel-inverse
|
21
|
+
.panel.panel-default
|
55
22
|
table.table
|
56
23
|
thead
|
57
24
|
tr
|
@@ -95,22 +62,85 @@
|
|
95
62
|
= number_to_currency @order.total_price
|
96
63
|
|
97
64
|
nav.col-sm-4
|
98
|
-
|
99
|
-
.panel
|
100
|
-
.
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
65
|
+
.panel.panel-default
|
66
|
+
.panel-body
|
67
|
+
h3.text-center
|
68
|
+
small>
|
69
|
+
= @order.class.human_attribute_name(:total_price)
|
70
|
+
= number_to_currency @order.total_price
|
71
|
+
|
72
|
+
.panel.panel-default
|
73
|
+
.panel-heading
|
74
|
+
.panel-title
|
75
|
+
= Comable.t('admin.bill')
|
76
|
+
.panel-body
|
77
|
+
.pull-right
|
78
|
+
.comable-avatar
|
79
|
+
= gravatar_tag @order.email, class: 'thumbnail'
|
80
|
+
|
81
|
+
dl.dl-horizontal.comable-address-with-icon
|
82
|
+
dt
|
83
|
+
i.fa.fa-map-marker.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:bill_address)}"
|
84
|
+
dd
|
85
|
+
ul.list-unstyled
|
86
|
+
li = @order.bill_address.zip_code
|
87
|
+
li = @order.bill_address.state_name
|
88
|
+
li = @order.bill_address.city
|
89
|
+
li = @order.bill_address.detail
|
90
|
+
|
91
|
+
- if @order.bill_address.phone_number.present?
|
92
|
+
dt
|
93
|
+
i.fa.fa-phone.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.bill_address.class.human_attribute_name(:phone_number)}"
|
94
|
+
dd
|
95
|
+
= @order.bill_address.phone_number
|
96
|
+
|
97
|
+
dt
|
98
|
+
i.fa.fa-user.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:customer)}"
|
99
|
+
dd
|
100
|
+
= link_to_if @order.customer, @order.bill_address.full_name, [comable, :admin, @order.customer]
|
101
|
+
|
102
|
+
dt
|
103
|
+
i.fa.fa-envelope.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:email)}"
|
104
|
+
dd
|
105
|
+
= mail_to @order.email
|
106
|
+
|
107
|
+
.panel.panel-default
|
108
|
+
.panel-heading
|
109
|
+
.panel-title
|
110
|
+
= Comable.t('admin.ship')
|
111
|
+
.panel-body
|
112
|
+
dl.dl-horizontal.comable-address-with-icon
|
113
|
+
dt
|
114
|
+
i.fa.fa-map-marker.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:ship_address)}"
|
115
|
+
dd
|
116
|
+
ul.list-unstyled
|
117
|
+
li = @order.ship_address.zip_code
|
118
|
+
li = @order.ship_address.state_name
|
119
|
+
li = @order.ship_address.city
|
120
|
+
li = @order.ship_address.detail
|
121
|
+
|
122
|
+
- if @order.ship_address.phone_number.present?
|
123
|
+
dt
|
124
|
+
i.fa.fa-phone.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.ship_address.class.human_attribute_name(:phone_number)}"
|
125
|
+
dd
|
126
|
+
= @order.ship_address.phone_number
|
127
|
+
|
128
|
+
dt
|
129
|
+
i.fa.fa-user.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:customer)}"
|
130
|
+
dd
|
131
|
+
= @order.bill_address.full_name
|
132
|
+
|
133
|
+
- if @order.shipment_method
|
134
|
+
dt
|
135
|
+
i.fa.fa-truck.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:shipment_method)}"
|
136
|
+
dd
|
137
|
+
= @order.shipment_method.name
|
105
138
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
= link_to Comable.t('admin.nav.orders.customer'), '#', class: 'list-group-item disabled'
|
139
|
+
- if @order.payment_method
|
140
|
+
dt
|
141
|
+
i.fa.fa-money.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:payment_method)}"
|
142
|
+
dd
|
143
|
+
= @order.payment_method.name
|
112
144
|
|
113
|
-
|
114
|
-
|
115
|
-
/ = link_to Comable.t('admin.nav.orders.shipment'), '#', class: 'list-group-item'
|
116
|
-
/ = link_to Comable.t('admin.nav.orders.payment'), '#', class: 'list-group-item'
|
145
|
+
.panel-footer
|
146
|
+
= render 'google_map', id: 'comable-google-map-for-ship-address', address: @order.ship_address
|
@@ -1,46 +1,31 @@
|
|
1
|
-
=
|
2
|
-
/ TODO: Standardize
|
3
|
-
- if @payment_method.errors.any?
|
4
|
-
#error_explanation
|
5
|
-
h2
|
6
|
-
= pluralize(@payment_method.errors.count, 'error')
|
7
|
-
| prohibited this payment_method from being saved:
|
8
|
-
|
9
|
-
ul
|
10
|
-
- @payment_method.errors.full_messages.each do |message|
|
11
|
-
li = message
|
1
|
+
= error_messages_for @payment_method
|
12
2
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
= Comable.t('admin.nav.payment_methods.edit')
|
3
|
+
= form_for [comable, :admin, @payment_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.select :payment_provider_type, Comable::PaymentProvider.all.map { |provider_class| [provider_class.display_name, provider_class.name] }
|
32
|
-
.col-sm-3
|
33
|
-
= f.select :payment_provider_kind, Comable::PaymentProvider::General.kind.map.with_index { |(_, value), index| [value, index] }
|
12
|
+
.col-sm-9
|
13
|
+
.form-group
|
14
|
+
= f.label :name
|
15
|
+
= f.text_field :name
|
34
16
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
17
|
+
.form-group
|
18
|
+
= f.label :payment_provider
|
19
|
+
.row
|
20
|
+
.col-sm-6
|
21
|
+
= f.select :payment_provider_type, Comable::PaymentProvider.all.map { |provider_class| [provider_class.display_name, provider_class.name] }
|
22
|
+
.col-sm-6
|
23
|
+
= f.select :payment_provider_kind, Comable::PaymentProvider::General.kind.map.with_index { |(_, value), index| [value, index] }
|
42
24
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
25
|
+
.form-group
|
26
|
+
= f.label :enable_price
|
27
|
+
.row
|
28
|
+
.col-sm-6
|
29
|
+
= f.text_field :enable_price_from
|
30
|
+
.col-sm-6
|
31
|
+
= f.text_field :enable_price_to
|
@@ -1,28 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
li.active
|
8
|
-
= @payment_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.payment_method'), comable.admin_payment_methods_path
|
12
|
+
li.active
|
13
|
+
= @payment_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_payment_method_path(@payment_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_payment_method_path(@payment_method), method: :delete, class: 'btn btn-danger'
|
@@ -1,53 +1,41 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
= Comable.t('admin.nav.payment_method')
|
7
|
-
|
8
|
-
h1.page-header
|
9
|
-
= Comable.t('admin.nav.payment_method')
|
10
|
-
small<
|
11
|
-
= @payment_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_payment_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
|
-
= @payment_methods.klass.human_attribute_name(:name)
|
27
|
-
th
|
28
|
-
= @payment_methods.klass.human_attribute_name(:payment_provider)
|
29
|
-
th
|
30
|
-
= @payment_methods.klass.human_attribute_name(:enable_price)
|
31
|
-
tbody
|
32
|
-
- @payment_methods.each do |payment_method|
|
33
|
-
tr
|
34
|
-
td
|
35
|
-
= link_to payment_method.name, comable.admin_payment_method_path(payment_method)
|
36
|
-
/- unless payment_method.activate_flag
|
37
|
-
/ span.fa.fa-eye-slash.text-muted<
|
38
|
-
td
|
39
|
-
= payment_method.payment_provider.display_name
|
40
|
-
td
|
41
|
-
- if payment_method.enable_price_from || payment_method.enable_price_to
|
42
|
-
span = number_to_currency payment_method.enable_price_from
|
43
|
-
span>< ~
|
44
|
-
span = number_to_currency payment_method.enable_price_to
|
7
|
+
h1.page-header
|
8
|
+
= Comable.t('admin.nav.payment_method')
|
9
|
+
small<
|
10
|
+
= @payment_methods.total_count
|
11
|
+
= Comable.t('admin.results')
|
45
12
|
|
46
|
-
|
47
|
-
|
13
|
+
.comable-page-body
|
14
|
+
- if @payment_methods.empty?
|
15
|
+
= Comable.t('admin.not_found')
|
16
|
+
- else
|
17
|
+
table.table.table-striped
|
18
|
+
thead
|
19
|
+
th
|
20
|
+
= @payment_methods.klass.human_attribute_name(:name)
|
21
|
+
th
|
22
|
+
= @payment_methods.klass.human_attribute_name(:payment_provider)
|
23
|
+
th
|
24
|
+
= @payment_methods.klass.human_attribute_name(:enable_price)
|
25
|
+
tbody
|
26
|
+
- @payment_methods.each do |payment_method|
|
27
|
+
tr
|
28
|
+
td
|
29
|
+
= link_to payment_method.name, comable.admin_payment_method_path(payment_method)
|
30
|
+
/- unless payment_method.activate_flag
|
31
|
+
/ span.fa.fa-eye-slash.text-muted<
|
32
|
+
td
|
33
|
+
= payment_method.payment_provider.display_name
|
34
|
+
td
|
35
|
+
- if payment_method.enable_price_from || payment_method.enable_price_to
|
36
|
+
span = number_to_currency payment_method.enable_price_from
|
37
|
+
span>< ~
|
38
|
+
span = number_to_currency payment_method.enable_price_to
|
48
39
|
|
49
|
-
|
50
|
-
|
51
|
-
.panel
|
52
|
-
.list-group
|
53
|
-
= link_to Comable.t('admin.actions.new'), comable.new_admin_payment_method_path, class: 'list-group-item'
|
40
|
+
.text-center
|
41
|
+
= paginate @payment_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.payment_method'), comable.admin_payment_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'
|