tramway-sport_school 1.2.12.2 → 1.2.12.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: af5ea2ccf7649a8de556ecea2abd248293b288d5351e5dc595bcdde22829feb4
4
- data.tar.gz: ef6a5e41904f4b8ba04e82dfd8ed39aa5799ac979228d38663092d272881c4cd
3
+ metadata.gz: 5c242fd010f3c69258108167b41453eb1be0b70b278f98f4a3a98ee5b3827f78
4
+ data.tar.gz: c13d0352ad9438d8ce8e7fad72d5c6080287350e5c88f0955acdeb2bebb6b0b1
5
5
  SHA512:
6
- metadata.gz: 61fde47bf5ca03a91470afae12cebd494cac290d91e303b42eb19969ba15339d8cd27b7547472178bb5e2ab03c6ec5ed09f93619e29c55de4ffbd70dfb96f3bc
7
- data.tar.gz: 685916e870810d8cb8a5dd3662e202912cd6603320dc0258b147fac5b9052d6b7a914e9f0fa5b56368eebba29548ad4d942f8655b8706a646a678ef7fb1fed1c
6
+ metadata.gz: 0e0862e8a57850ff800c8c6a12dffbef40667b8f5d5f8b2052304393fbf8c3e9f6b59c083bec5d53e0224dced233812e337bbf642886e97277671c3a18bd6b65
7
+ data.tar.gz: 978dfcb55dc786a243e529f88ea003539e8d0535a9d82aecf75aa258ea2cef92acf218b30c7ec7593159832c8887734c6e4251ee663271c9db54494b76320970
@@ -4,15 +4,15 @@ require_dependency 'tramway/sport_school/application_controller'
4
4
 
5
5
  class Tramway::SportSchool::Web::WelcomeController < ::Tramway::SportSchool::ApplicationController
6
6
  def index
7
- @kind_sports = ::Tramway::SportSchool::KindSport.active.published.map { |k| ::Tramway::SportSchool::Features::KindSportDecorator.new k }
8
- @documents = ::Tramway::SportSchool::Document.active.published
9
- @trainers = ::Tramway::SportSchool::Trainer.active.published.map { |t| ::Tramway::SportSchool::Cards::TrainerDecorator.new t }
7
+ @kind_sports = ::Tramway::SportSchool::KindSport.published.map { |k| ::Tramway::SportSchool::Features::KindSportDecorator.new k }
8
+ @documents = ::Tramway::SportSchool::Document.published
9
+ @trainers = ::Tramway::SportSchool::Trainer.published.map { |t| ::Tramway::SportSchool::Cards::TrainerDecorator.new t }
10
10
  @institution = ::Tramway::SportSchool::Institution.includes(:social_networks).first
11
11
  blocks = ::Tramway::Landing::Block.on_main_page
12
12
  @links = ::Tramway::Landing::BlockLinkDecorator.decorate blocks.with_navbar_link
13
13
  @blocks = ::Tramway::Landing::BlockDecorator.decorate blocks
14
14
  @organizations = ::Tramway::SportSchool::Organization.published
15
- @news = ::Tramway::News::News.active.last(3).reverse.map { |t| ::Tramway::Landing::Cards::NewsDecorator.new t }
15
+ @news = ::Tramway::News::News.last(3).reverse.map { |t| ::Tramway::Landing::Cards::NewsDecorator.new t }
16
16
  @education_documents = ::Tramway::SportSchool::Document.published.education.map { |t| ::Tramway::SportSchool::Cards::DocumentDecorator.new t }
17
17
  @school_info_documents = ::Tramway::SportSchool::Document.published.school_info.map { |t| ::Tramway::SportSchool::Cards::DocumentDecorator.new t }
18
18
  @provision_documents = ::Tramway::SportSchool::Document.published.provision.map { |t| ::Tramway::SportSchool::Cards::DocumentDecorator.new t }
@@ -9,8 +9,16 @@ class Tramway::SportSchool::DocumentDecorator < ::Tramway::Core::ApplicationDeco
9
9
  def list_attributes
10
10
  [:view_state]
11
11
  end
12
+
13
+ def show_attributes
14
+ [:title]
15
+ end
16
+
17
+ delegate :human_view_state_event_name, to: :model_class
12
18
  end
13
19
 
20
+ delegate_attributes :title
21
+
14
22
  def view_state
15
23
  object.human_view_state_name
16
24
  end
@@ -7,5 +7,5 @@ class Tramway::SportSchool::InstitutionDecorator < ::Tramway::Core::ApplicationD
7
7
  end
8
8
  end
9
9
 
10
- delegate :logo, to: :object
10
+ delegate_attributes :logo, :title
11
11
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::Tramway::Auth.root_path = '/admin'
3
+ ::Tramway::Auth.root_path_for Tramway::User::User => '/admin'
4
4
  ::Tramway::Admin.set_available_models(::Tramway::SportSchool::KindSport,
5
5
  ::Tramway::SportSchool::Trainer,
6
6
  ::Tramway::SportSchool::Document,
@@ -42,6 +42,7 @@ module Tramway::SportSchool::Generators
42
42
  add_name_to_tramway_sport_school_institutions
43
43
  add_main_image_to_tramway_sport_school_institutions
44
44
  add_favicon_to_tramway_sport_school_institutions
45
+ add_public_name_to_tramway_sport_school_institutions
45
46
  ]
46
47
  migrations.each do |migration|
47
48
  migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddPublicNameToTramwaySportSchoolInstitutions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :tramway_sport_school_institutions, :public_name, :text
6
+ end
7
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module SportSchool
5
- VERSION = '1.2.12.2'
5
+ VERSION = '1.2.12.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-sport_school
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12.2
4
+ version: 1.2.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-13 00:00:00.000000000 Z
11
+ date: 2021-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -94,6 +94,7 @@ files:
94
94
  - lib/tramway/sport_school/generates/templates/add_ll_to_tramway_sport_school_institutions.rb
95
95
  - lib/tramway/sport_school/generates/templates/add_main_image_to_tramway_sport_school_institutions.rb
96
96
  - lib/tramway/sport_school/generates/templates/add_name_to_tramway_sport_school_institutions.rb
97
+ - lib/tramway/sport_school/generates/templates/add_public_name_to_tramway_sport_school_institutions.rb
97
98
  - lib/tramway/sport_school/generates/templates/add_state_to_tramway_sport_school_kind_sports.rb
98
99
  - lib/tramway/sport_school/generates/templates/add_url_to_tramway_sport_school_institutions.rb
99
100
  - lib/tramway/sport_school/generates/templates/create_tramway_sport_school_documents.rb
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
- rubygems_version: 3.1.2
125
+ rubygems_version: 3.0.3.1
125
126
  signing_key:
126
127
  specification_version: 4
127
128
  summary: Engine for Sport School web sites