tramway-landing 3.3 → 3.3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -0
- data/app/decorators/tramway/landing/navbar/link_decorator.rb +4 -0
- data/app/forms/admin/tramway/landing/block_form.rb +1 -1
- data/app/helpers/tramway/landing/application_helper.rb +1 -0
- data/app/views/layouts/tramway/landing/_head.html.haml +1 -1
- data/app/views/layouts/tramway/landing/application.html.haml +1 -1
- data/config/locales/ru.state_machines.yml +9 -10
- data/lib/tramway/landing/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c14f6391ae112cddfc858d096b112eca375aaa6ddc7cd9da06a866693078669
|
4
|
+
data.tar.gz: f7ba024715b3c41a14c4bcd842663d5406db0534563db94c9a81e207cabe6c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0323315717fbb03b07a3b9c14a5e0fdde3addc11f62a1fa64d44be73dd3b9470af28f978747a7573d4d837fddd48b4ee69063e4edab2c86ed17cc2cfc0639dce
|
7
|
+
data.tar.gz: 5f16ae8cea65958e08b700a7a4067629b2eef5c329668a67f1a39de80272bc2c908c9083fea65b28f8111ab03a83433d89beaefb292da6899fe5c8e1756ca852
|
data/README.md
CHANGED
@@ -232,6 +232,52 @@ How create blocks you can find here
|
|
232
232
|
* [Just text](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/just_text/main.md)
|
233
233
|
* Link to object
|
234
234
|
|
235
|
+
## Tools
|
236
|
+
|
237
|
+
### Google Tag Manager, Google Analytics, Yandex Metrika
|
238
|
+
|
239
|
+
#### 1. Add landing tools to the initializer
|
240
|
+
|
241
|
+
*config/initializers/tramway.rb*
|
242
|
+
```ruby
|
243
|
+
Tramway::Admin.set_available_models(
|
244
|
+
::Tramway::Landing::Block,
|
245
|
+
::Tramway::Landing::Tool,
|
246
|
+
project: #{project_name_which_you_use_in_the_application}
|
247
|
+
)
|
248
|
+
|
249
|
+
Tramway::Admin.navbar_structure(
|
250
|
+
::Tramway::Landing::Block,
|
251
|
+
::Tramway::Landing::Tool
|
252
|
+
)
|
253
|
+
```
|
254
|
+
|
255
|
+
#### 2. Click on `Tools`, create new tool with type `[Google Tag Manager, Google Analytics, Yandex Metrika]` and add account_id for your profile in this tool.
|
256
|
+
|
257
|
+
#### 3. Add to `WelcomeController` query to get `@tools`
|
258
|
+
|
259
|
+
*app/controllers/web/welcome_controller.rb*
|
260
|
+
```ruby
|
261
|
+
class Web::WelcomeController < ApplicationController
|
262
|
+
before_action :application
|
263
|
+
|
264
|
+
layout 'tramway/landing/application'
|
265
|
+
|
266
|
+
def index
|
267
|
+
@blocks = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.on_main_page
|
268
|
+
@tools = ::Tramway::Landing::Tool.active
|
269
|
+
end
|
270
|
+
|
271
|
+
private
|
272
|
+
|
273
|
+
def application
|
274
|
+
@application = ::Tramway::Core.application_object
|
275
|
+
end
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
And now all we need to integrate tool to your web page will be integrated automatically. **Enjoy!**
|
280
|
+
|
235
281
|
## Contributing
|
236
282
|
Contribution directions go here.
|
237
283
|
|
@@ -14,7 +14,7 @@ class Admin::Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationF
|
|
14
14
|
position: {
|
15
15
|
type: :numeric,
|
16
16
|
input_options: {
|
17
|
-
hint: I18n.t('hints.tramway.landing.block.position', array: ::Tramway::Landing::Block.
|
17
|
+
hint: I18n.t('hints.tramway.landing.block.position', array: ::Tramway::Landing::Block.on_main_page.map(&:position).join(','))
|
18
18
|
}
|
19
19
|
},
|
20
20
|
block_type: :default,
|
@@ -5,6 +5,7 @@ module Tramway
|
|
5
5
|
module ApplicationHelper
|
6
6
|
include Tramway::Admin::RussianCasesHelper
|
7
7
|
include Tramway::Profiles::LinksHelper if defined?(::Tramway::Profiles)
|
8
|
+
include ::FontAwesome5::Rails::IconHelper
|
8
9
|
|
9
10
|
def actual_forms(forms)
|
10
11
|
forms = forms.reject { |f| f.form_name == 'user_sign_up' } if @signed_in
|
@@ -11,5 +11,5 @@
|
|
11
11
|
= favicon_link_tag @application.favicon
|
12
12
|
- ::Tramway::Landing.head_content.each do |content|
|
13
13
|
- self.instance_exec &content
|
14
|
-
- @tools
|
14
|
+
- @tools&.each do |tool|
|
15
15
|
= render "layouts/tramway/landing/tools/#{tool.title}_head", account_id: tool.account_id
|
@@ -3,7 +3,7 @@
|
|
3
3
|
%head
|
4
4
|
= render 'layouts/tramway/landing/head'
|
5
5
|
%body{ class: @application&.name }
|
6
|
-
- @tools
|
6
|
+
- @tools&.each do |tool|
|
7
7
|
- if tool.with_body_fragment?
|
8
8
|
= render "layouts/tramway/landing/tools/#{tool.title}_body", account_id: tool.account_id
|
9
9
|
= stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.5/css/mdb.min.css'
|
@@ -3,13 +3,12 @@ ru:
|
|
3
3
|
tramway/landing/block:
|
4
4
|
published: Опубликованные
|
5
5
|
hidden: Скрытые
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
hide: Скрыть с сайта
|
6
|
+
state_machines:
|
7
|
+
tramway/landing/block:
|
8
|
+
view_state:
|
9
|
+
states:
|
10
|
+
published: Виден
|
11
|
+
hidden: Скрытый
|
12
|
+
events:
|
13
|
+
publish: Показать на сайте
|
14
|
+
hide: Скрыть с сайта
|
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:
|
4
|
+
version: 3.3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moshinaan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.1
|
123
|
+
rubygems_version: 3.0.3.1
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Landing Engine for your Rails projects
|