voidable-hotwire 0.5.0 → 0.5.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/lib/templates/erb/scaffold/edit.html.erb.tt +3 -0
- data/lib/templates/erb/scaffold/index.html.erb.tt +22 -1
- data/lib/templates/erb/scaffold/new.html.erb.tt +3 -0
- data/lib/templates/erb/scaffold/show.html.erb.tt +3 -0
- data/lib/voidable/hotwire/version.rb +1 -1
- metadata +4 -2
- data/lib/templates/erb/scaffold/_details.html.erb.tt +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4959c33ee919d4af15bf4b4c21fdb13d0ce7391a5dcbd9afbe42f7b7842c10cb
|
|
4
|
+
data.tar.gz: 47c79d6845e2fd0f16f37ca05f34a3807ca80caacbd4f57c54f88b128528fd8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a9ab0e6f39e7666099b1670bce646b19e34a08b44135a2b62ee3378d447260f899cfcf3b036aa068e8887240e628944f26528bca0f012e4eb5db81fe534a809
|
|
7
|
+
data.tar.gz: b308f7cf89bc31bd8473c4aa046bd201ac4fd8edd4b8fc734f479deecc01e3cc60736ca76c86cde116664d25f086167b97f00e035df9167d94830f715933cc9f
|
|
@@ -76,7 +76,28 @@
|
|
|
76
76
|
</void-dialog>
|
|
77
77
|
<%% else %>
|
|
78
78
|
<void-dialog id="resource-modal" open size="md" heading="<%%= @<%= singular_table_name %>.<%= display_column %>.to_s %>" data-close-href="<%%= <%= index_helper(type: :path) %> %>">
|
|
79
|
-
|
|
79
|
+
<dl class="detail-grid">
|
|
80
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
|
81
|
+
<dt class="detail-label"><%= attribute.human_name %></dt>
|
|
82
|
+
<% if attribute.type == :boolean -%>
|
|
83
|
+
<dd class="detail-value">
|
|
84
|
+
<void-badge color="<%%= @<%= singular_table_name %>.<%= attribute.column_name %> ? 'success' : 'default' %>" variant="outline"><%%= @<%= singular_table_name %>.<%= attribute.column_name %> ? 'Yes' : 'No' %></void-badge>
|
|
85
|
+
</dd>
|
|
86
|
+
<% elsif [:integer, :float, :decimal].include?(attribute.type) -%>
|
|
87
|
+
<dd class="detail-value-mono"><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %></dd>
|
|
88
|
+
<% elsif attribute.attachment? -%>
|
|
89
|
+
<dd class="detail-value"><%%= link_to @<%= singular_table_name %>.<%= attribute.column_name %>.filename, @<%= singular_table_name %>.<%= attribute.column_name %> if @<%= singular_table_name %>.<%= attribute.column_name %>.attached? %></dd>
|
|
90
|
+
<% elsif attribute.attachments? -%>
|
|
91
|
+
<dd class="detail-value">
|
|
92
|
+
<%% @<%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
|
93
|
+
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
|
94
|
+
<%% end %>
|
|
95
|
+
</dd>
|
|
96
|
+
<% else -%>
|
|
97
|
+
<dd class="detail-value"><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %></dd>
|
|
98
|
+
<% end -%>
|
|
99
|
+
<% end -%>
|
|
100
|
+
</dl>
|
|
80
101
|
<div class="modal-actions">
|
|
81
102
|
<void-button variant="outline" size="sm"><a href="<%%= <%= edit_helper(type: :path) %> %>">Edit</a></void-button>
|
|
82
103
|
<void-button color="error" variant="outline" size="sm" data-open-dialog="resource-delete-dialog">Delete</void-button>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: voidable-hotwire
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaz Walker
|
|
@@ -57,10 +57,12 @@ files:
|
|
|
57
57
|
- lib/generators/voidable/install/templates/voidable-layout-sidebar.css
|
|
58
58
|
- lib/generators/voidable/install/templates/voidable-layout-topbar.css
|
|
59
59
|
- lib/generators/voidable/install/templates/voidable-layout.js
|
|
60
|
-
- lib/templates/erb/scaffold/_details.html.erb.tt
|
|
61
60
|
- lib/templates/erb/scaffold/_form.html.erb.tt
|
|
61
|
+
- lib/templates/erb/scaffold/edit.html.erb.tt
|
|
62
62
|
- lib/templates/erb/scaffold/index.html.erb.tt
|
|
63
|
+
- lib/templates/erb/scaffold/new.html.erb.tt
|
|
63
64
|
- lib/templates/erb/scaffold/partial.html.erb.tt
|
|
65
|
+
- lib/templates/erb/scaffold/show.html.erb.tt
|
|
64
66
|
- lib/templates/rails/scaffold_controller/controller.rb.tt
|
|
65
67
|
- lib/voidable/hotwire.rb
|
|
66
68
|
- lib/voidable/hotwire/engine.rb
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<dl class="detail-grid">
|
|
2
|
-
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
|
3
|
-
<dt class="detail-label"><%= attribute.human_name %></dt>
|
|
4
|
-
<% if attribute.type == :boolean -%>
|
|
5
|
-
<dd class="detail-value">
|
|
6
|
-
<void-badge color="<%%= <%= singular_table_name %>.<%= attribute.column_name %> ? 'success' : 'default' %>" variant="outline"><%%= <%= singular_table_name %>.<%= attribute.column_name %> ? 'Yes' : 'No' %></void-badge>
|
|
7
|
-
</dd>
|
|
8
|
-
<% elsif [:integer, :float, :decimal].include?(attribute.type) -%>
|
|
9
|
-
<dd class="detail-value-mono"><%%= <%= singular_table_name %>.<%= attribute.column_name %> %></dd>
|
|
10
|
-
<% elsif attribute.attachment? -%>
|
|
11
|
-
<dd class="detail-value"><%%= link_to <%= singular_table_name %>.<%= attribute.column_name %>.filename, <%= singular_table_name %>.<%= attribute.column_name %> if <%= singular_table_name %>.<%= attribute.column_name %>.attached? %></dd>
|
|
12
|
-
<% elsif attribute.attachments? -%>
|
|
13
|
-
<dd class="detail-value">
|
|
14
|
-
<%% <%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
|
15
|
-
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
|
16
|
-
<%% end %>
|
|
17
|
-
</dd>
|
|
18
|
-
<% else -%>
|
|
19
|
-
<dd class="detail-value"><%%= <%= singular_table_name %>.<%= attribute.column_name %> %></dd>
|
|
20
|
-
<% end -%>
|
|
21
|
-
<% end -%>
|
|
22
|
-
</dl>
|