decidim-meetings 0.20.1 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/decidim_meetings_manifest.js +2 -0
- data/app/assets/images/decidim/gamification/badges/attended_meetings.svg +1 -106
- data/app/assets/images/decidim/meetings/icon.svg +1 -5
- data/app/assets/javascripts/decidim/meetings/admin/destroy_meeting_alert.js.es6 +16 -0
- data/app/assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 +3 -0
- data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +9 -0
- data/app/cells/decidim/meetings/content_blocks/upcoming_events_cell.rb +2 -1
- data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +7 -7
- data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -1
- data/app/cells/decidim/meetings/join_meeting_button/show.erb +2 -2
- data/app/cells/decidim/meetings/meeting_cell.rb +1 -0
- data/app/cells/decidim/meetings/meeting_list_item/show.erb +3 -3
- data/app/cells/decidim/meetings/meeting_list_item_cell.rb +1 -1
- data/app/cells/decidim/meetings/meeting_m/date.erb +1 -1
- data/app/cells/decidim/meetings/meeting_m/footer.erb +1 -1
- data/app/cells/decidim/meetings/meeting_m/multiple_dates.erb +1 -1
- data/app/cells/decidim/meetings/meeting_m_cell.rb +9 -1
- data/app/cells/decidim/meetings/meeting_s/show.erb +6 -6
- data/app/cells/decidim/meetings/meetings_map/show.erb +0 -2
- data/app/cells/decidim/meetings/meetings_map_cell.rb +3 -1
- data/app/commands/decidim/meetings/admin/close_meeting.rb +1 -2
- data/app/commands/decidim/meetings/admin/copy_meeting.rb +38 -28
- data/app/commands/decidim/meetings/admin/create_meeting.rb +36 -24
- data/app/commands/decidim/meetings/admin/destroy_meeting.rb +6 -1
- data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +2 -1
- data/app/commands/decidim/meetings/admin/update_meeting.rb +9 -3
- data/app/commands/decidim/meetings/create_meeting.rb +78 -0
- data/app/commands/decidim/meetings/join_meeting.rb +11 -0
- data/app/commands/decidim/meetings/update_meeting.rb +94 -0
- data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
- data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -0
- data/app/controllers/decidim/meetings/admin/meetings_controller.rb +21 -7
- data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
- data/app/controllers/decidim/meetings/calendars_controller.rb +1 -0
- data/app/controllers/decidim/meetings/meetings_controller.rb +75 -12
- data/app/controllers/decidim/meetings/registrations_controller.rb +1 -1
- data/app/controllers/decidim/meetings/versions_controller.rb +14 -0
- data/app/controllers/decidim/meetings/{meeting_widgets_controller.rb → widgets_controller.rb} +2 -2
- data/app/forms/decidim/meetings/admin/close_meeting_form.rb +7 -1
- data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +2 -8
- data/app/forms/decidim/meetings/admin/meeting_form.rb +24 -23
- data/app/forms/decidim/meetings/meeting_form.rb +78 -0
- data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -6
- data/app/helpers/decidim/meetings/application_helper.rb +26 -0
- data/app/helpers/decidim/meetings/map_helper.rb +2 -1
- data/app/helpers/decidim/meetings/meetings_helper.rb +13 -1
- data/app/models/decidim/meetings/agenda.rb +3 -0
- data/app/models/decidim/meetings/agenda_item.rb +3 -0
- data/app/models/decidim/meetings/meeting.rb +36 -15
- data/app/models/decidim/meetings/minutes.rb +3 -0
- data/app/models/decidim/meetings/service.rb +13 -0
- data/app/permissions/decidim/meetings/admin/permissions.rb +2 -0
- data/app/permissions/decidim/meetings/permissions.rb +20 -0
- data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +5 -1
- data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +1 -2
- data/app/presenters/decidim/meetings/meeting_presenter.rb +21 -6
- data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
- data/app/queries/decidim/meetings/filtered_meetings.rb +37 -0
- data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +2 -8
- data/app/services/decidim/meetings/calendar/meeting_to_event.rb +3 -3
- data/app/services/decidim/meetings/diff_renderer.rb +21 -0
- data/app/services/decidim/meetings/meeting_search.rb +3 -25
- data/app/types/decidim/meetings/agenda_item_type.rb +28 -0
- data/app/types/decidim/meetings/agenda_type.rb +25 -0
- data/app/types/decidim/meetings/meeting_type.rb +35 -8
- data/app/types/decidim/meetings/meetings_type.rb +1 -1
- data/app/types/decidim/meetings/minutes_type.rb +26 -0
- data/app/types/decidim/meetings/service_type.rb +13 -0
- data/app/views/decidim/meetings/_calendar_modal.html.erb +4 -4
- data/app/views/decidim/meetings/admin/invites/index.html.erb +2 -2
- data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +1 -6
- data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +1 -0
- data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +5 -12
- data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +22 -3
- data/app/views/decidim/meetings/admin/registrations/_form.html.erb +4 -0
- data/app/views/decidim/meetings/directory/meetings/index.html.erb +5 -3
- data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -4
- data/app/views/decidim/meetings/meetings/_count.html.erb +1 -0
- data/app/views/decidim/meetings/meetings/_filters.html.erb +13 -7
- data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
- data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +2 -2
- data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
- data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +8 -8
- data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
- data/app/views/decidim/meetings/meetings/index.html.erb +16 -1
- data/app/views/decidim/meetings/meetings/index.js.erb +13 -4
- data/app/views/decidim/meetings/meetings/new.html.erb +25 -0
- data/app/views/decidim/meetings/meetings/show.html.erb +30 -8
- data/app/views/decidim/meetings/versions/index.html.erb +8 -0
- data/app/views/decidim/meetings/versions/show.html.erb +10 -0
- data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +2 -2
- data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +1 -1
- data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +1 -3
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +0 -8
- data/config/locales/bg-BG.yml +21 -0
- data/config/locales/bg.yml +21 -0
- data/config/locales/ca.yml +61 -8
- data/config/locales/cs.yml +68 -9
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +64 -7
- data/config/locales/el.yml +449 -0
- data/config/locales/en.yml +62 -9
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +60 -7
- data/config/locales/es-PY.yml +60 -7
- data/config/locales/es.yml +62 -9
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +0 -8
- data/config/locales/fi-plain.yml +60 -7
- data/config/locales/fi.yml +88 -35
- data/config/locales/fr-CA.yml +504 -0
- data/config/locales/fr.yml +60 -7
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +0 -8
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +11 -7
- data/config/locales/id-ID.yml +0 -8
- data/config/locales/is-IS.yml +0 -10
- data/config/locales/is.yml +228 -0
- data/config/locales/it.yml +58 -7
- data/config/locales/ja-JP.yml +494 -0
- data/config/locales/ja.yml +496 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +452 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +53 -8
- data/config/locales/no.yml +24 -9
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +210 -147
- data/config/locales/pt-BR.yml +1 -9
- data/config/locales/pt.yml +232 -177
- data/config/locales/ro-RO.yml +500 -0
- data/config/locales/ru.yml +0 -8
- data/config/locales/sk-SK.yml +463 -0
- data/config/locales/sk.yml +458 -0
- data/config/locales/sl.yml +29 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +13 -0
- data/config/locales/sv.yml +67 -13
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +0 -8
- data/config/locales/uk.yml +0 -8
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +496 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200320105922_index_foreign_keys_in_decidim_meetings_registrations.rb +7 -0
- data/db/migrate/20200526110940_add_author_to_meetings.rb +30 -0
- data/db/migrate/20200702123209_create_meeting_services_table.rb +13 -0
- data/db/migrate/20200702123210_move_meeting_services_to_own_model.rb +31 -0
- data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +9 -0
- data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +29 -0
- data/lib/decidim/api/linked_resources_interface.rb +17 -0
- data/lib/decidim/api/services_interface.rb +13 -0
- data/lib/decidim/meetings.rb +1 -0
- data/lib/decidim/meetings/admin_engine.rb +5 -1
- data/lib/decidim/meetings/api.rb +8 -0
- data/lib/decidim/meetings/component.rb +69 -14
- data/lib/decidim/meetings/engine.rb +3 -6
- data/lib/decidim/meetings/meeting_serializer.rb +1 -1
- data/lib/decidim/meetings/seeds/city.jpeg +0 -0
- data/lib/decidim/meetings/test/factories.rb +45 -8
- data/lib/decidim/meetings/version.rb +1 -1
- data/lib/tasks/decidim_meetings.rake +16 -0
- metadata +91 -21
- data/app/presenters/decidim/meetings/admin_log/value_types/organizer_presenter.rb +0 -70
- data/app/views/decidim/meetings/meeting_widgets/show.html.erb +0 -9
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
class DiffRenderer < BaseDiffRenderer
|
6
|
+
def attribute_types
|
7
|
+
{
|
8
|
+
title: :string,
|
9
|
+
description: :html,
|
10
|
+
address: :string,
|
11
|
+
location: :string,
|
12
|
+
location_hints: :string,
|
13
|
+
start_time: :date,
|
14
|
+
end_time: :date,
|
15
|
+
decidim_user_group_id: :user_group,
|
16
|
+
decidim_scope_id: :scope
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -6,6 +6,8 @@ module Decidim
|
|
6
6
|
# `current_component` param with a `Decidim::Component` in order to
|
7
7
|
# find the meetings.
|
8
8
|
class MeetingSearch < ResourceSearch
|
9
|
+
text_search_fields :title, :description
|
10
|
+
|
9
11
|
# Public: Initializes the service.
|
10
12
|
# component - A Decidim::Component to get the meetings from.
|
11
13
|
# page - The page number to paginate the results.
|
@@ -15,20 +17,9 @@ module Decidim
|
|
15
17
|
super(scope, options)
|
16
18
|
end
|
17
19
|
|
18
|
-
# Handle the search_text filter
|
19
|
-
def search_search_text
|
20
|
-
query
|
21
|
-
.where(localized_search_text_in(:title), text: "%#{search_text}%")
|
22
|
-
.or(query.where(localized_search_text_in(:description), text: "%#{search_text}%"))
|
23
|
-
end
|
24
|
-
|
25
20
|
# Handle the date filter
|
26
21
|
def search_date
|
27
|
-
|
28
|
-
query.where("end_time >= ? ", Time.current).order(start_time: :asc)
|
29
|
-
elsif options[:date] == "past"
|
30
|
-
query.where("end_time <= ? ", Time.current).order(start_time: :desc)
|
31
|
-
end
|
22
|
+
apply_scopes(%w(upcoming past), date)
|
32
23
|
end
|
33
24
|
|
34
25
|
def search_space
|
@@ -36,19 +27,6 @@ module Decidim
|
|
36
27
|
|
37
28
|
query.joins(:component).where(decidim_components: { participatory_space_type: options[:space].classify })
|
38
29
|
end
|
39
|
-
|
40
|
-
private
|
41
|
-
|
42
|
-
# Internal: builds the needed query to search for a text in the organization's
|
43
|
-
# available locales. Note that it is intended to be used as follows:
|
44
|
-
#
|
45
|
-
# Example:
|
46
|
-
# Resource.where(localized_search_text_for(:title, text: "my_query"))
|
47
|
-
#
|
48
|
-
# The Hash with the `:text` key is required or it won't work.
|
49
|
-
def localized_search_text_in(field)
|
50
|
-
options[:organization].available_locales.map { |l| "#{field} ->> '#{l}' ILIKE :text" }.join(" OR ")
|
51
|
-
end
|
52
30
|
end
|
53
31
|
end
|
54
32
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
AgendaItemType = GraphQL::ObjectType.define do
|
6
|
+
name "MeetingAgendaItem"
|
7
|
+
description "A meeting agenda item"
|
8
|
+
|
9
|
+
field :id, !types.ID, "The ID for this agenda item"
|
10
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this agenda item"
|
11
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this agenda item"
|
12
|
+
field :items, !types[AgendaItemType], "Sub-items (children) of this agenda item", property: :agenda_item_children
|
13
|
+
field :parent, AgendaItemType, "Parent agenda item, if available"
|
14
|
+
field :agenda, AgendaType, "Belonging agenda"
|
15
|
+
field :duration, !types.Int, "Duration in number of minutes for this item in this agenda"
|
16
|
+
field :position, !types.Int, "Order position for this agenda item"
|
17
|
+
|
18
|
+
field :createdAt, Decidim::Core::DateTimeType do
|
19
|
+
description "The date and time this agenda item was created"
|
20
|
+
property :created_at
|
21
|
+
end
|
22
|
+
field :updatedAt, Decidim::Core::DateTimeType do
|
23
|
+
description "The date and time this agenda item was updated"
|
24
|
+
property :updated_at
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
AgendaType = GraphQL::ObjectType.define do
|
6
|
+
name "MeetingAgenda"
|
7
|
+
description "A meeting agenda"
|
8
|
+
|
9
|
+
field :id, !types.ID, "The ID for the agenda"
|
10
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for the agenda"
|
11
|
+
field :items, !types[AgendaItemType], "Items and sub-items of the agenda", property: :agenda_items
|
12
|
+
# probably useful in the future, when handling user permissions
|
13
|
+
# field :visible, !types.Boolean, "Whether this minutes is public or not", property: :visible
|
14
|
+
|
15
|
+
field :createdAt, Decidim::Core::DateTimeType do
|
16
|
+
description "The date and time this agenda was created"
|
17
|
+
property :created_at
|
18
|
+
end
|
19
|
+
field :updatedAt, Decidim::Core::DateTimeType do
|
20
|
+
description "The date and time this agenda was updated"
|
21
|
+
property :updated_at
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -10,24 +10,51 @@ module Decidim
|
|
10
10
|
-> { Decidim::Comments::CommentableInterface },
|
11
11
|
-> { Decidim::Core::CategorizableInterface },
|
12
12
|
-> { Decidim::Core::ScopableInterface },
|
13
|
-
-> { Decidim::Core::AttachableInterface }
|
13
|
+
-> { Decidim::Core::AttachableInterface },
|
14
|
+
-> { Decidim::Core::TimestampsInterface },
|
15
|
+
-> { Decidim::Meetings::ServicesInterface },
|
16
|
+
-> { Decidim::Meetings::LinkedResourcesInterface },
|
17
|
+
-> { Decidim::Forms::QuestionnaireEntityInterface }
|
14
18
|
]
|
15
19
|
|
16
|
-
field :id, !types.ID
|
17
|
-
field :reference, !types.String
|
20
|
+
field :id, !types.ID, "ID of this meeting"
|
21
|
+
field :reference, !types.String, "Reference for this meeting"
|
18
22
|
field :title, !Decidim::Core::TranslatedFieldType, "The title of this meeting."
|
23
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description of this meeting."
|
19
24
|
field :startTime, !Decidim::Core::DateTimeType, "The time this meeting starts", property: :start_time
|
20
25
|
field :endTime, !Decidim::Core::DateTimeType, "The time this meeting ends", property: :end_time
|
26
|
+
field :author, Decidim::Core::AuthorInterface, "If specified, the author of this meeting"
|
27
|
+
field :agenda, AgendaType, "Agenda for this meeting, if available" do
|
28
|
+
resolve ->(meeting, _args, _ctx) {
|
29
|
+
meeting.agenda if meeting.agenda&.visible?
|
30
|
+
}
|
31
|
+
end
|
21
32
|
|
22
33
|
field :closed, !types.Boolean, "Whether this meeting is closed or not.", property: :closed?
|
23
34
|
field :closingReport, Decidim::Core::TranslatedFieldType, "The closing report of this meeting.", property: :closing_report
|
24
|
-
|
25
|
-
field :registrationsEnabled, !types.Boolean, "Whether the registrations are enabled or not", property: :registrations_enabled
|
26
|
-
field :remainingSlots, types.Int, "Amount of slots available for this meeting", property: :remaining_slots
|
35
|
+
field :attendingOrganizations, types.String, "list of attending organizations", property: :attending_organizations
|
27
36
|
field :attendeeCount, types.Int, "Amount of attendees to this meeting", property: :attendees_count
|
28
37
|
field :contributionCount, types.Int, "Amount of contributions to this meeting", property: :contributions_count
|
29
|
-
|
30
|
-
|
38
|
+
field :minutes, MinutesType, "Minutes for this meeting, if available" do
|
39
|
+
resolve ->(meeting, _args, _ctx) {
|
40
|
+
meeting.minutes if meeting.minutes&.visible?
|
41
|
+
}
|
42
|
+
end
|
43
|
+
field :privateMeeting, !types.Boolean, "Whether the meeting is private or not (it can only be true if transparent)", property: :private_meeting
|
44
|
+
field :transparent, !types.Boolean, "For private meetings, information is public if transparent", property: :transparent
|
45
|
+
field :registrationsEnabled, !types.Boolean, "Whether the registrations are enabled or not", property: :registrations_enabled
|
46
|
+
field :registrationTerms, Decidim::Core::TranslatedFieldType, "The registration terms", property: :registration_terms
|
47
|
+
field :remainingSlots, types.Int, "Amount of slots available for this meeting", property: :remaining_slots
|
48
|
+
field :registrationFormEnabled, !types.Boolean, "Whether the registrations have a form or not", property: :registration_form_enabled
|
49
|
+
field :registrationForm, Decidim::Forms::QuestionnaireType do
|
50
|
+
description "If registration requires to fill a form, this is the questionnaire"
|
51
|
+
resolve ->(meeting, _args, _ctx) {
|
52
|
+
meeting.questionnaire if meeting.registration_form_enabled?
|
53
|
+
}
|
54
|
+
end
|
55
|
+
field :location, Decidim::Core::TranslatedFieldType, "The location of this meeting (free format)"
|
56
|
+
field :locationHints, Decidim::Core::TranslatedFieldType, "The location of this meeting (free format)", property: :location_hints
|
57
|
+
field :address, types.String, "The physical address of this meeting (used for geolocation)"
|
31
58
|
field :coordinates, Decidim::Core::CoordinatesType, "Physical coordinates for this meeting" do
|
32
59
|
resolve ->(meeting, _args, _ctx) {
|
33
60
|
[meeting.latitude, meeting.longitude]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
MinutesType = GraphQL::ObjectType.define do
|
6
|
+
name "MeetingMinutes"
|
7
|
+
description "A meeting minutes"
|
8
|
+
|
9
|
+
field :id, !types.ID, "The ID for the minutes"
|
10
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for the minutes"
|
11
|
+
field :videoUrl, types.String, "URL for the video of the session, if any", property: :video_url
|
12
|
+
field :audioUrl, types.String, "URL for the audio of the session, if any", property: :audio_url
|
13
|
+
# probably useful in the future, when handling user permissions
|
14
|
+
# field :visible, !types.Boolean, "Whether this minutes is public or not", property: :visible
|
15
|
+
|
16
|
+
field :createdAt, Decidim::Core::DateTimeType do
|
17
|
+
description "The date and time this minutes was created"
|
18
|
+
property :created_at
|
19
|
+
end
|
20
|
+
field :updatedAt, Decidim::Core::DateTimeType do
|
21
|
+
description "The date and time this minutes was updated"
|
22
|
+
property :updated_at
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Meetings
|
5
|
+
ServiceType = GraphQL::ObjectType.define do
|
6
|
+
name "MeetingService"
|
7
|
+
description "A meeting service"
|
8
|
+
|
9
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for the service"
|
10
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for the service"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<button class="button button--title
|
1
|
+
<button class="button button--title share-link text-center calendar" data-open="calendarShare">
|
2
2
|
<%= t(".export_calendar") %>
|
3
|
-
<%= icon "share", class: "icon--after" %>
|
3
|
+
<%= icon "share", class: "icon--after", role: "img", "aria-hidden": true %>
|
4
4
|
</button>
|
5
5
|
<div class="reveal" id="calendarShare" data-reveal>
|
6
6
|
<div class="reveal__header">
|
7
|
-
<
|
7
|
+
<h2 class="reveal__title"><%= t(".calendar_url") %>:</h2>
|
8
8
|
<button class="close-button" data-close aria-label="<%= t(".close_window") %>" type="button">
|
9
9
|
<span aria-hidden="true">×</span>
|
10
10
|
</button>
|
11
11
|
</div>
|
12
|
-
<input type="text" value="<%= "#{path}" %>" readonly>
|
12
|
+
<input type="text" value="<%= "#{path}" %>" readonly title="<%= t(".calendar_url") %>">
|
13
13
|
</div>
|
@@ -45,8 +45,8 @@
|
|
45
45
|
<%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
|
46
46
|
<%= hidden_field_tag :state, @state %>
|
47
47
|
<div class="input-group-button">
|
48
|
-
<button type="submit" class="button
|
49
|
-
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
48
|
+
<button type="submit" class="button">
|
49
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
50
50
|
</button>
|
51
51
|
</div>
|
52
52
|
</div>
|
@@ -22,12 +22,7 @@
|
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
<div class="row column">
|
25
|
-
|
26
|
-
<%= form.select :proposal_ids,
|
27
|
-
@form.proposals.order(title: :asc).map{|proposal| [decidim_html_escape(present(proposal).title), proposal.id]},
|
28
|
-
{ include_blank: true },
|
29
|
-
{ multiple: true, class: "chosen-select" } %>
|
30
|
-
<% end %>
|
25
|
+
<%= proposals_picker(form, :proposals, proposals_picker_meeting_meeting_closes_path(meeting)) %>
|
31
26
|
</div>
|
32
27
|
</div>
|
33
28
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= cell "decidim/proposals/proposals_picker", current_component %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
</div>
|
5
5
|
|
6
6
|
<div class="card-section">
|
7
|
-
<div class="row column
|
7
|
+
<div class="row column hashtags__container">
|
8
8
|
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, value: @meeting.present? ? present(@meeting).title(all_locales: true) : @form.title.with_indifferent_access %>
|
9
9
|
</div>
|
10
10
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<div class="row column">
|
16
|
-
<%= form.
|
16
|
+
<%= form.geocoding_field :address %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="row column">
|
@@ -34,13 +34,6 @@
|
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
|
37
|
-
<div class="row column">
|
38
|
-
<% prompt_options = { url: decidim_admin.users_organization_url, text: t(".select_organizer") } %>
|
39
|
-
<%= form.autocomplete_select(:organizer_id, form.object.organizer.presence, { multiple: false }, prompt_options) do |user|
|
40
|
-
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
41
|
-
end %>
|
42
|
-
</div>
|
43
|
-
|
44
37
|
<div class="row column" id="private_meeting">
|
45
38
|
<%= form.check_box :private_meeting %>
|
46
39
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h2 class="card-title"><%= title %></h2>
|
4
4
|
</div>
|
5
5
|
<div class="card-section">
|
6
|
-
<div class="row column
|
6
|
+
<div class="row column hashtags__container">
|
7
7
|
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true %>
|
8
8
|
</div>
|
9
9
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="row column">
|
15
|
-
<%= form.
|
15
|
+
<%= form.geocoding_field :address %>
|
16
16
|
<p class="help-text"><%= t(".address_help") %></p>
|
17
17
|
</div>
|
18
18
|
|
@@ -36,24 +36,17 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
<div class="row">
|
39
|
-
<% if
|
39
|
+
<% if current_component.has_subscopes? %>
|
40
40
|
<div class="columns xlarge-6">
|
41
|
-
<%= scopes_picker_field form, :decidim_scope_id %>
|
41
|
+
<%= scopes_picker_field form, :decidim_scope_id, root: current_component.scope %>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
45
45
|
<div class="columns xlarge-6">
|
46
|
-
<%= form.categories_select :decidim_category_id, current_participatory_space.categories,
|
46
|
+
<%= form.categories_select :decidim_category_id, current_participatory_space.categories, include_blank: "", disable_parents: false %>
|
47
47
|
</div>
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<div class="row column">
|
51
|
-
<% prompt_options = { url: decidim_admin.users_organization_url, text: t(".select_organizer") } %>
|
52
|
-
<%= form.autocomplete_select(:organizer_id, form.object.organizer.presence, { multiple: false }, prompt_options) do |user|
|
53
|
-
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
54
|
-
end %>
|
55
|
-
</div>
|
56
|
-
|
57
50
|
<div class="row column" id="private_meeting">
|
58
51
|
<%= form.check_box :private_meeting %>
|
59
52
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= decidim_form_for(@form, html: { class: "form edit_meeting" }) do |f| %>
|
1
|
+
<%= decidim_form_for(@form, url: { action: "update" }, html: { class: "form edit_meeting" }) do |f| %>
|
2
2
|
<%= render partial: "form", object: f %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
@@ -18,9 +18,10 @@
|
|
18
18
|
<th><%= t("models.meeting.fields.start_time", scope: "decidim.meetings") %></th>
|
19
19
|
<th><%= t("models.meeting.fields.end_time", scope: "decidim.meetings") %></th>
|
20
20
|
<th><%= t("models.meeting.fields.closed", scope: "decidim.meetings") %></th>
|
21
|
-
<% if Decidim.
|
21
|
+
<% if Decidim::Map.available?(:static, :geocoding) %>
|
22
22
|
<th><%= t("models.meeting.fields.map", scope: "decidim.meetings") %></th>
|
23
23
|
<% end %>
|
24
|
+
<%= th_resource_scope_label %>
|
24
25
|
<th class="actions"><%= t("actions.title", scope: "decidim.meetings") %></th>
|
25
26
|
</tr>
|
26
27
|
</thead>
|
@@ -43,11 +44,12 @@
|
|
43
44
|
<td>
|
44
45
|
<%= humanize_boolean meeting.closed? %>
|
45
46
|
</td>
|
46
|
-
<% if Decidim.
|
47
|
+
<% if Decidim::Map.available?(:static, :geocoding) %>
|
47
48
|
<td>
|
48
49
|
<%= static_map_link(meeting) %>
|
49
50
|
</td>
|
50
51
|
<% end %>
|
52
|
+
<%= td_resource_scope_for(meeting.scope) %>
|
51
53
|
<td class="table-list__actions">
|
52
54
|
<%= icon_link_to "eye", resource_locator(meeting).path, t("actions.preview", scope: "decidim.meetings"), class: "action-icon--preview", target: :blank %>
|
53
55
|
|
@@ -77,7 +79,22 @@
|
|
77
79
|
<%= resource_permissions_link(meeting) %>
|
78
80
|
|
79
81
|
<% if allowed_to? :destroy, :meeting, meeting: meeting %>
|
80
|
-
|
82
|
+
<% if present(meeting).authored_proposals.empty? %>
|
83
|
+
<%= icon_link_to "circle-x", meeting_path(meeting), t("actions.destroy", scope: "decidim.meetings"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.meetings") } %>
|
84
|
+
<% else %>
|
85
|
+
<%=
|
86
|
+
content_tag(:button,
|
87
|
+
class: ["action-icon", "action-icon--remove", "destroy-meeting-alert"],
|
88
|
+
"data-invalid-destroy-message" => t("actions.invalid_destroy.proposals_count", count: present(meeting).authored_proposals.size, scope: "decidim.meetings"),
|
89
|
+
"data-proposal-titles" => present(meeting).formatted_proposals_titles) do
|
90
|
+
content_tag(:span,
|
91
|
+
data: { tooltip: true, disable_hover: false, click_open: false },
|
92
|
+
title: t("actions.destroy", scope: "decidim.meetings")) do
|
93
|
+
icon("circle-x")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
%>
|
97
|
+
<% end %>
|
81
98
|
<% end %>
|
82
99
|
</td>
|
83
100
|
</tr>
|
@@ -88,3 +105,5 @@
|
|
88
105
|
</div>
|
89
106
|
</div>
|
90
107
|
</div>
|
108
|
+
|
109
|
+
<%= javascript_include_tag "decidim/meetings/admin/destroy_meeting_alert" %>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(t(".meetings")) %>
|
2
|
+
|
1
3
|
<div class="wrapper">
|
2
4
|
<div class="row">
|
3
5
|
<h1 class="section-heading"><%= t(".meetings") %></h1>
|
@@ -10,10 +12,10 @@
|
|
10
12
|
<div class="filters__section">
|
11
13
|
<div class="filters__search">
|
12
14
|
<div class="input-group">
|
13
|
-
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search") %>
|
15
|
+
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search") %>
|
14
16
|
<div class="input-group-button">
|
15
|
-
<button type="submit" class="button
|
16
|
-
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
17
|
+
<button type="submit" class="button">
|
18
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
17
19
|
</button>
|
18
20
|
</div>
|
19
21
|
</div>
|