effective_pages 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/admin/carousel_items_controller.rb +2 -0
- data/app/controllers/admin/menus_controller.rb +3 -0
- data/app/datatables/effective_page_sections_datatable.rb +1 -1
- data/app/views/admin/carousel_items/_form_carousel_item.html.haml +4 -4
- data/app/views/admin/carousel_items/index.html.haml +4 -10
- data/app/views/admin/menus/index.html.haml +4 -10
- data/app/views/admin/page_banners/_form_page_banner.html.haml +3 -4
- data/app/views/admin/page_sections/_form_page_section.html.haml +2 -1
- data/config/effective_pages.rb +2 -0
- data/lib/effective_pages/version.rb +1 -1
- data/lib/effective_pages.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33c7720dd14a75e375dffed5ae8c21e7390cfd93727886785c72d574fbe23376
|
4
|
+
data.tar.gz: 40ab7326b18be3a3a728461f604c4e2cfd827d75bacef55b2cd7bada79f5d513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b9359a7b5c76c694ded55b524981df67e85f01e080c6ca2ae17c895762a52438d72d2c3b1ee508ff89d370eda0b921ea526af6b53800a353a8ad4ac5f79228e
|
7
|
+
data.tar.gz: 5ccdeb32c10e7920fa017a4f6d0d5ca8ba6416290de99d202a4f972092e20b3e18cb53dc4c1d26d6e38aafbeae6135073382d0029a9717d6aae61c99112adf89
|
@@ -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'
|
10
|
+
= f.article_editor :rich_text_body, label: 'Body'
|
11
11
|
- else
|
12
|
-
= f.rich_text_area :rich_text_body, label: 'Body'
|
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
|
19
|
-
= f.text_field :caption, hint: '
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
3
|
-
|
4
|
-
= f.
|
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'
|
data/config/effective_pages.rb
CHANGED
@@ -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
|
data/lib/effective_pages.rb
CHANGED
@@ -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.
|
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
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|