i18n_rails_helpers 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,14 +14,22 @@ module ContextualLinkHelpers
|
|
14
14
|
"list-alt"
|
15
15
|
when "update"
|
16
16
|
"refresh"
|
17
|
+
when "copy"
|
18
|
+
"repeat"
|
19
|
+
else
|
20
|
+
action
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def icon_link_to(action, url = nil, options = {})
|
21
25
|
url ||= {:action => action}
|
26
|
+
|
27
|
+
icon = options.delete(:icon)
|
28
|
+
icon ||= action
|
29
|
+
|
22
30
|
options.merge!(:class => "btn")
|
23
31
|
link_to(url_for(url), options) do
|
24
|
-
content_tag(:i, "", :class => "icon-#{action_to_icon(
|
32
|
+
content_tag(:i, "", :class => "icon-#{action_to_icon(icon)}") + " " + t_action(action)
|
25
33
|
end
|
26
34
|
end
|
27
35
|
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-05 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Rails i18n view helpers for things like crud actions, models and and attributes.
|