tramway-landing 3.0.1.2 → 3.0.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e21fee02cb0065616dc61bf96c8511d04a4d55e16a016f0af60ed4b39d99cc1
|
|
4
|
+
data.tar.gz: f43fec0852a18c5d4d171fe0c3e292cd22dd824360041fae1bfc074bd0671ca8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe6e012753c8a68003c953badc98a099a5e430fa7ad1934a2bdcd691f427a4cee846407d22d97e2258f1fb6182798a1b8ffcde05b0508cf44aac70b6a93765a6
|
|
7
|
+
data.tar.gz: d0acb6af1362ed8bf473349d96dbca1605a99fbbfb0ed00c8161e08198f6a3db67209aac8eb59b738c47b039a742f1129d2694a19410763158683a51599eeede
|
|
@@ -7,7 +7,7 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def list_attributes
|
|
10
|
-
%i[position view_state block_type]
|
|
10
|
+
%i[page_link position view_state block_type]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
delegate :human_view_state_event_name, to: :model_class
|
|
@@ -15,6 +15,18 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
|
|
|
15
15
|
|
|
16
16
|
delegate_attributes :position, :title, :background, :anchor, :description, :view_name
|
|
17
17
|
|
|
18
|
+
def public_path
|
|
19
|
+
if object.published?
|
|
20
|
+
Tramway::Page::Engine.routes.url_helpers.page_path slug: object.page.slug
|
|
21
|
+
else
|
|
22
|
+
Tramway::Page::Engine.routes.url_helpers.preview_path id: object.page.id
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def page_link
|
|
27
|
+
link_to object.page.title
|
|
28
|
+
end
|
|
29
|
+
|
|
18
30
|
def block_type
|
|
19
31
|
object.block_type_text
|
|
20
32
|
end
|
|
@@ -26,9 +26,9 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
|
26
26
|
store_accessor :button, :button_link
|
|
27
27
|
store_accessor :button, :button_title
|
|
28
28
|
|
|
29
|
-
scope :on_main_page,
|
|
30
|
-
active.joins(:page).where(view_state: :published).where('tramway_page_pages.page_type = ?', :main).order :position
|
|
31
|
-
|
|
29
|
+
scope :on_main_page, lambda {
|
|
30
|
+
active.joins(:page).where(view_state: :published).where('tramway_page_pages.page_type = ?', :main).order :position
|
|
31
|
+
}
|
|
32
32
|
scope :with_navbar_link, -> { where navbar_link: :exist }
|
|
33
33
|
scope :header, -> { on_main_page.where(block_type: :header).first }
|
|
34
34
|
scope :footer, -> { on_main_page.where(block_type: :footer).first }
|
|
@@ -39,7 +39,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def header?
|
|
42
|
-
block_type.in? [
|
|
42
|
+
block_type.in? %w[header header_with_form]
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def footer?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-landing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- moshinaan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-04-
|
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Landing Engine for your Rails projects
|
|
14
14
|
email:
|