i18n_rails_helpers 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,12 +22,17 @@ module ContextualLinkHelpers
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def icon_link_to(action, url = nil, options = {})
|
25
|
+
classes = ["btn"]
|
26
|
+
|
25
27
|
url ||= {:action => action}
|
26
28
|
|
27
29
|
icon = options.delete(:icon)
|
28
30
|
icon ||= action
|
29
31
|
|
30
|
-
options.
|
32
|
+
type = options.delete(:type)
|
33
|
+
classes << "btn-#{type}"
|
34
|
+
|
35
|
+
options.merge!(:class => classes.join(" "))
|
31
36
|
link_to(url_for(url), options) do
|
32
37
|
content_tag(:i, "", :class => "icon-#{action_to_icon(icon)}") + " " + t_action(action)
|
33
38
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_rails_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-07-
|
18
|
+
date: 2012-07-17 00:00:00 +02:00
|
19
|
+
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
21
22
|
description: Rails i18n view helpers for things like crud actions, models and and attributes.
|
@@ -36,6 +37,7 @@ files:
|
|
36
37
|
- lib/list_link_helpers.rb
|
37
38
|
- rails/init.rb
|
38
39
|
- README.markdown
|
40
|
+
has_rdoc: true
|
39
41
|
homepage: https://github.com/huerlisi/i18n_rails_helpers
|
40
42
|
licenses: []
|
41
43
|
|
@@ -65,10 +67,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
67
|
requirements: []
|
66
68
|
|
67
69
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.
|
70
|
+
rubygems_version: 1.3.7
|
69
71
|
signing_key:
|
70
72
|
specification_version: 3
|
71
73
|
summary: I18n Rails helpers
|
72
74
|
test_files: []
|
73
75
|
|
74
|
-
has_rdoc:
|