action_link 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/fonts/action_link/acticons.woff +0 -0
- data/app/assets/stylesheets/action_link/style.scss +5 -0
- data/app/assets/stylesheets/action_link/variables.scss +1 -0
- data/app/components/action_link/new.rb +11 -1
- data/config/locales/action_link_component.de.yml +1 -0
- data/config/locales/action_link_component.en.yml +1 -0
- data/lib/action_link/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8751045faed03a5802b305dbcc9d8b06ac5924809ff427486e7ebb1cfde422ba
|
|
4
|
+
data.tar.gz: 39c04503d2b3097fe50c7f0ec42838c28cb360db9d88e5be78d1baf379896fab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ed13bfdd53de6a18257fc22b7fbaa268bb0a665071a1030abaee6237a0ab79caa4629d07a018796a40d04aeee203cc5bbae9f03884a88d196b791790616611e
|
|
7
|
+
data.tar.gz: 7fb5dab692d5659d316f8967bd88a562af98d216fb2fe5409d5b5273b573bf8f84845244f7a4e7bc4f9b5cd77ad98e8e715b2beea82f2494db32b881709f80b0
|
data/CHANGELOG.md
CHANGED
|
Binary file
|
|
@@ -4,12 +4,13 @@ module ActionLink
|
|
|
4
4
|
# An action link that indicates adding a new record.
|
|
5
5
|
class New < Base
|
|
6
6
|
ICON = 'plus-circle'.freeze
|
|
7
|
+
ICON_MULTIPLE = 'plus-plus-circle'.freeze
|
|
7
8
|
|
|
8
9
|
erb_template <<~ERB.gsub("\n", '')
|
|
9
10
|
<% if permission? %>
|
|
10
11
|
<%= link_to(url, **options) do %>
|
|
11
12
|
<%= content %>
|
|
12
|
-
<% if icon? %><%= ' ' %><%= icon_tag
|
|
13
|
+
<% if icon? %><%= ' ' %><%= icon_tag icon_name %><% end %>
|
|
13
14
|
<% end %>
|
|
14
15
|
<% else %>
|
|
15
16
|
<%= content %>
|
|
@@ -21,11 +22,20 @@ module ActionLink
|
|
|
21
22
|
option :model, as: :manual_model
|
|
22
23
|
option :url
|
|
23
24
|
option :associative, default: -> { false }
|
|
25
|
+
option :multiple, default: -> { false }
|
|
24
26
|
|
|
25
27
|
def i18n_title_key
|
|
26
28
|
return 'action_link.titles.assign' if associative
|
|
29
|
+
return 'action_link.titles.new_multiple' if multiple
|
|
27
30
|
|
|
28
31
|
super
|
|
29
32
|
end
|
|
33
|
+
|
|
34
|
+
def icon_name
|
|
35
|
+
return ::ActionLink::New::ICON if associative
|
|
36
|
+
return ::ActionLink::New::ICON_MULTIPLE if multiple
|
|
37
|
+
|
|
38
|
+
::ActionLink::New::ICON
|
|
39
|
+
end
|
|
30
40
|
end
|
|
31
41
|
end
|
data/lib/action_link/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_link
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- halo
|
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
130
|
version: '0'
|
|
131
131
|
requirements: []
|
|
132
|
-
rubygems_version: 4.0.
|
|
132
|
+
rubygems_version: 4.0.23
|
|
133
133
|
specification_version: 4
|
|
134
134
|
summary: A set of ViewComponents for common links (show, edit, delete, etc.)
|
|
135
135
|
test_files: []
|