effective_pages 3.15.4 → 3.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 024ea03b129280ef6dd089a2d1031f303d5ec7dd8e7e1604bbfba15b99ae011d
4
- data.tar.gz: 3b6fc4ca5163cc668c09554f53a046cc14920740801df0c84ddd5b8b584e3b2f
3
+ metadata.gz: d027bd87ad0419c7ad33bde2cefa9810edf4fbf9e58ffb7dab10a8e3683319a2
4
+ data.tar.gz: 3eaf2cf7f9faf038771571d83a42b9348e80c18734bb3ed1899f6f28c2e0b7dd
5
5
  SHA512:
6
- metadata.gz: 35a7c0ff55b50b421b1b22a902b374142a7379f41b520a494538f18ca888e4b87dd2d32a293e4ca5bc0f4a28d7a07d584bf0bc87456a6cac01cea017eebf4ee1
7
- data.tar.gz: f8d22045cef60110c4acb3b642c295903e07ac4e084b66cbb93fe59c0cdc72fbf4daaf9724f87778cf9635e4ead3557dad6ca969c9a3771b5f3d11718f0ca1f5
6
+ metadata.gz: abbe83aa755538e03ad753be65516be97acfe7bdbe60e2c0038994fef2b226e8291fd183632259a9fd8ee9e93f2fa5994030dd133f81e791443e21fc73146e31
7
+ data.tar.gz: 32e52493518d978fc30f412ad1fb4ed2e3e6c1211ad5ac0ce285087dd3787a245c7aa5bcded16afe9ebbf3637cff4e4ba20dc60925514f48b03a14a5c140fb6c
@@ -17,6 +17,7 @@ class EffectiveCarouselItemsDatatable < Effective::Datatable
17
17
 
18
18
  col :link_label, visible: false
19
19
  col :link_url, visible: false
20
+ col :new_window, label: 'New window', visible: false
20
21
  col :caption, visible: false
21
22
 
22
23
  actions_col
@@ -23,6 +23,7 @@ module Effective
23
23
 
24
24
  link_label :string
25
25
  link_url :string
26
+ new_window :boolean
26
27
 
27
28
  position :integer
28
29
 
@@ -15,6 +15,8 @@
15
15
  .col= f.text_field :link_label
16
16
  .col= f.url_field :link_url
17
17
 
18
+ = f.check_box :new_window, label: 'Open link in a new window'
19
+
18
20
  = f.file_field :file, label: 'Image attachment', hint: EffectivePages.carousels_hint_text
19
21
  = f.text_field :caption, hint: 'Optional'
20
22
 
@@ -11,12 +11,21 @@
11
11
  .carousel-inner
12
12
  - carousel_items.each_with_index do |item, index|
13
13
  .carousel-item{class: ('active' if index == 0)}
14
- - if item.caption.blank?
15
- = image_tag(item.file, class: 'd-block w-100', alt: "Slide #{index+1}")
16
- - else
14
+ - link_options = item.new_window? ? { target: '_blank' } : {}
15
+ - if item.link_url.present? && item.caption.present?
16
+ = link_to item.link_url, **link_options do
17
+ = image_tag(item.file, alt: item.caption)
18
+ .carousel-caption.d-none.d-md-block
19
+ %p= item.caption
20
+ - elsif item.link_url.present?
21
+ = link_to item.link_url, **link_options do
22
+ = image_tag(item.file, class: 'd-block w-100', alt: "Slide #{index+1}")
23
+ - elsif item.caption.present?
17
24
  = image_tag(item.file, alt: item.caption)
18
25
  .carousel-caption.d-none.d-md-block
19
26
  %p= item.caption
27
+ - else
28
+ = image_tag(item.file, class: 'd-block w-100', alt: "Slide #{index+1}")
20
29
 
21
30
  %button.carousel-control-prev{'data-target': '#' + uid, type: 'button', 'data-slide': 'prev'}
22
31
  %span.carousel-control-prev-icon{'aria-hidden': true}
@@ -87,6 +87,7 @@ class CreateEffectivePages < ActiveRecord::Migration[6.0]
87
87
 
88
88
  t.string :link_label
89
89
  t.string :link_url
90
+ t.boolean :new_window, default: false
90
91
 
91
92
  t.integer :position
92
93
 
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.15.4'.freeze
2
+ VERSION = '3.16.0'.freeze
3
3
  end
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.15.4
4
+ version: 3.16.0
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: 2026-03-13 00:00:00.000000000 Z
11
+ date: 2026-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails