tramway-landing 1.7.2 → 1.8
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 +4 -4
- data/app/decorators/tramway/landing/block_decorator.rb +1 -0
- data/app/forms/tramway/landing/block_form.rb +27 -14
- data/app/models/tramway/landing/block.rb +13 -1
- data/app/views/tramway/landing/blocks/block_types/_view.html.haml +1 -0
- data/config/locales/models.yml +2 -0
- data/lib/tramway/landing/generates/install_generator.rb +2 -1
- data/lib/tramway/landing/generates/templates/add_view_name_to_tramway_landing_blocks.rb +5 -0
- data/lib/tramway/landing/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74664af83fb56c8127c0ccb38dcfe389dda475a82b0b555bda93b7d94d56094
|
4
|
+
data.tar.gz: a95df8d21c49dfc28fa6b5652fdae5e2f54ace6d7511de1091e70b22d5638cf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d13d3a202bec874c370ca73d378c74895442ede071e74c7aa2924668ecf0f9760adca4b70cb4ca45a0887fbec7867965033f1deb274040e7f24a2047f1c30ea0
|
7
|
+
data.tar.gz: faa355ec8ff76a08ec3de1ce1120619288f47a0fcd0eba76e6c9c5a62495150234bab7518624af08c050676f4017fa7130145e61712e2fca31b1a580a1d2c0d1
|
@@ -17,6 +17,7 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
|
|
17
17
|
delegate :anchor, to: :object
|
18
18
|
delegate :description, to: :object
|
19
19
|
delegate :anchor, to: :object
|
20
|
+
delegate :view_name, to: :object
|
20
21
|
|
21
22
|
def block_type
|
22
23
|
object.block_type_text
|
@@ -1,20 +1,33 @@
|
|
1
1
|
class Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm
|
2
|
-
properties :title,
|
2
|
+
properties :title,
|
3
|
+
:background,
|
4
|
+
:view_state,
|
5
|
+
:block_type,
|
6
|
+
:position,
|
7
|
+
:navbar_link,
|
8
|
+
:anchor,
|
9
|
+
:description,
|
10
|
+
:link_object_type,
|
11
|
+
:link_object_id,
|
12
|
+
:button_title,
|
13
|
+
:button_link,
|
14
|
+
:view_name
|
3
15
|
|
4
16
|
def initialize(object = nil)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
super(object).tap do
|
18
|
+
form_properties title: :string,
|
19
|
+
background: :file,
|
20
|
+
position: :numeric,
|
21
|
+
block_type: :default,
|
22
|
+
navbar_link: :default,
|
23
|
+
anchor: :string,
|
24
|
+
description: :ckeditor,
|
25
|
+
link_object_type: :default,
|
26
|
+
link_object_id: :numeric,
|
27
|
+
button_title: :string,
|
28
|
+
button_link: :string,
|
29
|
+
view_name: :string
|
30
|
+
end
|
18
31
|
end
|
19
32
|
|
20
33
|
def button_title
|
@@ -1,5 +1,17 @@
|
|
1
1
|
class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
2
|
-
enumerize :block_type, in: [
|
2
|
+
enumerize :block_type, in: [
|
3
|
+
:header,
|
4
|
+
:footer,
|
5
|
+
:page,
|
6
|
+
:cards,
|
7
|
+
:features,
|
8
|
+
:contacts,
|
9
|
+
:news,
|
10
|
+
:link,
|
11
|
+
:page_with_button,
|
12
|
+
:just_text,
|
13
|
+
:view
|
14
|
+
]
|
3
15
|
enumerize :navbar_link, in: [ :exist, :not_exist ], default: :not_exist
|
4
16
|
enumerize :link_object_type, in: [ 'Tramway::SportSchool::Document', 'Tramway::Page::Page' ]
|
5
17
|
|
@@ -0,0 +1 @@
|
|
1
|
+
= render "tramway/landing/blocks/views/#{block.view_name}"
|
data/config/locales/models.yml
CHANGED
@@ -16,6 +16,7 @@ ru:
|
|
16
16
|
link_object_id: ID объекта, на который делается ссылка
|
17
17
|
button_title: Наименование кнопки
|
18
18
|
button_link: Ссылка кнопки
|
19
|
+
view_name: Название вьюхи
|
19
20
|
cases:
|
20
21
|
tramway/landing/block:
|
21
22
|
plural: Блоки
|
@@ -33,6 +34,7 @@ ru:
|
|
33
34
|
news: Блок новостей
|
34
35
|
link: Ссылка на объект
|
35
36
|
just_text_with_button: Просто текст
|
37
|
+
view: Вьюха (программируется)
|
36
38
|
navbar_link:
|
37
39
|
exist: Присутствует
|
38
40
|
not_exist: Отсутствует
|
@@ -19,7 +19,8 @@ module Tramway::Landing::Generators
|
|
19
19
|
:add_description_to_tramway_landing_blocks,
|
20
20
|
:add_link_object_id_to_tramway_landing_blocks,
|
21
21
|
:add_link_object_type_to_tramway_landing_blocks,
|
22
|
-
:add_button_to_tramway_landing_blocks
|
22
|
+
:add_button_to_tramway_landing_blocks,
|
23
|
+
:add_view_name_to_tramway_landing_blocks
|
23
24
|
]
|
24
25
|
|
25
26
|
migrations.each do |migration|
|
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: 1.
|
4
|
+
version: '1.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- app/views/tramway/landing/blocks/block_types/_link.html.haml
|
54
54
|
- app/views/tramway/landing/blocks/block_types/_page.html.haml
|
55
55
|
- app/views/tramway/landing/blocks/block_types/_page_with_button.html.haml
|
56
|
+
- app/views/tramway/landing/blocks/block_types/_view.html.haml
|
56
57
|
- app/views/tramway/landing/blocks/templates/_features_list.html.haml
|
57
58
|
- app/views/tramway/landing/blocks/templates/_full_page.html.haml
|
58
59
|
- app/views/tramway/landing/blocks/templates/_section_with_image_and_text.html.haml
|
@@ -72,6 +73,7 @@ files:
|
|
72
73
|
- lib/tramway/landing/generates/templates/add_link_object_id_to_tramway_landing_blocks.rb
|
73
74
|
- lib/tramway/landing/generates/templates/add_link_object_type_to_tramway_landing_blocks.rb
|
74
75
|
- lib/tramway/landing/generates/templates/add_navbar_link_to_tramway_landing_blocks.rb
|
76
|
+
- lib/tramway/landing/generates/templates/add_view_name_to_tramway_landing_blocks.rb
|
75
77
|
- lib/tramway/landing/generates/templates/create_tramway_landing_blocks.rb
|
76
78
|
- lib/tramway/landing/version.rb
|
77
79
|
homepage: https://github.com/kalashnikovisme/tramway-landing
|