effective_pages 3.4.0 → 3.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87905a09b84f0b8cf820024a81ea1066e5f213cd8e6b445f7cafc2d24eb86398
4
- data.tar.gz: 7bcd83be6059d46ee284e80420683eeb273df7d2f3788b1b84e0b5c6bb06d1c5
3
+ metadata.gz: 33c7720dd14a75e375dffed5ae8c21e7390cfd93727886785c72d574fbe23376
4
+ data.tar.gz: 40ab7326b18be3a3a728461f604c4e2cfd827d75bacef55b2cd7bada79f5d513
5
5
  SHA512:
6
- metadata.gz: b3ec4c9bb169cba79542e2d7d5d6db7d2e04bd3cc69b6e46848542e78cbd7cae0d57b8976e812be8309bb6116cfc6b9745e85f960bc8a8b95876c48b72f87430
7
- data.tar.gz: be88b345621ea1f0ee7f31e07a08a44392be1a34706463551b9548be2730bcf6fa77a698ace3ac0237af76290a310639a5521cce745bd8d602c8b715c4c1476f
6
+ metadata.gz: 4b9359a7b5c76c694ded55b524981df67e85f01e080c6ca2ae17c895762a52438d72d2c3b1ee508ff89d370eda0b921ea526af6b53800a353a8ad4ac5f79228e
7
+ data.tar.gz: 5ccdeb32c10e7920fa017a4f6d0d5ca8ba6416290de99d202a4f972092e20b3e18cb53dc4c1d26d6e38aafbeae6135073382d0029a9717d6aae61c99112adf89
@@ -5,6 +5,8 @@ module Admin
5
5
 
6
6
  include Effective::CrudController
7
7
 
8
+ page_title 'Carousels'
9
+
8
10
  def permitted_params
9
11
  params.require(:effective_carousel_item).permit!
10
12
  end
@@ -3,8 +3,11 @@ module Admin
3
3
  before_action(:authenticate_user!) if defined?(Devise)
4
4
  before_action { EffectiveResources.authorize!(self, :admin, :effective_pages) }
5
5
 
6
+
6
7
  include Effective::CrudController
7
8
 
9
+ page_title 'Menus'
10
+
8
11
  resource_scope -> { Effective::Page.all }
9
12
 
10
13
  if (config = EffectivePages.layout)
@@ -8,13 +8,13 @@ class EffectivePageSectionsDatatable < Effective::Datatable
8
8
  col :updated_at, visible: false
9
9
 
10
10
  col :name
11
- col :hint
12
11
 
13
12
  col :title
14
13
  col :rich_text_body
15
14
 
16
15
  col :file
17
16
 
17
+ col :hint, visible: false
18
18
  col :link_label, visible: false
19
19
  col :link_url, visible: false
20
20
  col :caption, visible: false
@@ -7,15 +7,15 @@
7
7
  = f.text_field :title
8
8
 
9
9
  - if defined?(EffectiveArticleEditor)
10
- = f.article_editor :rich_text_body, label: 'Body', hint: 'The main content'
10
+ = f.article_editor :rich_text_body, label: 'Body'
11
11
  - else
12
- = f.rich_text_area :rich_text_body, label: 'Body', hint: 'The main content'
12
+ = f.rich_text_area :rich_text_body, label: 'Body'
13
13
 
14
14
  .row
15
15
  .col= f.text_field :link_label
16
16
  .col= f.url_field :link_url
17
17
 
18
- = f.file_field :file, label: 'Image Attachment', hint: 'The image to display on this carousel item'
19
- = f.text_field :caption, hint: 'Displayed alongside the image'
18
+ = f.file_field :file, label: 'Image attachment', hint: EffectivePages.carousels_hint_text
19
+ = f.text_field :caption, hint: 'Optional'
20
20
 
21
21
  = effective_submit(f)
@@ -1,11 +1,5 @@
1
- %h1= @page_title
2
-
3
- %p
4
- Click Reorder to drag & drop reorder carousel items.
5
- Edit an item to change its content.
6
-
7
1
  - EffectivePages.carousels.each do |carousel|
8
- %h3 #{carousel.to_s.titleize} Carousel
9
- - datatable = EffectiveCarouselItemsDatatable.new(carousel: carousel)
10
- = render_datatable(datatable, simple: true, inline: true)
11
- %hr.my-5
2
+ .bg-white.my-5.p-3.rounded
3
+ %h3.mb-0 #{carousel.to_s.titleize} Carousel
4
+ - datatable = EffectiveCarouselItemsDatatable.new(carousel: carousel)
5
+ = render_datatable(datatable, simple: true, inline: true)
@@ -1,11 +1,5 @@
1
- %h1= @page_title
2
-
3
- %p
4
- Click Reorder to drag & drop reorder menu items.
5
- Edit an item to reorder its children items.
6
-
7
1
  - EffectivePages.menus.each do |menu|
8
- %h3 #{menu.to_s.titleize} Menu
9
- - datatable = EffectivePagesMenuDatatable.new(menu: menu)
10
- = render_datatable(datatable, simple: true, inline: true)
11
- %hr.my-5
2
+ .bg-white.my-5.p-3.rounded
3
+ %h3.mb-0 #{menu.to_s.titleize} Menu
4
+ - datatable = EffectivePagesMenuDatatable.new(menu: menu)
5
+ = render_datatable(datatable, simple: true, inline: true)
@@ -1,8 +1,7 @@
1
1
  = effective_form_with(model: [:admin, page_banner], engine: true) do |f|
2
- = f.text_field :name, hint: 'The name of this banner. Used for reference only'
3
-
4
- = f.file_field :file, label: 'Image Attachment', hint: 'Upload an image to display on this banner'
5
- = f.text_field :caption, hint: 'Displayed alongside the image'
2
+ = f.text_field :name, hint: 'The name of this banner, used only for reference'
3
+ = f.file_field :file, label: 'Image attachment', hint: EffectivePages.banners_hint_text
4
+ = f.text_field :caption, hint: 'Optional. Displayed alongside the image'
6
5
 
7
6
  -# - if defined?(EffectiveArticleEditor)
8
7
  -# = f.article_editor :rich_text_body, label: 'Body', hint: 'The main content'
@@ -5,7 +5,8 @@
5
5
  = f.static_field :name
6
6
 
7
7
  - if f.object.hint.present?
8
- .mb-4= f.object.hint.html_safe
8
+ %h4.mt-0 Instructions
9
+ %p= f.object.hint.html_safe
9
10
 
10
11
  = f.text_field :title
11
12
 
@@ -63,10 +63,12 @@ EffectivePages.setup do |config|
63
63
  # Allow a page banner to be selected on the Admin::Pages#edit screen
64
64
  # Banners can be CRUD by the admin
65
65
  config.banners = false
66
+ config.banners_hint_text = 'Hint text that includes required image dimensions'
66
67
 
67
68
  # Page Carousels
68
69
  # The menu names a page can belong to
69
70
  config.carousels = false
70
71
  # config.carousels = [:home, :secondary]
72
+ config.carousels_hint_text = 'Hint text that includes required image dimensions'
71
73
 
72
74
  end
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.4.0'.freeze
2
+ VERSION = '3.4.1'.freeze
3
3
  end
@@ -12,7 +12,7 @@ module EffectivePages
12
12
  :site_og_image, :site_og_image_width, :site_og_image_height,
13
13
  :site_title, :site_title_suffix, :fallback_meta_description,
14
14
  :silence_missing_page_title_warnings, :silence_missing_meta_description_warnings, :silence_missing_canonical_url_warnings,
15
- :use_effective_roles, :layout, :max_menu_depth,
15
+ :use_effective_roles, :layout, :max_menu_depth, :banners_hint_text, :carousels_hint_text,
16
16
 
17
17
  # Booleans
18
18
  :banners,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
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: 2022-10-11 00:00:00.000000000 Z
11
+ date: 2022-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails