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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57f2d1b3f419bb1bb445ddbdaaeddfaff7e36ff793996ebdf01ee8ee02af12eb
4
- data.tar.gz: a6b60de0abf7774981099ae62a6a6a9deea359ffc2a78df092eef19647d2ab1b
3
+ metadata.gz: e63ac0e6c73f4a430023cfcd2b012c34dc790f17a301a80253d29514e1e770ce
4
+ data.tar.gz: 3c9960b503437ab6a60b686df8b112953f61fbaa836f7d757704761188ede4be
5
5
  SHA512:
6
- metadata.gz: a344b8c9013efd19eb212656411ba9a28551fba244886328fd515ebc32d832a90ad2a713ff71af926323ad2f8d3804286baebf772f88d6e91a9c6aab4ac54d29
7
- data.tar.gz: 6125433fabb4a07aece199dd5b6c14ffe67c03e97a008fbbb8980a990e01bd6b2c1e21afdd545e74606aea648430cacb0033bf8fe4a636addb1b1acfabc44bdf
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
- [ :forms ]
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 Tramway::Landing::Navbar::LinkDecorator < Tramway::Core::ApplicationDecorator
2
4
  def title
3
5
  object[:title]
@@ -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
- title: :string,
10
- url: :string,
11
- form_name: :default,
12
- position: :integer
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.select { |f| f.form_name != 'user_sign_up' } if @signed_in
11
- forms = forms.select { |f| f.form_name != 'user_sign_in' } if @signed_in
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
- (content_for?(:application_name) && yield(:application_name).present?) ? yield(:application_name) : @application.public_name
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
- (content_for?(:application_tagline) && yield(:application_tagline).present?) ? yield(:application_tagline) : @application.tagline
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
- mount_uploader :background, PhotoUploader
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Landing::Form < ApplicationRecord
2
4
  belongs_to :block, class_name: 'Tramway::Landing::Block'
3
5
 
@@ -52,3 +52,6 @@ ru:
52
52
  navbar_link:
53
53
  exist: Присутствует
54
54
  not_exist: Отсутствует
55
+ errors:
56
+ messages:
57
+ extension_whitelist_error: неверный формата, расширение файла должно быть jpg, jpeg, gif или png.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '3.1.0.5'
5
+ VERSION = '3.1.0.6'
6
6
  end
7
7
  end
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.5
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-07 00:00:00.000000000 Z
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: