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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aebc50c638d7d8369af0f9508672f61fb72111b2383824c06768030668529352
4
- data.tar.gz: 4423eb7153bfa694537dd1f9dfddc34e5243b0274f0ab666228aa75e68fa8eb2
3
+ metadata.gz: 8235104f968f686a83092e13ffd8dbd2d1915a8b9c9c5c2ba593d80fdcca3e50
4
+ data.tar.gz: 16b8368fd4d8ac1d36030a19dccf060e5ca0236fd3d72458794b184cb1cb3e79
5
5
  SHA512:
6
- metadata.gz: ad27d46d8779ad5fc1884214918bef7132158c54400fafe7f4bd76a0f449d6957f88e2d75fbeae518106bccd600dd1393ccb7d18e26be84a57899794e58a7f83
7
- data.tar.gz: 13845a0085eefbd7846b34dd58d2daf37297d4f894687e279f7f1f30a10ad91401a64ddf58fa7a4c732e3d44dfebc7e86121af03709610b0d25e6dc2864b7aea
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
- )
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Page
5
- VERSION = '1.5.4'
5
+ VERSION = '1.5.4.1'
6
6
  end
7
7
  end
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-08 00:00:00.000000000 Z
11
+ date: 2021-03-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Description of Tramway::Page.
14
14
  email: