comable-backend 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,95 @@
|
|
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
|
+
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_orders_path(format: :csv, q: params[:q])
|
19
|
+
li
|
20
|
+
= link_to Comable.t('admin.export_to_excel'), comable.export_admin_orders_path(format: :xlsx, q: params[:q])
|
21
|
+
|
22
|
+
h1.page-header
|
23
|
+
= Comable.t('admin.nav.order')
|
24
|
+
small<
|
25
|
+
| #{@orders.total_count} #{Comable.t('admin.results')}
|
26
|
+
|
27
|
+
.comable-page-body
|
28
|
+
.comable-search
|
29
|
+
= search_form_for @q, url: comable.admin_orders_path do |f|
|
30
|
+
.input-group
|
31
|
+
span.input-group-btn
|
32
|
+
button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown"
|
33
|
+
i.fa.fa-search
|
34
|
+
span.caret<
|
35
|
+
ul.dropdown-menu role="menu"
|
36
|
+
li
|
37
|
+
= link_to Comable.t('admin.advanced_search'), 'javascript:void(0)', 'data-toggle' => 'collapse', 'data-target' => '#comable-advanced-search'
|
38
|
+
li
|
39
|
+
= link_to Comable.t('admin.clear_search_conditions'), comable.admin_orders_path
|
40
|
+
= f.text_field :code_cont, class: 'form-control'
|
41
|
+
span.input-group-btn
|
42
|
+
= f.submit Comable.t('admin.search'), class: 'btn btn-default'
|
43
|
+
.hidden
|
44
|
+
= f.label :user_id
|
45
|
+
= f.text_field :user_id_eq
|
46
|
+
|
47
|
+
= render 'comable/admin/shared/advanced_search', f: f
|
48
|
+
|
49
|
+
section
|
50
|
+
- if @orders.empty?
|
51
|
+
= Comable.t('admin.not_found')
|
52
|
+
- else
|
53
|
+
table.table.table-striped
|
54
|
+
thead
|
55
|
+
th
|
56
|
+
= sort_link [:comable, @q], :code
|
57
|
+
th
|
58
|
+
= sort_link [:comable, @q], :state
|
59
|
+
th
|
60
|
+
= @orders.klass.human_attribute_name(:payment_state)
|
61
|
+
th
|
62
|
+
= @orders.klass.human_attribute_name(:shipment_state)
|
63
|
+
th
|
64
|
+
= @orders.klass.human_attribute_name(:bill_full_name)
|
65
|
+
th
|
66
|
+
= @orders.klass.human_attribute_name(:order_items)
|
67
|
+
th
|
68
|
+
= sort_link [:comable, @q], :total_price
|
69
|
+
th
|
70
|
+
= sort_link [:comable, @q], :completed_at
|
71
|
+
tbody
|
72
|
+
- @orders.each do |order|
|
73
|
+
tr
|
74
|
+
td
|
75
|
+
= link_to order.code, comable.admin_order_path(order)
|
76
|
+
td
|
77
|
+
= order.human_state_name
|
78
|
+
td
|
79
|
+
= order.payment_human_state_name
|
80
|
+
td
|
81
|
+
= order.shipment_human_state_name
|
82
|
+
td
|
83
|
+
= order.bill_full_name
|
84
|
+
td
|
85
|
+
ul.list-unstyled
|
86
|
+
- order.order_items.each do |order_item|
|
87
|
+
li
|
88
|
+
| #{order_item.name_with_sku} x #{order_item.quantity}
|
89
|
+
td
|
90
|
+
= number_to_currency order.total_price
|
91
|
+
td
|
92
|
+
= l order.completed_at
|
93
|
+
|
94
|
+
.text-center
|
95
|
+
= paginate @orders, theme: :comable_backend
|
@@ -0,0 +1,177 @@
|
|
1
|
+
.comable-page
|
2
|
+
.comable-page-heading
|
3
|
+
ul.pull-right.list-inline
|
4
|
+
li
|
5
|
+
- if !@order.shipped?
|
6
|
+
= link_to comable.ship_admin_order_path(@order), class: 'btn btn-primary', method: :post, disabled: !@order.can_ship? do
|
7
|
+
i.fa.fa-truck>
|
8
|
+
= Comable.t('admin.ship')
|
9
|
+
- if @order.completed?
|
10
|
+
li
|
11
|
+
= link_to comable.cancel_admin_order_path(@order), class: 'btn btn-default', method: :post do
|
12
|
+
= @order.class.human_state_event_name(:cancel)
|
13
|
+
- if @order.canceled?
|
14
|
+
li
|
15
|
+
= button_to comable.resume_admin_order_path(@order), class: 'btn btn-default', method: :post do
|
16
|
+
= @order.class.human_state_event_name(:resume)
|
17
|
+
|
18
|
+
ul.pull-right.list-inline
|
19
|
+
li
|
20
|
+
= link_to comable.edit_admin_order_path(@order), class: 'btn btn-default' do
|
21
|
+
span.fa.fa-edit>
|
22
|
+
= Comable.t('admin.actions.edit')
|
23
|
+
|
24
|
+
li.btn-group
|
25
|
+
/ TODO: Comment out after implemented.
|
26
|
+
/ = link_to Comable.t('admin.nav.orders.cart'), '#', class: 'btn btn-default'
|
27
|
+
/ = link_to Comable.t('admin.nav.orders.shipment'), '#', class: 'btn btn-default'
|
28
|
+
/ = link_to Comable.t('admin.nav.orders.payment'), '#', class: 'btn btn-default'
|
29
|
+
|
30
|
+
h1.page-header
|
31
|
+
ol.breadcrumb
|
32
|
+
li>
|
33
|
+
= link_to Comable.t('admin.nav.order'), comable.admin_orders_path
|
34
|
+
li.active
|
35
|
+
= @order.code
|
36
|
+
small< data-toggle="tooltip" data-placement="right" title="#{l @order.completed_at}"
|
37
|
+
= time_ago_in_words @order.completed_at
|
38
|
+
|
39
|
+
.comable-page-body
|
40
|
+
- if @order.payment
|
41
|
+
= render 'payment_state', payment: @order.payment
|
42
|
+
- if @order.shipment
|
43
|
+
= render 'shipment_state', shipment: @order.shipment
|
44
|
+
|
45
|
+
section.row
|
46
|
+
.col-lg-8
|
47
|
+
.panel.panel-default
|
48
|
+
table.table
|
49
|
+
thead
|
50
|
+
tr
|
51
|
+
th colspan="2"
|
52
|
+
= @order.order_items.klass.human_attribute_name(:product)
|
53
|
+
th
|
54
|
+
= @order.order_items.klass.human_attribute_name(:price)
|
55
|
+
th
|
56
|
+
= @order.order_items.klass.human_attribute_name(:quantity)
|
57
|
+
th
|
58
|
+
= @order.order_items.klass.human_attribute_name(:subtotal_price)
|
59
|
+
tbody
|
60
|
+
- @order.order_items.each do |order_item|
|
61
|
+
tr
|
62
|
+
td width="180"
|
63
|
+
= image_tag order_item.image_url, width: '100%'
|
64
|
+
td
|
65
|
+
= order_item.name_with_sku
|
66
|
+
.text-muted
|
67
|
+
small = order_item.code
|
68
|
+
td
|
69
|
+
= number_to_currency order_item.price
|
70
|
+
td
|
71
|
+
= number_with_delimiter order_item.quantity
|
72
|
+
td
|
73
|
+
= number_to_currency order_item.subtotal_price
|
74
|
+
tr
|
75
|
+
th.text-right colspan="4"
|
76
|
+
= @order.class.human_attribute_name(:item_total_price)
|
77
|
+
td
|
78
|
+
= number_to_currency @order.item_total_price
|
79
|
+
tr
|
80
|
+
th.text-right colspan="4"
|
81
|
+
= @order.class.human_attribute_name(:payment_fee)
|
82
|
+
td
|
83
|
+
= number_to_currency @order.payment_fee
|
84
|
+
tr
|
85
|
+
th.text-right colspan="4"
|
86
|
+
= @order.class.human_attribute_name(:shipment_fee)
|
87
|
+
td
|
88
|
+
= number_to_currency @order.shipment_fee
|
89
|
+
tr
|
90
|
+
th.text-right colspan="4"
|
91
|
+
= @order.class.human_attribute_name(:total_price)
|
92
|
+
td
|
93
|
+
= number_to_currency @order.total_price
|
94
|
+
|
95
|
+
nav.col-lg-4
|
96
|
+
.panel.panel-default.visible-lg-block
|
97
|
+
.panel-body
|
98
|
+
h3.text-center
|
99
|
+
small>
|
100
|
+
= @order.class.human_attribute_name(:total_price)
|
101
|
+
= number_to_currency @order.total_price
|
102
|
+
|
103
|
+
.panel.panel-default
|
104
|
+
.panel-heading
|
105
|
+
.panel-title
|
106
|
+
= Comable.t('admin.bill')
|
107
|
+
.panel-body
|
108
|
+
.pull-right
|
109
|
+
.comable-avatar
|
110
|
+
= gravatar_tag @order.email, class: 'thumbnail'
|
111
|
+
|
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(:bill_address)}"
|
115
|
+
dd
|
116
|
+
ul.list-unstyled
|
117
|
+
li = @order.bill_address.zip_code
|
118
|
+
li = @order.bill_address.state_name
|
119
|
+
li = @order.bill_address.city
|
120
|
+
li = @order.bill_address.detail
|
121
|
+
|
122
|
+
- if @order.bill_address.phone_number.present?
|
123
|
+
dt
|
124
|
+
i.fa.fa-phone.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.bill_address.class.human_attribute_name(:phone_number)}"
|
125
|
+
dd
|
126
|
+
= @order.bill_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(:user)}"
|
130
|
+
dd
|
131
|
+
= link_to_if @order.user, @order.bill_address.full_name, [comable, :admin, @order.user]
|
132
|
+
|
133
|
+
dt
|
134
|
+
i.fa.fa-envelope.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:email)}"
|
135
|
+
dd
|
136
|
+
= mail_to @order.email
|
137
|
+
|
138
|
+
.panel.panel-default
|
139
|
+
.panel-heading
|
140
|
+
.panel-title
|
141
|
+
= Comable.t('admin.ship')
|
142
|
+
.panel-body
|
143
|
+
dl.dl-horizontal.comable-address-with-icon
|
144
|
+
dt
|
145
|
+
i.fa.fa-map-marker.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:ship_address)}"
|
146
|
+
dd
|
147
|
+
ul.list-unstyled
|
148
|
+
li = @order.ship_address.zip_code
|
149
|
+
li = @order.ship_address.state_name
|
150
|
+
li = @order.ship_address.city
|
151
|
+
li = @order.ship_address.detail
|
152
|
+
|
153
|
+
- if @order.ship_address.phone_number.present?
|
154
|
+
dt
|
155
|
+
i.fa.fa-phone.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.ship_address.class.human_attribute_name(:phone_number)}"
|
156
|
+
dd
|
157
|
+
= @order.ship_address.phone_number
|
158
|
+
|
159
|
+
dt
|
160
|
+
i.fa.fa-user.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:user)}"
|
161
|
+
dd
|
162
|
+
= @order.bill_address.full_name
|
163
|
+
|
164
|
+
- if @order.shipment
|
165
|
+
dt
|
166
|
+
i.fa.fa-truck.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:shipment_method)}"
|
167
|
+
dd
|
168
|
+
= @order.shipment.name
|
169
|
+
|
170
|
+
- if @order.payment
|
171
|
+
dt
|
172
|
+
i.fa.fa-money.fa-lg data-toggle="tooltip" data-placement="left" title="#{@order.class.human_attribute_name(:payment_method)}"
|
173
|
+
dd
|
174
|
+
= @order.payment.name
|
175
|
+
|
176
|
+
.panel-footer
|
177
|
+
= render 'google_map', id: 'comable-google-map-for-ship-address', address: @order.ship_address
|
@@ -0,0 +1,69 @@
|
|
1
|
+
= error_messages_for @page
|
2
|
+
|
3
|
+
- url = @page.new_record? ? comable.admin_pages_path : comable.admin_page_path(@page)
|
4
|
+
|
5
|
+
= form_for @page, url: url do |f|
|
6
|
+
.hidden
|
7
|
+
= f.submit
|
8
|
+
|
9
|
+
fieldset
|
10
|
+
.col-md-3
|
11
|
+
legend
|
12
|
+
= Comable.t('admin.nav.pages.general')
|
13
|
+
|
14
|
+
.col-md-9
|
15
|
+
.form-group
|
16
|
+
= f.label :title
|
17
|
+
= f.text_field :title
|
18
|
+
|
19
|
+
.form-group
|
20
|
+
= f.label :content
|
21
|
+
= f.text_area :content, rows: (f.object.content ? f.object.content.lines.count : nil)
|
22
|
+
|
23
|
+
hr
|
24
|
+
|
25
|
+
fieldset
|
26
|
+
.col-md-3
|
27
|
+
legend
|
28
|
+
= Comable.t('admin.nav.pages.seo')
|
29
|
+
|
30
|
+
.col-md-9
|
31
|
+
.form-group
|
32
|
+
= f.label :page_title
|
33
|
+
= f.text_field :page_title
|
34
|
+
|
35
|
+
.form-group
|
36
|
+
= f.label :meta_description
|
37
|
+
= f.text_field :meta_description
|
38
|
+
|
39
|
+
.form-group
|
40
|
+
= f.label :meta_keywords
|
41
|
+
= f.text_field :meta_keywords
|
42
|
+
|
43
|
+
.form-group
|
44
|
+
= f.label :slug
|
45
|
+
.slug
|
46
|
+
.slug-url
|
47
|
+
span
|
48
|
+
= comable.page_url(id: '')
|
49
|
+
.slug-body
|
50
|
+
= f.text_field :slug
|
51
|
+
|
52
|
+
hr
|
53
|
+
|
54
|
+
fieldset
|
55
|
+
.col-md-3
|
56
|
+
legend
|
57
|
+
= Comable.t('admin.nav.pages.visibility')
|
58
|
+
|
59
|
+
.col-md-9
|
60
|
+
.form-group
|
61
|
+
.radio-inline
|
62
|
+
label
|
63
|
+
= f.radio_button :published_at, :published, checked: @page.published_at.present?
|
64
|
+
= Comable.t('admin.nav.pages.published')
|
65
|
+
.radio-inline
|
66
|
+
label
|
67
|
+
= f.radio_button :published_at, :unpublished, checked: @page.published_at.blank?
|
68
|
+
= Comable.t('admin.nav.pages.unpublished')
|
69
|
+
= f.text_field :published_at, value: @page.published_at.try(:strftime, '%Y-%m-%d %H:%M'), class: 'datetimepicker'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.comable-page
|
2
|
+
.comable-main-fixed-top
|
3
|
+
.comable-page-heading
|
4
|
+
ul.pull-right.list-inline
|
5
|
+
li
|
6
|
+
= link_to comable.page_path(@page), class: 'btn btn-default', target: '_blank' do
|
7
|
+
i.fa.fa-external-link>
|
8
|
+
= Comable.t('admin.preview')
|
9
|
+
li
|
10
|
+
= link_to_save
|
11
|
+
|
12
|
+
h1.page-header
|
13
|
+
ol.breadcrumb
|
14
|
+
li>
|
15
|
+
= link_to Comable.t('admin.nav.page'), comable.admin_pages_path
|
16
|
+
li.active
|
17
|
+
= @page.title
|
18
|
+
|
19
|
+
.comable-page-body
|
20
|
+
= render 'form'
|
21
|
+
hr
|
22
|
+
.panel.panel-danger
|
23
|
+
.panel-heading type="button" data-toggle="collapse" data-target="#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_page')
|
31
|
+
= link_to Comable.t('admin.actions.destroy'), comable.admin_page_path(@page), method: :delete, class: 'btn btn-danger'
|
@@ -0,0 +1,55 @@
|
|
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_page_path, class: 'btn btn-default'
|
6
|
+
h1.page-header
|
7
|
+
= Comable.t('admin.nav.page')
|
8
|
+
small<
|
9
|
+
| #{@pages.size} #{Comable.t('admin.results')}
|
10
|
+
|
11
|
+
.comable-page-body
|
12
|
+
.comable-search
|
13
|
+
= search_form_for @q, url: comable.admin_pages_path do |f|
|
14
|
+
.input-group
|
15
|
+
span.input-group-btn
|
16
|
+
button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown"
|
17
|
+
i.fa.fa-search
|
18
|
+
span.caret<
|
19
|
+
ul.dropdown-menu role="menu"
|
20
|
+
li
|
21
|
+
= link_to Comable.t('admin.advanced_search'), 'javascript:void(0)', 'data-toggle' => 'collapse', 'data-target' => '#comable-advanced-search'
|
22
|
+
li
|
23
|
+
= link_to Comable.t('admin.clear_search_conditions'), comable.admin_pages_path
|
24
|
+
= f.text_field :title_cont, class: 'form-control'
|
25
|
+
span.input-group-btn
|
26
|
+
= f.submit Comable.t('admin.search'), class: 'btn btn-default'
|
27
|
+
|
28
|
+
= render 'comable/admin/shared/advanced_search', f: f
|
29
|
+
|
30
|
+
section
|
31
|
+
- if @pages.empty?
|
32
|
+
= Comable.t('admin.not_found')
|
33
|
+
- else
|
34
|
+
table.table.table-striped
|
35
|
+
thead
|
36
|
+
th
|
37
|
+
= sort_link [:comable, @q], :title
|
38
|
+
th
|
39
|
+
= sort_link [:comable, @q], :content
|
40
|
+
th
|
41
|
+
= sort_link [:comable, @q], :published_at
|
42
|
+
tbody
|
43
|
+
- @pages.each do |page|
|
44
|
+
tr
|
45
|
+
td
|
46
|
+
= link_to page.title, comable.admin_page_path(page)
|
47
|
+
small.text-muted<
|
48
|
+
| #{comable.page_path(page)}
|
49
|
+
td
|
50
|
+
= page.content.truncate(50)
|
51
|
+
td
|
52
|
+
- if page.published_at
|
53
|
+
= l page.published_at
|
54
|
+
- else
|
55
|
+
= Comable.t('admin.nav.pages.unpublished')
|
@@ -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.page'), comable.admin_pages_path
|
12
|
+
li.active
|
13
|
+
= Comable.t('admin.actions.new')
|
14
|
+
|
15
|
+
.comable-page-body
|
16
|
+
= render 'form'
|