tramway-admin 1.32.0.1 → 1.32.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/tramway/admin/application.sass +4 -0
- data/app/controllers/tramway/admin/application_controller.rb +3 -1
- data/app/controllers/tramway/admin/records_controller.rb +3 -1
- data/app/views/tramway/admin/records/_search.html.haml +19 -12
- data/lib/tramway/admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e35624ddbaec0ee1d1fe553d65d077e6a4deb17d810faa186091f02321f0f12d
|
4
|
+
data.tar.gz: df7588e7dcb03f22cb106e4828eeb509bb048d7f9b4e8d553cb24a9d26368dd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d017beaa83e62658848a8dbd35216fdfbe120cc97ffea7961e0d199249d58f966fbbc61ab073d6fcb92332bba4b55293263890cb1f99d3fc73f1b0914c0e3020
|
7
|
+
data.tar.gz: c90255345820994d0a31c9e963e2057f2b4c65f9a5ae298e01969807c6e3ff1e818d972569fdd4e4ab172f28a24b7bb065f47df76329903aa8901499d3b29df4
|
@@ -41,7 +41,9 @@ module Tramway
|
|
41
41
|
begin_date = params[:list_filters][filter.to_sym][:begin_date]
|
42
42
|
end_date = params[:list_filters][filter.to_sym][:end_date]
|
43
43
|
if begin_date.present? && end_date.present?
|
44
|
-
|
44
|
+
if value.present?
|
45
|
+
records = decorator_class.list_filters[filter.to_sym][:query].call(records, begin_date, end_date)
|
46
|
+
end
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
@@ -14,7 +14,9 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
|
|
14
14
|
begin_date = params[:list_filters][filter.to_sym][:begin_date]
|
15
15
|
end_date = params[:list_filters][filter.to_sym][:end_date]
|
16
16
|
if begin_date.present? && end_date.present?
|
17
|
-
|
17
|
+
if value.present?
|
18
|
+
records = decorator_class.list_filters[filter.to_sym][:query].call(records, begin_date, end_date)
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -10,19 +10,26 @@
|
|
10
10
|
- decorator_class(model_class).list_filters.each_slice(3) do |slice|
|
11
11
|
.row-fluid.filters
|
12
12
|
- slice.each do |filter|
|
13
|
-
|
14
|
-
|
15
|
-
-
|
16
|
-
|
13
|
+
- case filter[1][:type]
|
14
|
+
- when :select
|
15
|
+
.col-md-4
|
16
|
+
= label_tag t("admin.filters.#{model_class.to_s.underscore}.#{filter[0]}")
|
17
17
|
= select_tag "list_filters[#{filter[0]}]", build_options_for_select(filter[0], filter[1][:select_collection]), include_blank: true, class: 'form-control'
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
- when :dates
|
19
|
+
.col-md-8.dates_filter
|
20
|
+
.begin_date
|
21
|
+
= label_tag t("admin.filters.#{model_class.to_s.underscore}.#{filter[0]}.begin_date")
|
22
|
+
= text_field_tag "list_filters[#{filter[0]}][begin_date]", '', class: 'form-control', id: 'filter_datepicker_begin_date', value: params.dig(:list_filters, filter[0], :begin_date)
|
23
|
+
%span
|
24
|
+
\ -
|
25
|
+
.end_date
|
26
|
+
= label_tag t("admin.filters.#{model_class.to_s.underscore}.#{filter[0]}.end_date")
|
27
|
+
= text_field_tag "list_filters[#{filter[0]}][end_date]", '', class: 'form-control', id: 'filter_datepicker_end_date', value: params.dig(:list_filters, filter[0], :end_date)
|
28
|
+
:javascript
|
29
|
+
$(function () {
|
30
|
+
$('#filter_datepicker_begin_date').datepicker();
|
31
|
+
$('#filter_datepicker_end_date').datepicker();
|
32
|
+
});
|
26
33
|
.row-fluid.filters
|
27
34
|
.col-md-4.offset-md-8.submit
|
28
35
|
= submit_tag t('helpers.actions.search'), class: 'btn btn-primary'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.32.
|
4
|
+
version: 1.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-kaminari-views
|