tramway-landing 3.3.0.6 → 3.3.0.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/README.md +6 -6
- data/app/assets/javascripts/tramway/landing/application.js +1 -1
- data/app/assets/stylesheets/tramway/landing/application.sass +1 -1
- data/app/controllers/tramway/landing/application_controller.rb +2 -2
- data/app/decorators/tramway/landing/block_decorator.rb +1 -1
- data/app/decorators/tramway/landing/block_types/cards_decorator.rb +1 -1
- data/app/decorators/tramway/landing/block_types/features_decorator.rb +1 -1
- data/app/decorators/tramway/landing/block_types/page_with_button_decorator.rb +1 -1
- data/app/decorators/tramway/landing/form_decorator.rb +1 -1
- data/app/decorators/tramway/landing/navbar/link_decorator.rb +1 -1
- data/app/decorators/tramway/landing/navbar_decorator.rb +1 -1
- data/app/decorators/tramway/landing/tool_decorator.rb +1 -1
- data/app/forms/admin/tramway/landing/block_form.rb +1 -1
- data/app/forms/admin/tramway/landing/form_form.rb +1 -1
- data/app/forms/admin/tramway/landing/tool_form.rb +1 -1
- data/app/helpers/tramway/landing/application_helper.rb +1 -1
- data/app/models/tramway/landing/application_record.rb +1 -1
- data/app/models/tramway/landing/block.rb +5 -1
- data/app/models/tramway/landing/tool.rb +1 -1
- data/app/views/tramway/landing/blocks/block_types/_header_with_form.html.haml +1 -1
- data/app/views/tramway/landing/blocks/block_types/contacts/_with_map.html.haml +1 -1
- data/app/views/tramway/landing/blocks/block_types/contacts/_without_map.html.haml +2 -2
- data/config/initializers/tramway.rb +3 -1
- data/lib/tramway/landing/generates/install_generator.rb +2 -2
- data/lib/tramway/landing/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34f2185899baf27445a519bb7fa32f77338526892d0959f0eb1a03f30766eb4f
|
4
|
+
data.tar.gz: 6742876e89fa349697fa76194c0ebbc695d75685287186c8db8164dc93fd32b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e89e03f13a6144f9aba19d3a2137d168fb3440ba7b0bf718f58d4a7968fe92a7f1fd52833d271612834e21d6fad77dacf590967de5a250ea3a5010ca7a2898
|
7
|
+
data.tar.gz: 82ca79395ec2aa9a29d982e69b1ff7bd3ac233ffc535b80fb74e08f9ee6edf4902358905c81ba184749f10c45b36ced84c1c71b75d2e753120df0ff5339d1712
|
data/README.md
CHANGED
@@ -45,8 +45,8 @@ rails db:migrate
|
|
45
45
|
|
46
46
|
*config/initializers/tramway.rb*
|
47
47
|
```ruby
|
48
|
-
Tramway
|
49
|
-
Tramway
|
48
|
+
Tramway.set_available_models ::Tramway::Landing::Block, project: #{project_name_which_you_use_in_the_application}
|
49
|
+
Tramway.navbar_structure ::Tramway::Landing::Block
|
50
50
|
```
|
51
51
|
|
52
52
|
#### 4. Add `PhotoVersions` to middleware (will be removed soon)
|
@@ -103,7 +103,7 @@ class Web::WelcomeController < ApplicationController
|
|
103
103
|
private
|
104
104
|
|
105
105
|
def application
|
106
|
-
@application = ::Tramway
|
106
|
+
@application = ::Tramway.application_object
|
107
107
|
end
|
108
108
|
end
|
109
109
|
```
|
@@ -240,13 +240,13 @@ How create blocks you can find here
|
|
240
240
|
|
241
241
|
*config/initializers/tramway.rb*
|
242
242
|
```ruby
|
243
|
-
Tramway
|
243
|
+
Tramway.set_available_models(
|
244
244
|
::Tramway::Landing::Block,
|
245
245
|
::Tramway::Landing::Tool,
|
246
246
|
project: #{project_name_which_you_use_in_the_application}
|
247
247
|
)
|
248
248
|
|
249
|
-
Tramway
|
249
|
+
Tramway.navbar_structure(
|
250
250
|
::Tramway::Landing::Block,
|
251
251
|
::Tramway::Landing::Tool
|
252
252
|
)
|
@@ -271,7 +271,7 @@ class Web::WelcomeController < ApplicationController
|
|
271
271
|
private
|
272
272
|
|
273
273
|
def application
|
274
|
-
@application = ::Tramway
|
274
|
+
@application = ::Tramway.application_object
|
275
275
|
end
|
276
276
|
end
|
277
277
|
```
|
@@ -7,8 +7,8 @@ module Tramway
|
|
7
7
|
before_action :application
|
8
8
|
|
9
9
|
def application
|
10
|
-
if ::Tramway
|
11
|
-
@application = Tramway
|
10
|
+
if ::Tramway.application
|
11
|
+
@application = Tramway.application&.model_class&.first || Tramway.application
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Landing::NavbarDecorator < ::Tramway::
|
3
|
+
class Tramway::Landing::NavbarDecorator < ::Tramway::ApplicationDecoratedCollection
|
4
4
|
def initialize(array)
|
5
5
|
original = if array.any? { |obj| obj.is_a? Hash }
|
6
6
|
get_original_array array
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Admin::Tramway::Landing::BlockForm < ::Tramway::
|
3
|
+
class Admin::Tramway::Landing::BlockForm < ::Tramway::ExtendedApplicationForm
|
4
4
|
association :page
|
5
5
|
|
6
6
|
properties :title, :background, :view_state_event, :block_type, :position, :navbar_link, :anchor, :description,
|
@@ -10,7 +10,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
10
10
|
|
11
11
|
uploader :background, :photo, extensions: %i[jpg jpeg gif png]
|
12
12
|
|
13
|
-
aasm :view_state do
|
13
|
+
aasm :view_state, column: :view_state do
|
14
14
|
state :published, initial: true
|
15
15
|
state :hidden
|
16
16
|
|
@@ -23,6 +23,10 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
aasm do
|
27
|
+
state :hack
|
28
|
+
end
|
29
|
+
|
26
30
|
store_accessor :button, :button_link
|
27
31
|
store_accessor :button, :button_title
|
28
32
|
|
@@ -47,7 +47,7 @@
|
|
47
47
|
= hidden_field_tag :success_redirect, request.path
|
48
48
|
= hidden_field_tag :error_redirect, request.path
|
49
49
|
- current_form.properties.each do |property|
|
50
|
-
= render 'tramway/
|
50
|
+
= render 'tramway/shared/input', property: property[0], object: :user, type: property[1], form: f, destination: :landing, record: current_form, value: (params[:record].present? ? params[:record][property[0]] : '')
|
51
51
|
= f.button :submit, current_form.submit_message
|
52
52
|
:javascript
|
53
53
|
$(document).ready(function() {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
.row
|
22
22
|
- if defined?(::Tramway::Profiles)
|
23
23
|
.col-lg-5.col-md-12
|
24
|
-
- social_networks = (@application.social_networks
|
24
|
+
- social_networks = (@application.social_networks if @application.respond_to?(:social_networks)) unless social_networks
|
25
25
|
- social_networks&.each do |profile|
|
26
26
|
%ul.list-group
|
27
27
|
%li.list-group-item
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- records_in_the_row = 4
|
2
2
|
- if defined?(::Tramway::Profiles)
|
3
|
-
- social_networks = (@application.social_networks
|
3
|
+
- social_networks = (@application.social_networks if @application.respond_to?(:social_networks)) unless social_networks
|
4
4
|
- social_networks&.each do |profile|
|
5
5
|
%ul.list-group
|
6
6
|
%li.list-group-item
|
@@ -14,4 +14,4 @@
|
|
14
14
|
%i.fas.fa-2x.mb-1.fa-phone.indigo-text{ aria: { hidden: 'true' } }
|
15
15
|
.col-10.mb-2.pl-3
|
16
16
|
%h5.feature-title.font-bold.mb-1
|
17
|
-
= yield(:phone)
|
17
|
+
= yield(:phone)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'rails/generators'
|
4
|
-
require 'tramway/
|
4
|
+
require 'tramway/generators/install_generator'
|
5
5
|
|
6
6
|
module Tramway::Landing::Generators
|
7
|
-
class InstallGenerator < ::Tramway::
|
7
|
+
class InstallGenerator < ::Tramway::Generators::InstallGenerator
|
8
8
|
include Rails::Generators::Migration
|
9
9
|
source_root File.expand_path('templates', __dir__)
|
10
10
|
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-landing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.0.
|
4
|
+
version: 3.3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- kalashnikovisme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|
15
|
-
-
|
15
|
+
- kalashnikovisme@gmail.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
@@ -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.
|
123
|
+
rubygems_version: 3.1.6
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Landing Engine for your Rails projects
|