decidim-core 0.18.1 → 0.19.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/config/decidim_core_manifest.js +3 -0
- data/app/assets/javascripts/decidim/social_share.js +2 -0
- data/app/assets/stylesheets/decidim/extras/_social_share.css.scss +36 -0
- data/app/assets/stylesheets/decidim/modules/_input-gallery.scss +24 -0
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +1 -1
- data/app/cells/decidim/activities_cell.rb +13 -8
- data/app/cells/decidim/activity_cell.rb +19 -5
- data/app/cells/decidim/address/details.erb +2 -2
- data/app/cells/decidim/amendable/amenders_list/show.erb +1 -1
- data/app/cells/decidim/amendable/amenders_list_cell.rb +5 -1
- data/app/cells/decidim/amendable/announcement_cell.rb +22 -9
- data/app/cells/decidim/amendable/wizard_step_form_cell.rb +121 -0
- data/app/cells/decidim/announcement_cell.rb +1 -0
- data/app/cells/decidim/author_cell.rb +7 -0
- data/app/cells/decidim/card_m_cell.rb +3 -1
- data/app/cells/decidim/coauthorships_cell.rb +3 -1
- data/app/cells/decidim/collapsible_authors_cell.rb +1 -0
- data/app/cells/decidim/collapsible_list_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/last_activity_cell.rb +3 -2
- data/app/cells/decidim/content_blocks/metrics_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/stats_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +1 -0
- data/app/cells/decidim/diff_cell.rb +1 -1
- data/app/cells/decidim/fingerprint/show.erb +1 -1
- data/app/cells/decidim/follow_button_cell.rb +3 -0
- data/app/cells/decidim/members_cell.rb +1 -0
- data/app/cells/decidim/notifications/show.erb +1 -1
- data/app/cells/decidim/profile_cell.rb +1 -0
- data/app/cells/decidim/profile_sidebar_cell.rb +4 -0
- data/app/cells/decidim/search_results_cell.rb +1 -0
- data/app/cells/decidim/search_results_section/show.erb +1 -1
- data/app/cells/decidim/tos_page_cell.rb +1 -0
- data/app/cells/decidim/user_group_pending_invitations_list_cell.rb +1 -0
- data/app/cells/decidim/user_group_pending_requests_list_cell.rb +1 -0
- data/app/cells/decidim/wizard_step_form/wizard_aside.erb +14 -0
- data/app/cells/decidim/wizard_step_form/wizard_header.erb +18 -0
- data/app/cells/decidim/wizard_step_form_cell.rb +112 -0
- data/app/commands/decidim/amendable/accept.rb +1 -1
- data/app/commands/decidim/amendable/create_draft.rb +70 -0
- data/app/commands/decidim/amendable/destroy_draft.rb +40 -0
- data/app/commands/decidim/amendable/promote.rb +13 -11
- data/app/commands/decidim/amendable/publish_draft.rb +76 -0
- data/app/commands/decidim/amendable/update_draft.rb +54 -0
- data/app/commands/decidim/amendable/withdraw.rb +31 -15
- data/app/commands/decidim/create_follow.rb +1 -0
- data/app/commands/decidim/create_omniauth_registration.rb +22 -4
- data/app/commands/decidim/create_registration.rb +5 -0
- data/app/commands/decidim/delete_follow.rb +1 -0
- data/app/commands/decidim/search.rb +1 -0
- data/app/controllers/concerns/decidim/action_authorization.rb +2 -0
- data/app/controllers/concerns/decidim/amendments_controller.rb +148 -28
- data/app/controllers/concerns/decidim/devise_controllers.rb +3 -2
- data/app/controllers/concerns/decidim/force_authentication.rb +38 -0
- data/app/controllers/concerns/decidim/impersonate_users.rb +1 -0
- data/app/controllers/concerns/decidim/locale_switcher.rb +44 -17
- data/app/controllers/concerns/decidim/needs_tos_accepted.rb +8 -0
- data/app/controllers/concerns/decidim/orderable.rb +36 -0
- data/app/controllers/concerns/decidim/participatory_space_context.rb +2 -0
- data/app/controllers/concerns/decidim/safe_redirect.rb +24 -0
- data/app/controllers/decidim/application_controller.rb +19 -2
- data/app/controllers/decidim/devise/confirmations_controller.rb +6 -0
- data/app/controllers/decidim/devise/invitations_controller.rb +8 -4
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +4 -1
- data/app/controllers/decidim/errors_controller.rb +3 -0
- data/app/controllers/decidim/follows_controller.rb +2 -2
- data/app/controllers/decidim/messaging/conversations_controller.rb +2 -2
- data/app/controllers/decidim/profiles_controller.rb +4 -1
- data/app/controllers/decidim/scopes_controller.rb +16 -4
- data/app/events/decidim/amendable/amendment_base_event.rb +4 -0
- data/app/forms/decidim/account_form.rb +1 -1
- data/app/forms/decidim/amendable/create_form.rb +3 -19
- data/app/forms/decidim/amendable/edit_form.rb +22 -0
- data/app/forms/decidim/amendable/form.rb +42 -20
- data/app/forms/decidim/amendable/promote_form.rb +4 -7
- data/app/forms/decidim/amendable/publish_form.rb +21 -0
- data/app/forms/decidim/amendable/reject_form.rb +1 -1
- data/app/forms/decidim/amendable/review_form.rb +9 -4
- data/app/forms/decidim/invite_user_form.rb +1 -0
- data/app/forms/decidim/notifications_settings_form.rb +1 -0
- data/app/forms/decidim/registration_form.rb +4 -3
- data/app/forms/decidim/user_group_form.rb +1 -0
- data/app/forms/decidim/user_interests_form.rb +1 -0
- data/app/helpers/decidim/amendments_helper.rb +33 -19
- data/app/helpers/decidim/cells_helper.rb +2 -0
- data/app/helpers/decidim/layout_helper.rb +1 -0
- data/app/helpers/decidim/map_helper.rb +1 -1
- data/app/helpers/decidim/meta_tags_helper.rb +1 -0
- data/app/helpers/decidim/resource_reference_helper.rb +1 -0
- data/app/jobs/decidim/event_publisher_job.rb +60 -0
- data/app/jobs/decidim/metric_job.rb +1 -0
- data/app/models/decidim/action_log.rb +12 -0
- data/app/models/decidim/amendment.rb +31 -2
- data/app/models/decidim/attachment.rb +2 -0
- data/app/models/decidim/authorization.rb +1 -0
- data/app/models/decidim/category.rb +1 -0
- data/app/models/decidim/component.rb +7 -0
- data/app/models/decidim/content_block.rb +1 -0
- data/app/models/decidim/follow.rb +3 -0
- data/app/models/decidim/identity.rb +1 -0
- data/app/models/decidim/impersonation_log.rb +2 -0
- data/app/models/decidim/newsletter.rb +1 -0
- data/app/models/decidim/participatory_process_user_role.rb +1 -0
- data/app/models/decidim/participatory_space_private_user.rb +1 -0
- data/app/models/decidim/permission_action.rb +2 -0
- data/app/models/decidim/report.rb +1 -0
- data/app/models/decidim/scope.rb +1 -0
- data/app/models/decidim/searchable_resource.rb +1 -1
- data/app/models/decidim/static_page.rb +1 -0
- data/app/models/decidim/user.rb +2 -0
- data/app/permissions/decidim/permissions.rb +18 -14
- data/app/permissions/decidim/user_manager_permissions.rb +9 -2
- data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -0
- data/app/presenters/decidim/admin_log/participatory_space_private_user_presenter.rb +1 -1
- data/app/presenters/decidim/admin_log/user_presenter.rb +1 -1
- data/app/presenters/decidim/hashtag_presenter.rb +1 -1
- data/app/presenters/decidim/log/base_presenter.rb +1 -0
- data/app/presenters/decidim/log/diff_presenter.rb +1 -1
- data/app/presenters/decidim/log/value_types/area_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/area_type_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/currency_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/date_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/locale_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/percentage_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/scope_presenter.rb +1 -0
- data/app/presenters/decidim/log/value_types/scope_type_presenter.rb +1 -0
- data/app/presenters/decidim/metric_charts_presenter.rb +1 -0
- data/app/presenters/decidim/metric_object_presenter.rb +4 -0
- data/app/queries/decidim/metric_manage.rb +3 -0
- data/app/queries/decidim/metric_measure.rb +1 -0
- data/app/queries/decidim/metrics/followers_metric_manage.rb +3 -0
- data/app/queries/decidim/metrics/participants_metric_manage.rb +4 -0
- data/app/queries/decidim/similar_emendations.rb +56 -0
- data/app/resolvers/decidim/core/metric_resolver.rb +1 -0
- data/app/services/decidim/action_authorizer.rb +1 -0
- data/app/services/decidim/action_logger.rb +1 -0
- data/app/services/decidim/activity_search.rb +1 -0
- data/app/services/decidim/email_notification_generator.rb +4 -0
- data/app/services/decidim/notification_generator.rb +2 -0
- data/app/services/decidim/notification_generator_for_recipient.rb +0 -1
- data/app/services/decidim/resource_search.rb +1 -1
- data/app/services/decidim/traceability.rb +1 -0
- data/app/uploaders/decidim/application_uploader.rb +1 -0
- data/app/uploaders/decidim/attachment_uploader.rb +16 -0
- data/app/uploaders/decidim/avatar_uploader.rb +0 -2
- data/app/uploaders/decidim/data_portability_uploader.rb +1 -0
- data/app/uploaders/decidim/homepage_image_uploader.rb +0 -2
- data/app/uploaders/decidim/image_uploader.rb +15 -1
- data/app/uploaders/decidim/oauth_application_logo_uploader.rb +0 -1
- data/app/uploaders/decidim/official_image_footer_uploader.rb +0 -1
- data/app/uploaders/decidim/official_image_header_uploader.rb +0 -1
- data/app/uploaders/decidim/open_data_uploader.rb +1 -0
- data/app/validators/etiquette_validator.rb +5 -0
- data/app/views/decidim/account/delete.html.erb +2 -2
- data/app/views/decidim/account/show.html.erb +1 -1
- data/app/views/decidim/amendments/_edit_form_fields.html.erb +16 -13
- data/app/views/decidim/amendments/_similar_emendation.html.erb +24 -0
- data/app/views/decidim/amendments/compare_draft.html.erb +21 -0
- data/app/views/decidim/amendments/edit_draft.html.erb +31 -0
- data/app/views/decidim/amendments/new.html.erb +5 -17
- data/app/views/decidim/amendments/preview_draft.html.erb +32 -0
- data/app/views/decidim/amendments/review.html.erb +5 -3
- data/app/views/decidim/application/_document.html.erb +1 -1
- data/app/views/decidim/application/_photos.html.erb +1 -1
- data/app/views/decidim/data_portability/show.html.erb +1 -1
- data/app/views/decidim/devise/invitations/edit.html.erb +2 -2
- data/app/views/decidim/devise/sessions/new.html.erb +1 -1
- data/app/views/decidim/doorkeeper/authorizations/new.html.erb +3 -3
- data/app/views/decidim/export_mailer/data_portability_export.html.erb +1 -1
- data/app/views/decidim/searches/index.js.erb +6 -0
- data/app/views/decidim/shared/_address_details.html.erb +2 -2
- data/app/views/decidim/shared/_embed_modal.html.erb +1 -1
- data/app/views/decidim/shared/_share_modal.html.erb +7 -4
- data/app/views/layouts/decidim/_application.html.erb +0 -1
- data/app/views/layouts/decidim/_head.html.erb +13 -12
- data/app/views/layouts/decidim/_logo.html.erb +1 -1
- data/app/views/layouts/decidim/_social_media_links.html.erb +5 -5
- data/app/views/layouts/decidim/_user_menu.html.erb +1 -1
- data/app/views/layouts/decidim/_wrapper.html.erb +2 -2
- data/app/views/layouts/decidim/mailer.html.erb +2 -2
- data/config/locales/ar.yml +27 -17
- data/config/locales/ca.yml +79 -15
- data/config/locales/cs.yml +73 -14
- data/config/locales/de.yml +62 -12
- data/config/locales/en.yml +80 -16
- data/config/locales/eo-UY.yml +16 -0
- data/config/locales/es-MX.yml +73 -11
- data/config/locales/es-PY.yml +73 -11
- data/config/locales/es.yml +79 -15
- data/config/locales/eu.yml +6 -13
- data/config/locales/fi-plain.yml +75 -11
- data/config/locales/fi.yml +80 -16
- data/config/locales/fr.yml +70 -16
- data/config/locales/gl.yml +6 -13
- data/config/locales/hu.yml +80 -17
- data/config/locales/id-ID.yml +6 -12
- data/config/locales/it.yml +56 -14
- data/config/locales/nl.yml +76 -12
- data/config/locales/no.yml +11 -2
- data/config/locales/pl.yml +6 -15
- data/config/locales/pt-BR.yml +6 -13
- data/config/locales/pt.yml +6 -13
- data/config/locales/ru.yml +7 -2
- data/config/locales/sv.yml +34 -18
- data/config/locales/tr-TR.yml +15 -12
- data/config/locales/uk.yml +7 -2
- data/config/routes.rb +7 -0
- data/db/migrate/20180226140756_add_version_to_action_logs.rb +1 -0
- data/db/migrate/20180305132906_rename_features_to_components.rb +1 -0
- data/db/migrate/20190412131728_fix_user_names.rb +1 -1
- data/db/migrate/20190610093742_add_force_users_to_authenticate_before_access_organization.rb +10 -0
- data/db/migrate/20190618075906_add_confidential_to_doorkeeper_application.rb +13 -0
- data/db/migrate/{20190925091507_add_uniq_index_to_decidim_metrics.rb → 20190829092826_add_uniq_index_to_decidim_metrics.rb} +0 -0
- data/lib/decidim/amendable.rb +87 -13
- data/lib/decidim/attributes/localized_date.rb +5 -0
- data/lib/decidim/attributes/time_with_zone.rb +5 -0
- data/lib/decidim/authorable.rb +3 -0
- data/lib/decidim/authorization_form_builder.rb +2 -2
- data/lib/decidim/component_manifest.rb +2 -0
- data/lib/decidim/content_parsers.rb +2 -0
- data/lib/decidim/content_parsers/hashtag_parser.rb +1 -1
- data/lib/decidim/content_parsers/link_parser.rb +10 -0
- data/lib/decidim/content_parsers/newline_parser.rb +20 -0
- data/lib/decidim/content_parsers/user_parser.rb +1 -1
- data/lib/decidim/content_processor.rb +2 -0
- data/lib/decidim/content_renderers.rb +1 -0
- data/lib/decidim/content_renderers/hashtag_renderer.rb +1 -1
- data/lib/decidim/content_renderers/link_renderer.rb +24 -0
- data/lib/decidim/content_renderers/user_renderer.rb +2 -2
- data/lib/decidim/core.rb +11 -0
- data/lib/decidim/core/engine.rb +2 -28
- data/lib/decidim/core/test.rb +4 -1
- data/lib/decidim/core/test/factories.rb +35 -8
- data/lib/decidim/core/test/shared_examples/amendable/create_amendment_draft_examples.rb +50 -0
- data/lib/decidim/core/test/shared_examples/amendable/destroy_amendment_draft_examples.rb +39 -0
- data/lib/decidim/core/test/shared_examples/amendable/promote_amendment_examples.rb +27 -3
- data/lib/decidim/core/test/shared_examples/amendable/{create_amendment_examples.rb → publish_amendment_draft_examples.rb} +26 -17
- data/lib/decidim/core/test/shared_examples/amendable/update_amendment_draft_examples.rb +42 -0
- data/lib/decidim/core/test/shared_examples/amendable/withdraw_amendment_examples.rb +19 -11
- data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +1 -1
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +1 -1
- data/lib/decidim/core/test/shared_examples/simple_event.rb +4 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/data_portability_file_zipper.rb +3 -0
- data/lib/decidim/events/author_event.rb +1 -0
- data/lib/decidim/events/base_event.rb +12 -22
- data/lib/decidim/events/coauthor_event.rb +1 -0
- data/lib/decidim/events/simple_event.rb +3 -0
- data/lib/decidim/exporters/csv.rb +1 -0
- data/lib/decidim/fingerprintable.rb +1 -0
- data/lib/decidim/followable.rb +8 -0
- data/lib/decidim/form_builder.rb +24 -3
- data/lib/decidim/gamification.rb +4 -0
- data/lib/decidim/gamification/badge_status.rb +1 -0
- data/lib/decidim/has_category.rb +2 -0
- data/lib/decidim/has_component.rb +2 -7
- data/lib/decidim/has_private_users.rb +8 -1
- data/lib/decidim/has_settings.rb +12 -8
- data/lib/decidim/hashtaggable.rb +4 -0
- data/lib/decidim/metric_operation_manifest.rb +1 -0
- data/lib/decidim/nicknamizable.rb +1 -0
- data/lib/decidim/participable.rb +1 -0
- data/lib/decidim/participatory_space_resourceable.rb +1 -0
- data/lib/decidim/randomable.rb +20 -0
- data/lib/decidim/search_resource_fields_mapper.rb +2 -0
- data/lib/decidim/searchable.rb +2 -0
- data/lib/decidim/settings_manifest.rb +10 -1
- data/lib/decidim/stats_registry.rb +1 -0
- data/lib/decidim/view_model.rb +1 -1
- data/lib/tasks/decidim_data_portability_tasks.rake +1 -0
- data/lib/tasks/decidim_metrics_tasks.rake +2 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.no.js +12 -12
- metadata +140 -82
- data/app/commands/decidim/amendable/create.rb +0 -80
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
class ImageUploader < ApplicationUploader
|
6
6
|
include CarrierWave::MiniMagick
|
7
7
|
|
8
|
-
process :validate_size, :validate_dimensions
|
8
|
+
process :validate_size, :validate_dimensions, :strip
|
9
9
|
process quality: Decidim.image_uploader_quality
|
10
10
|
|
11
11
|
# CarrierWave automatically calls this method and validates the content
|
@@ -16,6 +16,20 @@ module Decidim
|
|
16
16
|
]
|
17
17
|
end
|
18
18
|
|
19
|
+
# Strips out all embedded information from the image
|
20
|
+
def strip
|
21
|
+
manipulate! do |img|
|
22
|
+
img.strip
|
23
|
+
img
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Add a white list of extensions which are allowed to be uploaded.
|
28
|
+
# For images you might use something like this:
|
29
|
+
def extension_white_list
|
30
|
+
%w(jpg jpeg gif png bmp ico)
|
31
|
+
end
|
32
|
+
|
19
33
|
# A simple check to avoid DoS with maliciously crafted images, or just to
|
20
34
|
# avoid reckless users that upload gigapixels images.
|
21
35
|
#
|
@@ -17,26 +17,31 @@ class EtiquetteValidator < ActiveModel::EachValidator
|
|
17
17
|
|
18
18
|
def validate_caps(record, attribute, value)
|
19
19
|
return if value.scan(/[A-Z]/).length < value.length / 4
|
20
|
+
|
20
21
|
record.errors.add(attribute, options[:message] || :too_much_caps)
|
21
22
|
end
|
22
23
|
|
23
24
|
def validate_marks(record, attribute, value)
|
24
25
|
return if value.scan(/[!?¡¿]{2,}/).empty?
|
26
|
+
|
25
27
|
record.errors.add(attribute, options[:message] || :too_many_marks)
|
26
28
|
end
|
27
29
|
|
28
30
|
def validate_long_words(record, attribute, value)
|
29
31
|
return if value.scan(/[A-z]{35,}/).empty?
|
32
|
+
|
30
33
|
record.errors.add(attribute, options[:message] || :long_words)
|
31
34
|
end
|
32
35
|
|
33
36
|
def validate_caps_first(record, attribute, value)
|
34
37
|
return if value.scan(/\A[a-z]{1}/).empty?
|
38
|
+
|
35
39
|
record.errors.add(attribute, options[:message] || :must_start_with_caps)
|
36
40
|
end
|
37
41
|
|
38
42
|
def validate_length(record, attribute, value)
|
39
43
|
return if value.length > 15
|
44
|
+
|
40
45
|
record.errors.add(attribute, options[:message] || :too_short)
|
41
46
|
end
|
42
47
|
end
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= f.text_area :delete_reason, rows: 2, label: false %>
|
12
12
|
</label>
|
13
13
|
</div>
|
14
|
-
<input type="submit" class="button open-modal-button" value="<%= t(".confirm.title") %>"
|
14
|
+
<input type="submit" class="button open-modal-button" value="<%= t(".confirm.title") %>">
|
15
15
|
<% end %>
|
16
16
|
<div class="tiny reveal" id="deleteConfirm" data-reveal>
|
17
17
|
<%= decidim_form_for(@form, url: account_path, method: :delete, html: { class: "user-form delete-account-modal" }) do |f| %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
<p><%= t(".confirm.question") %></p>
|
21
21
|
|
22
|
-
<input type="submit" class="button expanded" value="<%= t(".confirm.ok") %>"
|
22
|
+
<input type="submit" class="button expanded" value="<%= t(".confirm.ok") %>">
|
23
23
|
|
24
24
|
<button class="close-button" data-close aria-label="<%= t(".confirm.close") %>" type="button">
|
25
25
|
<span aria-hidden="true">×</span>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<%= decidim_form_for(@account, url: account_path, method: :put, html: { autocomplete: "nope" }) do |f| %>
|
3
|
-
<input autocomplete="off" name="hidden" type="password" style="display:none;"
|
3
|
+
<input autocomplete="off" name="hidden" type="password" style="display:none;">
|
4
4
|
<div class="columns large-4">
|
5
5
|
<%= f.upload :avatar %>
|
6
6
|
</div>
|
@@ -1,20 +1,23 @@
|
|
1
1
|
<%= form.fields_for :emendation_params, form.object.emendation_params do |emendation_form| %>
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<% amendable.attributes.each do |key, value| %>
|
3
|
+
<% key = key.to_sym %>
|
4
|
+
<% if amendable.amendable_fields.include?(key) %>
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
<% if [:title, :body].include?(key) %>
|
7
|
+
<div class="field hashtags__container">
|
8
|
+
<%= emendation_form.form_field_for key,
|
9
|
+
class: "js-hashtags",
|
10
|
+
hashtaggable: true,
|
11
|
+
label: amendments_form_fields_label(key),
|
12
|
+
value: amendments_form_fields_value(original, key) %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
12
15
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% end %>
|
16
|
+
<% if form.object.errors[key].present? %>
|
17
|
+
<% form.object.errors.full_messages_for(key).each do |message| %>
|
18
|
+
<small class="form-error is-visible"><%= message %></small>
|
17
19
|
<% end %>
|
20
|
+
<% end %>
|
18
21
|
|
19
22
|
<% end %>
|
20
23
|
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<main class="column">
|
2
|
+
<article class="card card--proposal">
|
3
|
+
<div class="card__content">
|
4
|
+
<div class="card__header">
|
5
|
+
<%= link_to Decidim::ResourceLocatorPresenter.new(emendation).path, target: "_blank" do %>
|
6
|
+
<h5 class="card__title"><%= decidim_html_escape(present(emendation).title).html_safe %></h5>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= cell("decidim/coauthorships", emendation, has_actions: false, context: { current_user: current_user }) %>
|
10
|
+
|
11
|
+
<div class="tech-info tech-info--text-left">
|
12
|
+
<%= t("decidim.proposals.proposals.proposal.creation_date", date: l(emendation.created_at, format: :decidim_short)) %>
|
13
|
+
</div>
|
14
|
+
<%= resource_reference(emendation, class: "tech-info--text-left") %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%== cell("decidim/proposals/proposal_m", emendation).badge %>
|
18
|
+
|
19
|
+
<p><%= truncate(present(emendation).body(strip_tags: true), length: 100) %></p>
|
20
|
+
|
21
|
+
<%= cell "decidim/tags", emendation, context: { extra_classes: ["tags--proposal"] } %>
|
22
|
+
</div>
|
23
|
+
</article>
|
24
|
+
</main>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<main class="wrapper">
|
2
|
+
<div class="row">
|
3
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_aside ) %>
|
4
|
+
|
5
|
+
<div class="columns large-6">
|
6
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_header, similar_resources_count: similar_emendations.size ) %>
|
7
|
+
|
8
|
+
<div class="row small-up-1 card-grid">
|
9
|
+
<% similar_emendations.each do |emendation| %>
|
10
|
+
<%= render partial: "similar_emendation", locals: { emendation: emendation } %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="row column text-center">
|
15
|
+
<%= link_to t(".continue"), edit_draft_amend_path(amendment), class: "button small" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="columns large-3"></div>
|
20
|
+
</div>
|
21
|
+
</main>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<main class="wrapper">
|
2
|
+
<div class="row">
|
3
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_aside ) %>
|
4
|
+
|
5
|
+
<div class="columns large-6">
|
6
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_header ) %>
|
7
|
+
|
8
|
+
<div class="card">
|
9
|
+
<div class="card__content">
|
10
|
+
<%= decidim_form_for(@form, url: update_draft_amend_path(amendment), method: :patch) do |form| %>
|
11
|
+
<%= render partial: "edit_form_fields", locals: { form: form, original: :emendation } %>
|
12
|
+
|
13
|
+
<% if current_organization.user_groups_enabled? && current_user.user_groups.verified.any? %>
|
14
|
+
<div class="field">
|
15
|
+
<%= user_group_select_field form, :user_group_id %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<div class="row column flex-center">
|
20
|
+
<%= link_to t(".discard"), destroy_draft_amend_path(amendment), method: :delete, data: { confirm: t(".discard_confirmation") } %>
|
21
|
+
|
22
|
+
<%= form.submit t(".send"), class: "button button--nomargin small", data: { disable: true } %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="columns large-3"></div>
|
30
|
+
</div>
|
31
|
+
</main>
|
@@ -1,23 +1,10 @@
|
|
1
1
|
<main class="wrapper">
|
2
2
|
<div class="row">
|
3
|
-
|
4
|
-
|
5
|
-
<%= link_to :back do %>
|
6
|
-
<%= icon "chevron-left", class: "icon--small" %>
|
7
|
-
<%= t(".back") %>
|
8
|
-
<% end %>
|
9
|
-
</div>
|
10
|
-
<div class="section">
|
11
|
-
<p>
|
12
|
-
<%= t(".help_text", model_name: amendable.model_name.human.downcase ) %>
|
13
|
-
<strong>
|
14
|
-
<%= decidim_html_escape(amendable.title).html_safe %>
|
15
|
-
</strong>
|
16
|
-
</p>
|
17
|
-
</div>
|
18
|
-
</div>
|
3
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_aside ) %>
|
4
|
+
|
19
5
|
<div class="columns large-6">
|
20
|
-
|
6
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_header ) %>
|
7
|
+
|
21
8
|
<div class="card">
|
22
9
|
<div class="card__content">
|
23
10
|
<%= decidim_form_for(@form, url: amends_path, method: :post) do |form| %>
|
@@ -38,6 +25,7 @@
|
|
38
25
|
</div>
|
39
26
|
</div>
|
40
27
|
</div>
|
28
|
+
|
41
29
|
<div class="columns large-3"></div>
|
42
30
|
</div>
|
43
31
|
</main>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<main class="wrapper">
|
2
|
+
<div class="row">
|
3
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_aside) %>
|
4
|
+
|
5
|
+
<div class="columns large-6">
|
6
|
+
<%= cell("decidim/amendable/wizard_step_form", amendable, view: :wizard_header) %>
|
7
|
+
|
8
|
+
<div class="card">
|
9
|
+
<div class="p-l">
|
10
|
+
<div class="row column view-header">
|
11
|
+
<h2 class="heading2"><%= present(emendation).title(links: true, html_escape: true) %></h2>
|
12
|
+
<%= cell("decidim/coauthorships", emendation) %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="row column">
|
16
|
+
<%= simple_format present(emendation).body(links: true, strip_tags: true) %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<br><%= render partial: "attachments", locals: { attached_to: emendation } %>
|
20
|
+
|
21
|
+
<div class="row column flex-center">
|
22
|
+
<%= link_to t(".modify"), edit_draft_amend_path(amendment) %>
|
23
|
+
|
24
|
+
<%= button_to t(".publish"), publish_draft_amend_path(amendment), method: :post, class: "button button--nomargin small" %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="columns large-3"></div>
|
31
|
+
</div>
|
32
|
+
</main>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<main class="wrapper">
|
2
2
|
<div class="row">
|
3
|
-
<div class="columns
|
3
|
+
<div class="columns">
|
4
4
|
<div class="m-bottom">
|
5
5
|
<%= link_to :back do %>
|
6
6
|
<%= icon "chevron-left", class: "icon--small" %>
|
@@ -16,7 +16,10 @@
|
|
16
16
|
</p>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
|
-
<div class="columns
|
19
|
+
<div class="columns mediumlarge-6">
|
20
|
+
<%= cell("decidim/diff", emendation.versions.last) %>
|
21
|
+
</div>
|
22
|
+
<div class="columns mediumlarge-6">
|
20
23
|
<h2 class="section-heading">
|
21
24
|
<%= t(".heading") %>
|
22
25
|
</h2>
|
@@ -34,6 +37,5 @@
|
|
34
37
|
</div>
|
35
38
|
</div>
|
36
39
|
</div>
|
37
|
-
<div class="columns large-3"></div>
|
38
40
|
</div>
|
39
41
|
</main>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
<div class="card--list__data">
|
15
|
-
<%= link_to document.url, target: "_blank", class: "card--list__data__icon" do %>
|
15
|
+
<%= link_to document.url, target: "_blank", rel: "noopener", class: "card--list__data__icon" do %>
|
16
16
|
<%= icon "cloud-download" %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% photos.in_groups_of(3, false).each do |group| %>
|
6
6
|
<% group.each_with_index do |photo, index| %>
|
7
7
|
<div class="columns small-6 medium-4 <%= (index == 2 || photo == group.last ? "end" : "") %>">
|
8
|
-
<%= link_to photo.big_url, target: "_blank" do %>
|
8
|
+
<%= link_to photo.big_url, target: "_blank", rel: "noopener" do %>
|
9
9
|
<%= image_tag photo.thumbnail_url, class:"thumbnail", alt: strip_tags(translated_attribute(photo.title)) %>
|
10
10
|
<% end %>
|
11
11
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="row data-portability">
|
2
2
|
<strong><%= t(".download_data") %></strong>
|
3
3
|
<p><%= t(".download_data_description", user_email: current_user.email).html_safe %></p>
|
4
|
-
<%= button_to t(".request_data"), export_data_portability_path, class: "button
|
4
|
+
<%= button_to t(".request_data"), export_data_portability_path, class: "button", data: { disable: true } %>
|
5
5
|
</div>
|
@@ -23,11 +23,11 @@
|
|
23
23
|
|
24
24
|
<% if f.object.class.require_password_on_accepting %>
|
25
25
|
<div class="field">
|
26
|
-
<%= f.password_field :password, required: "required" %></p>
|
26
|
+
<%= f.password_field :password, required: "required", minlength: ::Devise.password_length.min, maxlength: ::Devise.password_length.max %></p>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<div class="field">
|
30
|
-
<%= f.password_field :password_confirmation, required: "required" %></p>
|
30
|
+
<%= f.password_field :password_confirmation, required: "required", minlength: ::Devise.password_length.min, maxlength: ::Devise.password_length.max %></p>
|
31
31
|
</div>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="row collapse">
|
5
5
|
<div class="row collapse">
|
6
6
|
<div class="columns large-8 large-centered text-center page-title">
|
7
|
-
<h1
|
7
|
+
<h1><%= t("devise.sessions.new.sign_in") %></h1>
|
8
8
|
<% if current_organization.sign_up_enabled? %>
|
9
9
|
<p>
|
10
10
|
<%= t(".are_you_new?") %>
|
@@ -6,14 +6,14 @@
|
|
6
6
|
<div class="card__content">
|
7
7
|
<div class="row">
|
8
8
|
<div class="columns medium-2 text-center">
|
9
|
-
<img src="<%= oauth_application.organization_logo.url %>" alt="<%= oauth_application.organization_name %>" width="75" height="75"
|
9
|
+
<img src="<%= oauth_application.organization_logo.url %>" alt="<%= oauth_application.organization_name %>" width="75" height="75">
|
10
10
|
</div>
|
11
11
|
<div class="columns medium-10">
|
12
12
|
<h3 class="heading3"><%= t(".wants_to_use_your_account_html", application_name: oauth_application.name) %>
|
13
|
-
<br
|
13
|
+
<br>
|
14
14
|
<%= t(".by_organization_link_html", link: link_to(oauth_application.organization_name, oauth_application.organization_url)) %>
|
15
15
|
</h3>
|
16
|
-
<br
|
16
|
+
<br>
|
17
17
|
<p class="lead"><%= t(".connect_your_account_html", organization: current_organization.name) %></p>
|
18
18
|
<div>
|
19
19
|
<p><strong><%= t(".this_application_will_be_able_to") %></strong></p>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<%= t(".click_button", date: l(Decidim.data_portability_expiry_time.from_now, format: :decidim_short) ).html_safe %><br
|
1
|
+
<%= t(".click_button", date: l(Decidim.data_portability_expiry_time.from_now, format: :decidim_short) ).html_safe %><br>
|
2
2
|
<%= link_to t(".download"), download_file_data_portability_url(host: @organization.host, token: @token), class: "button expanded hollow button--sc" %>
|
@@ -5,3 +5,9 @@ var $count = $('#search-count');
|
|
5
5
|
$results.html('<%= j(cell("decidim/search_results", @sections, params: params).show).strip.html_safe %>');
|
6
6
|
$filters.html('<%= j(render partial: "filters").strip.html_safe %>');
|
7
7
|
$count.html('<%= j(render partial: "count").strip.html_safe %>');
|
8
|
+
|
9
|
+
if (window.Decidim.DataPicker) {
|
10
|
+
window.theDataPicker = new window.Decidim.DataPicker($(".data-picker"));
|
11
|
+
}
|
12
|
+
|
13
|
+
$(document).foundation();
|