agilibox 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/helpers/agilibox/filters_helper.rb +1 -1
- data/app/helpers/agilibox/sorting_helper.rb +8 -3
- data/lib/agilibox/form_back_url.rb +3 -3
- data/lib/agilibox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a1aedfde807ff11e7230b83d1c65305f4abe9b6
|
4
|
+
data.tar.gz: ec2ff7c3c3bc68c383b3ba4887a4c0f006c80a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95781e7dba7620ecdcd196a15b0788618b70d401391163e7443d3576e522f560fd62d5fcc39d1a6f8be8aea4b468569d3c498926770b4ffd30cd6e63e7d6dc9d
|
7
|
+
data.tar.gz: 830a06fca765d269ba0445df621d04d5f0fbf73783e138567c8254e0ee63ad76f51fa95d3e4c875c3dea247db6767347fe84e4322283751fe7144188fdaf1420
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Agilibox::SortingHelper
|
2
|
-
def sortable_column(name, column)
|
2
|
+
def sortable_column(name, column, options = {})
|
3
3
|
unless column.is_a?(Symbol)
|
4
4
|
raise ArgumentError, "invalid column, please use symbol"
|
5
5
|
end
|
@@ -23,9 +23,14 @@ module Agilibox::SortingHelper
|
|
23
23
|
klass = "sort"
|
24
24
|
end
|
25
25
|
|
26
|
-
url_params =
|
26
|
+
unless (url_params = options.delete(:url_params))
|
27
|
+
url_params = (params.try(:permit!) || params).to_h.symbolize_keys
|
28
|
+
end
|
29
|
+
url_params[:sort] = new_sort_param
|
30
|
+
|
31
|
+
html_options = {class: klass}.merge(options)
|
27
32
|
|
28
|
-
link_to(name, url_params,
|
33
|
+
link_to(name, url_params, html_options)
|
29
34
|
end
|
30
35
|
|
31
36
|
def sortable_column_order(sort_param = params[:sort])
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Agilibox::FormBackUrl
|
2
2
|
def back_url_tag
|
3
3
|
tag(:input,
|
4
|
-
:type
|
5
|
-
:name
|
6
|
-
:value => (params[:back_url] || request.referer),
|
4
|
+
:type => "hidden",
|
5
|
+
:name => "back_url",
|
6
|
+
:value => (params[:back_url].presence || request.referer),
|
7
7
|
)
|
8
8
|
end
|
9
9
|
|
data/lib/agilibox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilibox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|