pattana 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/pattana/api/v1/cities_controller.rb +4 -4
- data/app/controllers/pattana/api/v1/countries_controller.rb +5 -2
- data/app/controllers/pattana/api/v1/regions_controller.rb +2 -2
- data/app/controllers/pattana/application_controller.rb +10 -0
- data/app/controllers/pattana/cities_controller.rb +1 -1
- data/app/controllers/pattana/countries_controller.rb +59 -3
- data/app/controllers/pattana/dashboard_controller.rb +1 -1
- data/app/controllers/pattana/regions_controller.rb +55 -3
- data/app/models/city.rb +2 -2
- data/app/models/country.rb +2 -2
- data/app/models/region.rb +2 -2
- data/app/serializers/city_preview_serializer.rb +1 -1
- data/app/serializers/country_preview_serializer.rb +1 -1
- data/app/serializers/region_preview_serializer.rb +1 -1
- data/app/views/pattana/api/v1/docs/cities_in_a_country/_pos_case_1.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_country/_pos_case_2.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_country/_pos_case_3.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_country/_pos_case_4.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_region/_pos_case_1.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_region/_pos_case_2.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_region/_pos_case_3.html.erb +11 -4
- data/app/views/pattana/api/v1/docs/cities_in_a_region/_pos_case_4.html.erb +12 -4
- data/app/views/pattana/api/v1/docs/countries/_pos_case_1.html.erb +11 -4
- data/app/views/pattana/api/v1/docs/countries/_pos_case_2.html.erb +12 -17
- data/app/views/pattana/api/v1/docs/countries/_pos_case_3.html.erb +19 -15
- data/app/views/pattana/api/v1/docs/countries/_pos_case_4.html.erb +6 -20
- data/app/views/pattana/api/v1/docs/regions/_pos_case_1.html.erb +12 -3
- data/app/views/pattana/api/v1/docs/regions/_pos_case_2.html.erb +14 -5
- data/app/views/pattana/api/v1/docs/regions/_pos_case_3.html.erb +12 -3
- data/app/views/pattana/api/v1/docs/regions/_pos_case_4.html.erb +13 -4
- data/app/views/pattana/cities/_show.html.erb +31 -0
- data/app/views/pattana/countries/_show.html.erb +106 -39
- data/app/views/pattana/countries/cities.js.erb +5 -2
- data/app/views/pattana/countries/index.html.erb +10 -2
- data/app/views/pattana/countries/regions.js.erb +5 -2
- data/app/views/pattana/country_cities/_action_buttons.html.erb +17 -0
- data/app/views/pattana/country_regions/_action_buttons.html.erb +17 -0
- data/app/views/pattana/dashboard/index.html.erb +3 -3
- data/app/views/pattana/region_cities/_action_buttons.html.erb +17 -0
- data/app/views/pattana/regions/_show.html.erb +68 -22
- data/app/views/pattana/regions/cities.js.erb +5 -2
- data/lib/pattana/version.rb +1 -1
- metadata +7 -4
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-9 col-sm-
|
5
|
+
<div class="col-md-9 col-sm-6 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
6
6
|
|
7
7
|
<div class="visible-sm visible-xs mt-50"></div>
|
8
8
|
|
@@ -24,6 +24,37 @@
|
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
27
|
+
<div class="col-md-3 col-sm-6 col-xs-12">
|
28
|
+
|
29
|
+
<% edit_link = edit_country_path(id: @country.id) %>
|
30
|
+
<% delete_link = country_path(id: @country.id) %>
|
31
|
+
|
32
|
+
<% if @country.show_in_api? %>
|
33
|
+
<!-- Hide in API -->
|
34
|
+
<%= link_to raw("<i class=\"fa fa-cloud mr-5\"></i> Hide in API"), hide_in_api_country_path(:id => @country.id), :remote=>true, class: "btn btn-block btn-danger btn-only-hover" %>
|
35
|
+
<% else %>
|
36
|
+
<!-- Show in API -->
|
37
|
+
<%= link_to raw("<i class=\"fa fa-cloud-download mr-5\"></i> Show in API"), show_in_api_country_path(:id => @country.id), :remote=>true, class: "btn btn-block btn-success btn-only-hover" %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if @country.operational? %>
|
41
|
+
<!-- Hide in API -->
|
42
|
+
<%= link_to raw("<i class=\"fa fa-toggle-off mr-5\"></i> Hide in API"), remove_operational_country_path(:id => @country.id), :remote=>true, class: "btn btn-block btn-danger btn-only-hover" %>
|
43
|
+
<% else %>
|
44
|
+
<!-- Show in API -->
|
45
|
+
<%= link_to raw("<i class=\"fa fa-toggle-on mr-5\"></i> Show in API"), mark_as_operational_country_path(:id => @country.id), :remote=>true, class: "btn btn-block btn-success btn-only-hover" %>
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
<!-- Edit -->
|
49
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Edit"), edit_link, :remote=>true, class: "btn btn-block btn-white btn-only-hover" %>
|
50
|
+
|
51
|
+
<!-- Delete -->
|
52
|
+
<%= link_to raw("<i class=\"linecons-trash mr-5\"></i> Delete"), delete_link, method: :delete, :remote=>true, data: { confirm: 'Are you sure?' }, class: "btn btn-block btn-danger btn-only-hover" %>
|
53
|
+
|
54
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
|
27
58
|
</div>
|
28
59
|
|
29
60
|
<%= clear_tag(50) %>
|
@@ -141,24 +172,10 @@
|
|
141
172
|
<div class="tab-pane" id="regions" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
142
173
|
<%= clear_tag(20) %>
|
143
174
|
|
144
|
-
<div id="div_region_action_buttons">
|
145
|
-
<div class="row">
|
146
|
-
<div class="col-md-6">
|
147
|
-
|
148
|
-
<%= theme_button('Refresh', 'refresh', regions_country_path(@country), classes: "pull-left", btn_type: "white") %>
|
149
|
-
|
150
|
-
</div>
|
151
|
-
<div class="col-md-6">
|
152
|
-
<%= search_form_kuppayam(Region, regions_country_path(@country), text: "") %>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
</div>
|
156
|
-
<%= clear_tag(10) %>
|
157
|
-
|
158
175
|
<div id="div_region_counts">
|
159
176
|
<div class="row">
|
160
177
|
|
161
|
-
<div class="col-lg-
|
178
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
162
179
|
|
163
180
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
164
181
|
|
@@ -182,10 +199,9 @@
|
|
182
199
|
</div>
|
183
200
|
|
184
201
|
</div>
|
185
|
-
|
186
202
|
</div>
|
187
203
|
|
188
|
-
<div class="col-lg-
|
204
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
189
205
|
|
190
206
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
191
207
|
|
@@ -203,44 +219,61 @@
|
|
203
219
|
<i class="linecons-cloud"></i>
|
204
220
|
</div>
|
205
221
|
<div class="xe-label">
|
206
|
-
<strong class="num"><%= @country.regions.show_in_api.count %></strong>
|
222
|
+
<strong class="num"><%= @country.regions.show_in_api(true).count %></strong>
|
207
223
|
<span>Show in API</span>
|
208
224
|
</div>
|
209
225
|
</div>
|
210
226
|
|
211
227
|
</div>
|
212
|
-
|
213
228
|
</div>
|
229
|
+
|
230
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
214
231
|
|
232
|
+
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
233
|
+
|
234
|
+
<div class="xe-widget xe-counter"
|
235
|
+
data-count=".num"
|
236
|
+
data-from="0"
|
237
|
+
data-to="99.9"
|
238
|
+
data-suffix="%"
|
239
|
+
data-duration="2"
|
240
|
+
style="margin-bottom: 0px;
|
241
|
+
padding: 0px;
|
242
|
+
width: 15%;
|
243
|
+
margin: 0px auto;">
|
244
|
+
<div class="xe-icon">
|
245
|
+
<i class="fa-toggle-on"></i>
|
246
|
+
</div>
|
247
|
+
<div class="xe-label">
|
248
|
+
<strong class="num"><%= @country.regions.operational(true).count %></strong>
|
249
|
+
<span>Operational</span>
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
</div>
|
215
255
|
|
216
256
|
</div>
|
217
257
|
</div>
|
258
|
+
|
259
|
+
<div id="div_region_action_buttons">
|
260
|
+
</div>
|
261
|
+
|
218
262
|
<div id="div_region_index">
|
219
|
-
|
263
|
+
<div class="text-center">
|
264
|
+
<p>Click the below button to see the list of regions in <%= @country.name %></p>
|
265
|
+
<%= link_to('Show Regions', regions_country_path(@country), class: "mt-10 btn btn-success", remote: true) %>
|
266
|
+
</div>
|
220
267
|
</div>
|
221
268
|
</div>
|
222
269
|
|
223
270
|
<div class="tab-pane" id="cities" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
224
271
|
<%= clear_tag(20) %>
|
225
272
|
|
226
|
-
<div id="div_city_action_buttons">
|
227
|
-
<div class="row">
|
228
|
-
<div class="col-md-6">
|
229
|
-
|
230
|
-
<%= theme_button('Refresh', 'refresh', cities_country_path(@country), classes: "pull-left", btn_type: "white") %>
|
231
|
-
|
232
|
-
</div>
|
233
|
-
<div class="col-md-6">
|
234
|
-
<%= search_form_kuppayam(City, cities_country_path(@country), text: "") %>
|
235
|
-
</div>
|
236
|
-
</div>
|
237
|
-
</div>
|
238
|
-
<%= clear_tag(10) %>
|
239
|
-
|
240
273
|
<div id="div_city_counts">
|
241
274
|
<div class="row">
|
242
275
|
|
243
|
-
<div class="col-lg-
|
276
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
244
277
|
|
245
278
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
246
279
|
|
@@ -267,7 +300,7 @@
|
|
267
300
|
|
268
301
|
</div>
|
269
302
|
|
270
|
-
<div class="col-lg-
|
303
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
271
304
|
|
272
305
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
273
306
|
|
@@ -285,7 +318,7 @@
|
|
285
318
|
<i class="linecons-cloud"></i>
|
286
319
|
</div>
|
287
320
|
<div class="xe-label">
|
288
|
-
<strong class="num"><%= @country.cities.show_in_api.count %></strong>
|
321
|
+
<strong class="num"><%= @country.cities.show_in_api(true).count %></strong>
|
289
322
|
<span>Show in API</span>
|
290
323
|
</div>
|
291
324
|
</div>
|
@@ -293,12 +326,46 @@
|
|
293
326
|
</div>
|
294
327
|
|
295
328
|
</div>
|
329
|
+
|
330
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
331
|
+
|
332
|
+
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
333
|
+
|
334
|
+
<div class="xe-widget xe-counter"
|
335
|
+
data-count=".num"
|
336
|
+
data-from="0"
|
337
|
+
data-to="99.9"
|
338
|
+
data-suffix="%"
|
339
|
+
data-duration="2"
|
340
|
+
style="margin-bottom: 0px;
|
341
|
+
padding: 0px;
|
342
|
+
width: 15%;
|
343
|
+
margin: 0px auto;">
|
344
|
+
<div class="xe-icon">
|
345
|
+
<i class="fa-toggle-on"></i>
|
346
|
+
</div>
|
347
|
+
<div class="xe-label">
|
348
|
+
<strong class="num"><%= @country.cities.operational(true).count %></strong>
|
349
|
+
<span>Operational</span>
|
350
|
+
</div>
|
351
|
+
</div>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
</div>
|
296
356
|
|
297
357
|
|
298
358
|
</div>
|
299
359
|
</div>
|
360
|
+
|
361
|
+
<div id="div_city_action_buttons">
|
362
|
+
</div>
|
363
|
+
|
300
364
|
<div id="div_city_index">
|
301
|
-
|
365
|
+
<div class="text-center">
|
366
|
+
<p>Click the below button to see the list of cities in <%= @country.name %></p>
|
367
|
+
<%= link_to('Show Cities', cities_country_path(@country), class: "mt-10 btn btn-success", remote: true) %>
|
368
|
+
</div>
|
302
369
|
</div>
|
303
370
|
</div>
|
304
371
|
|
@@ -1,11 +1,14 @@
|
|
1
1
|
<% if @cities.any? %>
|
2
2
|
|
3
3
|
// Refresh the list
|
4
|
+
$('#div_city_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/country_cities/action_buttons")) %>");
|
4
5
|
$('#div_city_index').html("<%= escape_javascript(render(:partial=>"pattana/country_cities/index")) %>");
|
5
6
|
|
6
7
|
<% else %>
|
7
|
-
|
8
|
+
|
9
|
+
$('#div_city_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/country_cities/action_buttons")) %>");
|
10
|
+
|
8
11
|
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
9
|
-
$('#div_city_index').html(noResultsText);
|
12
|
+
$('#div_city_index .table-responsive').html(noResultsText);
|
10
13
|
|
11
14
|
<% end %>
|
@@ -11,8 +11,16 @@
|
|
11
11
|
<div class="row">
|
12
12
|
<div class="col-md-6">
|
13
13
|
|
14
|
-
<%= theme_button('Refresh', 'refresh', pattana.countries_path(), classes: "pull-left", btn_type: "white") %>
|
15
|
-
|
14
|
+
<%= theme_button('Refresh', 'refresh', pattana.countries_path(), classes: "pull-left mr-10", btn_type: "white") %>
|
15
|
+
|
16
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
17
|
+
<% if options[:object_filter] == true %>
|
18
|
+
<%= report_object_filter(filter_name, options) %>
|
19
|
+
<% else %>
|
20
|
+
<%= report_filter(filter_name, options) %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
|
16
24
|
</div>
|
17
25
|
<div class="col-md-6">
|
18
26
|
<%= search_form_kuppayam(Country, pattana.countries_path, text: @filters[:query]) %>
|
@@ -1,11 +1,14 @@
|
|
1
1
|
<% if @regions.any? %>
|
2
2
|
|
3
3
|
// Refresh the list
|
4
|
+
$('#div_region_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/country_regions/action_buttons")) %>");
|
4
5
|
$('#div_region_index').html("<%= escape_javascript(render(:partial=>"pattana/country_regions/index")) %>");
|
5
6
|
|
6
7
|
<% else %>
|
7
|
-
|
8
|
+
|
9
|
+
$('#div_region_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/country_regions/action_buttons")) %>");
|
10
|
+
|
8
11
|
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
9
|
-
$('#div_region_index').html(noResultsText);
|
12
|
+
$('#div_region_index .table-responsive').html(noResultsText);
|
10
13
|
|
11
14
|
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-6">
|
3
|
+
<%= theme_button('Refresh', 'refresh', cities_country_path(@country), classes: "pull-left mr-10", btn_type: "success") %>
|
4
|
+
|
5
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
6
|
+
<% if options[:object_filter] == true %>
|
7
|
+
<%= report_object_filter(filter_name, options) %>
|
8
|
+
<% else %>
|
9
|
+
<%= report_filter(filter_name, options) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<div class="col-md-6">
|
14
|
+
<%= search_form_kuppayam(City, cities_country_path(@country), text: @query) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<%= clear_tag(10) %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-6">
|
3
|
+
<%= theme_button('Refresh', 'refresh', regions_country_path(@country), classes: "pull-left mr-10", btn_type: "success") %>
|
4
|
+
|
5
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
6
|
+
<% if options[:object_filter] == true %>
|
7
|
+
<%= report_object_filter(filter_name, options) %>
|
8
|
+
<% else %>
|
9
|
+
<%= report_filter(filter_name, options) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<div class="col-md-6">
|
14
|
+
<%= search_form_kuppayam(Region, regions_country_path(@country), text: @query) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<%= clear_tag(10) %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
countries: {
|
4
4
|
counts: {
|
5
5
|
total: Country.count,
|
6
|
-
show_in_api: Country.show_in_api.count
|
6
|
+
show_in_api: Country.show_in_api(true).count
|
7
7
|
},
|
8
8
|
text: "Countries",
|
9
9
|
icon_class: "fa-flag-checkered",
|
@@ -12,7 +12,7 @@
|
|
12
12
|
regions: {
|
13
13
|
counts: {
|
14
14
|
total: Region.count,
|
15
|
-
show_in_api: Region.show_in_api.count
|
15
|
+
show_in_api: Region.show_in_api(true).count
|
16
16
|
},
|
17
17
|
text: "Regions",
|
18
18
|
icon_class: "fa-globe",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
cities: {
|
22
22
|
counts: {
|
23
23
|
total: City.count,
|
24
|
-
show_in_api: City.show_in_api.count
|
24
|
+
show_in_api: City.show_in_api(true).count
|
25
25
|
},
|
26
26
|
text: "Cities",
|
27
27
|
icon_class: "fa-map-marker",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-6">
|
3
|
+
<%= theme_button('Refresh', 'refresh', cities_region_path(@region), classes: "pull-left mr-10", btn_type: "success") %>
|
4
|
+
|
5
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
6
|
+
<% if options[:object_filter] == true %>
|
7
|
+
<%= report_object_filter(filter_name, options) %>
|
8
|
+
<% else %>
|
9
|
+
<%= report_filter(filter_name, options) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<div class="col-md-6">
|
14
|
+
<%= search_form_kuppayam(City, cities_region_path(@region), text: @query) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<%= clear_tag(10) %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-9 col-sm-
|
5
|
+
<div class="col-md-9 col-sm-6 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
6
6
|
|
7
7
|
<div class="visible-sm visible-xs mt-50"></div>
|
8
8
|
|
@@ -28,6 +28,37 @@
|
|
28
28
|
|
29
29
|
</div>
|
30
30
|
|
31
|
+
<div class="col-md-3 col-sm-6 col-xs-12">
|
32
|
+
|
33
|
+
<% edit_link = edit_region_path(id: @region.id) %>
|
34
|
+
<% delete_link = region_path(id: @region.id) %>
|
35
|
+
|
36
|
+
<% if @region.show_in_api? %>
|
37
|
+
<!-- Hide in API -->
|
38
|
+
<%= link_to raw("<i class=\"fa fa-cloud mr-5\"></i> Hide in API"), hide_in_api_region_path(:id => @region.id), :remote=>true, class: "btn btn-block btn-danger btn-only-hover" %>
|
39
|
+
<% else %>
|
40
|
+
<!-- Show in API -->
|
41
|
+
<%= link_to raw("<i class=\"fa fa-cloud-download mr-5\"></i> Show in API"), show_in_api_region_path(:id => @region.id), :remote=>true, class: "btn btn-block btn-success btn-only-hover" %>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% if @region.operational? %>
|
45
|
+
<!-- Hide in API -->
|
46
|
+
<%= link_to raw("<i class=\"fa fa-toggle-off mr-5\"></i> Hide in API"), remove_operational_region_path(:id => @region.id), :remote=>true, class: "btn btn-block btn-danger btn-only-hover" %>
|
47
|
+
<% else %>
|
48
|
+
<!-- Show in API -->
|
49
|
+
<%= link_to raw("<i class=\"fa fa-toggle-on mr-5\"></i> Show in API"), mark_as_operational_region_path(:id => @region.id), :remote=>true, class: "btn btn-block btn-success btn-only-hover" %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<!-- Edit -->
|
53
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Edit"), edit_link, :remote=>true, class: "btn btn-block btn-white btn-only-hover" %>
|
54
|
+
|
55
|
+
<!-- Delete -->
|
56
|
+
<%= link_to raw("<i class=\"linecons-trash mr-5\"></i> Delete"), delete_link, method: :delete, :remote=>true, data: { confirm: 'Are you sure?' }, class: "btn btn-block btn-danger btn-only-hover" %>
|
57
|
+
|
58
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
31
62
|
</div>
|
32
63
|
|
33
64
|
<%= clear_tag(50) %>
|
@@ -87,24 +118,10 @@
|
|
87
118
|
<div class="tab-pane" id="cities" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
88
119
|
<%= clear_tag(20) %>
|
89
120
|
|
90
|
-
<div id="div_city_action_buttons">
|
91
|
-
<div class="row">
|
92
|
-
<div class="col-md-6">
|
93
|
-
|
94
|
-
<%= theme_button('Refresh', 'refresh', cities_region_path(@region), classes: "pull-left", btn_type: "white") %>
|
95
|
-
|
96
|
-
</div>
|
97
|
-
<div class="col-md-6">
|
98
|
-
<%= search_form_kuppayam(City, cities_region_path(@region), text: "") %>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
<%= clear_tag(10) %>
|
103
|
-
|
104
121
|
<div id="div_city_counts">
|
105
122
|
<div class="row">
|
106
123
|
|
107
|
-
<div class="col-lg-
|
124
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
108
125
|
|
109
126
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
110
127
|
|
@@ -128,10 +145,9 @@
|
|
128
145
|
</div>
|
129
146
|
|
130
147
|
</div>
|
131
|
-
|
132
148
|
</div>
|
133
149
|
|
134
|
-
<div class="col-lg-
|
150
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
135
151
|
|
136
152
|
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
137
153
|
|
@@ -149,21 +165,51 @@
|
|
149
165
|
<i class="linecons-cloud"></i>
|
150
166
|
</div>
|
151
167
|
<div class="xe-label">
|
152
|
-
<strong class="num"><%= @region.cities.show_in_api.count %></strong>
|
168
|
+
<strong class="num"><%= @region.cities.show_in_api(true).count %></strong>
|
153
169
|
<span>Show in API</span>
|
154
170
|
</div>
|
155
171
|
</div>
|
156
172
|
|
157
173
|
</div>
|
158
|
-
|
159
174
|
</div>
|
175
|
+
|
176
|
+
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
160
177
|
|
178
|
+
<div style="border: 1px solid #ddd; margin-bottom: 20px;">
|
179
|
+
|
180
|
+
<div class="xe-widget xe-counter"
|
181
|
+
data-count=".num"
|
182
|
+
data-from="0"
|
183
|
+
data-to="99.9"
|
184
|
+
data-suffix="%"
|
185
|
+
data-duration="2"
|
186
|
+
style="margin-bottom: 0px;
|
187
|
+
padding: 0px;
|
188
|
+
width: 15%;
|
189
|
+
margin: 0px auto;">
|
190
|
+
<div class="xe-icon">
|
191
|
+
<i class="fa-toggle-on"></i>
|
192
|
+
</div>
|
193
|
+
<div class="xe-label">
|
194
|
+
<strong class="num"><%= @region.cities.operational(true).count %></strong>
|
195
|
+
<span>Operational</span>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
</div>
|
161
201
|
|
162
202
|
</div>
|
163
203
|
</div>
|
204
|
+
|
205
|
+
<div id="div_city_action_buttons">
|
206
|
+
</div>
|
207
|
+
|
164
208
|
<div id="div_city_index">
|
165
|
-
|
166
|
-
|
209
|
+
<div class="text-center">
|
210
|
+
<p>Click the below button to see the list of cities in <%= @region.name %></p>
|
211
|
+
<%= link_to('Show Regions', cities_region_path(@region), class: "mt-10 btn btn-success", remote: true) %>
|
212
|
+
</div>
|
167
213
|
</div>
|
168
214
|
</div>
|
169
215
|
|
@@ -1,11 +1,14 @@
|
|
1
1
|
<% if @cities.any? %>
|
2
2
|
|
3
3
|
// Refresh the list
|
4
|
+
$('#div_city_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/region_cities/action_buttons")) %>");
|
4
5
|
$('#div_city_index').html("<%= escape_javascript(render(:partial=>"pattana/region_cities/index")) %>");
|
5
6
|
|
6
7
|
<% else %>
|
7
|
-
|
8
|
+
|
9
|
+
$('#div_city_action_buttons').html("<%= escape_javascript(render(:partial=>"pattana/region_cities/action_buttons")) %>");
|
10
|
+
|
8
11
|
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
9
|
-
$('#div_city_index').html(noResultsText);
|
12
|
+
$('#div_city_index .table-responsive').html(noResultsText);
|
10
13
|
|
11
14
|
<% end %>
|
data/lib/pattana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pattana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: '0.1'
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.15
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0.1'
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
120
|
+
version: 0.1.15
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: bcrypt
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -426,12 +426,15 @@ files:
|
|
426
426
|
- app/views/pattana/countries/cities.js.erb
|
427
427
|
- app/views/pattana/countries/index.html.erb
|
428
428
|
- app/views/pattana/countries/regions.js.erb
|
429
|
+
- app/views/pattana/country_cities/_action_buttons.html.erb
|
429
430
|
- app/views/pattana/country_cities/_index.html.erb
|
430
431
|
- app/views/pattana/country_cities/_row.html.erb
|
432
|
+
- app/views/pattana/country_regions/_action_buttons.html.erb
|
431
433
|
- app/views/pattana/country_regions/_form.html.erb
|
432
434
|
- app/views/pattana/country_regions/_index.html.erb
|
433
435
|
- app/views/pattana/country_regions/_row.html.erb
|
434
436
|
- app/views/pattana/dashboard/index.html.erb
|
437
|
+
- app/views/pattana/region_cities/_action_buttons.html.erb
|
435
438
|
- app/views/pattana/region_cities/_index.html.erb
|
436
439
|
- app/views/pattana/region_cities/_row.html.erb
|
437
440
|
- app/views/pattana/regions/_form.html.erb
|