tramway-page 1.5.4.1 → 1.6

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: 8235104f968f686a83092e13ffd8dbd2d1915a8b9c9c5c2ba593d80fdcca3e50
4
- data.tar.gz: 16b8368fd4d8ac1d36030a19dccf060e5ca0236fd3d72458794b184cb1cb3e79
3
+ metadata.gz: 69c0b46625403a5637e0845bab960d97e7ba812e421589448b8c7b60ad182029
4
+ data.tar.gz: 58e8d2cf3937bc7f7b663795f443c57c1a777afd425fc215ab3cf5b86a413e04
5
5
  SHA512:
6
- metadata.gz: 0f0a1de0389159f3d8190ad6e09a2f4fda9da97ad78cbcc4625034fb0d5913baece01d30493e87d34e2aa69c52471a7b0d930f6fa9a946bfa24d873ec505842a
7
- data.tar.gz: 71b1f13b592cea0bfbf20018cf8469febe2ff82a3dd8b6bd4105009791055356b36f56eb175b1eaf6882e2fc5eb37b9622249c61a29dfd3aa8c7179706f2637c
6
+ metadata.gz: 060a17f1e341a7f9465a4752660de4f8a86afac717872c85023e270c01db82cbdbc4a39ef0aed8e4199c3fb6b00698f32b8f01ae733dbf19416c9fc333b9447f
7
+ data.tar.gz: b6c5f5645240c2e645baf913bf048e3793b94b4bbebccae59201103cea70f85b0b934bca8102a012039056226fca99ad3e51a6771c0db2e41b3d4b613c280570
@@ -5,7 +5,7 @@ class ::Tramway::Page::PagesController < ::Tramway::Page::ApplicationController
5
5
 
6
6
  def show
7
7
  @page = ::Tramway::Page::Page.published.find_by slug: params[:slug]
8
- @blocks = @page.blocks.published.active.map do |block|
8
+ @blocks = @page.blocks.published.map do |block|
9
9
  if block.block_type.header_with_form? && block.form_url.present?
10
10
  # FIXME: in future
11
11
  @header_with_form = block.form_to_render.new(Tramway::Auth.authenticable_models.first.new, page: @page.id)
@@ -15,5 +15,6 @@ class ::Tramway::Page::PagesController < ::Tramway::Page::ApplicationController
15
15
  end
16
16
  ::Tramway::Landing::BlockDecorator.decorate block
17
17
  end
18
+ render(layout: false) if @page.page_type.without_layout?
18
19
  end
19
20
  end
@@ -8,7 +8,7 @@ class ::Tramway::Page::PreviewsController < ::Tramway::Page::ApplicationControll
8
8
 
9
9
  def show
10
10
  @page = ::Tramway::Page::Page.find params[:id]
11
- @blocks = @page.blocks.active.map do |block|
11
+ @blocks = @page.blocks.map do |block|
12
12
  if block.block_type.header_with_form? && block.form_url.present?
13
13
  # FIXME: in future
14
14
  @header_with_form = block.form_to_render.new(Tramway::Auth.authenticable_models.first.new, page: @page.id)
@@ -3,7 +3,7 @@
3
3
  class Tramway::Page::Page < ::Tramway::Core::ApplicationRecord
4
4
  has_many :blocks, -> { order(position: :asc) }, class_name: 'Tramway::Landing::Block'
5
5
 
6
- enumerize :page_type, in: %i[main other], default: :other
6
+ enumerize :page_type, in: %i[main other without_layout], default: :other
7
7
 
8
8
  scope :landings, -> { where page_type: :landing }
9
9
  scope :published, -> { where view_state: :published }
@@ -1,11 +1,10 @@
1
1
  ru:
2
- activerecord:
3
- state_machines:
4
- tramway/page/page:
5
- view_state:
6
- states:
7
- published: Видена
8
- unpublished: Скрыта
9
- events:
10
- publish: Показать на сайте
11
- hide: Скрыть с сайта
2
+ state_machines:
3
+ tramway/page/page:
4
+ view_state:
5
+ states:
6
+ published: Видена
7
+ unpublished: Скрыта
8
+ events:
9
+ publish: Показать на сайте
10
+ hide: Скрыть с сайта
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Page
5
- VERSION = '1.5.4.1'
5
+ VERSION = '1.6'
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.1
4
+ version: '1.6'
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-09 00:00:00.000000000 Z
11
+ date: 2022-06-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Description of Tramway::Page.
14
14
  email:
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.1.4
71
+ rubygems_version: 3.1.6
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Summary of Tramway::Page.