effective_resources 2.36.3 → 2.36.4
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/controllers/concerns/effective/wizard_controller/wicked_overrides.rb +11 -0
- data/app/views/effective/acts_as_wizard/_wizard_step.html.haml +1 -9
- data/app/views/effective/acts_as_wizard/wizard_step.html.haml +15 -0
- data/lib/effective_resources/version.rb +1 -1
- data/lib/effective_resources.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3ff88c8978b4ed28a1f6980a5a97130cb8d42c5bdee07cbaef255675fd07de5
|
|
4
|
+
data.tar.gz: 57761a2906421319973b0b55ca5881fe45e64d3cf3f557d2dcad989767f46acd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c87aabca3c9cd31830af970da57d1a0faed0eca28580b00980a9f4b899c42c8e996298042d724d8421928167095333c3b647034b77b8b58df254e304d45b931
|
|
7
|
+
data.tar.gz: 479b95d77770f3adbcdc93c989a05f391454b4757e6fb4b8326edbb68568f2ae35913212648960f4d6f53e33e6121c3152bf8e88bd76ba7bafacf4cccd320ea8
|
|
@@ -18,6 +18,17 @@ module Effective
|
|
|
18
18
|
effective_resource.url_helpers.url_for(merged_url_options)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
# Override from wicked to support a fallback wizard step template
|
|
22
|
+
def render_step(the_step, options = {}, params = {})
|
|
23
|
+
if the_step.nil? || the_step.to_s == Wicked::FINISH_STEP
|
|
24
|
+
redirect_to_finish_wizard(options, params)
|
|
25
|
+
elsif lookup_context.exists?(the_step.to_s, lookup_context.prefixes)
|
|
26
|
+
render(the_step, options)
|
|
27
|
+
else
|
|
28
|
+
render('effective/acts_as_wizard/wizard_step', options)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
21
32
|
end
|
|
22
33
|
end
|
|
23
34
|
end
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
= wizard_card(resource) do
|
|
2
2
|
- partial = "#{resource.render_path}/#{resource.render_step}_fields"
|
|
3
|
-
|
|
4
|
-
- if render_partial_exists?(partial)
|
|
5
|
-
= effective_table_with(resource) { |f| render(partial, f: f) }
|
|
6
|
-
|
|
7
|
-
- elsif Rails.env.development? || Rails.env.test?
|
|
8
|
-
- names = partial.split('/')
|
|
9
|
-
- name = names[0...-1].join('/') + '/_' + names.last + '.html.haml'
|
|
10
|
-
|
|
11
|
-
%div.alert.alert-warning Unable to find partial: #{name}
|
|
3
|
+
= effective_table_with(resource) { |f| render(partial, f: f) }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
- prefix = controller_path
|
|
2
|
+
- locals = { resource: resource, Effective::Resource.new(resource).name.to_sym => resource }
|
|
3
|
+
|
|
4
|
+
= render "#{prefix}/layout" do
|
|
5
|
+
= render_if_exists("#{prefix}/content", locals)
|
|
6
|
+
|
|
7
|
+
= card do
|
|
8
|
+
= render_if_exists("#{prefix}/#{step}_requirements", locals)
|
|
9
|
+
|
|
10
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
11
|
+
= f.hidden_field :id
|
|
12
|
+
|
|
13
|
+
= render("#{prefix}/#{step}_fields", f: f)
|
|
14
|
+
|
|
15
|
+
= f.submit 'Save and Continue', left: true
|
data/lib/effective_resources.rb
CHANGED
|
@@ -213,7 +213,7 @@ module EffectiveResources
|
|
|
213
213
|
resource.datatable_name
|
|
214
214
|
elsif resource.respond_to?(:model_name) == false # Just a string. Fees will do this
|
|
215
215
|
value = I18n.t(resource)
|
|
216
|
-
raise StandardError.new("Missing translation: #{resource}") if value.include?("Missing translation:")
|
|
216
|
+
raise StandardError.new("Missing translation: #{resource}") if value.include?(resource) || value.include?("Missing translation:")
|
|
217
217
|
value
|
|
218
218
|
elsif attribute.blank?
|
|
219
219
|
resource.model_name.human
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.36.
|
|
4
|
+
version: 2.36.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
@@ -266,6 +266,7 @@ files:
|
|
|
266
266
|
- app/views/effective/acts_as_published/_fields.html.haml
|
|
267
267
|
- app/views/effective/acts_as_slugged/_fields.html.haml
|
|
268
268
|
- app/views/effective/acts_as_wizard/_wizard_step.html.haml
|
|
269
|
+
- app/views/effective/acts_as_wizard/wizard_step.html.haml
|
|
269
270
|
- app/views/effective/resource/_actions.html.haml
|
|
270
271
|
- app/views/effective/resource/_actions_dropleft.html.haml
|
|
271
272
|
- app/views/effective/resource/_actions_glyphicons.html.haml
|