effective_resources 2.25.10 → 2.25.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/effective/flash_messages.rb +1 -1
- data/app/helpers/effective_resources_helper.rb +16 -1
- data/app/models/concerns/acts_as_slugged.rb +2 -0
- data/app/views/effective/acts_as_email_notification/_fields.html.haml +2 -2
- data/app/views/effective/acts_as_published/_fields.html.haml +9 -0
- data/app/views/effective/acts_as_slugged/_fields.html.haml +3 -0
- data/lib/effective_resources/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7189c9b0628e5f84b362ccfc62a80e26bf349fb0477dcdaef239f1eabbd3b3f4
|
4
|
+
data.tar.gz: 8a4a392131be33cd557d9d752698125b735610685bbb10c9035102d8c7cd624a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58b7e2293d65db01e5683cc9505e0bca06d97be8cf32c9d48246882a747ff35d4c3c4b920150264e5ee98ea8353e4c5710d6dc6607505b372be005d374fcd8ed
|
7
|
+
data.tar.gz: 1f1ce662f557191eb973733ae430ba5a5563bc740d4bb8b8041b25bdfeceea559ee05b37d256b89f0828f9ac79d59dfd232201eb8979c08bf2d324a650513466
|
@@ -278,7 +278,7 @@ module EffectiveResourcesHelper
|
|
278
278
|
raise("expected a title for step #{step}") unless title.present?
|
279
279
|
|
280
280
|
link = if edit_effective_wizard? && resource.is_a?(controller.resource_klass) && resource.can_visit_step?(step)
|
281
|
-
link_to('Edit', wizard_path(step), title: "Edit #{title}")
|
281
|
+
link_to('Edit', wizard_path(step), title: "Edit #{title}", class: 'btn btn-secondary mb-2')
|
282
282
|
end
|
283
283
|
|
284
284
|
content_tag(:div, class: 'card mb-4') do
|
@@ -327,4 +327,19 @@ module EffectiveResourcesHelper
|
|
327
327
|
EffectiveResources.masked_email(resource)
|
328
328
|
end
|
329
329
|
|
330
|
+
def acts_as_published_fields(form)
|
331
|
+
raise('expected an acts_as_published form object') unless form.object.class.try(:acts_as_published?)
|
332
|
+
render('effective/acts_as_published/fields', form: form)
|
333
|
+
end
|
334
|
+
|
335
|
+
def acts_as_slugged_fields(form, url: nil)
|
336
|
+
raise('expected an acts_as_slugged form object') unless form.object.class.try(:acts_as_slugged?)
|
337
|
+
|
338
|
+
current_url = if url.present?
|
339
|
+
'Currently accessible via ' + link_to(url.gsub(form.object.slug, '<strong>' + form.object.slug + '</strong>').html_safe, url, target: :_blank)
|
340
|
+
end
|
341
|
+
|
342
|
+
render('effective/acts_as_slugged/fields', form: form, current_url: current_url)
|
343
|
+
end
|
344
|
+
|
330
345
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
.col-md-10
|
13
13
|
= form.select :from, mailer_froms_collection(), label: 'From', value: email_from
|
14
14
|
.col-md-2.my-4
|
15
|
-
%a{href: "#acts-as-email-notification-collapse-#{uid}", 'data-toggle': 'collapse', role: 'button', 'aria-expanded': expanded, 'aria-controls': "acts-as-email-notification-collapse-#{uid}"}
|
15
|
+
%a{href: "#acts-as-email-notification-collapse-#{uid}", 'data-toggle': 'collapse', role: 'button', 'aria-expanded': expanded, 'aria-controls': "acts-as-email-notification-collapse-#{uid}"} Add CC or BCC
|
16
16
|
|
17
17
|
.collapse{id: "acts-as-email-notification-collapse-#{uid}", class: ('show' if expanded)}
|
18
18
|
= form.text_field :cc, label: 'CC', value: email_cc
|
@@ -30,7 +30,7 @@
|
|
30
30
|
.col-md-10
|
31
31
|
= form.select :from, mailer_froms_collection(), label: 'From'
|
32
32
|
.col-md-2.my-4
|
33
|
-
%a{href: "#acts-as-email-notification-collapse-#{uid}", 'data-toggle': 'collapse', role: 'button', 'aria-expanded': expanded, 'aria-controls': "acts-as-email-notification-collapse-#{uid}"}
|
33
|
+
%a{href: "#acts-as-email-notification-collapse-#{uid}", 'data-toggle': 'collapse', role: 'button', 'aria-expanded': expanded, 'aria-controls': "acts-as-email-notification-collapse-#{uid}"} Add CC or BCC
|
34
34
|
|
35
35
|
.collapse{id: "acts-as-email-notification-collapse-#{uid}", class: ('show' if expanded)}
|
36
36
|
= form.text_field :cc, label: 'CC'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# acts_as_published
|
2
|
+
= form.hide_if(:save_as_draft, true) do
|
3
|
+
.row
|
4
|
+
.col-md-6
|
5
|
+
= form.datetime_field :published_start_at, label: 'Published start', hint: 'Will appear on the website after this date and time. Leave blank to publish immediately.'
|
6
|
+
.col-md-6
|
7
|
+
= form.datetime_field :published_end_at, label: 'Published end', hint: 'Will not appear on the website after this date and time. Leave blank for no end date.', date_linked: false
|
8
|
+
|
9
|
+
= form.check_box :save_as_draft, label: "Save as a draft. It will not appear on the website and can only be accessed by admin users."
|
@@ -0,0 +1,3 @@
|
|
1
|
+
- if form.object.persisted? || form.object.errors.include?(:slug)
|
2
|
+
- hint = "The slug controls the internet address for this item. Be careful, changing the slug will break links that other websites may have to the old address."
|
3
|
+
= form.text_field :slug, hint: [hint, current_url].compact.join("<br>")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.25.
|
4
|
+
version: 2.25.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -259,6 +259,8 @@ files:
|
|
259
259
|
- app/views/application/update.js.erb
|
260
260
|
- app/views/effective/acts_as_email_form/_fields.html.haml
|
261
261
|
- app/views/effective/acts_as_email_notification/_fields.html.haml
|
262
|
+
- app/views/effective/acts_as_published/_fields.html.haml
|
263
|
+
- app/views/effective/acts_as_slugged/_fields.html.haml
|
262
264
|
- app/views/effective/acts_as_wizard/_wizard_step.html.haml
|
263
265
|
- app/views/effective/resource/_actions.html.haml
|
264
266
|
- app/views/effective/resource/_actions_dropleft.html.haml
|