decidim-meetings 0.26.1 → 0.26.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/meetings/admin/create_meeting.rb +1 -1
- data/app/commands/decidim/meetings/admin/update_meeting.rb +1 -1
- data/app/commands/decidim/meetings/create_meeting.rb +2 -1
- data/app/commands/decidim/meetings/join_meeting.rb +11 -2
- data/app/commands/decidim/meetings/update_meeting.rb +1 -1
- data/app/controllers/decidim/meetings/directory/meetings_controller.rb +2 -1
- data/app/controllers/decidim/meetings/meetings_controller.rb +4 -3
- data/app/forms/decidim/meetings/admin/meeting_form.rb +0 -4
- data/app/helpers/decidim/meetings/application_helper.rb +24 -8
- data/app/helpers/decidim/meetings/directory/application_helper.rb +5 -7
- data/app/jobs/decidim/meetings/upcoming_meeting_notification_job.rb +4 -1
- data/app/models/decidim/meetings/agenda_item.rb +1 -1
- data/app/models/decidim/meetings/meeting.rb +5 -2
- data/app/packs/src/decidim/meetings/admin/meetings_form.js +1 -1
- data/app/presenters/decidim/meetings/meeting_presenter.rb +9 -0
- data/app/views/decidim/meetings/directory/meetings/_filters.html.erb +1 -1
- data/app/views/decidim/meetings/layouts/live_event.html.erb +1 -0
- data/app/views/decidim/meetings/meetings/_filters.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/index.js.erb +6 -0
- data/config/locales/ar.yml +12 -0
- data/config/locales/ca.yml +7 -7
- data/config/locales/cs.yml +9 -9
- data/config/locales/de.yml +59 -3
- data/config/locales/en.yml +6 -6
- data/config/locales/es-MX.yml +7 -7
- data/config/locales/es-PY.yml +5 -5
- data/config/locales/es.yml +7 -7
- data/config/locales/eu.yml +0 -8
- data/config/locales/fi-plain.yml +5 -5
- data/config/locales/fi.yml +5 -5
- data/config/locales/fr-CA.yml +3 -3
- data/config/locales/fr.yml +11 -11
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/hu.yml +145 -0
- data/config/locales/it.yml +0 -8
- data/config/locales/ja.yml +1 -1
- data/config/locales/lb.yml +0 -1
- data/config/locales/lt.yml +674 -0
- data/config/locales/nl.yml +78 -53
- data/config/locales/no.yml +0 -6
- data/config/locales/oc-FR.yml +1 -0
- data/config/locales/pl.yml +3 -4
- data/config/locales/pt-BR.yml +0 -4
- data/config/locales/pt.yml +0 -8
- data/config/locales/ro-RO.yml +0 -8
- data/config/locales/sv.yml +4 -8
- data/config/locales/tr-TR.yml +0 -3
- data/db/migrate/20210512100333_drop_decidim_meetings_minutes_table.rb +1 -0
- data/lib/decidim/content_parsers/meeting_parser.rb +20 -0
- data/lib/decidim/content_renderers/meeting_renderer.rb +17 -0
- data/lib/decidim/meetings/component.rb +4 -4
- data/lib/decidim/meetings/engine.rb +6 -0
- data/lib/decidim/meetings/version.rb +1 -1
- data/lib/decidim/meetings.rb +8 -0
- metadata +17 -14
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module ContentParsers
|
5
|
+
# A parser that searches mentions of Meetings in content.
|
6
|
+
#
|
7
|
+
# @see BaseParser Examples of how to use a content parser
|
8
|
+
class MeetingParser < ResourceParser
|
9
|
+
private
|
10
|
+
|
11
|
+
def url_regex
|
12
|
+
%r{#{URL_REGEX_SCHEME}#{URL_REGEX_CONTENT}/meetings/#{URL_REGEX_END_CHAR}+}i
|
13
|
+
end
|
14
|
+
|
15
|
+
def model_class
|
16
|
+
"Decidim::Meetings::Meeting"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module ContentRenderers
|
5
|
+
# A renderer that searches Global IDs representing meetings in content
|
6
|
+
# and replaces it with a link to their show page.
|
7
|
+
#
|
8
|
+
# e.g. gid://<APP_NAME>/Decidim::Meetings::Meeting/1
|
9
|
+
#
|
10
|
+
# @see BaseRenderer Examples of how to use a content renderer
|
11
|
+
class MeetingRenderer < ResourceRenderer
|
12
|
+
def regex
|
13
|
+
%r{gid://([\w-]*/Decidim::Meetings::Meeting/(\d+))}i
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -127,7 +127,7 @@ Decidim.register_component(:meetings) do |component|
|
|
127
127
|
end
|
128
128
|
|
129
129
|
2.times do
|
130
|
-
start_time =
|
130
|
+
start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now)
|
131
131
|
end_time = start_time + [rand(1..4).hours, rand(1..20).days].sample
|
132
132
|
params = {
|
133
133
|
component: component,
|
@@ -207,8 +207,8 @@ Decidim.register_component(:meetings) do |component|
|
|
207
207
|
user = Decidim::User.find_or_initialize_by(email: email)
|
208
208
|
|
209
209
|
user.update!(
|
210
|
-
password: "
|
211
|
-
password_confirmation: "
|
210
|
+
password: "decidim123456",
|
211
|
+
password_confirmation: "decidim123456",
|
212
212
|
name: name,
|
213
213
|
nickname: Faker::Twitter.unique.screen_name,
|
214
214
|
organization: component.organization,
|
@@ -282,7 +282,7 @@ Decidim.register_component(:meetings) do |component|
|
|
282
282
|
author = user_group.users.sample
|
283
283
|
end
|
284
284
|
|
285
|
-
start_time =
|
285
|
+
start_time = Faker::Date.between(from: 20.weeks.ago, to: 20.weeks.from_now)
|
286
286
|
params = {
|
287
287
|
component: component,
|
288
288
|
scope: Faker::Boolean.boolean(true_ratio: 0.5) ? global : scopes.sample,
|
@@ -42,6 +42,12 @@ module Decidim
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
initializer "decidim.content_processors" do |_app|
|
46
|
+
Decidim.configure do |config|
|
47
|
+
config.content_processors += [:meeting]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
45
51
|
initializer "decidim_meetings.view_hooks" do
|
46
52
|
Decidim.view_hooks.register(:participatory_space_highlighted_elements, priority: Decidim::ViewHooks::HIGH_PRIORITY) do |view_context|
|
47
53
|
view_context.cell("decidim/meetings/highlighted_meetings", view_context.current_participatory_space)
|
data/lib/decidim/meetings.rb
CHANGED
@@ -29,4 +29,12 @@ module Decidim
|
|
29
29
|
2.days
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
module ContentParsers
|
34
|
+
autoload :MeetingParser, "decidim/content_parsers/meeting_parser"
|
35
|
+
end
|
36
|
+
|
37
|
+
module ContentRenderers
|
38
|
+
autoload :MeetingRenderer, "decidim/content_renderers/meeting_renderer"
|
39
|
+
end
|
32
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-meetings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.26.
|
21
|
+
version: 0.26.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.26.
|
28
|
+
version: 0.26.3
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-forms
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.26.
|
35
|
+
version: 0.26.3
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.26.
|
42
|
+
version: 0.26.3
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: icalendar
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,56 +60,56 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.26.
|
63
|
+
version: 0.26.3
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.26.
|
70
|
+
version: 0.26.3
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-assemblies
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.26.
|
77
|
+
version: 0.26.3
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.26.
|
84
|
+
version: 0.26.3
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-dev
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.26.
|
91
|
+
version: 0.26.3
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.26.
|
98
|
+
version: 0.26.3
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-participatory_processes
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.26.
|
105
|
+
version: 0.26.3
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.26.
|
112
|
+
version: 0.26.3
|
113
113
|
description: A meetings component for decidim's participatory spaces.
|
114
114
|
email:
|
115
115
|
- josepjaume@gmail.com
|
@@ -425,6 +425,7 @@ files:
|
|
425
425
|
- config/locales/mt.yml
|
426
426
|
- config/locales/nl.yml
|
427
427
|
- config/locales/no.yml
|
428
|
+
- config/locales/oc-FR.yml
|
428
429
|
- config/locales/om-ET.yml
|
429
430
|
- config/locales/pl.yml
|
430
431
|
- config/locales/pt-BR.yml
|
@@ -509,6 +510,8 @@ files:
|
|
509
510
|
- lib/decidim/api/meetings_type.rb
|
510
511
|
- lib/decidim/api/service_type.rb
|
511
512
|
- lib/decidim/api/services_interface.rb
|
513
|
+
- lib/decidim/content_parsers/meeting_parser.rb
|
514
|
+
- lib/decidim/content_renderers/meeting_renderer.rb
|
512
515
|
- lib/decidim/meetings.rb
|
513
516
|
- lib/decidim/meetings/admin.rb
|
514
517
|
- lib/decidim/meetings/admin_engine.rb
|