decidim-core 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/app/assets/images/decidim/decidim-logo.svg +23 -23
- data/app/assets/images/decidim/default-avatar.svg +7 -7
- data/app/assets/images/decidim/icons.svg +1 -0
- data/app/assets/javascripts/decidim.js.es6 +5 -2
- data/app/assets/javascripts/decidim/append_redirect_url_to_modals.js.es6 +84 -0
- data/app/assets/javascripts/decidim/data_picker.js.es6 +177 -0
- data/app/assets/javascripts/decidim/form_filter.component.js.es6 +25 -20
- data/app/assets/javascripts/decidim/form_filter.component.test.js +24 -13
- data/app/assets/javascripts/decidim/history.js.es6 +3 -3
- data/app/assets/stylesheets/decidim/_decidim.scss +1 -4
- data/app/assets/stylesheets/decidim/_variables.scss +4 -4
- data/app/assets/stylesheets/decidim/editor.scss +13 -0
- data/app/assets/stylesheets/decidim/email.css +9 -1
- data/app/assets/stylesheets/decidim/extras/_add_comments.scss +3 -3
- data/app/assets/stylesheets/decidim/extras/_announcement.scss +1 -1
- data/app/assets/stylesheets/decidim/extras/_collection-sort-controls.scss +2 -2
- data/app/assets/stylesheets/decidim/extras/_embed.scss +6 -5
- data/app/assets/stylesheets/decidim/extras/_impersonation-bar.scss +4 -0
- data/app/assets/stylesheets/decidim/extras/_label-required.scss +1 -1
- data/app/assets/stylesheets/decidim/extras/_leaflet.scss +6 -4
- data/app/assets/stylesheets/decidim/extras/_meeting-registrations.scss +4 -4
- data/app/assets/stylesheets/decidim/extras/_process_stats.scss +11 -4
- data/app/assets/stylesheets/decidim/extras/_proposal_form.scss +3 -3
- data/app/assets/stylesheets/decidim/extras/_quill.scss +1 -1
- data/app/assets/stylesheets/decidim/extras/_reference.scss +3 -3
- data/app/assets/stylesheets/decidim/extras/_register_form.scss +3 -3
- data/app/assets/stylesheets/decidim/extras/_results-per-page.scss +10 -10
- data/app/assets/stylesheets/decidim/extras/_social_icons_mini.scss +4 -3
- data/app/assets/stylesheets/decidim/layouts/_highlighted_banner.scss +38 -0
- data/app/assets/stylesheets/decidim/layouts/_home.scss +33 -3
- data/app/assets/stylesheets/decidim/layouts/_user.scss +33 -5
- data/app/assets/stylesheets/decidim/layouts/_view.scss +1 -2
- data/app/assets/stylesheets/decidim/map.css +5 -3
- data/app/assets/stylesheets/decidim/modules/_address.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +24 -9
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +24 -10
- data/app/assets/stylesheets/decidim/modules/_callout.scss +5 -1
- data/app/assets/stylesheets/decidim/modules/_card-grid.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_cards.scss +102 -31
- data/app/assets/stylesheets/decidim/modules/_comments.scss +21 -20
- data/app/assets/stylesheets/decidim/modules/_cookie-bar.scss +4 -0
- data/app/assets/stylesheets/decidim/modules/_data-picker.scss +159 -0
- data/app/assets/stylesheets/decidim/modules/_datepicker.scss +36 -36
- data/app/assets/stylesheets/decidim/modules/_definition-data.scss +12 -9
- data/app/assets/stylesheets/decidim/modules/_extra.scss +4 -1
- data/app/assets/stylesheets/decidim/modules/_filter-tags.scss +3 -0
- data/app/assets/stylesheets/decidim/modules/_filters.scss +9 -5
- data/app/assets/stylesheets/decidim/modules/_flag.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_footer.scss +10 -0
- data/app/assets/stylesheets/decidim/modules/_forms.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_help.scss +2 -0
- data/app/assets/stylesheets/decidim/modules/_icons.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_layout.scss +4 -0
- data/app/assets/stylesheets/decidim/modules/_list-docs.scss +3 -0
- data/app/assets/stylesheets/decidim/modules/_main-container.scss +13 -7
- data/app/assets/stylesheets/decidim/modules/_map.scss +13 -1
- data/app/assets/stylesheets/decidim/modules/_margins.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_messages.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_modules.scss +3 -0
- data/app/assets/stylesheets/decidim/modules/_navbar.scss +36 -16
- data/app/assets/stylesheets/decidim/modules/_omnipresent_banner.scss +26 -0
- data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +5 -0
- data/app/assets/stylesheets/decidim/modules/_order-by.scss +10 -10
- data/app/assets/stylesheets/decidim/modules/_pagination.scss +3 -2
- data/app/assets/stylesheets/decidim/modules/_process-header.scss +11 -2
- data/app/assets/stylesheets/decidim/modules/_process-info.scss +9 -1
- data/app/assets/stylesheets/decidim/modules/_process-nav.scss +20 -3
- data/app/assets/stylesheets/decidim/modules/_process-phase.scss +12 -3
- data/app/assets/stylesheets/decidim/modules/_progress-bar.scss +69 -0
- data/app/assets/stylesheets/decidim/modules/_reference.scss +1 -2
- data/app/assets/stylesheets/decidim/modules/_reveal.scss +1 -1
- data/app/assets/stylesheets/decidim/modules/_share.scss +2 -0
- data/app/assets/stylesheets/decidim/modules/_signup.scss +5 -1
- data/app/assets/stylesheets/decidim/modules/_static-pages.scss +6 -0
- data/app/assets/stylesheets/decidim/modules/_status-labels.scss +2 -0
- data/app/assets/stylesheets/decidim/modules/_tags.scss +3 -1
- data/app/assets/stylesheets/decidim/modules/_timeline.scss +41 -30
- data/app/assets/stylesheets/decidim/modules/_title-action.scss +2 -1
- data/app/assets/stylesheets/decidim/modules/_typography.scss +13 -4
- data/app/assets/stylesheets/decidim/modules/_user-form.scss +1 -0
- data/app/assets/stylesheets/decidim/modules/_video.scss +2 -2
- data/app/assets/stylesheets/decidim/utils/_fontface.scss +22 -20
- data/app/assets/stylesheets/decidim/utils/_helpers.scss +6 -6
- data/app/assets/stylesheets/decidim/utils/_keyframes.scss +6 -6
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +24 -7
- data/app/assets/stylesheets/decidim/utils/_settings.scss +50 -52
- data/app/assets/stylesheets/decidim/utils/_toggle-expand.scss +1 -0
- data/app/commands/decidim/create_omniauth_registration.rb +3 -0
- data/app/commands/decidim/create_registration.rb +3 -1
- data/app/commands/decidim/destroy_account.rb +1 -0
- data/app/commands/decidim/invite_user_again.rb +1 -1
- data/app/commands/decidim/messaging/reply_to_conversation.rb +1 -3
- data/app/commands/decidim/unsubscribe_settings.rb +29 -0
- data/app/commands/decidim/update_account.rb +16 -3
- data/app/controllers/concerns/decidim/action_authorization.rb +1 -1
- data/app/controllers/concerns/decidim/devise_controllers.rb +10 -0
- data/app/controllers/concerns/decidim/form_factory.rb +2 -1
- data/app/controllers/concerns/decidim/impersonate_users.rb +13 -8
- data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -1
- data/app/controllers/decidim/application_controller.rb +16 -0
- data/app/controllers/decidim/cookie_policy_controller.rb +2 -0
- data/app/controllers/decidim/devise/invitations_controller.rb +9 -1
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +10 -1
- data/app/controllers/decidim/devise/sessions_controller.rb +9 -1
- data/app/controllers/decidim/locales_controller.rb +2 -3
- data/app/controllers/decidim/messaging/conversations_controller.rb +2 -2
- data/app/controllers/decidim/newsletters_controller.rb +60 -0
- data/app/controllers/decidim/pages_controller.rb +1 -0
- data/app/controllers/decidim/profiles_controller.rb +23 -0
- data/app/controllers/decidim/scopes_controller.rb +19 -20
- data/app/events/decidim/profile_updated_event.rb +27 -0
- data/app/forms/decidim/account_form.rb +34 -0
- data/app/forms/decidim/form.rb +1 -0
- data/app/forms/decidim/messaging/conversation_form.rb +5 -2
- data/app/forms/decidim/omniauth_registration_form.rb +5 -0
- data/app/forms/decidim/registration_form.rb +8 -1
- data/app/helpers/decidim/action_authorization_helper.rb +2 -2
- data/app/helpers/decidim/application_helper.rb +8 -0
- data/app/helpers/decidim/feature_path_helper.rb +12 -2
- data/app/helpers/decidim/feature_reference_helper.rb +1 -1
- data/app/helpers/decidim/messaging/conversation_helper.rb +27 -9
- data/app/helpers/decidim/newsletters_helper.rb +49 -0
- data/app/helpers/decidim/scopes_helper.rb +43 -2
- data/app/helpers/decidim/translations_helper.rb +6 -2
- data/app/mailers/decidim/decidim_devise_mailer.rb +1 -3
- data/app/mailers/decidim/messaging/conversation_mailer.rb +1 -1
- data/app/mailers/decidim/newsletter_mailer.rb +7 -8
- data/app/models/decidim/abilities/everyone_ability.rb +1 -0
- data/app/models/decidim/authorization.rb +19 -5
- data/app/models/decidim/impersonation_log.rb +2 -1
- data/app/models/decidim/messaging/conversation.rb +2 -0
- data/app/models/decidim/messaging/message.rb +4 -0
- data/app/models/decidim/organization.rb +1 -0
- data/app/models/decidim/scope.rb +10 -2
- data/app/models/decidim/user.rb +10 -2
- data/app/presenters/decidim/home_stats_presenter.rb +10 -4
- data/app/presenters/decidim/user_group_presenter.rb +28 -0
- data/app/presenters/decidim/user_presenter.rb +42 -0
- data/app/services/decidim/action_authorizer.rb +32 -68
- data/app/services/decidim/notification_generator_for_recipient.rb +8 -3
- data/app/uploaders/decidim/avatar_uploader.rb +2 -2
- data/app/views/decidim/account/delete.html.erb +1 -1
- data/app/views/decidim/account/show.html.erb +4 -1
- data/app/views/decidim/devise/invitations/edit.html.erb +2 -0
- data/app/views/decidim/devise/omniauth_registrations/new.html.erb +7 -1
- data/app/views/decidim/devise/registrations/new.html.erb +7 -1
- data/app/views/decidim/messaging/conversations/_message.html.erb +6 -12
- data/app/views/decidim/messaging/conversations/_reply.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/index.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/update.js.erb +1 -0
- data/app/views/decidim/newsletter_mailer/newsletter.html.erb +11 -0
- data/app/views/decidim/newsletters/show.html.erb +11 -0
- data/app/views/decidim/newsletters/unsubscribe.html.erb +4 -0
- data/app/views/decidim/notifications/_notification.html.erb +1 -1
- data/app/views/decidim/profiles/show.html.erb +64 -0
- data/app/views/decidim/scopes/_scopes_picker_input.html.erb +6 -0
- data/app/views/decidim/scopes/picker.html.erb +36 -0
- data/app/views/decidim/shared/_action_authorization_modal.html.erb +25 -51
- data/app/views/decidim/shared/_author.html.erb +21 -0
- data/app/views/decidim/shared/_author_reference.html.erb +12 -0
- data/app/views/layouts/decidim/_application.html.erb +1 -0
- data/app/views/layouts/decidim/_impersonation_warning.html.erb +1 -1
- data/app/views/layouts/decidim/_mailer_logo.html.erb +6 -1
- data/app/views/layouts/decidim/_omnipresent_banner.html.erb +14 -0
- data/app/views/layouts/decidim/_user_menu.html.erb +3 -0
- data/app/views/layouts/decidim/mailer.html.erb +16 -4
- data/app/views/layouts/decidim/widget.html.erb +14 -9
- data/app/views/pages/home.html.erb +2 -0
- data/app/views/pages/home/_highlighted_content_banner.html.erb +26 -0
- data/config/initializers/devise.rb +1 -3
- data/config/locales/ca.yml +67 -9
- data/config/locales/en.yml +65 -4
- data/config/locales/es.yml +74 -14
- data/config/locales/eu.yml +66 -4
- data/config/locales/fi.yml +87 -25
- data/config/locales/fr.yml +71 -9
- data/config/locales/gl.yml +493 -0
- data/config/locales/it.yml +79 -17
- data/config/locales/nl.yml +71 -9
- data/config/locales/pl.yml +66 -4
- data/config/locales/pt-BR.yml +493 -0
- data/config/locales/pt.yml +99 -37
- data/config/locales/ru.yml +85 -13
- data/config/locales/sv.yml +493 -0
- data/config/locales/uk.yml +78 -16
- data/config/routes.rb +11 -1
- data/db/migrate/20171212103803_create_unique_nicknames.rb +29 -0
- data/db/migrate/20180115090038_extend_user_profile.rb +8 -0
- data/db/migrate/20180123125308_add_enable_omnipresent_banner_to_decidim_organizations.rb +7 -0
- data/db/migrate/20180123125409_add_omnipresent_banner_title_to_decidim_organizations.rb +7 -0
- data/db/migrate/20180123125432_add_omnipresent_banner_short_description_to_decidim_organizations.rb +7 -0
- data/db/migrate/20180123125452_add_omnipresent_banner_url_to_decidim_organizations.rb +7 -0
- data/db/migrate/20180125063433_add_highlighted_content_banner_to_decidim_organizations.rb +13 -0
- data/db/seeds.rb +8 -2
- data/lib/decidim/abilities/participatory_process_role_ability.rb +1 -3
- data/lib/decidim/content_parsers.rb +8 -0
- data/lib/decidim/content_parsers/base_parser.rb +58 -0
- data/lib/decidim/content_parsers/user_parser.rb +46 -0
- data/lib/decidim/content_processor.rb +84 -0
- data/lib/decidim/content_renderers.rb +8 -0
- data/lib/decidim/content_renderers/base_renderer.rb +37 -0
- data/lib/decidim/content_renderers/user_renderer.rb +32 -0
- data/lib/decidim/core.rb +66 -1
- data/lib/decidim/core/api/author_interface.rb +3 -3
- data/lib/decidim/core/api/user_group_type.rb +10 -8
- data/lib/decidim/core/api/user_type.rb +13 -7
- data/lib/decidim/core/engine.rb +7 -5
- data/lib/decidim/core/test.rb +1 -1
- data/lib/decidim/core/test/factories.rb +21 -45
- data/lib/decidim/core/test/shared_examples/announcements_examples.rb +3 -2
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +5 -2
- data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +40 -3
- data/lib/decidim/core/test/shared_examples/simple_event.rb +73 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/events.rb +2 -0
- data/lib/decidim/events/author_event.rb +41 -0
- data/lib/decidim/events/base_event.rb +28 -3
- data/lib/decidim/events/email_event.rb +1 -1
- data/lib/decidim/events/notification_event.rb +1 -1
- data/lib/decidim/events/simple_event.rb +79 -0
- data/lib/decidim/filter_form_builder.rb +2 -3
- data/lib/decidim/form_builder.rb +39 -27
- data/lib/decidim/friendly_dates.rb +26 -0
- data/lib/decidim/has_feature.rb +1 -0
- data/lib/decidim/has_reference.rb +1 -1
- data/lib/decidim/i18n_exceptions.rb +1 -3
- data/lib/decidim/menu.rb +1 -1
- data/lib/decidim/newsletter_encryptor.rb +22 -0
- data/lib/decidim/nicknamizable.rb +56 -0
- data/lib/decidim/participable.rb +8 -0
- data/lib/decidim/participatory_space_manifest.rb +10 -1
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.gl.js +13 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.pt-br.js +14 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.pt.js +5 -1
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ru.js +4 -1
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.sv.js +14 -0
- data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.uk.js +4 -1
- data/vendor/assets/javascripts/form_datepicker.js.es6 +4 -2
- data/vendor/assets/javascripts/foundation-datepicker.js +42 -26
- metadata +124 -84
- data/app/assets/javascripts/decidim/select2.field.js.es6 +0 -47
- data/app/assets/javascripts/decidim/select2.js.es6 +0 -11
- data/app/assets/stylesheets/decidim/editor.sass +0 -4
- data/app/assets/stylesheets/decidim/plugins/_select2.scss +0 -63
- data/app/helpers/decidim/datetime_helper.rb +0 -23
- data/app/queries/decidim/freetext_scopes.rb +0 -39
- data/lib/decidim/core/test/shared_examples/manage_moderations_examples.rb +0 -64
@@ -29,8 +29,15 @@ module Decidim
|
|
29
29
|
return unless event_class
|
30
30
|
return unless resource
|
31
31
|
return unless recipient
|
32
|
+
return unless notification.event_class_instance.notifiable?
|
32
33
|
|
33
|
-
|
34
|
+
notification.save!
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def notification
|
40
|
+
@notification ||= Notification.new(
|
34
41
|
user: recipient,
|
35
42
|
event_class: event_class,
|
36
43
|
resource: resource,
|
@@ -39,8 +46,6 @@ module Decidim
|
|
39
46
|
)
|
40
47
|
end
|
41
48
|
|
42
|
-
private
|
43
|
-
|
44
49
|
attr_reader :event, :event_class, :resource, :recipient_id, :extra
|
45
50
|
|
46
51
|
def recipient
|
@@ -8,11 +8,11 @@ module Decidim
|
|
8
8
|
process :validate_dimensions
|
9
9
|
|
10
10
|
version :big do
|
11
|
-
process
|
11
|
+
process resize_to_fit: [80, 80]
|
12
12
|
end
|
13
13
|
|
14
14
|
version :thumb do
|
15
|
-
process
|
15
|
+
process resize_to_fit: [40, 40]
|
16
16
|
end
|
17
17
|
|
18
18
|
def default_url(*)
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div>
|
9
9
|
<label>
|
10
10
|
<span class="user-form__label"><%= t('activemodel.attributes.account.delete_reason') %></span>
|
11
|
-
<%= f.text_area :delete_reason, rows: 2 %>
|
11
|
+
<%= f.text_area :delete_reason, rows: 2, label: false %>
|
12
12
|
</label>
|
13
13
|
</div>
|
14
14
|
<input type="submit" class="button open-modal-button" value="<%= t('.confirm.title') %>" />
|
@@ -1,12 +1,15 @@
|
|
1
1
|
<div class="row">
|
2
|
-
<%= decidim_form_for(@account, url: account_path, method: :put, class: "user-form") do |f| %>
|
2
|
+
<%= decidim_form_for(@account, url: account_path, method: :put, class: "user-form", autocomplete: "nope") do |f| %>
|
3
3
|
<div class="columns large-4">
|
4
4
|
<%= f.upload :avatar %>
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="columns large-8 end">
|
8
8
|
<%= f.text_field :name %>
|
9
|
+
<%= f.text_field :nickname %>
|
9
10
|
<%= f.email_field :email %>
|
11
|
+
<%= f.url_field :personal_url %>
|
12
|
+
<%= f.text_area :about, rows: 5 %>
|
10
13
|
|
11
14
|
<% if @account.errors[:password].any? || @account.errors[:password_confirmation].any? %>
|
12
15
|
<%= render partial: "password_fields", locals: { form: f } %>
|
@@ -13,6 +13,8 @@
|
|
13
13
|
<%= decidim_form_for resource, as: resource_name, url: invitation_path(resource_name, invite_redirect: params[:invite_redirect]), html: { method: :put, class: "register-form new_user" } do |f| %>
|
14
14
|
<%= f.hidden_field :invitation_token %>
|
15
15
|
|
16
|
+
<%= f.text_field :nickname, help_text: t("devise.invitations.edit.nickname_help") %>
|
17
|
+
|
16
18
|
<% if f.object.class.require_password_on_accepting %>
|
17
19
|
<%= f.password_field :password %></p>
|
18
20
|
|
@@ -16,7 +16,13 @@
|
|
16
16
|
<%= decidim_form_for(@form, as: resource_name, url: omniauth_registrations_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
|
17
17
|
<div class="user-person">
|
18
18
|
<div class="field">
|
19
|
-
<%= f.text_field :name, help_text: t(".username_help")
|
19
|
+
<%= f.text_field :name, help_text: t(".username_help") %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="user-person">
|
24
|
+
<div class="field">
|
25
|
+
<%= f.text_field :nickname, help_text: t(".nickname_help") %>
|
20
26
|
</div>
|
21
27
|
</div>
|
22
28
|
|
@@ -33,6 +33,12 @@
|
|
33
33
|
</div>
|
34
34
|
</div>
|
35
35
|
|
36
|
+
<div class="user-person">
|
37
|
+
<div class="field">
|
38
|
+
<%= f.text_field :nickname, help_text: t(".nickname_help") %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
36
42
|
<div class="field">
|
37
43
|
<%= f.email_field :email %>
|
38
44
|
</div>
|
@@ -65,7 +71,7 @@
|
|
65
71
|
|
66
72
|
<fieldset>
|
67
73
|
<div class="field">
|
68
|
-
<%= f.check_box :
|
74
|
+
<%= f.check_box :newsletter, label: t(".newsletter"), checked: true %>
|
69
75
|
</div>
|
70
76
|
|
71
77
|
<div class="field">
|
@@ -1,17 +1,11 @@
|
|
1
1
|
<article class="message">
|
2
2
|
<div class="message__header">
|
3
|
-
<div class="author-data">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= message.sender.name %>
|
10
|
-
</span>
|
11
|
-
<time datetime="<%= message.created_at.utc %>">
|
12
|
-
<%= simple_date(message.created_at) %>
|
13
|
-
</time>
|
14
|
-
</div>
|
3
|
+
<div class="card__author author-data author-data--small">
|
4
|
+
<%= render "decidim/shared/author_reference", author: present(message.sender) %>
|
5
|
+
|
6
|
+
<time datetime="<%= message.created_at.utc %>">
|
7
|
+
<%= message.friendly_created_at %>
|
8
|
+
</time>
|
15
9
|
</div>
|
16
10
|
</div>
|
17
11
|
<div class="message__content">
|
@@ -6,6 +6,6 @@
|
|
6
6
|
<%= form_for form, url: decidim.conversation_path(conversation.id), method: :put, remote: true do |f| %>
|
7
7
|
<%= f.text_area :body, label: false, rows: 4, required: true %>
|
8
8
|
|
9
|
-
<%= f.submit t(".send") %>
|
9
|
+
<%= f.submit t(".send"), data: { disable: true } %>
|
10
10
|
<% end %>
|
11
11
|
</div>
|
@@ -3,3 +3,14 @@
|
|
3
3
|
<% content_for :note do %>
|
4
4
|
<%== t ".note", organization_name: h(@organization.name), link: decidim.notifications_settings_url(host: @organization.host) %>
|
5
5
|
<% end %>
|
6
|
+
|
7
|
+
<% content_for :unsubscribe do %>
|
8
|
+
<%== t ".unsubscribe", link: decidim.unsubscribe_newsletters_url(host: @organization.host, u: @encrypted_token ) %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% content_for :see_on_website do %>
|
12
|
+
<center style="display: none">
|
13
|
+
<%== CGI.unescapeHTML truncate(@body, max_length: 50) %>
|
14
|
+
</center>
|
15
|
+
<%== t ".see_on_website", link: decidim.newsletter_url(host: @organization.host, id: @newsletter) %>
|
16
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= decidim_sanitize @body %>
|
2
|
+
|
3
|
+
<% content_for :note do %>
|
4
|
+
<%== t "note", scope: "decidim.newsletter_mailer.newsletter", organization_name: h(@organization.name), link: decidim.notifications_settings_url(host: @organization.host) %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% if @user.present? %>
|
8
|
+
<% content_for :unsubscribe do %>
|
9
|
+
<%== t "unsubscribe", scope: "decidim.newsletter_mailer.newsletter", link: decidim.unsubscribe_newsletters_url(host: @organization.host, u: @encrypted_token) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="card--list__item">
|
2
2
|
<div class="card--list__text">
|
3
3
|
<%= link_to notification.event_class_instance.resource_path do %>
|
4
|
-
<%= resource_icon notification.resource, class: "icon--
|
4
|
+
<%= resource_icon notification.resource, class: "icon--chat card--list__icon" %>
|
5
5
|
<% end %>
|
6
6
|
<div>
|
7
7
|
<h5 class="card--list__heading">
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<% add_decidim_page_title(user.nickname) %>
|
2
|
+
|
3
|
+
<main class="wrapper">
|
4
|
+
<% present(user) do |profile_user| %>
|
5
|
+
<div class="user-header row collapse">
|
6
|
+
<div class="columns">
|
7
|
+
<div class="user-header__main">
|
8
|
+
<div class="user-header__avatar">
|
9
|
+
<%= image_tag profile_user.avatar_url(:big) %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<h1 class="heading1 user-header__heading">
|
13
|
+
<strong><%= profile_user.name %></strong>
|
14
|
+
<div class="user-nickname">
|
15
|
+
<%= profile_user.nickname %>
|
16
|
+
<% if !current_user || (current_user && current_user != user) %>
|
17
|
+
<span class="user-contact_link">
|
18
|
+
<%= link_to_current_or_new_conversation_with(user) %>
|
19
|
+
</span>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<% if current_user && current_user != user %>
|
24
|
+
<%= render partial: "decidim/shared/follow_button", locals: { followable: user } %>
|
25
|
+
<% end %>
|
26
|
+
</h1>
|
27
|
+
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<% if profile_user.about.present? %>
|
33
|
+
<div class="row">
|
34
|
+
<strong><%= t(".about_me") %></strong>
|
35
|
+
<p><%= profile_user.about %></p>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<% if profile_user.personal_url.present? %>
|
40
|
+
<div class="row">
|
41
|
+
<strong><%= t(".personal_url") %></strong>
|
42
|
+
<p><%= link_to profile_user.personal_url, profile_user.personal_url %></p>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<% if profile_user.officialized? %>
|
47
|
+
<div class="row">
|
48
|
+
<div class="mediumlarge-6 large-6">
|
49
|
+
<div class="card">
|
50
|
+
<div class="badge-card__content">
|
51
|
+
<span>
|
52
|
+
<%= icon "verified-badge" %>
|
53
|
+
</span>
|
54
|
+
|
55
|
+
<span>
|
56
|
+
<%= translated_attribute(profile_user.officialized_as).presence || t("decidim.profiles.default_officialization_text") %>
|
57
|
+
</span>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
<% end %>
|
64
|
+
</main>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<div id="<%=picker_options[:id]%>" class="data-picker <%=picker_options[:class]%>" data-picker-name="<%=picker_options[:name]%>">
|
2
|
+
<div class="picker-values"><% scopes.each do |scope, params| %>
|
3
|
+
<div><a href="<%=params[:url]%>" data-picker-value="<%=scope.id%>"><%=params[:text]%></a></div>
|
4
|
+
<% end %></div>
|
5
|
+
<div class="picker-prompt"><a href="<%=prompt_params[:url]%>"><%=prompt_params[:text]%></a></div>
|
6
|
+
</div>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<div class="scope-picker picker-header">
|
2
|
+
<h2 id="data_picker-title"><%= title %></h2>
|
3
|
+
<ul>
|
4
|
+
<% unless root %>
|
5
|
+
<li><a href="<%= scopes_picker_path(**context)%>"><%= t("decidim.scopes.global") %></a></li>
|
6
|
+
<% end %>
|
7
|
+
<% parent_scopes.each do |scope| %>
|
8
|
+
<li><a href="<%= scopes_picker_path(current: scope.id, **context)%>"><%= translated_attribute(scope.name) %></a></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="scope-picker picker-content">
|
14
|
+
<div class="picker-scrollable-content">
|
15
|
+
<% if scopes.any? %>
|
16
|
+
<ul>
|
17
|
+
<% scopes.each do |scope| %>
|
18
|
+
<li><a href="<%= scopes_picker_path(current: scope.id, **context)%>"><%= translated_attribute(scope.name) %></a></li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="scope-picker picker-footer">
|
26
|
+
<div class="buttons button--double">
|
27
|
+
<% if current || !required %>
|
28
|
+
<a class="button" href="<%= scopes_picker_path(current: current&.id, **context) %>" data-picker-value="<%= current&.id || global_value %>" data-picker-text="<%= scope_name_for_picker(current, t("decidim.scopes.global")) %>" data-picker-choose>
|
29
|
+
<% else %>
|
30
|
+
<a class="button muted">
|
31
|
+
<% end %>
|
32
|
+
<%= t("decidim.scopes.picker.choose") %>
|
33
|
+
</a>
|
34
|
+
<a class="button clear" data-close aria-label="<%= t("decidim.scopes.picker.cancel") %>"><%= t("decidim.scopes.picker.cancel") %></a>
|
35
|
+
</div>
|
36
|
+
</div>
|
@@ -6,59 +6,33 @@
|
|
6
6
|
type="button">
|
7
7
|
<span aria-hidden="true">×</span>
|
8
8
|
</button>
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
<% status.data[:
|
26
|
-
|
27
|
-
<%
|
28
|
-
|
29
|
-
<div class="row">
|
30
|
-
<div class="columns medium-8 medium-offset-2">
|
31
|
-
<%= link_to t('.incomplete.reauthorize'), authorize_action_path(action), class: "button expanded" %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
<div class="text-center">
|
35
|
-
<button class="link" data-close><%=t ".incomplete.cancel" %></button>
|
36
|
-
</div>
|
37
|
-
<% elsif status.code == :missing %>
|
38
|
-
<div class="reveal__header missing-authorization">
|
39
|
-
<h3 class="reveal__title"><%= t('.missing.title') %></h3>
|
40
|
-
</div>
|
41
|
-
<p><%= t ".missing.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
42
|
-
<div class="row">
|
43
|
-
<div class="columns medium-8 medium-offset-2">
|
44
|
-
<%= link_to t('.missing.authorize', authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers")), authorize_action_path(action), class: "button expanded" %>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<% elsif status.code == :invalid %>
|
48
|
-
<div class="reveal__header invalid-authorization">
|
49
|
-
<h3 class="reveal__title"><%= t('.unauthorized.title') %></h3>
|
50
|
-
</div>
|
51
|
-
<p><%= t ".unauthorized.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
52
|
-
<ul>
|
53
|
-
<% status.data[:fields].each do |field, value| %>
|
54
|
-
<li><strong><%= t(".unauthorized.invalid", field: t("#{status.handler_name}.fields.#{field}", scope: "decidim.authorization_handlers")) %></strong></li>
|
9
|
+
<div class="reveal__header <%= status.code %>-authorization">
|
10
|
+
<h3 class="reveal__title"><%= t ".#{status.code}.title" %></h3>
|
11
|
+
</div>
|
12
|
+
<p><%= t ".#{status.code}.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
13
|
+
<% if status.data[:extra_explanation] %>
|
14
|
+
<p><%= t status.data[:extra_explanation][:key], **status.data[:extra_explanation][:params] %></p>
|
15
|
+
<% end %>
|
16
|
+
<% if status.data[:fields] %>
|
17
|
+
<ul>
|
18
|
+
<% status.data[:fields].each do |field, value| %>
|
19
|
+
<li><strong><%= t ".#{status.code}.invalid_field", field: t("#{status.handler_name}.fields.#{field}", scope: "decidim.authorization_handlers"), value: value ? "(#{value})" : "" %></strong></li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
<% end %>
|
23
|
+
<div class="row">
|
24
|
+
<div class="columns medium-8 medium-offset-2">
|
25
|
+
<% if status.data[:action].present? %>
|
26
|
+
<%= link_to t(".#{status.code}.#{status.data[:action]}", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers")), authorize_action_path(action), class: "button expanded" %>
|
27
|
+
<% else %>
|
28
|
+
<button class="button expanded" data-close><%= t ".#{status.code}.ok" %></button>
|
55
29
|
<% end %>
|
56
|
-
</ul>
|
57
|
-
<div class="row">
|
58
|
-
<div class="columns medium-8 medium-offset-2">
|
59
|
-
<button class="button expanded" data-close><%=t ".unauthorized.ok" %></button>
|
60
|
-
</div>
|
61
30
|
</div>
|
31
|
+
</div>
|
32
|
+
<% if status.data[:cancel] %>
|
33
|
+
<div class="text-center">
|
34
|
+
<button class="link" data-close><%= t ".#{status.code}.cancel" %></button>
|
35
|
+
</div>
|
62
36
|
<% end %>
|
63
37
|
</div>
|
64
38
|
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<span class="author__avatar author__avatar--small">
|
2
|
+
<%= image_tag author.avatar_url %>
|
3
|
+
</span>
|
4
|
+
|
5
|
+
<% if author.deleted? %>
|
6
|
+
<span class="label label--small label--basic">
|
7
|
+
<%= t('.deleted') %>
|
8
|
+
</span>
|
9
|
+
<% else %>
|
10
|
+
<span class="author__name"><%= author.name %></span>
|
11
|
+
|
12
|
+
<% if author.badge.present? %>
|
13
|
+
<span class="author__badge">
|
14
|
+
<%= icon author.badge %>
|
15
|
+
</span>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% if author.nickname.present? %>
|
19
|
+
<span class="author__nickname"><%= author.nickname %></span>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="author-data__main">
|
2
|
+
<div class="author author--inline">
|
3
|
+
<% if author.profile_path.present? %>
|
4
|
+
<%= link_to author.profile_path do %>
|
5
|
+
<%= render "decidim/shared/author", author: author %>
|
6
|
+
<% end %>
|
7
|
+
<% else %>
|
8
|
+
<%= render "decidim/shared/author", author: author %>
|
9
|
+
<% end %>
|
10
|
+
</a>
|
11
|
+
</div>
|
12
|
+
</div>
|