tramway-event 1.9.27.2 → 1.9.28

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: eb1e1ca115b97a701d2b64d567917c9d0cc389dcb6d37138576e9629412948e9
4
- data.tar.gz: 70e4fa964d1690414ecd04e3546ef434a02bd56f9f2af8a284e90196d548a1d3
3
+ metadata.gz: 6722dde4b829b38429a1403e26b967326d932d3ae37a1f4c2e8858f6fe0784cc
4
+ data.tar.gz: 0e6c0d0cf2989d4ac14daa4c5236160f72af1d10de0f78048021a8f157ddc16d
5
5
  SHA512:
6
- metadata.gz: 60e63ab6c330eb7cc533485efaed2783cb3870097c60a53eb8f118565bcab172353c9ab7993e5d8bc6f7dd698e71d82956f959ca90b0f0ba2333a9a38e9e6268
7
- data.tar.gz: 70c3cb5db52cbd8e71830447e3cbd518433c1b61f0165e05362679d4599193f76f64975f943f9f22d7131b26cee78bd1604eb9e019d8a704149a5c59b9048277
6
+ metadata.gz: a4366960890115f07f118f7da6ea51ddc9bb4acb58c8ee5df5ded6f6d4e000437771d4a8d317a5b935a376ef1384734cbf370310ae73f1618a4045624f7fc79b
7
+ data.tar.gz: 8593dd349e943ccfd494e1195e8cf43391149cadaa71e11730b8b35bce56f7fa8df0d8973f597d68d5068b8d0fd12af11c827633ab4ceada98bd6fd108b280fe
data/README.md CHANGED
@@ -48,6 +48,13 @@ Tramway::Admin.set_available_models ::Tramway::Event::Event, ::Tramway::Event::P
48
48
  mount Tramway::Event::Engine, at: '/'
49
49
  ```
50
50
 
51
+ ## How-to
52
+
53
+ ### Create event
54
+
55
+ English docs coming soon...
56
+ [На русском](https://github.com/ulmic/tramway-dev/tree/develop/tramway-event/docs/russian)
57
+
51
58
  ## Contributing
52
59
  Contribution directions go here.
53
60
 
@@ -17,6 +17,7 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
17
17
  status
18
18
  request_collecting_duration
19
19
  description
20
+ participants_list
20
21
  ]
21
22
  end
22
23
 
@@ -4,7 +4,7 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
4
4
  include HTMLTagsHelpers
5
5
  class << self
6
6
  def collections
7
- %i[requested waiting prev_approved without_answer approved rejected reserved all]
7
+ %i[all requested waiting prev_approved without_answer approved rejected reserved]
8
8
  end
9
9
 
10
10
  def list_attributes
@@ -44,7 +44,7 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
44
44
  object.event.title
45
45
  end)
46
46
  end)
47
- object.event.participant_form_fields.map do |field|
47
+ object.event.participant_form_fields.active.map do |field|
48
48
  hash = if field.options.is_a?(Hash)
49
49
  field.options
50
50
  else
@@ -2,11 +2,12 @@
2
2
 
3
3
  class Tramway::Event::EventForm < ::Tramway::Core::ApplicationForm
4
4
  properties :title, :description, :begin_date, :end_date, :photo, :status,
5
- :request_collecting_begin_date, :request_collecting_end_date
5
+ :request_collecting_begin_date, :request_collecting_end_date, :short_description
6
6
 
7
7
  def initialize(object)
8
8
  super(object).tap do
9
9
  form_properties title: :string,
10
+ short_description: :text,
10
11
  description: :ckeditor,
11
12
  begin_date: :date_picker,
12
13
  end_date: :date_picker,
@@ -11,8 +11,8 @@ class Tramway::Event::ParticipantForm < ::Tramway::Core::ApplicationForm
11
11
  ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(
12
12
  SecureRandom.hex,
13
13
  object.event,
14
+ participation_state_event: :default,
14
15
  comment: :string,
15
- participation_state_event: :string
16
16
  ).new object
17
17
  else
18
18
  super(object).tap do |obj|
@@ -13,8 +13,8 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
13
13
 
14
14
  enumerize :status, default: :common, in: %i[common main]
15
15
 
16
- scope :main_event, -> { where(status: :main) }
17
- scope :actual, -> { where 'end_date > ?', DateTime.now }
16
+ scope :main_event, -> { active.where(status: :main) }
17
+ scope :actual, -> { order(:begin_date).where('end_date > ?', DateTime.now) }
18
18
  scope :past, -> { where 'end_date < ?', DateTime.now }
19
19
 
20
20
  def request_collecting_state
@@ -38,6 +38,7 @@ ru:
38
38
  participants_list: Список участников
39
39
  does_not_have_end_date: мероприятие не имеет даты окончания
40
40
  participant_form_fields: Поле анкеты
41
+ short_description: Краткое описание
41
42
  tramway/event/participant:
42
43
  name: Имя
43
44
  list_fields: Данные
@@ -46,7 +46,8 @@ module Tramway::Event::Generators
46
46
  :add_description_to_tramway_event_people,
47
47
 
48
48
  :create_tramway_event_places,
49
- :create_tramway_event_events_places
49
+ :create_tramway_event_events_places,
50
+ :add_short_description_to_tramway_event_events
50
51
  ]
51
52
  migrations.each do |migration|
52
53
  migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddShortDescriptionToTramwayEventEvents < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :tramway_event_events, :short_description, :text
6
+ end
7
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.9.27.2'
5
+ VERSION = '1.9.28'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.27.2
4
+ version: 1.9.28
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-01-29 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email:
@@ -82,6 +82,7 @@ files:
82
82
  - lib/tramway/event/generators/templates/add_position_to_tramway_event_participant_form_fields.rb
83
83
  - lib/tramway/event/generators/templates/add_position_to_tramway_event_sections.rb
84
84
  - lib/tramway/event/generators/templates/add_request_period_to_tramway_event_events.rb
85
+ - lib/tramway/event/generators/templates/add_short_description_to_tramway_event_events.rb
85
86
  - lib/tramway/event/generators/templates/add_state_to_tramway_event_partakings.rb
86
87
  - lib/tramway/event/generators/templates/add_status_to_tramway_event_events.rb
87
88
  - lib/tramway/event/generators/templates/create_tramway_event_events.rb