action_link 0.1.1 → 1.0.1
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 +8 -0
- data/README.md +33 -12
- data/app/assets/fonts/action_link/acticons.woff +0 -0
- data/app/assets/stylesheets/action_link/_index.sass +8 -0
- data/app/assets/stylesheets/action_link/acticons.css +1 -0
- data/app/assets/stylesheets/action_link/acticons.css.map +1 -0
- data/app/assets/stylesheets/action_link/fonts.css +1 -0
- data/app/assets/stylesheets/action_link/fonts.css.map +1 -0
- data/app/assets/stylesheets/action_link/fonts.sass +1 -1
- data/app/assets/stylesheets/action_link/style.css +1 -0
- data/app/assets/stylesheets/action_link/style.css.map +1 -0
- data/app/assets/stylesheets/action_link/style.scss +10 -8
- data/app/assets/stylesheets/action_link/variables.css +1 -0
- data/app/assets/stylesheets/action_link/variables.css.map +1 -0
- data/app/assets/stylesheets/action_link/variables.scss +8 -8
- data/app/components/action_link/base.rb +9 -2
- data/app/components/action_link/custom.rb +19 -0
- data/app/components/action_link/destroy.rb +3 -3
- data/app/components/action_link/download.rb +21 -0
- data/app/components/action_link/edit.rb +1 -1
- data/app/components/action_link/new.rb +2 -2
- data/app/components/action_link/show.rb +1 -1
- data/config/locales/action_link_component.de.yml +2 -1
- data/config/locales/action_link_component.en.yml +2 -1
- data/lib/action_link/engine.rb +18 -0
- data/lib/action_link/version.rb +1 -1
- data/vscode/action_link.code-snippets +43 -0
- metadata +15 -7
- data/app/assets/stylesheets/action_link/all.sass +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80820750651f4ec759b40bafb3e029029676672d2e72f83b69eba9bd2f05a95b
|
|
4
|
+
data.tar.gz: e3daa24250f63d7a9e5c41c2c4609007d63b3501e1e48c156eee0590efc2253b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a639c34fb4df4af7c79fe5478f9212fcd39dfd61363e1476f7fc411a370199e529c2b85549f0092803a369fbf00e6bd7f634fafcabb64f7827b14576950b4c5e
|
|
7
|
+
data.tar.gz: d637d15c764b1cfc0c82ae5f27b83846cc82ac7f2627dc96662eaad0a805641e0e1fb6fd725f37e0bfcf446c95cb7e5fc4b49538af2ba37ace681d8febbf3ccf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,34 +1,55 @@
|
|
|
1
1
|
# ActionLink
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ActionLink is a Ruby gem that provides intuitive ViewComponents for CRUD resource link actions in Rails. It simplifies the process of creating common action links (show, edit, delete, etc.) with associated icons.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
+
Here's an example of how to use the `ActionLink` gem in a Rails view:
|
|
8
|
+
|
|
7
9
|
```ruby
|
|
8
10
|
# In Rails view
|
|
9
|
-
= render ActionLink::Show.new(url: [:admin, @post], current_user:)
|
|
11
|
+
= render ActionLink::Show.new(url: [:admin, @post], current_user: current_user)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## More Usage Examples
|
|
15
|
+
|
|
16
|
+
Here are some more examples of how to use the `ActionLink` gem in a Rails view:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
# In Rails view
|
|
20
|
+
= render ActionLink::Edit.new(url: [:edit, @post], current_user: current_user)
|
|
21
|
+
= render ActionLink::Destroy.new(url: [:destroy, @post], current_user: current_user)
|
|
22
|
+
= render ActionLink::New.new(url: [:new, @post], current_user: current_user)
|
|
10
23
|
```
|
|
11
24
|
|
|
12
25
|
## Installation
|
|
13
26
|
|
|
14
|
-
|
|
27
|
+
To install the `ActionLink` gem, add it to your application's Gemfile and run `bundle install`:
|
|
15
28
|
|
|
16
|
-
|
|
29
|
+
```ruby
|
|
30
|
+
gem 'action_link'
|
|
31
|
+
```
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
Alternatively, you can install the gem manually by running:
|
|
19
34
|
|
|
20
|
-
|
|
35
|
+
```sh
|
|
36
|
+
gem install action_link
|
|
37
|
+
```
|
|
21
38
|
|
|
22
39
|
## Development
|
|
23
40
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Contributing
|
|
41
|
+
To contribute to the development of the `ActionLink` gem, follow these steps:
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
1. Fork the repository on GitHub.
|
|
44
|
+
2. Clone your forked repository to your local machine.
|
|
45
|
+
3. Install the gem's dependencies by running `bin/setup`.
|
|
46
|
+
4. Run the tests to ensure everything is working correctly: `rake test`.
|
|
47
|
+
5. Make your changes and add tests for your changes.
|
|
48
|
+
6. Commit your changes and push them to your forked repository.
|
|
49
|
+
7. Create a pull request on GitHub with a description of your changes.
|
|
29
50
|
|
|
30
51
|
## License
|
|
31
52
|
|
|
32
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
53
|
+
The `ActionLink` gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
33
54
|
|
|
34
|
-
The icons are taken from the incredible [iconmonstr](https://iconmonstr.com/license/).
|
|
55
|
+
The icons used in this gem are taken from the incredible [iconmonstr](https://iconmonstr.com/license/).
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.o-acticon{font-family:"acticons";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}/*# sourceMappingURL=acticons.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["file:///Users/orange/Code/2-Areas/action_link/action_link/app/assets/stylesheets/action_link/acticons.sass"],"names":[],"mappings":"AAAA,WACE,uBACA,WACA,kBACA,mBACA,oBACA,oBACA,mCACA","file":"acticons.css","sourcesContent":[".o-acticon\n font-family: 'acticons'\n speak: none\n font-style: normal\n font-weight: normal\n font-variant: normal\n text-transform: none\n -webkit-font-smoothing: antialiased\n -moz-osx-font-smoothing: grayscale\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:"acticons";font-weight:normal;font-style:normal;src:url("/action_link/acticons.woff") format("woff")}/*# sourceMappingURL=fonts.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["file:///Users/orange/Code/2-Areas/action_link/action_link/app/assets/stylesheets/action_link/fonts.sass"],"names":[],"mappings":"AAAA,WACE,uBACA,mBACA,kBACA","file":"fonts.css","sourcesContent":["@font-face\n font-family: 'acticons'\n font-weight: normal\n font-style: normal\n src: url('/action_link/acticons.woff') format('woff')\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.o-acticon--info-circle:before{content:""}.o-acticon--questionmark:before{content:"❓"}.o-acticon--arrow-down-circle:before{content:""}.o-acticon--pencil-circle:before{content:""}.o-acticon--check-circle:before{content:""}.o-acticon--chevron-circle-right:before{content:""}.o-acticon--plus-circle:before{content:""}.o-acticon--times-circle:before{content:""}/*# sourceMappingURL=style.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["file:///Users/orange/Code/2-Areas/action_link/action_link/app/assets/stylesheets/action_link/style.scss","file:///Users/orange/Code/2-Areas/action_link/action_link/app/assets/stylesheets/action_link/variables.scss"],"names":[],"mappings":"CAKE,+BACE,QCJU,IDQZ,gCACE,QCRW,IDYb,qCACE,QCZgB,IDgBlB,iCACE,QChBY,IDoBd,gCACE,QCpBW,IDwBb,wCACE,QCxBmB,ID4BrB,+BACE,QC5BU,IDgCZ,gCACE,QChCW","file":"style.css","sourcesContent":["// This file is autogenerated by `rake acticons:update`\n\n@use \"variables\";\n\n.o-acticon--info-circle {\n &:before {\n content: variables.$info-circle;\n }\n}\n.o-acticon--questionmark {\n &:before {\n content: variables.$questionmark;\n }\n}\n.o-acticon--arrow-down-circle {\n &:before {\n content: variables.$arrow-down-circle;\n }\n}\n.o-acticon--pencil-circle {\n &:before {\n content: variables.$pencil-circle;\n }\n}\n.o-acticon--check-circle {\n &:before {\n content: variables.$check-circle;\n }\n}\n.o-acticon--chevron-circle-right {\n &:before {\n content: variables.$chevron-circle-right;\n }\n}\n.o-acticon--plus-circle {\n &:before {\n content: variables.$plus-circle;\n }\n}\n.o-acticon--times-circle {\n &:before {\n content: variables.$times-circle;\n }\n}\n","// This file is autogenerated by `rake acticons:update`\n\n$info-circle: \"\\e907\";\n$questionmark: \"\\2753\";\n$arrow-down-circle: \"\\e9af\";\n$pencil-circle: \"\\e9ae\";\n$check-circle: \"\\e93b\";\n$chevron-circle-right: \"\\e928\";\n$plus-circle: \"\\e919\";\n$times-circle: \"\\e91a\";\n"]}
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
// This file is autogenerated by `rake acticons:update`
|
|
2
2
|
|
|
3
|
+
@use "variables";
|
|
4
|
+
|
|
3
5
|
.o-acticon--info-circle {
|
|
4
6
|
&:before {
|
|
5
|
-
content:
|
|
7
|
+
content: variables.$info-circle;
|
|
6
8
|
}
|
|
7
9
|
}
|
|
8
10
|
.o-acticon--questionmark {
|
|
9
11
|
&:before {
|
|
10
|
-
content:
|
|
12
|
+
content: variables.$questionmark;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
.o-acticon--arrow-down-circle {
|
|
14
16
|
&:before {
|
|
15
|
-
content:
|
|
17
|
+
content: variables.$arrow-down-circle;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
.o-acticon--pencil-circle {
|
|
19
21
|
&:before {
|
|
20
|
-
content:
|
|
22
|
+
content: variables.$pencil-circle;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
.o-acticon--check-circle {
|
|
24
26
|
&:before {
|
|
25
|
-
content:
|
|
27
|
+
content: variables.$check-circle;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
.o-acticon--chevron-circle-right {
|
|
29
31
|
&:before {
|
|
30
|
-
content:
|
|
32
|
+
content: variables.$chevron-circle-right;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
.o-acticon--plus-circle {
|
|
34
36
|
&:before {
|
|
35
|
-
content:
|
|
37
|
+
content: variables.$plus-circle;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
.o-acticon--times-circle {
|
|
39
41
|
&:before {
|
|
40
|
-
content:
|
|
42
|
+
content: variables.$times-circle;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*# sourceMappingURL=variables.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"variables.css","sourcesContent":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is autogenerated by `rake acticons:update`
|
|
2
2
|
|
|
3
|
-
$
|
|
4
|
-
$
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
9
|
-
$
|
|
10
|
-
$
|
|
3
|
+
$info-circle: "\e907";
|
|
4
|
+
$questionmark: "\2753";
|
|
5
|
+
$arrow-down-circle: "\e9af";
|
|
6
|
+
$pencil-circle: "\e9ae";
|
|
7
|
+
$check-circle: "\e93b";
|
|
8
|
+
$chevron-circle-right: "\e928";
|
|
9
|
+
$plus-circle: "\e919";
|
|
10
|
+
$times-circle: "\e91a";
|
|
@@ -24,6 +24,7 @@ module ActionLink
|
|
|
24
24
|
option :url, default: -> {}
|
|
25
25
|
|
|
26
26
|
def permission?
|
|
27
|
+
# TODO: use allowed? in ActionPolicy
|
|
27
28
|
_policy.public_send(:"#{_action}?")
|
|
28
29
|
end
|
|
29
30
|
|
|
@@ -52,7 +53,7 @@ module ActionLink
|
|
|
52
53
|
# May be accessed and/or overriden in subclasses
|
|
53
54
|
|
|
54
55
|
def i18n_title_key
|
|
55
|
-
"
|
|
56
|
+
"action_link.titles.#{_action}"
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
def http_method; end
|
|
@@ -69,7 +70,11 @@ module ActionLink
|
|
|
69
70
|
# Options for `link_to`
|
|
70
71
|
|
|
71
72
|
def _title
|
|
72
|
-
|
|
73
|
+
return if manual_title == false
|
|
74
|
+
|
|
75
|
+
# Sometimes the <a title> attribute has non-breaking spaces in it ` `.
|
|
76
|
+
# ActionLink must not replace that with `&bnsp;` (though other HTML needs to be stripped).
|
|
77
|
+
t(i18n_title_key, subject: strip_tags(_title_subject_name.gsub(' ', ' ')))
|
|
73
78
|
end
|
|
74
79
|
|
|
75
80
|
def _data
|
|
@@ -96,6 +101,8 @@ module ActionLink
|
|
|
96
101
|
|
|
97
102
|
# Converts a class like `::ActionLink::New` to the symbol `:new`.
|
|
98
103
|
def _action
|
|
104
|
+
return action if is_a?(::ActionLink::Custom)
|
|
105
|
+
|
|
99
106
|
@_action ||= self.class.name[12..].underscore.to_sym
|
|
100
107
|
end
|
|
101
108
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ActionLink
|
|
4
|
+
# An action link that indicates showing an existing record.
|
|
5
|
+
class Custom < Base
|
|
6
|
+
option :action
|
|
7
|
+
|
|
8
|
+
erb_template <<~ERB.gsub("\n", '')
|
|
9
|
+
<% if permission? %>
|
|
10
|
+
<%= link_to(url, **options) do %>
|
|
11
|
+
<%= content %>
|
|
12
|
+
<% icon_tag :icon %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<%= content %>
|
|
16
|
+
<% end %>
|
|
17
|
+
ERB
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -22,7 +22,7 @@ module ActionLink
|
|
|
22
22
|
option :associative, default: -> { false }
|
|
23
23
|
|
|
24
24
|
def i18n_title_key
|
|
25
|
-
return '
|
|
25
|
+
return 'action_link.titles.unassign' if associative
|
|
26
26
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
@@ -42,9 +42,9 @@ module ActionLink
|
|
|
42
42
|
|
|
43
43
|
def i18n_confirmation_key
|
|
44
44
|
if associative
|
|
45
|
-
'
|
|
45
|
+
'action_link.confirmations.unassign'
|
|
46
46
|
else
|
|
47
|
-
'
|
|
47
|
+
'action_link.confirmations.destroy'
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ActionLink
|
|
4
|
+
# An action link that indicates downloading a file.
|
|
5
|
+
class Download < Show
|
|
6
|
+
ICON = 'arrow-down-circle'
|
|
7
|
+
|
|
8
|
+
erb_template <<~ERB.gsub("\n", '')
|
|
9
|
+
<% if permission? %>
|
|
10
|
+
<%= link_to(url, **options.merge(target: :_blank)) do %>
|
|
11
|
+
<%= content %>
|
|
12
|
+
<% if icon? %><%= ' ' %><%= icon_tag ::ActionLink::Download::ICON %><% end %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<%= content %>
|
|
16
|
+
<% end %>
|
|
17
|
+
ERB
|
|
18
|
+
|
|
19
|
+
option :url
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module ActionLink
|
|
4
4
|
# An action link that indicates adding a new record.
|
|
5
5
|
class New < Base
|
|
6
|
-
ICON = 'plus-circle'
|
|
6
|
+
ICON = 'plus-circle'.freeze
|
|
7
7
|
|
|
8
8
|
erb_template <<~ERB.gsub("\n", '')
|
|
9
9
|
<% if permission? %>
|
|
@@ -23,7 +23,7 @@ module ActionLink
|
|
|
23
23
|
option :associative, default: -> { false }
|
|
24
24
|
|
|
25
25
|
def i18n_title_key
|
|
26
|
-
return '
|
|
26
|
+
return 'action_link.titles.assign' if associative
|
|
27
27
|
|
|
28
28
|
super
|
|
29
29
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
de:
|
|
2
|
-
|
|
2
|
+
action_link:
|
|
3
3
|
confirmations:
|
|
4
4
|
destroy: "Möchtest du %{subject} löschen?"
|
|
5
5
|
unassign: "Möchtest du %{subject} entkoppeln? Bei dieser Aktion wird nichts gelöscht."
|
|
@@ -10,3 +10,4 @@ de:
|
|
|
10
10
|
new: "%{subject} anlegen"
|
|
11
11
|
show: "%{subject} anzeigen"
|
|
12
12
|
unassign: "%{subject} entkoppeln"
|
|
13
|
+
download: "%{subject} downloaden"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
en:
|
|
2
|
-
|
|
2
|
+
action_link:
|
|
3
3
|
confirmations:
|
|
4
4
|
destroy: "Would you like to delete %{subject}?"
|
|
5
5
|
unassign: "Would you like to unassign %{subject}? This action does not delete."
|
|
@@ -10,3 +10,4 @@ en:
|
|
|
10
10
|
new: Add %{subject}
|
|
11
11
|
show: "Show %{subject}"
|
|
12
12
|
unassign: "Unassign %{subject}"
|
|
13
|
+
download: "Download %{subject}"
|
data/lib/action_link/engine.rb
CHANGED
|
@@ -8,6 +8,22 @@ module ActionLink
|
|
|
8
8
|
class Engine < ::Rails::Engine
|
|
9
9
|
isolate_namespace ActionLink
|
|
10
10
|
|
|
11
|
+
initializer "action_link.assets" do |app|
|
|
12
|
+
app.config.assets.paths << Engine.root.join('app/stylesheets')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
initializer 'action_link.vscode_snippets', group: :all do |app|
|
|
16
|
+
app.config.after_initialize do
|
|
17
|
+
vscode_dir = Rails.root.join('.vscode')
|
|
18
|
+
next unless vscode_dir.directory?
|
|
19
|
+
|
|
20
|
+
target = vscode_dir.join('action_link.code-snippets')
|
|
21
|
+
source = Engine.root.join('vscode/action_link.code-snippets')
|
|
22
|
+
|
|
23
|
+
FileUtils.ln_s(source, target, force: true)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
11
27
|
config.to_prepare do
|
|
12
28
|
# Our ActionLink components are subclasses of `ViewComponent::Base`.
|
|
13
29
|
# When `ViewComponent::Base` is subclassed, two things happen:
|
|
@@ -21,10 +37,12 @@ module ActionLink
|
|
|
21
37
|
# That's right here and now.
|
|
22
38
|
require_relative '../../app/components/action_link/application_component'
|
|
23
39
|
require_relative '../../app/components/action_link/base'
|
|
40
|
+
require_relative '../../app/components/action_link/custom'
|
|
24
41
|
require_relative '../../app/components/action_link/destroy'
|
|
25
42
|
require_relative '../../app/components/action_link/edit'
|
|
26
43
|
require_relative '../../app/components/action_link/new'
|
|
27
44
|
require_relative '../../app/components/action_link/show'
|
|
45
|
+
require_relative '../../app/components/action_link/download'
|
|
28
46
|
end
|
|
29
47
|
end
|
|
30
48
|
end
|
data/lib/action_link/version.rb
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"= render ActionLink::New": {
|
|
3
|
+
"prefix": [
|
|
4
|
+
"nal"
|
|
5
|
+
],
|
|
6
|
+
"body": [
|
|
7
|
+
"= render ActionLink::New.new(url: $1,",
|
|
8
|
+
" model: $2,",
|
|
9
|
+
" current_user:)",
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"= render ActionLink::Show": {
|
|
13
|
+
"prefix": [
|
|
14
|
+
"sal"
|
|
15
|
+
],
|
|
16
|
+
"body": [
|
|
17
|
+
"= render ActionLink::Show.new(url: $1, current_user:)",
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"= render ActionLink::Edit": {
|
|
21
|
+
"prefix": [
|
|
22
|
+
"eal"
|
|
23
|
+
],
|
|
24
|
+
"body": [
|
|
25
|
+
"= render ActionLink::Edit.new(url: $1,",
|
|
26
|
+
" model: $2,",
|
|
27
|
+
" title: $3,",
|
|
28
|
+
" current_user:)",
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"= render ActionLink::Destroy": {
|
|
32
|
+
"prefix": [
|
|
33
|
+
"dal"
|
|
34
|
+
],
|
|
35
|
+
"body": [
|
|
36
|
+
"= render ActionLink::Destroy.new(url: $1,",
|
|
37
|
+
" model: $2,",
|
|
38
|
+
" confirmation_subject: 'dieses Ding',",
|
|
39
|
+
" associative: true,",
|
|
40
|
+
" current_user:)",
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
}
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_link
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- halo
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: actionview
|
|
@@ -77,14 +76,24 @@ files:
|
|
|
77
76
|
- LICENSE.txt
|
|
78
77
|
- README.md
|
|
79
78
|
- app/assets/fonts/action_link/acticons.woff
|
|
79
|
+
- app/assets/stylesheets/action_link/_index.sass
|
|
80
|
+
- app/assets/stylesheets/action_link/acticons.css
|
|
81
|
+
- app/assets/stylesheets/action_link/acticons.css.map
|
|
80
82
|
- app/assets/stylesheets/action_link/acticons.sass
|
|
81
|
-
- app/assets/stylesheets/action_link/
|
|
83
|
+
- app/assets/stylesheets/action_link/fonts.css
|
|
84
|
+
- app/assets/stylesheets/action_link/fonts.css.map
|
|
82
85
|
- app/assets/stylesheets/action_link/fonts.sass
|
|
86
|
+
- app/assets/stylesheets/action_link/style.css
|
|
87
|
+
- app/assets/stylesheets/action_link/style.css.map
|
|
83
88
|
- app/assets/stylesheets/action_link/style.scss
|
|
89
|
+
- app/assets/stylesheets/action_link/variables.css
|
|
90
|
+
- app/assets/stylesheets/action_link/variables.css.map
|
|
84
91
|
- app/assets/stylesheets/action_link/variables.scss
|
|
85
92
|
- app/components/action_link/application_component.rb
|
|
86
93
|
- app/components/action_link/base.rb
|
|
94
|
+
- app/components/action_link/custom.rb
|
|
87
95
|
- app/components/action_link/destroy.rb
|
|
96
|
+
- app/components/action_link/download.rb
|
|
88
97
|
- app/components/action_link/edit.rb
|
|
89
98
|
- app/components/action_link/new.rb
|
|
90
99
|
- app/components/action_link/show.rb
|
|
@@ -95,6 +104,7 @@ files:
|
|
|
95
104
|
- lib/action_link/model.rb
|
|
96
105
|
- lib/action_link/title_subject_name.rb
|
|
97
106
|
- lib/action_link/version.rb
|
|
107
|
+
- vscode/action_link.code-snippets
|
|
98
108
|
homepage: https://github.com/halo/action_link
|
|
99
109
|
licenses:
|
|
100
110
|
- MIT
|
|
@@ -103,7 +113,6 @@ metadata:
|
|
|
103
113
|
source_code_uri: https://github.com/halo/action_link
|
|
104
114
|
changelog_uri: https://github.com/halo/halo/blob/main/CHANGELOG.md
|
|
105
115
|
rubygems_mfa_required: 'true'
|
|
106
|
-
post_install_message:
|
|
107
116
|
rdoc_options: []
|
|
108
117
|
require_paths:
|
|
109
118
|
- lib
|
|
@@ -118,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
118
127
|
- !ruby/object:Gem::Version
|
|
119
128
|
version: '0'
|
|
120
129
|
requirements: []
|
|
121
|
-
rubygems_version:
|
|
122
|
-
signing_key:
|
|
130
|
+
rubygems_version: 4.0.1
|
|
123
131
|
specification_version: 4
|
|
124
132
|
summary: A set of ViewComponents for common links (show, edit, delete, etc.)
|
|
125
133
|
test_files: []
|