tramway-page 1.5.4 → 1.5.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/decorators/tramway/page/page_decorator.rb +14 -0
- data/config/initializers/tramway.rb +0 -17
- data/lib/tramway/page/version.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: 8235104f968f686a83092e13ffd8dbd2d1915a8b9c9c5c2ba593d80fdcca3e50
|
4
|
+
data.tar.gz: 16b8368fd4d8ac1d36030a19dccf060e5ca0236fd3d72458794b184cb1cb3e79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0a1de0389159f3d8190ad6e09a2f4fda9da97ad78cbcc4625034fb0d5913baece01d30493e87d34e2aa69c52471a7b0d930f6fa9a946bfa24d873ec505842a
|
7
|
+
data.tar.gz: 71b1f13b592cea0bfbf20018cf8469febe2ff82a3dd8b6bd4105009791055356b36f56eb175b1eaf6882e2fc5eb37b9622249c61a29dfd3aa8c7179706f2637c
|
@@ -9,9 +9,23 @@ class Tramway::Page::PageDecorator < ::Tramway::Core::ApplicationDecorator
|
|
9
9
|
def show_associations
|
10
10
|
[:blocks]
|
11
11
|
end
|
12
|
+
|
12
13
|
delegate :human_view_state_event_name, to: :model_class
|
13
14
|
end
|
14
15
|
|
16
|
+
def additional_buttons
|
17
|
+
{
|
18
|
+
show: [
|
19
|
+
{
|
20
|
+
url: Tramway::Page::Engine.routes.url_helpers.preview_path(id: object.id),
|
21
|
+
method: :get,
|
22
|
+
text: 'Preview',
|
23
|
+
color: :primary
|
24
|
+
}
|
25
|
+
]
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
15
29
|
delegate_attributes :title, :page_type, :body
|
16
30
|
|
17
31
|
decorate_association :blocks, state_machines: [:view_state]
|
@@ -1,20 +1,3 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
::Tramway::Admin.set_available_models(::Tramway::Page::Page, project: :page)
|
4
|
-
::Tramway::Admin.set_additional_buttons(
|
5
|
-
{
|
6
|
-
::Tramway::Page::Page => {
|
7
|
-
show: [
|
8
|
-
lambda { |record|
|
9
|
-
{
|
10
|
-
url: Tramway::Page::Engine.routes.url_helpers.preview_path(id: record.id),
|
11
|
-
method: :get,
|
12
|
-
text: 'Preview',
|
13
|
-
color: :primary
|
14
|
-
}
|
15
|
-
}
|
16
|
-
]
|
17
|
-
}
|
18
|
-
},
|
19
|
-
project: :subberz
|
20
|
-
)
|
data/lib/tramway/page/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-page
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.4
|
4
|
+
version: 1.5.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Description of Tramway::Page.
|
14
14
|
email:
|