tramway-landing 3.1.0.5 → 3.1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/app/decorators/tramway/landing/block_decorator.rb +3 -5
- data/app/decorators/tramway/landing/navbar/link_decorator.rb +2 -0
- data/app/forms/admin/tramway/landing/form_form.rb +6 -4
- data/app/helpers/tramway/landing/application_helper.rb +5 -5
- data/app/models/tramway/landing/block.rb +1 -1
- data/app/models/tramway/landing/form.rb +2 -0
- data/config/locales/ru.models.yml +3 -0
- data/lib/tramway/landing/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: e63ac0e6c73f4a430023cfcd2b012c34dc790f17a301a80253d29514e1e770ce
|
4
|
+
data.tar.gz: 3c9960b503437ab6a60b686df8b112953f61fbaa836f7d757704761188ede4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474416ff89499f248e8d930d42051f042bb611eab3dd0193f9bcafb1a548c1b67bfdc49874f5bf5a1270c68668ffc6d7e1e56e057c6fa02ad93e3acf2e9dab79
|
7
|
+
data.tar.gz: 317bd1de28db9c050168eca7c341f6c20a22eac6acd4abc10bfaaffefcfb9f9bc27aae094b92f126c99b94ebead532753b17568ea6a9a513753c1a75e3c86e66
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
## English
|
2
|
+
|
1
3
|
# Tramway::Landing
|
2
4
|
It uses [Material Design Bootstrap](https://mdbootstrap.com/) by default
|
3
5
|
|
@@ -202,3 +204,19 @@ Contribution directions go here.
|
|
202
204
|
|
203
205
|
## License
|
204
206
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
207
|
+
|
208
|
+
## Русский
|
209
|
+
|
210
|
+
Инструкцию по созданию блоков, Вы можете посмотреть здесь
|
211
|
+
|
212
|
+
* [Начальный (Header)](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/header/main.md#%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)
|
213
|
+
* Начальный блок с формой (Header)
|
214
|
+
* [Подвал (Footer)](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/footer/main.md#%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)
|
215
|
+
* [Свободный блок (картинка+текст)](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_and_image/main.md)
|
216
|
+
* [Свободный блок с кнопкой (картинка + текст + кнопка)](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_image_and_button/main.md)
|
217
|
+
* [Карточки (выводит опредеделенный набор карточек)-программируется](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/cards/main.md)
|
218
|
+
* [Список возможностей-программируется](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/features/main.md)
|
219
|
+
* [Блок с контактами](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/contacts/main.md#%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)
|
220
|
+
* Представление
|
221
|
+
* [Просто текст](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/just_text/main.md)
|
222
|
+
* Ссылка на объект
|
@@ -9,9 +9,9 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
|
|
9
9
|
def list_attributes
|
10
10
|
%i[page_title position view_state block_type]
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def show_associations
|
14
|
-
[
|
14
|
+
[:forms]
|
15
15
|
end
|
16
16
|
|
17
17
|
delegate :human_view_state_event_name, to: :model_class
|
@@ -24,9 +24,7 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
|
|
24
24
|
|
25
25
|
def public_path
|
26
26
|
if object.published?
|
27
|
-
if object.page.slug.present?
|
28
|
-
Tramway::Page::Engine.routes.url_helpers.page_path slug: object.page.slug
|
29
|
-
end
|
27
|
+
Tramway::Page::Engine.routes.url_helpers.page_path slug: object.page.slug if object.page.slug.present?
|
30
28
|
else
|
31
29
|
Tramway::Page::Engine.routes.url_helpers.preview_path id: object.page.id
|
32
30
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Admin::Tramway::Landing::FormForm < Tramway::Core::ApplicationForm
|
2
4
|
association :block
|
3
5
|
|
@@ -6,10 +8,10 @@ class Admin::Tramway::Landing::FormForm < Tramway::Core::ApplicationForm
|
|
6
8
|
def initialize(object)
|
7
9
|
super(object).tap do
|
8
10
|
form_properties block: :association,
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
title: :string,
|
12
|
+
url: :string,
|
13
|
+
form_name: :default,
|
14
|
+
position: :integer
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -7,14 +7,14 @@ module Tramway
|
|
7
7
|
include Tramway::Profiles::LinksHelper if defined?(::Tramway::Profiles)
|
8
8
|
|
9
9
|
def actual_forms(forms)
|
10
|
-
forms = forms.
|
11
|
-
forms = forms.
|
10
|
+
forms = forms.reject { |f| f.form_name == 'user_sign_up' } if @signed_in
|
11
|
+
forms = forms.reject { |f| f.form_name == 'user_sign_in' } if @signed_in
|
12
12
|
forms
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def block_title(block)
|
16
16
|
if block.page.page_type.main?
|
17
|
-
|
17
|
+
content_for?(:application_name) && yield(:application_name).present? ? yield(:application_name) : @application.public_name
|
18
18
|
else
|
19
19
|
block.page.title
|
20
20
|
end
|
@@ -22,7 +22,7 @@ module Tramway
|
|
22
22
|
|
23
23
|
def block_tagline(block)
|
24
24
|
if block.page.page_type.main?
|
25
|
-
|
25
|
+
content_for?(:application_tagline) && yield(:application_tagline).present? ? yield(:application_tagline) : @application.tagline
|
26
26
|
else
|
27
27
|
raw block.page.body
|
28
28
|
end
|
@@ -8,7 +8,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
8
8
|
enumerize :navbar_link, in: %i[exist not_exist], default: :not_exist
|
9
9
|
enumerize :link_object_type, in: ['Tramway::SportSchool::Document', 'Tramway::Page::Page']
|
10
10
|
|
11
|
-
|
11
|
+
uploader :background, :photo, extensions: %i[jpg jpeg gif png]
|
12
12
|
|
13
13
|
state_machine :view_state, initial: :published do
|
14
14
|
state :published
|
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.1.0.
|
4
|
+
version: 3.1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moshinaan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|