bullet_train-super_scaffolding 1.20.0 → 1.21.0
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/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.html.erb +1 -1
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb +1 -1
- data/app/views/account/scaffolding/completely_concrete/tangible_things/_tangible_thing.html.erb +1 -1
- data/app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb +1 -1
- data/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/transformer.rb +0 -27
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f241fcb2c0833794677543f1f5e1708e52780d031afa17667082688b5a7900
|
4
|
+
data.tar.gz: e60606c64056414bc1c38454adb7e6bce8028d61405e0a3c9277ea92f06d8f89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60fc018c6b679c5293d83aa35eeadaaa9f9880900fa9d30bdc7ba9a8e64ed46f74a933c36f6a0e52ccbb426dce559227b6debc2c218045beaf9abc431b222f98
|
7
|
+
data.tar.gz: ad44026e89ef490995c10c56741276a82408e4de2c5540fd90031833665fa826fddefeb4729309c654a58bf660bdd3dd4536e02a67b25e74b44d3797a0ad4b9e
|
data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.html.erb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<% unless hide_actions %>
|
12
12
|
<%# We write the full path here since this partial is called from different scopes. %>
|
13
13
|
<%= link_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.edit'), [:edit, :account, creative_concept], class: 'button-secondary button-smaller' if can? :edit, creative_concept %>
|
14
|
-
<%= button_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.destroy'), [:account, creative_concept], method: :delete, data: {
|
14
|
+
<%= button_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.destroy'), [:account, creative_concept], method: :delete, data: { turbo_confirm: t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.confirmations.destroy', model_locales(creative_concept)) }, class: 'button-secondary button-smaller' if can? :destroy, creative_concept %>
|
15
15
|
<% end %>
|
16
16
|
</td>
|
17
17
|
</tr>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<% box.actions do %>
|
16
16
|
<%= link_to t('.buttons.edit'), [:edit, :account, @creative_concept], class: first_button_primary if can? :edit, @creative_concept %>
|
17
|
-
<%= button_to t('.buttons.destroy'), [:account, @creative_concept], method: :delete, class: first_button_primary, data: {
|
17
|
+
<%= button_to t('.buttons.destroy'), [:account, @creative_concept], method: :delete, class: first_button_primary, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(@creative_concept)) } if can? :destroy, @creative_concept %>
|
18
18
|
<%= link_to t('global.buttons.back'), [:account, @team, :scaffolding_absolutely_abstract_creative_concepts], class: first_button_primary %>
|
19
19
|
<% end %>
|
20
20
|
<% end %>
|
data/app/views/account/scaffolding/completely_concrete/tangible_things/_tangible_thing.html.erb
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
<%= link_to t('.buttons.shorthand.edit'), [:edit, :account, tangible_thing], class: 'button-secondary button-smaller' %>
|
22
22
|
<% end %>
|
23
23
|
<% if can? :destroy, tangible_thing %>
|
24
|
-
<%= button_to t('.buttons.shorthand.destroy'), [:account, tangible_thing], method: :delete, data: {
|
24
|
+
<%= button_to t('.buttons.shorthand.destroy'), [:account, tangible_thing], method: :delete, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(tangible_thing)) }, class: 'button-secondary button-smaller' %>
|
25
25
|
<% end %>
|
26
26
|
<%# 🚅 super scaffolding will insert new action model buttons above this line. %>
|
27
27
|
<% end %>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<% box.actions do %>
|
40
40
|
<%= link_to t('.buttons.edit'), [:edit, :account, @tangible_thing], class: first_button_primary if can? :edit, @tangible_thing %>
|
41
41
|
<%# 🚅 super scaffolding will insert new action model buttons above this line. %>
|
42
|
-
<%= button_to t('.buttons.destroy'), [:account, @tangible_thing], method: :delete, class: first_button_primary, data: {
|
42
|
+
<%= button_to t('.buttons.destroy'), [:account, @tangible_thing], method: :delete, class: first_button_primary, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(@tangible_thing)) } if can? :destroy, @tangible_thing %>
|
43
43
|
<%= link_to t('global.buttons.back'), [:account, @absolutely_abstract_creative_concept, :completely_concrete_tangible_things], class: first_button_primary %>
|
44
44
|
<% end %>
|
45
45
|
|
@@ -814,33 +814,6 @@ class Scaffolding::Transformer
|
|
814
814
|
|
815
815
|
unless cli_options["skip-show"]
|
816
816
|
|
817
|
-
# TODO: Seems like this block of code is useless?
|
818
|
-
# standard:disable Lint/Void
|
819
|
-
if attribute.is_id?
|
820
|
-
<<~ERB
|
821
|
-
<% if @tangible_thing.#{attribute.name_without_id} %>
|
822
|
-
<div class="form-group">
|
823
|
-
<label class="col-form-label"><%= t('.fields.#{attribute.name}.heading') %></label>
|
824
|
-
<div>
|
825
|
-
<%= link_to @tangible_thing.#{attribute.name_without_id}.#{attribute.options[:label]}, [:account, @tangible_thing.#{attribute.name_without_id}] %>
|
826
|
-
</div>
|
827
|
-
</div>
|
828
|
-
<% end %>
|
829
|
-
ERB
|
830
|
-
elsif attribute.is_ids?
|
831
|
-
<<~ERB
|
832
|
-
<% if @tangible_thing.#{attribute.collection_name}.any? %>
|
833
|
-
<div class="form-group">
|
834
|
-
<label class="col-form-label"><%= t('.fields.#{attribute.name}.heading') %></label>
|
835
|
-
<div>
|
836
|
-
<%= @tangible_thing.#{attribute.collection_name}.map { |#{attribute.name_without_ids}| link_to #{attribute.name_without_ids}.#{attribute.options[:label]}, [:account, #{attribute.name_without_ids}] }.to_sentence.html_safe %>
|
837
|
-
</div>
|
838
|
-
</div>
|
839
|
-
<% end %>
|
840
|
-
ERB
|
841
|
-
end
|
842
|
-
# standard:enable Lint/Void
|
843
|
-
|
844
817
|
# this gets stripped and is one line, so indentation isn't a problem.
|
845
818
|
field_content = <<-ERB
|
846
819
|
<%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix} %>
|