effective_form_inputs 1.2.6 → 1.2.7

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: f1bc6bc4e4dd8b9f47f184c3084520c675b98048
4
- data.tar.gz: 4622b3fc38c58ebea44de3a4aeb01f92fbe36838
3
+ metadata.gz: 73018ef84c08c044734ce1588e09044e9b7879b5
4
+ data.tar.gz: c304c9be743476829d43660d857c53902840001a
5
5
  SHA512:
6
- metadata.gz: 5eee846f4cc189d5ff1ea06bd3b991fea50bb75312b4cab43fb4a8696664957656c37fa3de06d6c9aac0a7e70b7da9f7cc84206b5661b309d91f9055cff13431
7
- data.tar.gz: f914da9f59d83f0ee60f2fc56a4a295b26bbf18698c8c86b91a597824d7b4689120fa1370f0e34d45a6bee4576aceb7c5219e10702e1d8f66a238963b2df5154
6
+ metadata.gz: 1e44b1ee96ea3b93918b28ced09b3bd7bf8c8b96a489d93195ef646c7332f5ac5f965b8ce860ee1f2738bdeac702ca67e24e65f1fd38aa4d1b5097ee8ee5abb7
7
+ data.tar.gz: ab87a091e9b9ce2405b05b2d8d0170a795830810c72e60cd924047ce544fdeaad37a271cd0138f59685aeaca45bd0395b8393cc0d9976d9e23c0f0d12de92283
@@ -104,18 +104,25 @@ module EffectiveBootstrap3Helper
104
104
  end
105
105
 
106
106
  def glyphicon_tag(icon, options = {})
107
- if icon.to_s.start_with?('glyphicon-')
108
- content_tag(:span, '', {class: "glyphicon #{icon}"}.merge(options))
109
- else
110
- content_tag(:span, '', {class: "glyphicon glyphicon-#{icon}"}.merge(options))
107
+ icon = icon.to_s.sub('glyphicon-', '')
108
+
109
+ icon = case icon
110
+ when 'destroy' then 'trash'
111
+ when 'show' then 'eye-open'
112
+ when 'settings' then 'cog'
113
+ when 'approve' then 'ok'
114
+ when 'decline' then 'remove'
115
+ else icon
111
116
  end
117
+
118
+ content_tag(:span, '', {class: "glyphicon glyphicon-#{icon}"}.merge(options))
112
119
  end
113
120
 
121
+
114
122
  def glyphicon_to(icon, path, options = {})
115
- content_tag(:a, options.merge(href: path)) do
116
- glyphicon_tag(icon)
117
- end
123
+ content_tag(:a, glyphicon_tag(icon), options.merge(href: path))
118
124
  end
125
+
119
126
  alias_method :bootstrap_icon_to, :glyphicon_to
120
127
  alias_method :glyph_icon_to, :glyphicon_to
121
128
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '1.2.6'.freeze
2
+ VERSION = '1.2.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_form_inputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-08 00:00:00.000000000 Z
11
+ date: 2018-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails