wice_grid 3.6.0.pre5 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/config/locales/uk.yml +45 -0
- data/lib/generators/wice_grid/templates/wice_grid_config.rb +3 -0
- data/lib/wice/columns/column_integer.rb +4 -4
- data/lib/wice/helpers/wice_grid_view_helpers.rb +6 -5
- data/lib/wice/wice_grid_serialized_queries_controller.rb +2 -2
- data/wice_grid.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3643b83501590a87afd3879142d6354d32e7a19b
|
4
|
+
data.tar.gz: d9c0551a69cd1e7eb6b73484ec36670ddb566b8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a50ee89b67227a47d257b4b0571984d2aeb3b0172cbe73a9c04de5c828046afbaad465436912182172e450d907af620cdb69469198d6cb9bd0c5b4a7328910e3
|
7
|
+
data.tar.gz: f6837a1b328b5e117d2dc1de534275475dd9a3b7f066ab898b2f29698150ced61683c70cbb53393f631d729b67b25a3b649f65922588441f6296142284dea457
|
data/README.md
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/leikind/wice_grid/badge.svg?branch=development&service=github)](https://coveralls.io/github/leikind/wice_grid?branch=development)
|
8
8
|
-->
|
9
9
|
|
10
|
+
THE PROJECT IS LOOKING FOR CONTRIBUTORS. THE AUTHOR WILL NOT WORK ON IT ANYMORE!
|
11
|
+
|
10
12
|
* Yuri Leikind, yuri.leikind at gmail dot com
|
11
13
|
* Version 3.6.0.pre3; [What's New In 3.6.0](https://github.com/leikind/wice_grid/wiki/What's-New-In-3.6.0)
|
12
14
|
* This tutorial is accompanied by a sample application with WiceGrid examples which you can browse online:
|
@@ -0,0 +1,45 @@
|
|
1
|
+
uk:
|
2
|
+
date:
|
3
|
+
order:
|
4
|
+
- :year
|
5
|
+
- :month
|
6
|
+
- :day
|
7
|
+
wice_grid:
|
8
|
+
show_filter_tooltip: Показати фільтр
|
9
|
+
hide_filter_tooltip: Сховати фільтр
|
10
|
+
csv_export_tooltip: Експорт в CSV
|
11
|
+
filter_tooltip: Фільтрувати
|
12
|
+
reset_filter_tooltip: Скинути фільтр
|
13
|
+
boolean_filter_true_label: так
|
14
|
+
boolean_filter_false_label: ні
|
15
|
+
previous_label: «
|
16
|
+
next_label: »
|
17
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
18
|
+
date_selector_tooltip_from: Від
|
19
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
20
|
+
date_selector_tooltip_to: До
|
21
|
+
# The title of the checkox to turn on negation
|
22
|
+
negation_checkbox_title: За винятком
|
23
|
+
# link to switch to show all records
|
24
|
+
show_all_records_label: показати всі
|
25
|
+
# tooltip for the link to switch to show all records
|
26
|
+
show_all_records_tooltip: Показати всі записи
|
27
|
+
# Warning message shown when the user wants to switch to all-records mode
|
28
|
+
all_queries_warning: Ви впевнені в тому, що хочете відобразити всі записи?
|
29
|
+
# link to paginated view
|
30
|
+
switch_back_to_paginated_mode_label: Назад до посторінкового виводу
|
31
|
+
# tooltip for the link to paginated view
|
32
|
+
switch_back_to_paginated_mode_tooltip: Назад до посторінкового виводу
|
33
|
+
# Title of the date string.
|
34
|
+
date_string_tooltip: Натисніть, щоб видалити дату
|
35
|
+
saved_query_panel_title: Збережені фільтри
|
36
|
+
save_query_button_label: Зберегти фільтр
|
37
|
+
saved_query_deletion_confirmation: Ви впевнені?
|
38
|
+
saved_query_deletion_link_title: Видалити збережуваний фільтр
|
39
|
+
saved_query_link_title: Завантажити збережуваний фільтр
|
40
|
+
validates_uniqueness_error: Збережуваний фільтр з такою назвою вже існує
|
41
|
+
validates_presence_error: Будь ласка, введіть назву Збережуваного фільтра
|
42
|
+
query_deleted_message: Збережуваний фільтр видалено.
|
43
|
+
query_saved_message: Збережуваний фільтр збережено.
|
44
|
+
select_all: Виділити все
|
45
|
+
deselect_all: Забрати виділення
|
@@ -182,6 +182,9 @@ if defined?(Wice::Defaults)
|
|
182
182
|
# The name of the page method (should correspond to Kaminari.config.page_method_name)
|
183
183
|
Wice::Defaults::PAGE_METHOD_NAME = :page
|
184
184
|
|
185
|
+
# The name of the theme to use for the pagination with Kaminari
|
186
|
+
Wice::Defaults::PAGINATION_THEME = :wice_grid
|
187
|
+
|
185
188
|
# By default ActiveRecord calls are always executed inside Model.unscoped{}.
|
186
189
|
# Setting <tt>USE_DEFAULT_SCOPE</tt> to true will use the default scope for all queries.
|
187
190
|
Wice::Defaults::USE_DEFAULT_SCOPE = false
|
@@ -38,11 +38,11 @@ module Wice
|
|
38
38
|
# remove spaces
|
39
39
|
val = val.gsub(' ', '')
|
40
40
|
|
41
|
-
|
42
|
-
if
|
43
|
-
op = val[0...
|
41
|
+
start_of_num = val =~ /[0-9.-]/ # first digit, dot or negative sign
|
42
|
+
if start_of_num
|
43
|
+
op = val[0...start_of_num]
|
44
44
|
op = '=' if op == ''
|
45
|
-
num = Float(val[
|
45
|
+
num = Float(val[start_of_num..-1]) rescue nil
|
46
46
|
|
47
47
|
op = nil unless ['<', '>', '<=', '>=', '='].include?(op)
|
48
48
|
end
|
@@ -97,7 +97,8 @@ module Wice
|
|
97
97
|
show_filters: Defaults::SHOW_FILTER,
|
98
98
|
sorting_dependant_row_cycling: false,
|
99
99
|
html: {},
|
100
|
-
upper_pagination_panel: Defaults::SHOW_UPPER_PAGINATION_PANEL
|
100
|
+
upper_pagination_panel: Defaults::SHOW_UPPER_PAGINATION_PANEL,
|
101
|
+
pagination_theme: ConfigurationProvider.value_for(:PAGINATION_THEME)
|
101
102
|
}
|
102
103
|
|
103
104
|
opts.assert_valid_keys(options.keys)
|
@@ -263,7 +264,7 @@ module Wice
|
|
263
264
|
if options[:upper_pagination_panel]
|
264
265
|
grid.output_buffer << rendering.pagination_panel(number_of_columns, options[:hide_csv_button]) do
|
265
266
|
pagination_panel_content_html =
|
266
|
-
pagination_panel_content(grid, options[:extra_request_parameters], options[:allow_showing_all_records])
|
267
|
+
pagination_panel_content(grid, options[:extra_request_parameters], options[:allow_showing_all_records], options[:pagination_theme])
|
267
268
|
pagination_panel_content_html
|
268
269
|
end
|
269
270
|
end
|
@@ -407,7 +408,7 @@ module Wice
|
|
407
408
|
pagination_panel_content_html
|
408
409
|
else
|
409
410
|
pagination_panel_content_html =
|
410
|
-
pagination_panel_content(grid, options[:extra_request_parameters], options[:allow_showing_all_records])
|
411
|
+
pagination_panel_content(grid, options[:extra_request_parameters], options[:allow_showing_all_records], options[:pagination_theme])
|
411
412
|
pagination_panel_content_html
|
412
413
|
end
|
413
414
|
end
|
@@ -610,7 +611,7 @@ module Wice
|
|
610
611
|
grid.csv_tempfile = spreadsheet.tempfile
|
611
612
|
end
|
612
613
|
|
613
|
-
def pagination_panel_content(grid, extra_request_parameters, allow_showing_all_records) #:nodoc:
|
614
|
+
def pagination_panel_content(grid, extra_request_parameters, allow_showing_all_records, pagination_theme) #:nodoc:
|
614
615
|
extra_request_parameters = extra_request_parameters.clone
|
615
616
|
if grid.saved_query
|
616
617
|
extra_request_parameters["#{grid.name}[q]"] = grid.saved_query.id
|
@@ -619,7 +620,7 @@ module Wice
|
|
619
620
|
html = pagination_info(grid, allow_showing_all_records)
|
620
621
|
|
621
622
|
paginate(grid.resultset,
|
622
|
-
theme:
|
623
|
+
theme: pagination_theme,
|
623
624
|
param_name: "#{grid.name}[page]",
|
624
625
|
params: extra_request_parameters,
|
625
626
|
inner_window: 4,
|
@@ -52,7 +52,7 @@ module Wice
|
|
52
52
|
@saved_query.name = params[:query_name]
|
53
53
|
@saved_query.query = query_params
|
54
54
|
|
55
|
-
@saved_query.attributes =
|
55
|
+
@saved_query.attributes = extra unless extra.nil?
|
56
56
|
|
57
57
|
if @saved_query.save
|
58
58
|
@grid_title_id = "#{@grid_name}_title"
|
@@ -65,7 +65,7 @@ module Wice
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def extra #:nodoc:
|
68
|
-
params[:extra]
|
68
|
+
params[:extra].permit! unless params[:extra].nil?
|
69
69
|
end
|
70
70
|
|
71
71
|
protected
|
data/wice_grid.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'wice_grid'
|
4
|
-
s.version = '3.6.0
|
4
|
+
s.version = '3.6.0'
|
5
5
|
s.authors = ['Yuri Leikind']
|
6
6
|
s.email = ['yuri.leikind@gmail.com']
|
7
7
|
s.homepage = 'https://github.com/leikind/wice_grid'
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
15
15
|
s.license = 'MIT'
|
16
16
|
s.require_paths = ['lib']
|
17
|
-
s.date = '2015-
|
17
|
+
s.date = '2015-04-17'
|
18
18
|
|
19
19
|
s.add_dependency 'activerecord', ['> 3.2']
|
20
20
|
s.add_dependency 'kaminari', ['~> 0.16']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wice_grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.0
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuri Leikind
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -247,6 +247,7 @@ files:
|
|
247
247
|
- config/locales/pt.yml
|
248
248
|
- config/locales/ru.yml
|
249
249
|
- config/locales/sk.yml
|
250
|
+
- config/locales/uk.yml
|
250
251
|
- config/locales/zh.yml
|
251
252
|
- lib/generators/wice_grid/add_migration_for_serialized_queries_generator.rb
|
252
253
|
- lib/generators/wice_grid/install_generator.rb
|
@@ -321,9 +322,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
321
322
|
version: '0'
|
322
323
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
323
324
|
requirements:
|
324
|
-
- - "
|
325
|
+
- - ">="
|
325
326
|
- !ruby/object:Gem::Version
|
326
|
-
version:
|
327
|
+
version: '0'
|
327
328
|
requirements: []
|
328
329
|
rubyforge_project:
|
329
330
|
rubygems_version: 2.4.5.1
|