decidim-conferences 0.19.1 → 0.20.0

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: 17b13f7756447bf49686845ee1c035fd843c7187110f1e2fe0c3938d8b42d5eb
4
- data.tar.gz: 0b7c31d1b7feeefb0e7eb727269002479e7bdb57eadf61a0c7bd2cc1c95a5664
3
+ metadata.gz: 5fe396d63f9e335c79c6ef5d3c2e7220226e03e6797e184cb60a681b30c79d6b
4
+ data.tar.gz: 8ee8b6a31e1f5f2cccc59de336da8f8f62f4943c8144d9571243727dbeff4300
5
5
  SHA512:
6
- metadata.gz: 42f0d7c52d5f2eb0c555d145505372412fd5e763cc4bc546c7a356bd6bdf774d601f3a620965bed1f068eaa6a1df5986b930cb2771538d6646a2a489d0bde293
7
- data.tar.gz: 8af57513c692428d9c7a9685441bd13470e271b15d4dd0960b5a2c8a0fad6ea4c790434c9f2b7557d9961db5efabe47b6ccf92679c0b0903a021db39147424f6
6
+ metadata.gz: dee2e08fa8880ee4c54af3b7da1291adde063e006377b0472481cc515396eb632f8bb78667e714ce0062a99c74a1d7f0d9a7afaac8ce62a129588ce8af4287cd
7
+ data.tar.gz: 6dbb9a34018713b7d5d19891a03f5a7e5cd32dc2f1deb219828ec1c502e14197be5499b9c61947f707008d09f8be70554c5de207fc6361c48ab0c3edcdf70a5a
@@ -9,13 +9,14 @@ module Decidim
9
9
  #
10
10
  class ConferenceRegistrationsController < Decidim::Conferences::Admin::ApplicationController
11
11
  include Concerns::ConferenceAdmin
12
+ include Decidim::Paginable
12
13
 
13
14
  helper_method :conference
14
15
 
15
16
  def index
16
17
  enforce_permission_to :read_conference_registrations, :conference, conference: conference
17
18
 
18
- @conference_registrations = Decidim::Conferences::ConferenceRegistration.where(conference: conference).page(params[:page]).per(15)
19
+ @conference_registrations = paginate(Decidim::Conferences::ConferenceRegistration.where(conference: conference))
19
20
  end
20
21
 
21
22
  def export
@@ -8,13 +8,14 @@ module Decidim
8
8
  class ConferenceSpeakersController < Decidim::Conferences::Admin::ApplicationController
9
9
  helper Decidim::Conferences::Admin::ConferenceSpeakersHelper
10
10
  include Concerns::ConferenceAdmin
11
+ include Decidim::Paginable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :index, :conference_speaker
14
15
 
15
16
  @query = params[:q]
16
17
 
17
- @conference_speakers = Decidim::Conferences::Admin::ConferenceSpeakers.for(collection, @query).page(params[:page]).per(15)
18
+ @conference_speakers = paginate(Decidim::Conferences::Admin::ConferenceSpeakers.for(collection, @query))
18
19
  end
19
20
 
20
21
  def new
@@ -7,10 +7,11 @@ module Decidim
7
7
  #
8
8
  class ConferenceUserRolesController < Decidim::Conferences::Admin::ApplicationController
9
9
  include Concerns::ConferenceAdmin
10
+ include Decidim::Paginable
10
11
 
11
12
  def index
12
13
  enforce_permission_to :index, :conference_user_role
13
- @conference_user_roles = collection
14
+ @conference_user_roles = paginate(collection)
14
15
  end
15
16
 
16
17
  def new
@@ -8,10 +8,11 @@ module Decidim
8
8
  class ConferencesController < Decidim::Conferences::Admin::ApplicationController
9
9
  helper_method :current_conference, :current_participatory_space
10
10
  layout "decidim/admin/conferences"
11
+ include Decidim::Paginable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :read, :conference_list
14
- @conferences = collection
15
+ @conferences = paginate(collection)
15
16
  end
16
17
 
17
18
  def new
@@ -6,11 +6,12 @@ module Decidim
6
6
  # Controller that allows managing conference media links.
7
7
  class MediaLinksController < Decidim::Conferences::Admin::ApplicationController
8
8
  include Concerns::ConferenceAdmin
9
+ include Decidim::Paginable
9
10
 
10
11
  def index
11
12
  enforce_permission_to :index, :media_link
12
13
 
13
- @media_links = collection.page(params[:page]).per(15)
14
+ @media_links = paginate(collection)
14
15
  end
15
16
 
16
17
  def new
@@ -7,11 +7,12 @@ module Decidim
7
7
  #
8
8
  class PartnersController < Decidim::Conferences::Admin::ApplicationController
9
9
  include Concerns::ConferenceAdmin
10
+ include Decidim::Paginable
10
11
 
11
12
  def index
12
13
  enforce_permission_to :index, :partner
13
14
 
14
- @partners = collection.page(params[:page]).per(15)
15
+ @partners = paginate(collection)
15
16
  end
16
17
 
17
18
  def new
@@ -8,11 +8,12 @@ module Decidim
8
8
  class RegistrationTypesController < Decidim::Conferences::Admin::ApplicationController
9
9
  include Concerns::ConferenceAdmin
10
10
  include Decidim::ApplicationHelper
11
+ include Decidim::Paginable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :index, :registration_type
14
15
 
15
- @registration_types = collection.page(params[:page]).per(15)
16
+ @registration_types = paginate(collection)
16
17
  end
17
18
 
18
19
  def new
@@ -16,6 +16,7 @@ module Decidim
16
16
  include Decidim::Traceable
17
17
  include Decidim::Loggable
18
18
  include Decidim::ParticipatorySpaceResourceable
19
+ include Decidim::Searchable
19
20
 
20
21
  belongs_to :organization,
21
22
  foreign_key: "decidim_organization_id",
@@ -55,6 +56,18 @@ module Decidim
55
56
  mount_uploader :main_logo, Decidim::Conferences::DiplomaUploader
56
57
  mount_uploader :signature, Decidim::Conferences::DiplomaUploader
57
58
 
59
+ searchable_fields({
60
+ scope_id: :decidim_scope_id,
61
+ participatory_space: :itself,
62
+ A: :title,
63
+ B: :slogan,
64
+ C: :short_description,
65
+ D: [:description, :objectives],
66
+ datetime: :published_at
67
+ },
68
+ index_on_create: ->(_conference) { false },
69
+ index_on_update: ->(conference) { conference.visible? })
70
+
58
71
  # Scope to return only the promoted conferences.
59
72
  #
60
73
  # Returns an ActiveRecord::Relation.
@@ -63,6 +63,7 @@
63
63
  <% end %>
64
64
  </tbody>
65
65
  </table>
66
+ <%= paginate @conference_speakers, theme: "decidim" %>
66
67
  </div>
67
68
  </div>
68
69
  </div>
@@ -60,6 +60,7 @@
60
60
  <% end %>
61
61
  </tbody>
62
62
  </table>
63
+ <%= paginate @conference_user_roles, theme: "decidim" %>
63
64
  </div>
64
65
  </div>
65
66
  </div>
@@ -60,6 +60,7 @@
60
60
  <% end %>
61
61
  </tbody>
62
62
  </table>
63
+ <%= paginate @conferences, theme: "decidim" %>
63
64
  </div>
64
65
  </div>
65
66
  </div>
@@ -51,6 +51,7 @@
51
51
  <% end %>
52
52
  </tbody>
53
53
  </table>
54
+ <%= paginate @partners, theme: "decidim" %>
54
55
  </div>
55
56
  </div>
56
57
  </div>
@@ -60,6 +60,7 @@
60
60
  <% end %>
61
61
  </tbody>
62
62
  </table>
63
+ <%= paginate @registration_types, theme: "decidim" %>
63
64
  </div>
64
65
  </div>
65
66
  </div>
@@ -3,7 +3,7 @@
3
3
  <p><%= t(".details_1", registration_type: translated_attribute(@registration_type.title), price: number_to_currency((@registration_type.price || 0), locale: I18n.locale, unit: Decidim.currency_unit)) %></p>
4
4
 
5
5
  <ul>
6
- <% @registration_type.conference_meetings.each do |conference_meeting| %>
6
+ <% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %>
7
7
  <li><%= present(conference_meeting).title %> </li>
8
8
  <% end %>
9
9
  </ul>
@@ -3,7 +3,7 @@
3
3
  <p><%= t(".details", registration_type: translated_attribute(@registration_type.title), price: number_to_currency((@registration_type.price || 0), locale: I18n.locale, unit: Decidim.currency_unit)) %></p>
4
4
 
5
5
  <ul>
6
- <% @registration_type.conference_meetings.each do |conference_meeting| %>
6
+ <% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %>
7
7
  <li><%= present(conference_meeting).title %> </li>
8
8
  <% end %>
9
9
  </ul>
@@ -18,6 +18,7 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
18
18
  participatory_space.register_resource(:conference) do |resource|
19
19
  resource.model_class_name = "Decidim::Conference"
20
20
  resource.card = "decidim/conferences/conference"
21
+ resource.searchable = true
21
22
  end
22
23
 
23
24
  participatory_space.context(:public) do |context|
@@ -71,6 +72,7 @@ Decidim.register_participatory_space(:conferences) do |participatory_space|
71
72
  Decidim::Faker::Localized.paragraph(3)
72
73
  end
73
74
  )
75
+ conference.add_to_index_as_search_resource
74
76
 
75
77
  # Create users with specific roles
76
78
  Decidim::ConferenceUserRole::ROLES.each do |role|
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-conferences version.
5
5
  module Conferences
6
6
  def self.version
7
- "0.19.1"
7
+ "0.20.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-conferences
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Massot Gil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-13 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.1
19
+ version: 0.20.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.19.1
26
+ version: 0.20.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-meetings
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.1
33
+ version: 0.20.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.19.1
40
+ version: 0.20.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: wicked_pdf
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.19.1
75
+ version: 0.20.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.19.1
82
+ version: 0.20.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: decidim-dev
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.19.1
89
+ version: 0.20.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.19.1
96
+ version: 0.20.0
97
97
  description: Conferences component for decidim.
98
98
  email:
99
99
  - isaac.mg@coditramuntana.com