decidim-core 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_core_manifest.js +2 -0
  3. data/app/assets/javascripts/decidim/map.js.es6.erb +95 -0
  4. data/app/assets/stylesheets/decidim/map.css +3 -0
  5. data/app/assets/stylesheets/decidim/modules/_layout.scss +2 -4
  6. data/app/assets/stylesheets/decidim/modules/_margins.scss +3 -2
  7. data/app/assets/stylesheets/decidim/modules/_process-header.scss +15 -2
  8. data/app/assets/stylesheets/decidim/modules/_process-phase.scss +4 -1
  9. data/app/assets/stylesheets/decidim/utils/_settings.scss +3 -3
  10. data/app/commands/decidim/create_report.rb +90 -0
  11. data/app/controllers/concerns/decidim/devise_controllers.rb +26 -0
  12. data/app/controllers/concerns/decidim/payload_info.rb +23 -0
  13. data/app/controllers/concerns/decidim/user_profile.rb +2 -1
  14. data/app/controllers/decidim/application_controller.rb +25 -1
  15. data/app/controllers/decidim/authorizations_controller.rb +10 -2
  16. data/app/controllers/decidim/cookie_policy_controller.rb +5 -0
  17. data/app/controllers/decidim/devise/confirmations_controller.rb +1 -9
  18. data/app/controllers/decidim/devise/invitations_controller.rb +1 -9
  19. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +1 -10
  20. data/app/controllers/decidim/devise/passwords_controller.rb +1 -9
  21. data/app/controllers/decidim/devise/registrations_controller.rb +2 -15
  22. data/app/controllers/decidim/devise/sessions_controller.rb +9 -15
  23. data/{lib → app/controllers}/decidim/features/base_controller.rb +5 -1
  24. data/app/controllers/decidim/participatory_process_groups_controller.rb +22 -0
  25. data/app/controllers/decidim/participatory_process_steps_controller.rb +2 -0
  26. data/app/controllers/decidim/participatory_processes_controller.rb +14 -3
  27. data/app/controllers/decidim/reports_controller.rb +33 -0
  28. data/app/controllers/decidim/static_map_controller.rb +18 -0
  29. data/app/forms/decidim/report_form.rb +12 -0
  30. data/app/helpers/decidim/application_helper.rb +0 -2
  31. data/app/helpers/decidim/feature_reference_helper.rb +22 -0
  32. data/app/helpers/decidim/map_helper.rb +41 -0
  33. data/app/helpers/decidim/organization_scopes_helper.rb +41 -0
  34. data/app/helpers/decidim/replace_buttons_helper.rb +42 -0
  35. data/app/helpers/decidim/resource_helper.rb +2 -1
  36. data/app/helpers/decidim/translations_helper.rb +1 -1
  37. data/app/mailers/decidim/reported_mailer.rb +35 -0
  38. data/app/middleware/decidim/current_organization.rb +29 -3
  39. data/app/models/decidim/abilities/everyone.rb +1 -0
  40. data/app/models/decidim/moderation.rb +13 -0
  41. data/app/models/decidim/newsletter.rb +1 -0
  42. data/app/models/decidim/organization.rb +2 -0
  43. data/app/models/decidim/participatory_process.rb +11 -0
  44. data/app/models/decidim/participatory_process_group.rb +15 -0
  45. data/app/models/decidim/participatory_process_step.rb +1 -1
  46. data/app/models/decidim/report.rb +23 -0
  47. data/app/services/decidim/public_processes.rb +42 -0
  48. data/app/services/decidim/resource_search.rb +17 -1
  49. data/app/services/decidim/static_map_generator.rb +49 -0
  50. data/app/uploaders/decidim/application_uploader.rb +4 -1
  51. data/app/uploaders/decidim/official_image_footer_uploader.rb +2 -2
  52. data/app/uploaders/decidim/official_image_header_uploader.rb +1 -1
  53. data/app/validators/geocoding_validator.rb +22 -0
  54. data/app/views/decidim/authorizations/new.html.erb +1 -1
  55. data/app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb +22 -0
  56. data/app/views/decidim/participatory_process_groups/show.html.erb +11 -0
  57. data/app/views/decidim/participatory_processes/index.html.erb +1 -1
  58. data/app/views/decidim/participatory_processes/show.html.erb +18 -5
  59. data/app/views/decidim/reported_mailer/hide.html.erb +5 -0
  60. data/app/views/decidim/reported_mailer/report.html.erb +5 -0
  61. data/app/views/decidim/shared/_address_details.html.erb +9 -0
  62. data/app/views/decidim/shared/_flag_modal.html.erb +20 -0
  63. data/app/views/decidim/shared/_share_modal.html.erb +5 -5
  64. data/app/views/decidim/shared/_static_map.html.erb +17 -0
  65. data/app/views/devise/mailer/invite_collaborator.html.erb +17 -0
  66. data/app/views/devise/mailer/invite_collaborator.text.erb +15 -0
  67. data/app/views/layouts/decidim/_application.html.erb +5 -12
  68. data/app/views/layouts/decidim/{_social_meta.html.erb → _head.html.erb} +13 -0
  69. data/app/views/layouts/decidim/_head_extra.html.erb +7 -0
  70. data/app/views/layouts/decidim/_process_header.html.erb +15 -9
  71. data/app/views/layouts/decidim/_process_header_steps.html.erb +3 -3
  72. data/app/views/layouts/decidim/{_header.html.erb → _wrapper.html.erb} +47 -10
  73. data/app/views/pages/home/_highlighted_processes.html.erb +2 -2
  74. data/config/i18n-tasks.yml +3 -0
  75. data/config/locales/ca.yml +40 -1
  76. data/config/locales/en.yml +40 -1
  77. data/config/locales/es.yml +40 -1
  78. data/config/locales/eu.yml +235 -1
  79. data/config/locales/fi.yml +375 -0
  80. data/config/routes.rb +4 -0
  81. data/db/migrate/20170215115407_add_organization_custom_reference.rb +11 -0
  82. data/db/migrate/20170220110740_remove_steps_short_description.rb +21 -0
  83. data/db/migrate/20170221094835_add_scopes_to_processes.rb +6 -0
  84. data/db/migrate/20170228142440_add_participatory_process_groups.rb +15 -0
  85. data/db/migrate/20170306144354_add_secondary_hosts_to_organizations.rb +5 -0
  86. data/db/migrate/20170307084957_create_reports.rb +15 -0
  87. data/db/migrate/20170308091316_create_moderations.rb +12 -0
  88. data/db/migrate/20170313095436_add_available_authorizations_to_organization.rb +10 -0
  89. data/db/seeds.rb +20 -10
  90. data/lib/decidim/core.rb +12 -1
  91. data/lib/decidim/core/api.rb +1 -0
  92. data/lib/decidim/core/api/decidim_type.rb +12 -0
  93. data/lib/decidim/core/api/process_step_type.rb +0 -6
  94. data/lib/decidim/core/api/user_type.rb +4 -0
  95. data/lib/decidim/core/engine.rb +27 -0
  96. data/lib/decidim/core/test.rb +5 -0
  97. data/lib/decidim/core/test/factories.rb +52 -3
  98. data/lib/decidim/core/test/shared_examples/comments_examples.rb +215 -0
  99. data/lib/decidim/core/test/shared_examples/has_reference.rb +30 -0
  100. data/lib/decidim/core/test/shared_examples/manage_moderations_examples.rb +75 -0
  101. data/lib/decidim/core/test/shared_examples/reportable.rb +44 -0
  102. data/lib/decidim/core/test/shared_examples/reports_examples.rb +64 -0
  103. data/lib/decidim/core/version.rb +2 -2
  104. data/lib/decidim/has_reference.rb +50 -0
  105. data/lib/decidim/query_extensions.rb +4 -0
  106. data/lib/decidim/reportable.rb +46 -0
  107. data/vendor/assets/javascripts/leaflet-svg-icon.js +179 -0
  108. data/vendor/assets/javascripts/leaflet-tilelayer-here.js +166 -0
  109. data/vendor/assets/javascripts/leaflet.js +9 -0
  110. data/vendor/assets/javascripts/leaflet.markercluster.js +7 -0
  111. data/vendor/assets/javascripts/quill.min.js +8 -8
  112. data/vendor/assets/javascripts/quill.min.js.map +1 -1
  113. data/vendor/assets/stylesheets/MarkerCluster.Default.css +60 -0
  114. data/vendor/assets/stylesheets/MarkerCluster.css +14 -0
  115. data/vendor/assets/stylesheets/leaflet.css +624 -0
  116. data/vendor/assets/stylesheets/quill.bubble.css +75 -4
  117. data/vendor/assets/stylesheets/quill.core.css +21 -2
  118. data/vendor/assets/stylesheets/quill.snow.css +29 -3
  119. metadata +107 -27
  120. data/app/views/layouts/decidim/_footer.html.erb +0 -36
  121. data/app/views/layouts/decidim/_meta.html.erb +0 -4
@@ -0,0 +1,11 @@
1
+ <% provide :meta_title, t(".title") %>
2
+
3
+ <main class="wrapper">
4
+ <section id="processes-grid" class="section row collapse">
5
+ <h1 class="section-heading"><%= t(".group_participatory_processes", group: translated_attribute(group.name)) %></h1>
6
+ <%= render partial: "decidim/participatory_processes/order_by_processes" %>
7
+ <div class="row small-up-1 medium-up-2 large-up-3 card-grid">
8
+ <%= render participatory_processes || render(partial: "no_processes_yet") %>
9
+ </div>
10
+ </section>
11
+ </main>
@@ -11,7 +11,7 @@
11
11
  <section id="processes-grid" class="section row collapse">
12
12
  <%= render partial: "order_by_processes" %>
13
13
  <div class="row small-up-1 medium-up-2 large-up-3 card-grid">
14
- <%= render(participatory_processes) || render(partial: "no_processes_yet") %>
14
+ <%= render collection || render(partial: "no_processes_yet") %>
15
15
  </div>
16
16
  </section>
17
17
  </main>
@@ -1,6 +1,10 @@
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) %>
1
+ <% add_decidim_meta_tags({
2
+ image_url: current_participatory_process.hero_image.url,
3
+ description: translated_attribute(current_participatory_process.short_description),
4
+ title: translated_attribute(current_participatory_process.title),
5
+ url: participatory_process_url(current_participatory_process),
6
+ twitter_handler: current_organization.twitter_handler
7
+ }) %>
4
8
 
5
9
  <div class="row column">
6
10
  <div class="row">
@@ -14,10 +18,10 @@
14
18
  </div>
15
19
  <div class="section columns medium-5 mediumlarge-4 large-3">
16
20
  <div class="card extra definition-data">
17
- <% if translated_attribute(current_participatory_process.scope).present? %>
21
+ <% if translated_attribute(current_participatory_process.meta_scope).present? %>
18
22
  <div class="definition-data__item scope">
19
23
  <span class="definition-data__title"><%= t(".scope") =%></span>
20
- <%== translated_attribute(current_participatory_process.scope) %>
24
+ <%== translated_attribute(current_participatory_process.meta_scope) %>
21
25
  </div>
22
26
  <% end %>
23
27
 
@@ -66,5 +70,14 @@
66
70
  </div>
67
71
  </div>
68
72
 
73
+ <div class="row">
74
+ <div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
75
+ <%= render partial: "decidim/shared/share_modal" %>
76
+ </div>
77
+ </div>
78
+
69
79
  <%= attachments_for current_participatory_process %>
70
80
  </div>
81
+
82
+ <%= javascript_include_tag "decidim/proposals/social_share" %>
83
+ <%= stylesheet_link_tag "decidim/proposals/social_share" %>
@@ -0,0 +1,5 @@
1
+ <p><%= t(".hello", name: @user.name) %></p>
2
+
3
+ <p>
4
+ <%= t(".report_html", { content: reported_content.html_safe }) %>
5
+ </p>
@@ -0,0 +1,5 @@
1
+ <p><%= t(".hello", name: @user.name) %></p>
2
+
3
+ <p>
4
+ <%= t(".report_html", { content: reported_content.html_safe }) %>
5
+ </p>
@@ -0,0 +1,9 @@
1
+ <div class="address__details">
2
+ <% if geolocalizable.respond_to? :location %>
3
+ <strong><%== translated_attribute geolocalizable.location %></strong><br />
4
+ <% end %>
5
+ <span><%= geolocalizable.address %></span><br />
6
+ <% if geolocalizable.respond_to? :location_hints %>
7
+ <span><%== translated_attribute geolocalizable.location_hints %></span>
8
+ <% end %>
9
+ </div>
@@ -0,0 +1,20 @@
1
+ <div class="reveal flag-modal" id="flagModal" data-reveal>
2
+ <div class="reveal__header">
3
+ <h3 class="reveal__title"><%= t('.title') %></h3>
4
+ <button class="close-button" data-close aria-label="<%= t('.close') %>" type="button">
5
+ <span aria-hidden="true">&times;</span>
6
+ </button>
7
+ </div>
8
+ <% if reportable.reported_by? current_user %>
9
+ <p><%= t('.already_reported') %></p>
10
+ <% else %>
11
+ <p><%= t('.description') %></p>
12
+ <%= decidim_form_for form, url: url, method: :post do |f| %>
13
+ <%= f.collection_radio_buttons :reason, [[:spam, t('.spam')], [:offensive, t('.offensive')], [:does_not_belong, t('.does_not_belong', organization_name: current_organization.name)]], :first, :last do |builder| %>
14
+ <%= builder.label { builder.radio_button + builder.text } %>
15
+ <% end %>
16
+ <%= f.text_area :details, rows: 4 %>
17
+ <%= f.submit t(".report") %>
18
+ <% end %>
19
+ <% end %>
20
+ </div>
@@ -12,11 +12,11 @@
12
12
  </button>
13
13
  </div>
14
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)) %>
15
+ <%= social_share_button_tag(decidim_page_title,
16
+ url: decidim_meta_url,
17
+ image: decidim_meta_image_url,
18
+ desc: h(decidim_meta_description),
19
+ via: decidim_meta_twitter_handler) %>
20
20
  <a class="button secondary" data-open="urlShare">
21
21
  <%= icon "link-intact" %>
22
22
  </a>
@@ -0,0 +1,17 @@
1
+ <% if geolocalizable.address.present? %>
2
+ <div class="card card--secondary">
3
+ <div class="card__content address">
4
+ <div class="address__info">
5
+ <div class="address__icon">
6
+ <%= icon icon_name, width: 40, height: 70 %>
7
+ </div>
8
+ <%= render partial: "decidim/shared/address_details", locals: { geolocalizable: geolocalizable } %>
9
+ </div>
10
+ <% if Decidim.geocoder.present? %>
11
+ <div class="address__map">
12
+ <%= static_map_link(geolocalizable) %>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
2
+
3
+ <p>
4
+ <% if @resource.invited_by.present? %>
5
+ <%= t("devise.mailer.invitation_instructions.invited_you_as_admin", invited_by: @resource.invited_by.name, application: @resource.organization.name) %>
6
+ <% else %>
7
+ <%= t("devise.mailer.invitation_instructions.someone_invited_you", application: @resource.organization.name) %>
8
+ <% end %>
9
+ </p>
10
+
11
+ <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>
12
+
13
+ <% if @resource.invitation_due_at %>
14
+ <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
15
+ <% end %>
16
+
17
+ <p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
@@ -0,0 +1,15 @@
1
+ <%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>
2
+
3
+ <% if @resource.invited_by.present? %>
4
+ <%= t("devise.mailer.invitation_instructions.invited_you_as_admin", invited_by: @resource.invited_by.name, application: @resource.organization.name) %>
5
+ <% else %>
6
+ <%= t("devise.mailer.invitation_instructions.you_are_now_admin", application: @resource.organization.name) %>
7
+ <% end %>
8
+
9
+ <%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %>
10
+
11
+ <% if @resource.invitation_due_at %>
12
+ <%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %>
13
+ <% end %>
14
+
15
+ <%= t("devise.mailer.invitation_instructions.ignore").html_safe %>
@@ -10,22 +10,15 @@
10
10
  <html class="no-js">
11
11
  <head>
12
12
  <title><%= decidim_page_title %></title>
13
-
14
- <%= csrf_meta_tags %>
15
-
16
- <%= render partial: 'layouts/decidim/meta' %>
17
- <%= render partial: 'layouts/decidim/social_meta' %>
18
-
19
- <%= favicon %>
20
- <%= stylesheet_link_tag 'application', media: 'all' %>
21
- <%= javascript_include_tag 'application' %>
13
+ <%= render partial: 'layouts/decidim/head' %>
22
14
  </head>
23
15
 
24
16
  <body>
25
17
  <%= render partial: 'layouts/decidim/cookie_warning' %>
26
- <%= render partial: 'layouts/decidim/header' %>
27
- <%= yield %>
28
- <%= render partial: 'layouts/decidim/footer' %>
18
+
19
+ <%= render 'layouts/decidim/wrapper' do %>
20
+ <%= yield %>
21
+ <% end %>
29
22
 
30
23
  <%= render partial: "decidim/shared/login_modal" %>
31
24
  </body>
@@ -1,3 +1,10 @@
1
+ <%= csrf_meta_tags %>
2
+
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <% available_locales.each do |locale| %>
5
+ <link rel="alternate" href="<%= url_for(request.parameters.merge(locale: locale)) %>" hreflang="<%= locale %>" />
6
+ <% end %>
7
+
1
8
  <meta name="twitter:card" content="summary_large_image" />
2
9
  <meta name="twitter:site" content="@<%= decidim_meta_twitter_handler %>" />
3
10
  <meta name="twitter:title" content="<%= decidim_page_title %>" />
@@ -9,3 +16,9 @@
9
16
  <meta property="og:title" content="<%= decidim_page_title %>" />
10
17
  <meta property="og:description" content="<%= decidim_meta_description %>" />
11
18
  <meta property="og:image" content="<%= decidim_meta_image_url %>" />
19
+
20
+ <%= favicon %>
21
+ <%= stylesheet_link_tag 'application', media: 'all' %>
22
+ <%= javascript_include_tag 'application' %>
23
+
24
+ <%= render partial: 'layouts/decidim/head_extra' %>
@@ -0,0 +1,7 @@
1
+ <%#
2
+ This file is meant to be overriden by the app developers in order to
3
+ include extra headers like tracking, error handling and such.
4
+
5
+ Just copy your own version of the file under:
6
+ `app/views/layouts/decidim/_head_extra.html.erb`
7
+ %>
@@ -3,15 +3,21 @@
3
3
  style="background-image:url(<%= current_participatory_process.banner_image.url %>);">
4
4
  <div class="process-header__container row">
5
5
  <div class="columns mediumlarge-9 process-header__info">
6
- <h1 class="text-highlight heading2">
7
- <%= translated_attribute(current_participatory_process.title) %>
8
- </h1>
9
- <h2 class="text-highlight heading-small">
10
- <span class="process-header__hashtag">
11
- <%= current_participatory_process.hashtag %>
12
- </span>
13
- <%= translated_attribute(current_participatory_process.subtitle) %>
14
- </h2>
6
+ <div>
7
+ <h1 class="text-highlight heading2">
8
+ <%= translated_attribute(current_participatory_process.title) %>
9
+ </h1>
10
+ </div>
11
+ <div>
12
+ <h2 class="text-highlight heading-small">
13
+ <% if current_participatory_process.hashtag.present? %>
14
+ <span class="process-header__hashtag">
15
+ <%= link_to "##{current_participatory_process.hashtag}", "https://twitter.com/hashtag/#{current_participatory_process.hashtag}" %>
16
+ </span>
17
+ <% end %>
18
+ <%= translated_attribute(current_participatory_process.subtitle) %>
19
+ </h2>
20
+ </div>
15
21
  </div>
16
22
  <%= render partial: "layouts/decidim/process_header_steps", locals: { participatory_process: current_participatory_process } %>
17
23
  </div>
@@ -1,7 +1,7 @@
1
1
  <% if participatory_process.steps.any? %>
2
2
  <div class="columns mediumlarge-3">
3
- <div class="process-header__phase">
4
- <div class="process-header__progress">
3
+ <div class="process-header__phase process-header__phase--simple">
4
+ <div class="process-header__progress show-for-medium">
5
5
  <ol>
6
6
  <% past_step = true %>
7
7
  <% participatory_process.steps.each_with_index do |step, index| %>
@@ -21,7 +21,7 @@
21
21
  <%= participatory_process_step_dates participatory_process.active_step %>
22
22
  </span>
23
23
  </div>
24
- <%= link_to t('.view_steps'), decidim.participatory_process_participatory_process_steps_path(current_participatory_process), class: "button tiny hollow" %>
24
+ <%= link_to t('.view_steps'), decidim.participatory_process_participatory_process_steps_path(current_participatory_process), class: "button tiny hollow show-for-medium" %>
25
25
  </div>
26
26
  </div>
27
27
  <% end %>
@@ -1,22 +1,22 @@
1
1
  <div class="off-canvas-wrapper">
2
2
  <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
3
3
  <div class="off-canvas position-right hide-for-large" data-position="right"
4
- id="offCanvas" data-off-canvas>
4
+ id="offCanvas" data-off-canvas>
5
5
  <!-- Close button -->
6
6
  <button class="close-button"
7
- aria-label="<%= t(".close_menu") %>" type="button"
8
- data-close>
7
+ aria-label="<%= t("layouts.decidim.header.close_menu") %>" type="button"
8
+ data-close>
9
9
  <span aria-hidden="true">&times;</span>
10
10
  </button>
11
11
  <!-- Menu -->
12
12
  <div class="hide-for-medium" data-set="nav-holder"></div>
13
13
  <div class="hide-for-medium usermenu-off-canvas-holder"
14
- data-set="nav-login-holder"></div>
14
+ data-set="nav-login-holder"></div>
15
15
  </div>
16
16
  <div class="off-canvas-content" data-off-canvas-content>
17
17
  <div class="footer-separator">
18
18
  <!--separates the footer from the rest of the page,
19
- creates a sticky footer-->
19
+ creates a sticky footer-->
20
20
  <!-- Topbar -->
21
21
  <div class="title-bar">
22
22
  <% if current_organization.official_img_header? %>
@@ -31,7 +31,7 @@
31
31
  <%= render partial: "layouts/decidim/language_chooser" %>
32
32
  <div class="hide-for-medium topbar__menu">
33
33
  <button type="button" data-toggle="offCanvas">
34
- <%= icon "menu", aria_label: t('.navigation'), role: "img" %>
34
+ <%= icon "menu", aria_label: t('layouts.decidim.header.navigation'), role: "img" %>
35
35
  </button>
36
36
  </div>
37
37
  <% if current_user %>
@@ -53,10 +53,10 @@
53
53
  </div>
54
54
  <% else %>
55
55
  <div class="topbar__user show-for-medium" data-set="nav-login-holder">
56
- <div class="topbar__user__login js-append">
57
- <%= link_to t('.sign_up'), decidim.new_user_registration_path, class: "sign-up-link" %>
58
- <%= link_to t('.sign_in'), decidim.new_user_session_path, class: "sign-in-link" %>
59
- </div>
56
+ <div class="topbar__user__login js-append">
57
+ <%= link_to t('layouts.decidim.header.sign_up'), decidim.new_user_registration_path, class: "sign-up-link" %>
58
+ <%= link_to t('layouts.decidim.header.sign_in'), decidim.new_user_session_path, class: "sign-in-link" %>
59
+ </div>
60
60
  </div>
61
61
  <% end %>
62
62
  </div>
@@ -71,3 +71,40 @@
71
71
 
72
72
  <main>
73
73
  <%= display_flash_messages %>
74
+ <%= yield %>
75
+ </main>
76
+ </div><!-- /.footer-separator -->
77
+ <div class="main-footer">
78
+ <% if current_organization.official_img_footer? %>
79
+ <%= link_to current_organization.official_url, class: "main-footer__badge" do %>
80
+ <%= image_tag current_organization.official_img_footer.url.to_s , alt: current_organization.name %>
81
+ <% end %>
82
+ <% end %>
83
+ <div class="row">
84
+ <div class="medium-8 large-6 large-offset-3 column main__footer__nav">
85
+ <% if current_organization.static_pages.any? %>
86
+ <ul class="footer-nav">
87
+ <% current_organization.static_pages.each do |page| %>
88
+ <li><%= link_to translated_attribute(page.title), decidim.page_path(page) %></a></li>
89
+ <% end %>
90
+ </ul>
91
+ <% end %>
92
+ </div>
93
+ <%= render partial: 'layouts/decidim/social_media_links' %>
94
+ </div>
95
+ </div>
96
+ <div class="mini-footer">
97
+ <div class="row">
98
+ <div class="columns">
99
+ <a rel="license" class="cc-badge"
100
+ href="http://creativecommons.org/licenses/by-sa/4.0/"
101
+ target="_blank">
102
+ <%= image_tag("decidim/cc-badge.png", alt: "Creative Commons License" ) %>
103
+ </a>
104
+ <%= t('layouts.decidim.footer.made_with_open_source').html_safe %>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div><!--/.off-canvas-content-->
109
+ </div><!--/.off-canvas-wrapper-inner-->
110
+ </div><!--/.off-canvas-wrapper-->
@@ -1,6 +1,6 @@
1
1
  <section class="wrapper-home">
2
2
  <div class="row">
3
- <h3 class="section-heading"><%= t(".processes_ending_soon") %></h3>
3
+ <h3 class="section-heading"><%= t(".active_processes") %></h3>
4
4
  <div class="row collapse">
5
5
  <div class="row small-up-1 smallmedium-up-2 mediumlarge-up-3
6
6
  large-up-4 card-grid">
@@ -34,4 +34,4 @@
34
34
  <%= link_to t(".see_all_processes"), participatory_processes_path, class: "button expanded hollow button--sc home-section__cta" %>
35
35
  </div>
36
36
  </div>
37
- </section>
37
+ </section>
@@ -93,6 +93,7 @@ ignore_unused:
93
93
  - activerecord.attributes.decidim/user.*
94
94
  - activerecord.models.decidim/user
95
95
  - activemodel.attributes.user.*
96
+ - activemodel.attributes.report.*
96
97
  - booleans.*
97
98
  - errors.messages.*
98
99
  - social_share_button.*
@@ -101,6 +102,8 @@ ignore_unused:
101
102
  - decidim.authorizations.first_login.actions.*
102
103
  - decidim.features.dummy.*
103
104
  - invisible_captcha.*
105
+ - decidim.participatory_processes.scopes.global
106
+ - decidim.participatory_processes.participatory_process_groups.none
104
107
  # - 'activerecord.attributes.*'
105
108
  # - '{devise,kaminari,will_paginate}.*'
106
109
  # - 'simple_form.{yes,no}'
@@ -1,6 +1,8 @@
1
1
  ca:
2
2
  activemodel:
3
3
  attributes:
4
+ report:
5
+ details: Comentaris addicionals
4
6
  user:
5
7
  email: El teu email
6
8
  name: El teu nom
@@ -150,6 +152,10 @@ ca:
150
152
  pages:
151
153
  index:
152
154
  title: Més informació
155
+ participatory_process_groups:
156
+ show:
157
+ group_participatory_processes: Processos per a %{group}
158
+ title: Grup de processos participatius
153
159
  participatory_process_steps:
154
160
  index:
155
161
  process_steps: Fases del procés
@@ -157,6 +163,10 @@ ca:
157
163
  participatory_processes:
158
164
  index:
159
165
  title: Processos participatius
166
+ participatory_process_groups:
167
+ none: cap
168
+ scopes:
169
+ global: Àmbit global
160
170
  show:
161
171
  developer_group: Grup promotor
162
172
  end_date: Data de finalització
@@ -165,6 +175,19 @@ ca:
165
175
  participatory_structure: Estructura participativa
166
176
  scope: Àmbit
167
177
  target: A qui va dirigit?
178
+ reported_mailer:
179
+ hide:
180
+ hello: Hola %{name},
181
+ report_html: "<p>El següent contingut:</p>%{content}<p>ha estat amagat automàticament.</p>"
182
+ subject: Un contingut ha estat amagat automàticament
183
+ report:
184
+ hello: Hola %{name},
185
+ report_html: "<p>El següent contingut:</p>%{content}<p>ha estat denunciat.</p>"
186
+ subject: Un contingut ha estat denunciat
187
+ reports:
188
+ create:
189
+ error: S'ha produït un error en denunciar. Torna-ho a intentar.
190
+ success: La denúncia s'ha creat amb èxit i serà revisada per un administrador.
168
191
  shared:
169
192
  action_authorization_modal:
170
193
  incomplete:
@@ -181,9 +204,20 @@ ca:
181
204
  invalid: "%{field} no és vàlid."
182
205
  ok: D'acord
183
206
  title: Acció no autoritzada
207
+ flag_modal:
208
+ already_reported: Aquest contingut ja ha estat denunciat i serà revisat per un administrador.
209
+ close: Tancar
210
+ description: Aquest contingut no és apropiat?
211
+ does_not_belong: Conté activitat il·legal, amenaces de suïcidi, informació personal, o qualsevol altra cosa que creguis que no pertany a %{organization_name}.
212
+ offensive: Conté racisme, sexisme, insults, atacs personals, amenaces de mort, peticions de suïcidi o qualsevol forma de discurs d'odi.
213
+ report: Denuncia
214
+ spam: Conté "clickbait", publicitat o estafes.
215
+ title: Denuncia un problema
184
216
  login_modal:
185
217
  please_sign_in: Si us plau, inicia sessió
186
218
  sign_up: Donar-se d'alta
219
+ reference:
220
+ reference: 'Referència: %{reference}'
187
221
  share_modal:
188
222
  close_window: Tanca la finestra
189
223
  share: Compartir
@@ -205,6 +239,8 @@ ca:
205
239
  someone_invited_you: Algú t'ha convidat a %{application}, pots acceptar la invitació amb l'enllaç a continuació.
206
240
  invite_admin:
207
241
  subject: Has estat convidat a gestionar %{organization}
242
+ invite_collaborator:
243
+ subject: Has estat convidat a col·laborar a %{organization}
208
244
  organization_admin_invitation_instructions:
209
245
  subject: Has estat convidat a gestionar %{organization}
210
246
  password_change:
@@ -238,6 +274,9 @@ ca:
238
274
  navigation: Navegació
239
275
  sign_in: Entra
240
276
  sign_up: Registra't
277
+ participatory_process_groups:
278
+ participatory_process_group:
279
+ browse: Explorar
241
280
  participatory_processes:
242
281
  index:
243
282
  promoted_processes: Processos destacats
@@ -298,8 +337,8 @@ ca:
298
337
  participate: Participa
299
338
  welcome: Benvingut a %{organization}!
300
339
  highlighted_processes:
340
+ active_processes: Processos actius
301
341
  active_step: Fase activa
302
- processes_ending_soon: Processos que acaben aviat
303
342
  see_all_processes: Veure tots els processos
304
343
  statistics:
305
344
  headline: Estat actual de %{organization}