decidim-core 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/decidim-logo.svg +69 -60
- data/app/assets/javascripts/decidim.js.es6 +1 -0
- data/app/assets/javascripts/decidim/core/bundle.js +2 -0
- data/app/assets/javascripts/decidim/core/bundle.js.map +1 -0
- data/app/assets/javascripts/decidim/data_picker.js.es6 +6 -0
- data/app/assets/stylesheets/decidim/_variables.scss +17 -0
- data/app/assets/stylesheets/decidim/extras/_leaflet.scss +2 -2
- data/app/assets/stylesheets/decidim/layouts/_highlighted_banner.scss +0 -4
- data/app/assets/stylesheets/decidim/layouts/_home.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_address.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +3 -2
- data/app/assets/stylesheets/decidim/modules/_badges.scss +7 -7
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +52 -14
- data/app/assets/stylesheets/decidim/modules/_callout.scss +5 -5
- data/app/assets/stylesheets/decidim/modules/_cards.scss +9 -23
- data/app/assets/stylesheets/decidim/modules/_conference-nav.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_filters.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_horizontal-tabs.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_loading-spinner.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_main-container.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_map.scss +3 -3
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +3 -3
- data/app/assets/stylesheets/decidim/modules/_omnipresent_banner.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_order-by.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_process-header.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_process-nav.scss +8 -8
- data/app/assets/stylesheets/decidim/modules/_process-phase.scss +4 -4
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_timeline.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_typography.scss +2 -2
- data/app/assets/stylesheets/decidim/modules/_wizard-steps.scss +3 -3
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +7 -1
- data/app/assets/stylesheets/decidim/vizzs/_areachart.scss +3 -7
- data/app/cells/decidim/activities_cell.rb +0 -2
- data/app/cells/decidim/card_m_cell.rb +3 -1
- data/app/cells/decidim/content_blocks/footer_sub_hero_cell.rb +0 -1
- data/app/cells/decidim/content_blocks/hero_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/last_activity_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/metrics_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/stats_cell.rb +0 -2
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +0 -2
- data/app/cells/decidim/follow_button_cell.rb +0 -4
- data/app/cells/decidim/pad_iframe_cell.rb +0 -4
- data/app/commands/decidim/create_omniauth_registration.rb +1 -1
- data/app/commands/decidim/create_report.rb +1 -1
- data/app/controllers/concerns/decidim/action_authorization.rb +6 -4
- data/app/controllers/concerns/decidim/locale_switcher.rb +14 -0
- data/app/controllers/concerns/decidim/participatory_space_context.rb +5 -6
- data/app/controllers/decidim/application_controller.rb +1 -1
- data/app/controllers/decidim/authorization_modals_controller.rb +5 -5
- data/app/controllers/decidim/static_map_controller.rb +2 -0
- data/app/frontend/entry.ts +1 -0
- data/app/helpers/decidim/cells_helper.rb +0 -1
- data/app/helpers/decidim/filters_helper.rb +10 -1
- data/app/helpers/decidim/layout_helper.rb +5 -0
- data/app/mailers/concerns/decidim/localised_mailer.rb +1 -1
- data/app/models/decidim/user.rb +1 -1
- data/app/permissions/decidim/permissions.rb +11 -11
- data/app/presenters/decidim/resource_locator_presenter.rb +13 -0
- data/app/queries/decidim/metrics/users_metric_manage.rb +2 -2
- data/app/services/decidim/action_authorizer.rb +51 -26
- data/app/services/decidim/email_notification_generator.rb +11 -0
- data/app/views/decidim/account/show.html.erb +2 -1
- data/app/views/decidim/authorization_modals/_content.html.erb +45 -0
- data/app/views/decidim/authorization_modals/show.html.erb +1 -41
- data/app/views/decidim/notification_mailer/event_received.html.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +1 -0
- data/app/views/layouts/decidim/_organization_colors.html.erb +5 -0
- data/app/views/layouts/decidim/_wrapper.html.erb +3 -1
- data/config/locales/ar-SA.yml +180 -10
- data/config/locales/ca.yml +118 -120
- data/config/locales/cs-CZ.yml +3 -3
- data/config/locales/cs.yml +1282 -0
- data/config/locales/de.yml +29 -31
- data/config/locales/en.yml +148 -149
- data/config/locales/es-MX.yml +28 -30
- data/config/locales/es-PY.yml +28 -30
- data/config/locales/es.yml +124 -126
- data/config/locales/eu.yml +28 -30
- data/config/locales/fi-pl.yml +1 -1
- data/config/locales/fi-plain.yml +1260 -0
- data/config/locales/fi.yml +95 -97
- data/config/locales/fr.yml +28 -30
- data/config/locales/gl.yml +28 -30
- data/config/locales/hu.yml +44 -46
- data/config/locales/id-ID.yml +28 -30
- data/config/locales/it.yml +32 -34
- data/config/locales/nl.yml +29 -31
- data/config/locales/pl.yml +28 -30
- data/config/locales/pt-BR.yml +28 -30
- data/config/locales/pt.yml +28 -30
- data/config/locales/ru.yml +1 -2
- data/config/locales/sv.yml +29 -31
- data/config/locales/tr-TR.yml +28 -30
- data/config/locales/uk.yml +1 -2
- data/db/migrate/20190220023422_add_colors_to_decidim_organization.rb +7 -0
- data/lib/decidim/content_renderers/user_renderer.rb +4 -6
- data/lib/decidim/core.rb +10 -1
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/test/shared_examples/amendable/amendment_accepted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/amendable/amendment_rejected_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +21 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/data_portability_file_zipper.rb +12 -3
- data/lib/decidim/form_builder.rb +3 -9
- data/lib/decidim/has_resource_permission.rb +43 -0
- data/lib/decidim/settings_manifest.rb +5 -0
- data/lib/decidim/view_model.rb +2 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ca.js +6 -6
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.cs.js +14 -0
- data/vendor/assets/javascripts/foundation-datepicker.js +2 -10
- metadata +18 -7
data/config/locales/uk.yml
CHANGED
@@ -154,13 +154,12 @@ uk:
|
|
154
154
|
granted_at: 'Надано: %{timestamp}'
|
155
155
|
started_at: 'Розпочато: %{timestamp}'
|
156
156
|
authorization_modals:
|
157
|
-
|
157
|
+
content:
|
158
158
|
expired:
|
159
159
|
authorize: Знову підтвердити свою особу за допомогою "%{authorization}"
|
160
160
|
explanation: Строк дії підтвердження вашої особи вичерпався. Щоб виконати цю дію, вам потрібно знову підтвердити свою особу за допомогою "%{authorization}".
|
161
161
|
title: Строк дії підтвердження особи вичерпався
|
162
162
|
incomplete:
|
163
|
-
cancel: Скасувати
|
164
163
|
explanation: 'Незважаючи на те, що ви наразі підтвердили свою особу за допомогою "%{authorization}", ми просимо вас знову підтвердити свою особу, оскільки нам не вистачає наступних даних:'
|
165
164
|
invalid_field: "Поле %{field}"
|
166
165
|
reauthorize: Заново підтвердити свою особу
|
@@ -19,12 +19,10 @@ module Decidim
|
|
19
19
|
# @return [String] the content ready to display (contains HTML)
|
20
20
|
def render
|
21
21
|
content.gsub(GLOBAL_ID_REGEX) do |user_gid|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
""
|
27
|
-
end
|
22
|
+
user = GlobalID::Locator.locate(user_gid)
|
23
|
+
Decidim::UserPresenter.new(user).display_mention
|
24
|
+
rescue ActiveRecord::RecordNotFound => _ex
|
25
|
+
""
|
28
26
|
end
|
29
27
|
end
|
30
28
|
end
|
data/lib/decidim/core.rb
CHANGED
@@ -74,6 +74,7 @@ module Decidim
|
|
74
74
|
autoload :Paddable, "decidim/paddable"
|
75
75
|
autoload :OpenDataExporter, "decidim/open_data_exporter"
|
76
76
|
autoload :IoEncoder, "decidim/io_encoder"
|
77
|
+
autoload :HasResourcePermission, "decidim/has_resource_permission"
|
77
78
|
|
78
79
|
include ActiveSupport::Configurable
|
79
80
|
# Loads seeds from all engines.
|
@@ -126,7 +127,7 @@ module Decidim
|
|
126
127
|
|
127
128
|
# Exposes a configuration option: The application available locales.
|
128
129
|
config_accessor :available_locales do
|
129
|
-
%w(en ca de es es-PY eu fi fr gl hu it nl pt pt-BR ru sv uk)
|
130
|
+
%w(en ca de es es-MX es-PY eu fi-pl fi fr gl hu id it nl pl pt pt-BR ru sv tr uk)
|
130
131
|
end
|
131
132
|
|
132
133
|
# Exposes a configuration option: an array of symbols representing processors
|
@@ -252,6 +253,14 @@ module Decidim
|
|
252
253
|
# Exposes a configuration option: an object to deliver SMS codes to users.
|
253
254
|
config_accessor :sms_gateway_service
|
254
255
|
|
256
|
+
# Exposes a configuration option: an object to generate a timestamp from a
|
257
|
+
# document
|
258
|
+
config_accessor :timestamp_service
|
259
|
+
|
260
|
+
# Exposes a configuration option: an object to process a pdf and add a
|
261
|
+
# signature to the document
|
262
|
+
config_accessor :pdf_signature_service
|
263
|
+
|
255
264
|
# Public: Registers a global engine. This method is intended to be used
|
256
265
|
# by component engines that also offer unscoped functionality
|
257
266
|
#
|
data/lib/decidim/core/test.rb
CHANGED
@@ -38,3 +38,4 @@ require "decidim/core/test/shared_examples/amendable/amendment_created_event_exa
|
|
38
38
|
require "decidim/core/test/shared_examples/amendable/amendment_accepted_event_examples"
|
39
39
|
require "decidim/core/test/shared_examples/amendable/amendment_rejected_event_examples"
|
40
40
|
require "decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples"
|
41
|
+
require "decidim/core/test/shared_examples/uncommentable_component_examples"
|
@@ -16,14 +16,14 @@ shared_examples "amendment accepted event" do
|
|
16
16
|
|
17
17
|
describe "email_subject" do
|
18
18
|
it "is generated correctly" do
|
19
|
-
expect(subject.email_subject).to eq("
|
19
|
+
expect(subject.email_subject).to eq("Accepted amendment for #{amendable_title} from #{emendation_author_nickname}")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "email_intro" do
|
24
24
|
it "is generated correctly" do
|
25
25
|
expect(subject.email_intro)
|
26
|
-
.to eq("An
|
26
|
+
.to eq("An amendment has been accepted for #{amendable_title}. You can see it from this page:")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ shared_examples "amendment accepted event" do
|
|
37
37
|
describe "notification_title" do
|
38
38
|
it "is generated correctly" do
|
39
39
|
expect(subject.notification_title)
|
40
|
-
.to include("The <a href=\"#{emendation_path}\">
|
40
|
+
.to include("The <a href=\"#{emendation_path}\">amendment</a> created by <a href=\"#{emendation_author_path}\">#{emendation_author_nickname}</a> has been accepted for <a href=\"#{amendable_path}\">#{amendable_title}</a> #{amendable_type}.") # rubocop:disable Metrics/LineLength
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -21,14 +21,14 @@ shared_examples "amendment created event" do
|
|
21
21
|
|
22
22
|
describe "email_subject" do
|
23
23
|
it "is generated correctly" do
|
24
|
-
expect(subject.email_subject).to eq("
|
24
|
+
expect(subject.email_subject).to eq("New amendment for #{amendable_title} from #{emendation_author_nickname}")
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "email_intro" do
|
29
29
|
it "is generated correctly" do
|
30
30
|
expect(subject.email_intro)
|
31
|
-
.to eq("A new
|
31
|
+
.to eq("A new amendment has been created for #{amendable_title}. You can see it from this page:")
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -42,7 +42,7 @@ shared_examples "amendment created event" do
|
|
42
42
|
describe "notification_title" do
|
43
43
|
it "is generated correctly" do
|
44
44
|
expect(subject.notification_title)
|
45
|
-
.to include("A <a href=\"#{emendation_path}\">new
|
45
|
+
.to include("A <a href=\"#{emendation_path}\">new amendment</a> has been created by <a href=\"#{emendation_author_path}\">#{emendation_author_nickname}</a> for <a href=\"#{amendable_path}\">#{amendable_title}</a> #{amendable_type}.") # rubocop:disable Metrics/LineLength
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -16,14 +16,14 @@ shared_examples "amendment promoted event" do
|
|
16
16
|
|
17
17
|
describe "email_subject" do
|
18
18
|
it "is generated correctly" do
|
19
|
-
expect(subject.email_subject).to eq("An
|
19
|
+
expect(subject.email_subject).to eq("An amendment from #{emendation_author_nickname} has been published as a new proposal")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "email_intro" do
|
24
24
|
it "is generated correctly" do
|
25
25
|
expect(subject.email_intro)
|
26
|
-
.to eq("
|
26
|
+
.to eq("A rejected amendment for #{amendable_title} has been published as a new #{amendable_type}. You can see it from this page:")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ shared_examples "amendment promoted event" do
|
|
37
37
|
describe "notification_title" do
|
38
38
|
it "is generated correctly" do
|
39
39
|
expect(subject.notification_title)
|
40
|
-
.to include("A <a href=\"#{emendation_path}\">rejected
|
40
|
+
.to include("A <a href=\"#{emendation_path}\">rejected amendment</a> for <a href=\"#{amendable_path}\">#{amendable_title}</a> #{amendable_type} has been published as a new proposal by <a href=\"#{emendation_author_path}\">#{emendation_author_nickname}</a>.") # rubocop:disable Metrics/LineLength
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -16,14 +16,14 @@ shared_examples "amendment rejected event" do
|
|
16
16
|
|
17
17
|
describe "email_subject" do
|
18
18
|
it "is generated correctly" do
|
19
|
-
expect(subject.email_subject).to eq("
|
19
|
+
expect(subject.email_subject).to eq("Amendment rejected for #{amendable_title} from #{emendation_author_nickname}")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "email_intro" do
|
24
24
|
it "is generated correctly" do
|
25
25
|
expect(subject.email_intro)
|
26
|
-
.to eq("An
|
26
|
+
.to eq("An amendment has been rejected for #{amendable_title}. You can see it from this page:")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ shared_examples "amendment rejected event" do
|
|
37
37
|
describe "notification_title" do
|
38
38
|
it "is generated correctly" do
|
39
39
|
expect(subject.notification_title)
|
40
|
-
.to include("The <a href=\"#{emendation_path}\">
|
40
|
+
.to include("The <a href=\"#{emendation_path}\">amendment</a> created by <a href=\"#{emendation_author_path}\">#{emendation_author_nickname}</a> has been rejected for <a href=\"#{amendable_path}\">#{amendable_title}</a> #{amendable_type}.") # rubocop:disable Metrics/LineLength
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
shared_examples "an uncommentable component" do
|
6
|
+
let!(:component) do
|
7
|
+
create(:component,
|
8
|
+
manifest: manifest,
|
9
|
+
participatory_space: participatory_space)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "doesn't displays comments count" do
|
13
|
+
component.update!(settings: { comments_enabled: false })
|
14
|
+
|
15
|
+
visit_component
|
16
|
+
|
17
|
+
ressources.each do |ressource|
|
18
|
+
expect(page).not_to have_link(resource_locator(ressource).path)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/decidim/core/version.rb
CHANGED
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
#
|
12
12
|
# user - The user of data portability to be zipped.
|
13
13
|
# data - An array of all data to be zipped.
|
14
|
-
# images - An array of image
|
14
|
+
# images - An array of image files to be inclueded in the zipped file.
|
15
15
|
def initialize(user, data, images, token = nil)
|
16
16
|
super(user, token)
|
17
17
|
@export_data = data
|
@@ -42,11 +42,20 @@ module Decidim
|
|
42
42
|
next if image.file.nil?
|
43
43
|
folder_name = image_block.first.parameterize
|
44
44
|
uploader = Decidim::ApplicationUploader.new(image.model, image.mounted_as)
|
45
|
-
|
46
|
-
|
45
|
+
if image.file.respond_to? :file
|
46
|
+
uploader.cache!(File.open(image.file.file))
|
47
|
+
uploader.retrieve_from_store!(image.file.filename)
|
48
|
+
else
|
49
|
+
my_uploader = image.mounted_as
|
50
|
+
element = image.model
|
51
|
+
|
52
|
+
element.send(my_uploader).cache_stored_file!
|
53
|
+
element.send(my_uploader).retrieve_from_cache!(element.send(my_uploader).cache_name)
|
54
|
+
end
|
47
55
|
my_image_path = File.open(image.file.file)
|
48
56
|
next unless File.exist?(my_image_path)
|
49
57
|
zipfile.add("#{folder_name}/#{image.file.filename}", my_image_path)
|
58
|
+
CarrierWave.clean_cached_files!
|
50
59
|
end
|
51
60
|
end
|
52
61
|
zipfile.close
|
data/lib/decidim/form_builder.rb
CHANGED
@@ -279,10 +279,7 @@ module Decidim
|
|
279
279
|
datepicker_format = ruby_format_to_datepicker(I18n.t("date.formats.decidim_short"))
|
280
280
|
data[:"date-format"] = datepicker_format
|
281
281
|
|
282
|
-
template =
|
283
|
-
template += label(attribute, label_for(attribute) + required_for_attribute(attribute))
|
284
|
-
template += @template.text_field(
|
285
|
-
@object_name,
|
282
|
+
template = text_field(
|
286
283
|
attribute,
|
287
284
|
options.merge(data: data)
|
288
285
|
)
|
@@ -300,10 +297,7 @@ module Decidim
|
|
300
297
|
datepicker_format = ruby_format_to_datepicker(I18n.t("time.formats.decidim_short"))
|
301
298
|
data[:"date-format"] = datepicker_format
|
302
299
|
|
303
|
-
template =
|
304
|
-
template += label(attribute, label_for(attribute) + required_for_attribute(attribute))
|
305
|
-
template += @template.text_field(
|
306
|
-
@object_name,
|
300
|
+
template = text_field(
|
307
301
|
attribute,
|
308
302
|
options.merge(data: data)
|
309
303
|
)
|
@@ -354,7 +348,7 @@ module Decidim
|
|
354
348
|
|
355
349
|
if object.errors[attribute].any?
|
356
350
|
template += content_tag :p, class: "is-invalid-label" do
|
357
|
-
safe_join object.errors[attribute], "<br/>"
|
351
|
+
safe_join object.errors[attribute], "<br/>".html_safe
|
358
352
|
end
|
359
353
|
end
|
360
354
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
# A concern to include permission to a resource not related with components
|
7
|
+
# od a participatory space.
|
8
|
+
module HasResourcePermission
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
# An association with the permissions settings for the resource
|
13
|
+
has_one :resource_permission, as: :resource, class_name: "Decidim::ResourcePermission"
|
14
|
+
|
15
|
+
delegate :resource_manifest, :resource_key, to: :class
|
16
|
+
|
17
|
+
alias_method :manifest, :resource_manifest
|
18
|
+
|
19
|
+
# Public: Whether the permissions for this object actions can be set at resource level.
|
20
|
+
def allow_resource_permissions?
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
# Public: Returns permissions for this object actions if they can be set at resource level.
|
25
|
+
def permissions
|
26
|
+
resource_permission&.permissions if allow_resource_permissions?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class_methods do
|
31
|
+
# Finds the resource manifest for the model.
|
32
|
+
#
|
33
|
+
# Returns a Decidim::ResourceManifest
|
34
|
+
def resource_manifest
|
35
|
+
Decidim.find_resource_manifest(self)
|
36
|
+
end
|
37
|
+
|
38
|
+
def resource_key
|
39
|
+
model_name.param_key
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -67,6 +67,10 @@ module Decidim
|
|
67
67
|
@schema
|
68
68
|
end
|
69
69
|
|
70
|
+
def required_attributes_for_authorization
|
71
|
+
attributes.select { |_, attribute| attribute.required_for_authorization? }
|
72
|
+
end
|
73
|
+
|
70
74
|
# Semi-private: Attributes are an abstraction used by SettingsManifest
|
71
75
|
# to encapsulate behavior related to each individual settings field. Shouldn't
|
72
76
|
# be used from the outside.
|
@@ -87,6 +91,7 @@ module Decidim
|
|
87
91
|
attribute :translated, Boolean, default: false
|
88
92
|
attribute :editor, Boolean, default: false
|
89
93
|
attribute :required, Boolean, default: true
|
94
|
+
attribute :required_for_authorization, Boolean, default: false
|
90
95
|
|
91
96
|
validates :type, inclusion: { in: TYPES.keys }
|
92
97
|
|
data/lib/decidim/view_model.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
* Catalan translation for foundation-datepicker, language file from bootstrap-datepicker
|
3
3
|
* J. Garcia <jogaco.en@gmail.com>
|
4
4
|
*/
|
5
|
-
;(function($){
|
5
|
+
; (function ($) {
|
6
6
|
$.fn.fdatepicker.dates['ca'] = {
|
7
|
-
days: ["
|
8
|
-
daysShort: ["
|
9
|
-
daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds"],
|
10
|
-
months: ["
|
11
|
-
monthsShort: ["
|
7
|
+
days: ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"],
|
8
|
+
daysShort: ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."],
|
9
|
+
daysMin: ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."],
|
10
|
+
months: ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"],
|
11
|
+
monthsShort: ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des."],
|
12
12
|
today: "Avui",
|
13
13
|
clear: "Esborrar",
|
14
14
|
weekStart: 1
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Czech translation for foundation-datepicker
|
3
|
+
* Matěj Koubík <matej@koubik.name>
|
4
|
+
*/
|
5
|
+
;(function($){
|
6
|
+
$.fn.fdatepicker.dates['cs'] = {
|
7
|
+
days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"],
|
8
|
+
daysShort: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"],
|
9
|
+
daysMin: ["N", "P", "Ú", "St", "Č", "P", "So", "N"],
|
10
|
+
months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
|
11
|
+
monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"],
|
12
|
+
today: "Dnes"
|
13
|
+
};
|
14
|
+
}(jQuery));
|
@@ -441,15 +441,7 @@
|
|
441
441
|
else {
|
442
442
|
date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val();
|
443
443
|
}
|
444
|
-
|
445
|
-
$(this.picker).addClass('is-invalid')
|
446
|
-
$(this.element).addClass('is-invalid-input')
|
447
|
-
return;
|
448
|
-
} else {
|
449
|
-
$(this.picker).removeClass('is-invalid')
|
450
|
-
$(this.element).removeClass('is-invalid-input')
|
451
|
-
}
|
452
|
-
|
444
|
+
|
453
445
|
this.date = DPGlobal.parseDate(date, this.format, this.language);
|
454
446
|
|
455
447
|
if (fromArgs) {
|
@@ -1430,4 +1422,4 @@
|
|
1430
1422
|
|
1431
1423
|
$.fn.fdatepicker.DPGlobal = DPGlobal;
|
1432
1424
|
|
1433
|
-
}(window.jQuery);
|
1425
|
+
}(window.jQuery);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -130,14 +130,14 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - "~>"
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '4.
|
133
|
+
version: '4.3'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - "~>"
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: '4.
|
140
|
+
version: '4.3'
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: devise-i18n
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
@@ -732,28 +732,28 @@ dependencies:
|
|
732
732
|
requirements:
|
733
733
|
- - '='
|
734
734
|
- !ruby/object:Gem::Version
|
735
|
-
version: 0.
|
735
|
+
version: 0.17.0
|
736
736
|
type: :runtime
|
737
737
|
prerelease: false
|
738
738
|
version_requirements: !ruby/object:Gem::Requirement
|
739
739
|
requirements:
|
740
740
|
- - '='
|
741
741
|
- !ruby/object:Gem::Version
|
742
|
-
version: 0.
|
742
|
+
version: 0.17.0
|
743
743
|
- !ruby/object:Gem::Dependency
|
744
744
|
name: decidim-dev
|
745
745
|
requirement: !ruby/object:Gem::Requirement
|
746
746
|
requirements:
|
747
747
|
- - '='
|
748
748
|
- !ruby/object:Gem::Version
|
749
|
-
version: 0.
|
749
|
+
version: 0.17.0
|
750
750
|
type: :development
|
751
751
|
prerelease: false
|
752
752
|
version_requirements: !ruby/object:Gem::Requirement
|
753
753
|
requirements:
|
754
754
|
- - '='
|
755
755
|
- !ruby/object:Gem::Version
|
756
|
-
version: 0.
|
756
|
+
version: 0.17.0
|
757
757
|
description: Adds core features so other engines can hook into the framework.
|
758
758
|
email:
|
759
759
|
- josepjaume@gmail.com
|
@@ -795,6 +795,8 @@ files:
|
|
795
795
|
- app/assets/javascripts/decidim/append_elements.js.es6
|
796
796
|
- app/assets/javascripts/decidim/append_redirect_url_to_modals.js.es6
|
797
797
|
- app/assets/javascripts/decidim/conferences.js.es6
|
798
|
+
- app/assets/javascripts/decidim/core/bundle.js
|
799
|
+
- app/assets/javascripts/decidim/core/bundle.js.map
|
798
800
|
- app/assets/javascripts/decidim/data_picker.js.es6
|
799
801
|
- app/assets/javascripts/decidim/editor.js.es6
|
800
802
|
- app/assets/javascripts/decidim/filters.js.es6
|
@@ -1186,6 +1188,7 @@ files:
|
|
1186
1188
|
- app/forms/decidim/user_interest_scope_form.rb
|
1187
1189
|
- app/forms/decidim/user_interests_form.rb
|
1188
1190
|
- app/forms/translatable_presence_validator.rb
|
1191
|
+
- app/frontend/entry.ts
|
1189
1192
|
- app/helpers/decidim/action_authorization_helper.rb
|
1190
1193
|
- app/helpers/decidim/amendments_helper.rb
|
1191
1194
|
- app/helpers/decidim/application_helper.rb
|
@@ -1419,6 +1422,7 @@ files:
|
|
1419
1422
|
- app/views/decidim/application/_document.html.erb
|
1420
1423
|
- app/views/decidim/application/_documents.html.erb
|
1421
1424
|
- app/views/decidim/application/_photos.html.erb
|
1425
|
+
- app/views/decidim/authorization_modals/_content.html.erb
|
1422
1426
|
- app/views/decidim/authorization_modals/show.html.erb
|
1423
1427
|
- app/views/decidim/cookie_policy/accept.js.erb
|
1424
1428
|
- app/views/decidim/data_portability/export.html.erb
|
@@ -1544,6 +1548,7 @@ files:
|
|
1544
1548
|
- app/views/layouts/decidim/_logo.html.erb
|
1545
1549
|
- app/views/layouts/decidim/_mailer_logo.html.erb
|
1546
1550
|
- app/views/layouts/decidim/_omnipresent_banner.html.erb
|
1551
|
+
- app/views/layouts/decidim/_organization_colors.html.erb
|
1547
1552
|
- app/views/layouts/decidim/_social_media_links.html.erb
|
1548
1553
|
- app/views/layouts/decidim/_topbar_search.html.erb
|
1549
1554
|
- app/views/layouts/decidim/_user_menu.html.erb
|
@@ -1561,6 +1566,7 @@ files:
|
|
1561
1566
|
- config/locales/ar-SA.yml
|
1562
1567
|
- config/locales/ca.yml
|
1563
1568
|
- config/locales/cs-CZ.yml
|
1569
|
+
- config/locales/cs.yml
|
1564
1570
|
- config/locales/de.yml
|
1565
1571
|
- config/locales/en.yml
|
1566
1572
|
- config/locales/es-MX.yml
|
@@ -1568,6 +1574,7 @@ files:
|
|
1568
1574
|
- config/locales/es.yml
|
1569
1575
|
- config/locales/eu.yml
|
1570
1576
|
- config/locales/fi-pl.yml
|
1577
|
+
- config/locales/fi-plain.yml
|
1571
1578
|
- config/locales/fi.yml
|
1572
1579
|
- config/locales/fr.yml
|
1573
1580
|
- config/locales/gl.yml
|
@@ -1719,6 +1726,7 @@ files:
|
|
1719
1726
|
- db/migrate/20181211090933_add_area_to_action_logs.rb
|
1720
1727
|
- db/migrate/20181214101250_add_notification_types_to_users.rb
|
1721
1728
|
- db/migrate/20181218171503_add_user_groups_switch_to_organizations.rb
|
1729
|
+
- db/migrate/20190220023422_add_colors_to_decidim_organization.rb
|
1722
1730
|
- db/seeds.rb
|
1723
1731
|
- db/seeds/homepage_image.jpg
|
1724
1732
|
- lib/decidim/amendable.rb
|
@@ -1799,6 +1807,7 @@ files:
|
|
1799
1807
|
- lib/decidim/core/test/shared_examples/scope_helper_examples.rb
|
1800
1808
|
- lib/decidim/core/test/shared_examples/searchable_results_examples.rb
|
1801
1809
|
- lib/decidim/core/test/shared_examples/simple_event.rb
|
1810
|
+
- lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb
|
1802
1811
|
- lib/decidim/core/test/shared_examples/user_localised_email_examples.rb
|
1803
1812
|
- lib/decidim/core/version.rb
|
1804
1813
|
- lib/decidim/data_portability.rb
|
@@ -1850,6 +1859,7 @@ files:
|
|
1850
1859
|
- lib/decidim/has_component.rb
|
1851
1860
|
- lib/decidim/has_private_users.rb
|
1852
1861
|
- lib/decidim/has_reference.rb
|
1862
|
+
- lib/decidim/has_resource_permission.rb
|
1853
1863
|
- lib/decidim/has_settings.rb
|
1854
1864
|
- lib/decidim/hashtag.rb
|
1855
1865
|
- lib/decidim/hashtaggable.rb
|
@@ -1895,6 +1905,7 @@ files:
|
|
1895
1905
|
- vendor/assets/javascripts/appendAround.js
|
1896
1906
|
- vendor/assets/javascripts/d3.js
|
1897
1907
|
- vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ca.js
|
1908
|
+
- vendor/assets/javascripts/datepicker-locales/foundation-datepicker.cs.js
|
1898
1909
|
- vendor/assets/javascripts/datepicker-locales/foundation-datepicker.de.js
|
1899
1910
|
- vendor/assets/javascripts/datepicker-locales/foundation-datepicker.es.js
|
1900
1911
|
- vendor/assets/javascripts/datepicker-locales/foundation-datepicker.eu.js
|