voidable-hotwire 0.5.0 → 0.5.2
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: e3a2169f51c8f08ec86f299e8d508181ac486be949390f96526619a576bc48fa
|
|
4
|
+
data.tar.gz: 972ea5986c6826b9ea0fcc5861c894449f166eedaa5ace3b3751d0d6072941a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27bc52b568235b6826d064d9f6160efb89fa36b8f2dde6cf5c3fca2824129d362898f45e2a72695e698d270b643d94bbd6bad0cac6c179b9bd8f4174b098713e
|
|
7
|
+
data.tar.gz: 5c3548441e26b20c1b19f51bdf6602eb62af139be195d2c8e0f9cab60f2cd9722cb9bfebd0785575baf9b71fe3f477a767f0b220a055ccba12513f95f7122f6e
|
|
@@ -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.2
|
|
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>
|