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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ae44ca35830b2da4ed0a9d58887ab9da4e5422d79cc1c055950d25b50d348a6
4
- data.tar.gz: 49e9923821a7995e714016c35ae3b87cd410859218b6230b3d92f90d92d9e69a
3
+ metadata.gz: e35624ddbaec0ee1d1fe553d65d077e6a4deb17d810faa186091f02321f0f12d
4
+ data.tar.gz: df7588e7dcb03f22cb106e4828eeb509bb048d7f9b4e8d553cb24a9d26368dd9
5
5
  SHA512:
6
- metadata.gz: d83925eb840eaa03df35b3b55f84229b1be0c52d3e500b05e9bc826d06ebec5cf1c0c0620cf695c6144b473fa6b87219223de5ec5350952b1296322669ccb793
7
- data.tar.gz: 8f49db5d5bbd00419f3c15310e8fb73730062512ea91d0184175e37e17f5718a35017cffdc913261e9c843b5297438876ade41971d4434aff830eb8e9b989553
6
+ metadata.gz: d017beaa83e62658848a8dbd35216fdfbe120cc97ffea7961e0d199249d58f966fbbc61ab073d6fcb92332bba4b55293263890cb1f99d3fc73f1b0914c0e3020
7
+ data.tar.gz: c90255345820994d0a31c9e963e2057f2b4c65f9a5ae298e01969807c6e3ff1e818d972569fdd4e4ab172f28a24b7bb065f47df76329903aa8901499d3b29df4
@@ -42,3 +42,7 @@ td.actions
42
42
  .submit
43
43
  display: flex
44
44
  flex-direction: row-reverse
45
+
46
+ .dates_filter
47
+ display: flex
48
+ flex-direction: row
@@ -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
- records = decorator_class.list_filters[filter.to_sym][:query].call(records, begin_date, end_date) if value.present?
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
- records = decorator_class.list_filters[filter.to_sym][:query].call(records, begin_date, end_date) if value.present?
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
- .col-md-4
14
- = label_tag t("admin.filters.#{model_class.to_s.underscore}.#{filter[0]}")
15
- - case filter[1][:type]
16
- - when :select
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
- - when :dates
19
- = 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)
20
- = 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)
21
- :javascript
22
- $(function () {
23
- $('#filter_datepicker_begin_date').datepicker();
24
- $('#filter_datepicker_end_date').datepicker();
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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '1.32.0.1'
5
+ VERSION = '1.32.1'
6
6
  end
7
7
  end
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.0.1
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-18 00:00:00.000000000 Z
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