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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aee4a183653f52ebafde8ef27fd2f56ae93fcdab
4
- data.tar.gz: '083dcad59ffc648b796db198098dae500e9ebfa0'
3
+ metadata.gz: 2a1aedfde807ff11e7230b83d1c65305f4abe9b6
4
+ data.tar.gz: ec2ff7c3c3bc68c383b3ba4887a4c0f006c80a61
5
5
  SHA512:
6
- metadata.gz: d05e35403d1d4e0036dc43668aec99566d44953b2bfeb4ed79d315e00cbf6914304aaf86fb8971783060ee98973477871ff93c1701c0417fe4eb552e10d7118a
7
- data.tar.gz: aa0b2562bf0586b18aca19859be5ce0b267dad85aa13a87687424605561818d888ac06ff949d7a09a39151de600edd9709e76c14ac8b951d1049c39a6f07d693
6
+ metadata.gz: 95781e7dba7620ecdcd196a15b0788618b70d401391163e7443d3576e522f560fd62d5fcc39d1a6f8be8aea4b468569d3c498926770b4ffd30cd6e63e7d6dc9d
7
+ data.tar.gz: 830a06fca765d269ba0445df621d04d5f0fbf73783e138567c8254e0ee63ad76f51fa95d3e4c875c3dea247db6767347fe84e4322283751fe7144188fdaf1420
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.0.14
6
+
7
+ - Sorting helper improvements
8
+ - FormBackUrl fixes
9
+ - FiltersHelper fixes
10
+
5
11
  ## 1.0.13
6
12
 
7
13
  - Modal JS fix
@@ -31,7 +31,7 @@ module Agilibox::FiltersHelper
31
31
 
32
32
  def filters_form(options = {}, &block)
33
33
  if options.key?(:buttons)
34
- buttons = optins.delete(:buttons)
34
+ buttons = options.delete(:buttons)
35
35
  else
36
36
  buttons = true
37
37
  end
@@ -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 = (params.try(:permit!) || params).to_h.symbolize_keys.merge(sort: new_sort_param)
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, class: klass)
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 => "hidden",
5
- :name => "back_url",
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
 
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.0.13"
2
+ VERSION = "1.0.14"
3
3
  end
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.13
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-01-02 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n