decidim-meetings 0.22.0 → 0.23.3
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 +1 -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_cell.rb +1 -1
- data/app/cells/decidim/meetings/meeting_cell.rb +1 -1
- data/app/cells/decidim/meetings/meeting_list_item_cell.rb +2 -2
- data/app/cells/decidim/meetings/meeting_m_cell.rb +9 -1
- 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/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/update_meeting.rb +94 -0
- data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
- data/app/controllers/decidim/meetings/admin/meetings_controller.rb +11 -7
- data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
- data/app/controllers/decidim/meetings/meetings_controller.rb +76 -13
- 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/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 +25 -0
- data/app/helpers/decidim/meetings/meetings_helper.rb +12 -0
- 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 +69 -23
- 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 +3 -4
- data/app/presenters/decidim/meetings/meeting_presenter.rb +7 -3
- data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
- data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
- 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/meeting_type.rb +1 -1
- data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
- data/app/views/decidim/meetings/admin/meetings/_form.html.erb +4 -11
- data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
- data/app/views/decidim/meetings/admin/meetings/index.html.erb +4 -2
- 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 +8 -10
- data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
- data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
- data/app/views/decidim/meetings/meetings/index.html.erb +15 -0
- 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 +24 -9
- data/app/views/decidim/meetings/versions/index.html.erb +8 -0
- data/app/views/decidim/meetings/versions/show.html.erb +10 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +0 -8
- data/config/locales/bg-BG.yml +0 -8
- data/config/locales/bg.yml +21 -0
- data/config/locales/ca.yml +49 -7
- data/config/locales/cs.yml +57 -13
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +113 -71
- data/config/locales/el.yml +2 -7
- data/config/locales/en.yml +49 -7
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +49 -7
- data/config/locales/es-PY.yml +50 -8
- data/config/locales/es.yml +50 -8
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +0 -8
- data/config/locales/fi-plain.yml +49 -7
- data/config/locales/fi.yml +168 -126
- data/config/locales/fr-CA.yml +57 -7
- data/config/locales/fr.yml +57 -7
- data/config/locales/gl.yml +3 -7
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +2 -7
- data/config/locales/id-ID.yml +0 -8
- data/config/locales/is-IS.yml +0 -7
- data/config/locales/is.yml +228 -0
- data/config/locales/it.yml +47 -7
- data/config/locales/ja-JP.yml +48 -9
- 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.yml +1 -0
- data/config/locales/{lv-LV.yml → lv.yml} +2 -2
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +49 -7
- data/config/locales/no.yml +34 -8
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +193 -149
- data/config/locales/pt-BR.yml +1 -9
- data/config/locales/pt.yml +47 -7
- data/config/locales/ro-RO.yml +48 -7
- data/config/locales/ru.yml +0 -8
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +2 -7
- data/config/locales/sl.yml +25 -2
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sv.yml +56 -8
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +154 -98
- data/config/locales/uk.yml +0 -7
- 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/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/db/migrate/20201111133246_add_salt_to_decidim_meetings.rb +8 -0
- data/lib/decidim/api/services_interface.rb +1 -7
- data/lib/decidim/meetings/admin_engine.rb +2 -0
- data/lib/decidim/meetings/component.rb +63 -11
- data/lib/decidim/meetings/engine.rb +3 -2
- data/lib/decidim/meetings/meeting_serializer.rb +1 -1
- data/lib/decidim/meetings/test/factories.rb +45 -8
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +62 -22
- data/app/presenters/decidim/meetings/admin_log/value_types/organizer_presenter.rb +0 -70
@@ -1,70 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Meetings
|
5
|
-
module AdminLog
|
6
|
-
module ValueTypes
|
7
|
-
# This class presents the given value as a Decidim::Meetings::Organizer. Check
|
8
|
-
# the `DefaultPresenter` for more info on how value presenters work.
|
9
|
-
class OrganizerPresenter < Decidim::Log::ValueTypes::DefaultPresenter
|
10
|
-
include Rails.application.routes.mounted_helpers
|
11
|
-
include ActionView::Helpers::UrlHelper
|
12
|
-
# Public: Presents the value as a Decidim::Meetings::Organizer. If the result can
|
13
|
-
# be found, it shows its title. Otherwise it shows its ID.
|
14
|
-
#
|
15
|
-
# Returns an HTML-safe String.
|
16
|
-
def present
|
17
|
-
return unless value
|
18
|
-
return present_organizer if organizer
|
19
|
-
|
20
|
-
I18n.t("not_found", id: value, scope: "decidim.meetings.admin_log.meeting.value_types.organizer_presenter")
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def organizer
|
26
|
-
@organizer ||= Decidim::User.find_by(id: value)
|
27
|
-
end
|
28
|
-
|
29
|
-
def present_organizer
|
30
|
-
return content_tag(:span, present_user_name, class: "logs__log__author") if organizer.blank?
|
31
|
-
|
32
|
-
link_to(
|
33
|
-
present_user_name,
|
34
|
-
user_path,
|
35
|
-
class: "logs__log__author",
|
36
|
-
title: "@" + present_user_nickname,
|
37
|
-
target: "_blank",
|
38
|
-
data: {
|
39
|
-
tooltip: true,
|
40
|
-
"disable-hover": false
|
41
|
-
}, rel: "noopener"
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
# Private: Presents the name of the organizer performing the action.
|
46
|
-
#
|
47
|
-
# Returns an HTML-safe String.
|
48
|
-
def present_user_name
|
49
|
-
organizer.name.html_safe
|
50
|
-
end
|
51
|
-
|
52
|
-
# Private: Presents the nickname of the organizer performing the action.
|
53
|
-
#
|
54
|
-
# Returns an HTML-safe String.
|
55
|
-
def present_user_nickname
|
56
|
-
organizer.nickname.html_safe
|
57
|
-
end
|
58
|
-
|
59
|
-
# Private: Calculates the path for the organizer. Returns the path of the
|
60
|
-
# user profile. It's a public link.
|
61
|
-
#
|
62
|
-
# Returns an HTML-safe String.
|
63
|
-
def user_path
|
64
|
-
decidim.profile_path(present_user_nickname)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|