decidim-core 0.0.3 → 0.0.5
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_core_manifest.js +1 -0
- data/app/assets/images/decidim/process.svg +10 -0
- data/app/assets/javascripts/decidim.js.es6 +2 -0
- data/app/assets/javascripts/decidim/editor.js.es6 +2 -2
- data/app/assets/javascripts/decidim/filters.js.es6 +1 -1
- data/app/assets/javascripts/decidim/form_filter.component.js.es6 +26 -5
- data/app/assets/javascripts/decidim/form_filter.component.test.js +1 -18
- data/app/assets/javascripts/decidim/foundation.js.es6 +1 -0
- data/app/assets/javascripts/decidim/history.js.es6 +35 -0
- data/app/assets/javascripts/decidim/orders.js.es6 +28 -0
- data/app/assets/stylesheets/decidim/_decidim.scss +1 -0
- data/app/assets/stylesheets/decidim/email.css +21 -3
- data/app/assets/stylesheets/decidim/extras/_leaflet.scss +4 -2
- data/app/assets/stylesheets/decidim/extras/_quill.scss +8 -0
- data/app/assets/stylesheets/decidim/extras/_register_form.scss +9 -0
- data/app/assets/stylesheets/decidim/modules/_buttons.scss +19 -3
- data/app/assets/stylesheets/decidim/utils/_mixins.scss +8 -4
- data/app/commands/decidim/authorize_user.rb +9 -4
- data/app/commands/decidim/create_omniauth_registration.rb +4 -2
- data/app/commands/decidim/create_registration.rb +4 -1
- data/app/commands/decidim/invite_user.rb +3 -1
- data/app/commands/decidim/update_notifications_settings.rb +31 -0
- data/app/constraints/decidim/current_feature.rb +16 -15
- data/app/controllers/concerns/decidim/action_authorization.rb +73 -0
- data/app/controllers/concerns/decidim/feature_settings.rb +2 -5
- data/app/controllers/concerns/decidim/needs_authorization.rb +5 -1
- data/app/controllers/concerns/decidim/user_profile.rb +1 -0
- data/app/controllers/decidim/application_controller.rb +12 -0
- data/app/controllers/decidim/authorizations_controller.rb +10 -12
- data/app/controllers/decidim/cookie_policy_controller.rb +15 -0
- data/app/controllers/decidim/devise/confirmations_controller.rb +4 -0
- data/app/controllers/decidim/devise/invitations_controller.rb +4 -0
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +10 -3
- data/app/controllers/decidim/devise/passwords_controller.rb +4 -0
- data/app/controllers/decidim/devise/registrations_controller.rb +21 -0
- data/app/controllers/decidim/devise/sessions_controller.rb +4 -0
- data/app/controllers/decidim/notifications_settings_controller.rb +31 -0
- data/app/controllers/decidim/pages_controller.rb +17 -6
- data/app/controllers/decidim/participatory_processes_controller.rb +5 -5
- data/app/forms/decidim/notifications_settings_form.rb +17 -0
- data/app/forms/decidim/registration_form.rb +2 -1
- data/app/helpers/decidim/action_authorization_helper.rb +82 -0
- data/app/helpers/decidim/application_helper.rb +2 -0
- data/app/helpers/decidim/authorization_form_helper.rb +1 -1
- data/app/helpers/decidim/cookies_helper.rb +11 -0
- data/app/helpers/decidim/decidim_form_helper.rb +18 -0
- data/app/helpers/decidim/language_chooser_helper.rb +18 -0
- data/app/helpers/decidim/layout_helper.rb +0 -5
- data/app/helpers/decidim/localized_locales_helper.rb +1 -1
- data/app/helpers/decidim/meta_tags_helper.rb +104 -0
- data/app/helpers/decidim/orders_helper.rb +28 -0
- data/app/helpers/decidim/resource_helper.rb +46 -6
- data/app/mailers/decidim/application_mailer.rb +2 -2
- data/app/mailers/decidim/decidim_devise_mailer.rb +0 -1
- data/app/mailers/decidim/newsletter_mailer.rb +24 -0
- data/app/models/decidim/abilities/everyone.rb +2 -0
- data/app/models/decidim/feature.rb +30 -0
- data/app/models/decidim/newsletter.rb +24 -0
- data/app/models/decidim/organization.rb +2 -0
- data/app/models/decidim/user.rb +3 -2
- data/app/queries/decidim/highlighted_participatory_processes.rb +10 -0
- data/app/queries/decidim/promoted_participatory_processes.rb +9 -0
- data/app/queries/decidim/public_participatory_processes.rb +10 -0
- data/app/services/decidim/action_authorizer.rb +102 -0
- data/app/services/decidim/resource_search.rb +1 -1
- data/app/uploaders/decidim/official_image_footer_uploader.rb +12 -0
- data/app/uploaders/decidim/official_image_header_uploader.rb +12 -0
- data/app/validators/etiquette_validator.rb +42 -0
- data/app/views/decidim/account/show.html.erb +1 -1
- data/app/views/decidim/authorizations/index.html.erb +4 -4
- data/app/views/decidim/authorizations/new.html.erb +2 -2
- data/app/views/decidim/cookie_policy/accept.js.erb +3 -0
- data/app/views/decidim/devise/confirmations/new.html.erb +3 -1
- data/app/views/decidim/devise/invitations/edit.html.erb +1 -1
- data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
- data/app/views/decidim/devise/passwords/edit.html.erb +1 -1
- data/app/views/decidim/devise/passwords/new.html.erb +3 -1
- data/app/views/decidim/devise/registrations/edit.html.erb +2 -1
- data/app/views/decidim/devise/registrations/new.html.erb +13 -1
- data/app/views/decidim/devise/sessions/new.html.erb +3 -1
- data/app/views/decidim/newsletter_mailer/newsletter.html.erb +5 -0
- data/app/views/decidim/notifications_settings/show.html.erb +26 -0
- data/app/views/decidim/pages/index.html.erb +34 -0
- data/app/views/decidim/participatory_process_steps/index.html.erb +1 -1
- data/app/views/decidim/participatory_processes/_participatory_process.html.erb +4 -2
- data/app/views/decidim/participatory_processes/_promoted_process.html.erb +1 -1
- data/app/views/decidim/participatory_processes/index.html.erb +3 -3
- data/app/views/decidim/participatory_processes/show.html.erb +30 -9
- data/app/views/decidim/shared/_action_authorization_modal.html.erb +55 -0
- data/app/views/decidim/shared/_login_modal.html.erb +2 -3
- data/app/views/decidim/shared/_orders.html.erb +15 -0
- data/app/views/decidim/shared/_share_modal.html.erb +33 -0
- data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
- data/app/views/layouts/decidim/_application.html.erb +12 -0
- data/app/views/layouts/decidim/_cookie_warning.html.erb +8 -0
- data/app/views/layouts/decidim/_footer.html.erb +6 -0
- data/app/views/layouts/decidim/_header.html.erb +7 -9
- data/app/views/layouts/decidim/_language_chooser.html.erb +3 -3
- data/app/views/layouts/decidim/_logo.html.erb +1 -1
- data/app/views/layouts/decidim/_mailer_logo.html.erb +31 -0
- data/app/views/layouts/decidim/_main_nav.html.erb +11 -0
- data/app/views/layouts/decidim/_process_header.html.erb +9 -7
- data/app/views/layouts/decidim/_social_media_links.html.erb +39 -0
- data/app/views/layouts/decidim/_social_meta.html.erb +8 -8
- data/app/views/layouts/decidim/mailer.html.erb +110 -62
- data/app/views/layouts/decidim/participatory_process.html.erb +14 -3
- data/app/views/layouts/decidim/user_profile.html.erb +1 -0
- data/app/views/pages/decidim_page.html.erb +5 -0
- data/app/views/pages/home.html.erb +4 -0
- data/app/views/pages/home/_extended.html.erb +2 -2
- data/app/views/pages/home/_footer_sub_hero.html.erb +12 -0
- data/app/views/pages/home/_hero.html.erb +2 -2
- data/app/views/pages/home/_highlighted_processes.html.erb +2 -2
- data/config/i18n-tasks.yml +6 -2
- data/config/initializers/invisible_captcha.rb +10 -0
- data/config/initializers/mail_previews.rb +4 -0
- data/config/locales/ca.yml +129 -23
- data/config/locales/en.yml +98 -13
- data/config/locales/es.yml +128 -22
- data/config/locales/eu.yml +5 -0
- data/config/routes.rb +13 -5
- data/db/migrate/20170131134349_add_action_permissions_to_decidim_features.rb +5 -0
- data/db/migrate/20170202084913_add_comments_and_replies_notifications_to_users.rb +6 -0
- data/db/migrate/20170203150545_add_newsletter_notifications_to_users.rb +5 -0
- data/db/migrate/20170206083118_rename_extra_info_on_processes.rb +12 -0
- data/db/migrate/20170206142116_add_published_at_to_decidim_features.rb +6 -0
- data/db/migrate/20170207091021_add_social_media_handlers_to_organization.rb +8 -0
- data/db/migrate/20170207093048_add_organization_logo_and_url.rb +7 -0
- data/db/migrate/20170213081133_create_decidim_newsletters.rb +15 -0
- data/db/seeds.rb +29 -4
- data/lib/decidim/attributes.rb +6 -0
- data/lib/decidim/attributes/time_with_zone.rb +13 -0
- data/lib/decidim/authorable.rb +2 -2
- data/lib/decidim/core.rb +11 -0
- data/lib/decidim/core/api.rb +11 -0
- data/lib/decidim/core/api/author_interface.rb +11 -0
- data/lib/decidim/core/api/localized_string_type.rb +11 -0
- data/{app/types/decidim → lib/decidim/core/api}/process_step_type.rb +2 -2
- data/{app/types/decidim → lib/decidim/core/api}/process_type.rb +1 -1
- data/{app/types/decidim → lib/decidim/core/api}/session_type.rb +0 -0
- data/lib/decidim/core/api/translated_field_type.rb +42 -0
- data/{app/types/decidim → lib/decidim/core/api}/user_group_type.rb +1 -1
- data/{app/types/decidim → lib/decidim/core/api}/user_type.rb +1 -1
- data/lib/decidim/core/engine.rb +7 -1
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/test/factories.rb +41 -8
- data/lib/decidim/core/test/shared_examples/localised_email.rb +24 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/feature_manifest.rb +11 -0
- data/{app/validators → lib/decidim}/feature_validator.rb +1 -3
- data/lib/decidim/features/base_controller.rb +6 -1
- data/lib/decidim/form_builder.rb +166 -1
- data/lib/decidim/has_feature.rb +2 -1
- data/lib/decidim/resourceable.rb +26 -0
- data/vendor/assets/javascripts/morphdom.js +679 -0
- metadata +174 -49
- data/lib/decidim/has_attachment.rb +0 -32
@@ -13,7 +13,7 @@
|
|
13
13
|
<div class="columns large-6 medium-10 medium-centered">
|
14
14
|
<div class="card">
|
15
15
|
<div class="card__content">
|
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
19
|
<%= f.text_field :name, help_text: t(".username_help"), label: t(".username_help") %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="columns medium-7 large-5 medium-centered">
|
11
11
|
<div class="card">
|
12
12
|
<div class="card__content">
|
13
|
-
<%=
|
13
|
+
<%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "register-form new_user" }) do |f| %>
|
14
14
|
<%= f.hidden_field :reset_password_token %>
|
15
15
|
|
16
16
|
<div class="field">
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(t("devise.passwords.new.forgot_your_password")) %>
|
2
|
+
|
1
3
|
<main class="wrapper">
|
2
4
|
<div class="row collapse">
|
3
5
|
<div class="row collapse">
|
@@ -10,7 +12,7 @@
|
|
10
12
|
<div class="columns medium-7 large-5 medium-centered">
|
11
13
|
<div class="card">
|
12
14
|
<div class="card__content">
|
13
|
-
<%=
|
15
|
+
<%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: "register-form new_user" }) do |f| %>
|
14
16
|
<div class="field">
|
15
17
|
<%= f.email_field :email, autofocus: true %>
|
16
18
|
</div>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<h2><%= t("devise.registrations.edit.title", resource: resource_class.model_name.human) %></h2>
|
2
2
|
|
3
|
-
<%=
|
3
|
+
<%= decidim_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
4
4
|
<%= devise_error_messages! %>
|
5
|
+
<%= invisible_captcha %>
|
5
6
|
|
6
7
|
<div class="field">
|
7
8
|
<%= f.email_field :email %>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(t(".sign_up")) %>
|
2
|
+
|
1
3
|
<main class="wrapper">
|
2
4
|
<div class="row collapse">
|
3
5
|
<div class="row collapse">
|
@@ -17,7 +19,9 @@
|
|
17
19
|
<div class="columns large-6 medium-10 medium-centered">
|
18
20
|
<div class="card">
|
19
21
|
<div class="card__content">
|
20
|
-
<%=
|
22
|
+
<%= decidim_form_for(@form, as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
|
23
|
+
<%= invisible_captcha %>
|
24
|
+
|
21
25
|
<fieldset class="text-center">
|
22
26
|
<legend class="text-center heading5"><%= t(".sign_up_as.legend") %></legend>
|
23
27
|
<%= f.collection_radio_buttons :sign_up_as, [["user", t(".sign_up_as.user")], ["user_group", t(".sign_up_as.user_group") ]], :first, :last %>
|
@@ -55,7 +59,15 @@
|
|
55
59
|
</div>
|
56
60
|
</div>
|
57
61
|
|
62
|
+
<p class="lopd-text">
|
63
|
+
<%= strip_tags(translated_attribute(terms_and_conditions_page.content)) %>
|
64
|
+
</p>
|
65
|
+
|
58
66
|
<fieldset>
|
67
|
+
<div class="field">
|
68
|
+
<%= f.check_box :newsletter_notifications, label: t(".newsletter_notifications") %>
|
69
|
+
</div>
|
70
|
+
|
59
71
|
<div class="field">
|
60
72
|
<%= f.check_box :tos_agreement, label: t(".tos_agreement", link: link_to(t(".terms"), page_path("terms-and-conditions"))) %>
|
61
73
|
</div>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(t("devise.sessions.new.sign_in")) %>
|
2
|
+
|
1
3
|
<main class="wrapper">
|
2
4
|
<div class="row collapse">
|
3
5
|
<div class="row collapse">
|
@@ -13,7 +15,7 @@
|
|
13
15
|
<div class="columns large-6 medium-centered">
|
14
16
|
<div class="card">
|
15
17
|
<div class="card__content">
|
16
|
-
<%=
|
18
|
+
<%= decidim_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
|
17
19
|
<div>
|
18
20
|
<div class="field">
|
19
21
|
<%= f.email_field :email, autofocus: true %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<%= form_for(@notifications_settings, url: notifications_settings_path, method: :put, class: "user-form") do |f| %>
|
3
|
+
<div class="switch tiny switch-with-label comments_notifications">
|
4
|
+
<label>
|
5
|
+
<%= f.check_box :comments_notifications, label: false, class: "switch-input" %>
|
6
|
+
<span class="switch-paddle"></span>
|
7
|
+
<span class="switch-label"><%= t('.comments_notifications') %></span>
|
8
|
+
</label>
|
9
|
+
</div>
|
10
|
+
<div class="switch tiny switch-with-label replies_notifications">
|
11
|
+
<label>
|
12
|
+
<%= f.check_box :replies_notifications, label: false, class: "switch-input" %>
|
13
|
+
<span class="switch-paddle"></span>
|
14
|
+
<span class="switch-label"><%= t('.replies_notifications') %></span>
|
15
|
+
</label>
|
16
|
+
</div>
|
17
|
+
<div class="switch tiny switch-with-label newsletter_notifications">
|
18
|
+
<label>
|
19
|
+
<%= f.check_box :newsletter_notifications, label: false, class: "switch-input" %>
|
20
|
+
<span class="switch-paddle"></span>
|
21
|
+
<span class="switch-label"><%= t('.newsletter_notifications') %></span>
|
22
|
+
</label>
|
23
|
+
</div>
|
24
|
+
<%= f.submit t(".update_notifications_settings"), disable_with: true %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% add_decidim_page_title(t(".title")) %>
|
2
|
+
|
3
|
+
<main class="wrapper">
|
4
|
+
<div class="row column">
|
5
|
+
<h1 class="heading1 page-title"><%= t ".title" %></h1>
|
6
|
+
</div>
|
7
|
+
<div class="row">
|
8
|
+
<div class="columns large-8">
|
9
|
+
<div class="card card--list">
|
10
|
+
<% @pages.each do |page| %>
|
11
|
+
<div class="card--list__item">
|
12
|
+
<div class="card--list__text">
|
13
|
+
<div>
|
14
|
+
<%= link_to page_path(page), class: "card__link" do %>
|
15
|
+
<h6 class="card--list__heading heading6">
|
16
|
+
<%= translated_attribute page.title %>
|
17
|
+
</h6>
|
18
|
+
<span class="text-small">
|
19
|
+
<%= truncate strip_tags(translated_attribute(page.content)), length: 100 %>
|
20
|
+
</span>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="card--list__data">
|
25
|
+
<%= link_to page_path(page), class: "card--list__data__icon" do %>
|
26
|
+
<%= icon "chevron-right" %>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</main>
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<div class="column">
|
2
2
|
<article class="card card--process">
|
3
|
-
|
4
|
-
|
3
|
+
<%= link_to participatory_process_path(participatory_process), class: "card__link" do %>
|
4
|
+
<div class="card__image-top"
|
5
|
+
style="background-image:url(<%= participatory_process.hero_image.url %>)"></div>
|
6
|
+
<% end %>
|
5
7
|
<div class="card__content">
|
6
8
|
<%= link_to participatory_process_path(participatory_process), class: "card__link" do %>
|
7
9
|
<h4 class="card__title"><%= translated_attribute participatory_process.title %></h4>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</div>
|
14
14
|
<div class="columns mediumlarge-8 large-6 card--process__column">
|
15
15
|
<div class="card--full__image"
|
16
|
-
style="background-image:url(<%= promoted_process.hero_image.url %>">
|
16
|
+
style="background-image:url(<%= promoted_process.hero_image.url %>)">
|
17
17
|
<div class="card__content row collapse">
|
18
18
|
<div class="large-6 large-offset-6 columns">
|
19
19
|
<%= link_to participatory_process_path(promoted_process), class: "button expanded button--sc" do %>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<%
|
1
|
+
<% provide :meta_title, t(".title") %>
|
2
2
|
|
3
3
|
<main class="wrapper">
|
4
|
-
<% if
|
4
|
+
<% if promoted_participatory_processes.any? %>
|
5
5
|
<section id ="highlighted-processes" class="row section">
|
6
6
|
<h1 class="section-heading"><%= t(".promoted_processes", scope: "layouts") %></h1>
|
7
|
-
<%= render partial: "promoted_process", collection:
|
7
|
+
<%= render partial: "promoted_process", collection: promoted_participatory_processes, as: :promoted_process %>
|
8
8
|
</section>
|
9
9
|
<% end %>
|
10
10
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
<%
|
3
|
-
<%
|
1
|
+
<% provide :meta_description, translated_attribute(current_participatory_process.short_description) %>
|
2
|
+
<% provide :meta_title, translated_attribute(current_participatory_process.title) %>
|
3
|
+
<% provide :meta_url, participatory_process_url(current_participatory_process) %>
|
4
4
|
|
5
5
|
<div class="row column">
|
6
6
|
<div class="row">
|
@@ -28,17 +28,38 @@
|
|
28
28
|
</div>
|
29
29
|
<% end %>
|
30
30
|
|
31
|
-
<% if current_participatory_process.developer_group.present? %>
|
31
|
+
<% if translated_attribute(current_participatory_process.developer_group).present? %>
|
32
32
|
<div class="definition-data__item developer-group">
|
33
33
|
<span class="definition-data__title"><%= t(".developer_group") =%></span>
|
34
|
-
<%== current_participatory_process.developer_group %>
|
34
|
+
<%== translated_attribute(current_participatory_process.developer_group) %>
|
35
35
|
</div>
|
36
36
|
<% end %>
|
37
37
|
|
38
|
-
<% if translated_attribute(current_participatory_process.
|
39
|
-
<div class="definition-data__item
|
40
|
-
<span class="definition-data__title"><%= t(".
|
41
|
-
<%== translated_attribute(current_participatory_process.
|
38
|
+
<% if translated_attribute(current_participatory_process.local_area).present? %>
|
39
|
+
<div class="definition-data__item local_area">
|
40
|
+
<span class="definition-data__title"><%= t(".local_area") =%></span>
|
41
|
+
<%== translated_attribute(current_participatory_process.local_area) %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<% if translated_attribute(current_participatory_process.target).present? %>
|
46
|
+
<div class="definition-data__item target">
|
47
|
+
<span class="definition-data__title"><%= t(".target") =%></span>
|
48
|
+
<%== translated_attribute(current_participatory_process.target) %>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% if translated_attribute(current_participatory_process.participatory_scope).present? %>
|
53
|
+
<div class="definition-data__item participatory_scope">
|
54
|
+
<span class="definition-data__title"><%= t(".participatory_scope") =%></span>
|
55
|
+
<%== translated_attribute(current_participatory_process.participatory_scope) %>
|
56
|
+
</div>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<% if translated_attribute(current_participatory_process.participatory_structure).present? %>
|
60
|
+
<div class="definition-data__item participatory_structure">
|
61
|
+
<span class="definition-data__title"><%= t(".participatory_structure") =%></span>
|
62
|
+
<%== translated_attribute(current_participatory_process.participatory_structure) %>
|
42
63
|
</div>
|
43
64
|
<% end %>
|
44
65
|
</div>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<% if current_user %>
|
2
|
+
<% status = action_authorization(action) %>
|
3
|
+
<% if !status.ok? %>
|
4
|
+
<div class="reveal" id="<%= action.underscore%>AuthorizationModal" data-reveal>
|
5
|
+
<button class="close-button" data-close aria-label="Close modal"
|
6
|
+
type="button">
|
7
|
+
<span aria-hidden="true">×</span>
|
8
|
+
</button>
|
9
|
+
<% if status.code == :incomplete %>
|
10
|
+
<div class="reveal__header incomplete-authorization">
|
11
|
+
<h3 class="reveal__title"><%= t('.incomplete.title') %></h3>
|
12
|
+
</div>
|
13
|
+
<p><%= t ".incomplete.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
14
|
+
<ul>
|
15
|
+
<% status.data[:fields].each do |field| %>
|
16
|
+
<li><strong><%= t("#{status.handler_name}.fields.#{field}", scope: "decidim.authorization_handlers") %></strong></li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<div class="row">
|
20
|
+
<div class="columns medium-8 medium-offset-2">
|
21
|
+
<%= link_to t('.incomplete.reauthorize'), authorize_action_path(action), class: "button expanded" %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="text-center">
|
25
|
+
<button class="link" data-close><%=t ".incomplete.cancel" %></button>
|
26
|
+
</div>
|
27
|
+
<% elsif status.code == :missing %>
|
28
|
+
<div class="reveal__header missing-authorization">
|
29
|
+
<h3 class="reveal__title"><%= t('.missing.title') %></h3>
|
30
|
+
</div>
|
31
|
+
<p><%= t ".missing.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
32
|
+
<div class="row">
|
33
|
+
<div class="columns medium-8 medium-offset-2">
|
34
|
+
<%= link_to t('.missing.authorize', authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers")), authorize_action_path(action), class: "button expanded" %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<% elsif status.code == :invalid %>
|
38
|
+
<div class="reveal__header invalid-authorization">
|
39
|
+
<h3 class="reveal__title"><%= t('.unauthorized.title') %></h3>
|
40
|
+
</div>
|
41
|
+
<p><%= t ".unauthorized.explanation", authorization: t("#{status.handler_name}.name", scope: "decidim.authorization_handlers") %></p>
|
42
|
+
<ul>
|
43
|
+
<% status.data[:fields].each do |field, value| %>
|
44
|
+
<li><strong><%= t(".unauthorized.invalid", field: t("#{status.handler_name}.fields.#{field}", scope: "decidim.authorization_handlers")) %></strong></li>
|
45
|
+
<% end %>
|
46
|
+
</ul>
|
47
|
+
<div class="row">
|
48
|
+
<div class="columns medium-8 medium-offset-2">
|
49
|
+
<button class="button expanded" data-close><%=t ".unauthorized.ok" %></button>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
55
|
+
<% end %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
<div class="row">
|
10
10
|
<div class="columns medium-8 medium-centered">
|
11
|
-
<%=
|
11
|
+
<%= decidim_form_for(Decidim::User.new, as: :user, url: session_path(:user), html: { class: "register-form new_user" }) do |f| %>
|
12
12
|
<div>
|
13
13
|
<div class="field">
|
14
14
|
<%= f.email_field :email, autofocus: true %>
|
@@ -21,10 +21,9 @@
|
|
21
21
|
<%= f.submit t("devise.sessions.new.sign_in"), class: "button expanded" %>
|
22
22
|
</div>
|
23
23
|
<% end %>
|
24
|
-
|
25
24
|
<p class="text-center">
|
26
25
|
<%= link_to t('.sign_up'), decidim.new_user_registration_path, class: "sign-up-link" %>
|
27
26
|
</p>
|
28
27
|
</div>
|
29
28
|
</div>
|
30
|
-
</div>
|
29
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="row collapse order-by">
|
2
|
+
<div class="order-by__dropdown">
|
3
|
+
<span class="order-by__text"><%= t("#{i18n_scope}.label") %></span>
|
4
|
+
<ul class="dropdown menu" data-dropdown-menu data-close-on-click-inside="false">
|
5
|
+
<li>
|
6
|
+
<%= order_link order, i18n_scope: i18n_scope %>
|
7
|
+
<ul class="menu">
|
8
|
+
<% orders.each do |order_name| %>
|
9
|
+
<li><%= order_link order_name, i18n_scope: i18n_scope %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</li>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div class="text-center">
|
2
|
+
<button class="share-link link text-center" data-open="processShare">
|
3
|
+
<%= t(".share") %>
|
4
|
+
<%= icon "share", class: "icon--after"%>
|
5
|
+
</button>
|
6
|
+
</div>
|
7
|
+
<div class="reveal" id="processShare" data-reveal>
|
8
|
+
<div class="reveal__header">
|
9
|
+
<h3 class="reveal__title"><%= t(".share") %>:</h3>
|
10
|
+
<button class="close-button" data-close aria-label="<%= t(".close_window") %>" type="button">
|
11
|
+
<span aria-hidden="true">×</span>
|
12
|
+
</button>
|
13
|
+
</div>
|
14
|
+
<div class="button-group text-center">
|
15
|
+
<%= social_share_button_tag(content_for(:meta_title),
|
16
|
+
url: content_for(:meta_url),
|
17
|
+
image: content_for(:meta_image_url),
|
18
|
+
desc: content_for(:meta_description),
|
19
|
+
via: content_for(:twitter_handler)) %>
|
20
|
+
<a class="button secondary" data-open="urlShare">
|
21
|
+
<%= icon "link-intact" %>
|
22
|
+
</a>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="reveal" id="urlShare" data-reveal>
|
26
|
+
<div class="reveal__header">
|
27
|
+
<h3 class="reveal__title"><%= t(".share_link") %>:</h3>
|
28
|
+
<button class="close-button" data-close aria-label="<%= t(".close_window") %>" type="button">
|
29
|
+
<span aria-hidden="true">×</span>
|
30
|
+
</button>
|
31
|
+
</div>
|
32
|
+
<h4 class="heading4"><%= "#{content_for(:meta_url)}" %></h4>
|
33
|
+
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %></p>
|
2
2
|
|
3
|
-
<p><%= t("devise.mailer.invitation_instructions.someone_invited_you", application: @resource.organization.name) %></p>
|
3
|
+
<p><%= t("devise.mailer.invitation_instructions.someone_invited_you", application: @resource.organization.name) %></p>
|
4
4
|
<p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %></p>
|
5
5
|
|
6
6
|
<% if @resource.invitation_due_at %>
|
@@ -1,7 +1,16 @@
|
|
1
|
+
<% add_decidim_meta_tags({
|
2
|
+
description: strip_tags(translated_attribute(current_organization.description)),
|
3
|
+
title: current_organization.name,
|
4
|
+
url: request.original_url,
|
5
|
+
twitter_handler: current_organization.twitter_handler,
|
6
|
+
image_url: current_organization.homepage_image.url
|
7
|
+
}) %>
|
8
|
+
|
1
9
|
<!DOCTYPE html>
|
2
10
|
<html class="no-js">
|
3
11
|
<head>
|
4
12
|
<title><%= decidim_page_title %></title>
|
13
|
+
|
5
14
|
<%= csrf_meta_tags %>
|
6
15
|
|
7
16
|
<%= render partial: 'layouts/decidim/meta' %>
|
@@ -13,8 +22,11 @@
|
|
13
22
|
</head>
|
14
23
|
|
15
24
|
<body>
|
25
|
+
<%= render partial: 'layouts/decidim/cookie_warning' %>
|
16
26
|
<%= render partial: 'layouts/decidim/header' %>
|
17
27
|
<%= yield %>
|
18
28
|
<%= render partial: 'layouts/decidim/footer' %>
|
29
|
+
|
30
|
+
<%= render partial: "decidim/shared/login_modal" %>
|
19
31
|
</body>
|
20
32
|
</html>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% unless cookies_accepted? %>
|
2
|
+
<div class="cookie-warning">
|
3
|
+
<%= t('.description_html', link: link_to(t('.link_label'), decidim.page_path('terms-and-conditions'), target: "_blank")) %>
|
4
|
+
<div class="cookie-warning__action">
|
5
|
+
<%= button_to t('.ok'), decidim.accept_cookies_path, method: :get, remote: true, class: "button tiny cookie-bar__button" %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
@@ -1,6 +1,11 @@
|
|
1
1
|
</main>
|
2
2
|
</div><!-- /.footer-separator -->
|
3
3
|
<div class="main-footer">
|
4
|
+
<% if current_organization.official_img_footer? %>
|
5
|
+
<%= link_to current_organization.official_url, class: "main-footer__badge" do %>
|
6
|
+
<%= image_tag current_organization.official_img_footer.url.to_s , alt: current_organization.name %>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
4
9
|
<div class="row">
|
5
10
|
<div class="medium-8 large-6 large-offset-3 column main__footer__nav">
|
6
11
|
<% if current_organization.static_pages.any? %>
|
@@ -11,6 +16,7 @@
|
|
11
16
|
</ul>
|
12
17
|
<% end %>
|
13
18
|
</div>
|
19
|
+
<%= render partial: 'layouts/decidim/social_media_links' %>
|
14
20
|
</div>
|
15
21
|
</div>
|
16
22
|
<div class="mini-footer">
|