decidim-initiatives 0.28.5 → 0.29.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/cells/decidim/initiatives/initiative_g_cell.rb +6 -4
  4. data/app/cells/decidim/initiatives_votes/vote_cell.rb +1 -3
  5. data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +9 -58
  6. data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +5 -43
  7. data/app/commands/decidim/initiatives/admin/update_initiative.rb +25 -42
  8. data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +3 -4
  9. data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +11 -61
  10. data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +2 -33
  11. data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +2 -35
  12. data/app/commands/decidim/initiatives/approve_membership_request.rb +1 -1
  13. data/app/commands/decidim/initiatives/create_initiative.rb +6 -7
  14. data/app/commands/decidim/initiatives/revoke_membership_request.rb +1 -1
  15. data/app/commands/decidim/initiatives/spawn_committee_request.rb +4 -5
  16. data/app/commands/decidim/initiatives/update_initiative.rb +3 -3
  17. data/app/commands/decidim/initiatives/validate_sms_code.rb +3 -3
  18. data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
  19. data/app/controllers/decidim/initiatives/admin/answers_controller.rb +1 -1
  20. data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +7 -6
  21. data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +1 -1
  22. data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +2 -2
  23. data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +2 -2
  24. data/app/controllers/decidim/initiatives/application_controller.rb +5 -2
  25. data/app/controllers/decidim/initiatives/committee_requests_controller.rb +1 -2
  26. data/app/controllers/decidim/initiatives/create_initiative_controller.rb +1 -1
  27. data/app/controllers/decidim/initiatives/initiatives_controller.rb +2 -2
  28. data/app/events/decidim/initiatives/approve_membership_request_event.rb +9 -29
  29. data/app/events/decidim/initiatives/create_initiative_event.rb +17 -36
  30. data/app/events/decidim/initiatives/revoke_membership_request_event.rb +10 -33
  31. data/app/events/decidim/initiatives/spawn_committee_request_event.rb +10 -33
  32. data/app/forms/decidim/initiatives/admin/initiative_answer_form.rb +1 -1
  33. data/app/forms/decidim/initiatives/admin/initiative_form.rb +3 -3
  34. data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +2 -2
  35. data/app/forms/decidim/initiatives/initiative_form.rb +11 -1
  36. data/app/forms/decidim/initiatives/vote_form.rb +2 -2
  37. data/app/helpers/decidim/initiatives/initiative_helper.rb +0 -74
  38. data/app/helpers/decidim/initiatives/initiatives_helper.rb +0 -7
  39. data/app/models/decidim/initiative.rb +1 -1
  40. data/app/packs/entrypoints/decidim_initiatives_admin.js +0 -2
  41. data/app/packs/src/decidim/initiatives/admin/invite_users.js +1 -1
  42. data/app/permissions/decidim/initiatives/admin/permissions.rb +2 -2
  43. data/app/permissions/decidim/initiatives/permissions.rb +0 -14
  44. data/app/serializers/decidim/initiatives/initiative_serializer.rb +1 -1
  45. data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +1 -1
  46. data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +1 -2
  47. data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +6 -6
  48. data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +65 -59
  49. data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +1 -1
  50. data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +1 -1
  51. data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +1 -1
  52. data/app/views/decidim/initiatives/committee_requests/new.html.erb +3 -4
  53. data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +1 -1
  54. data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +1 -1
  55. data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +1 -1
  56. data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +1 -1
  57. data/app/views/decidim/initiatives/initiatives/print.html.erb +2 -2
  58. data/app/views/decidim/initiatives/initiatives/show.html.erb +2 -3
  59. data/app/views/layouts/decidim/_initiative_header.html.erb +6 -6
  60. data/app/views/layouts/decidim/initiative.html.erb +2 -2
  61. data/app/views/layouts/decidim/initiative_head.html.erb +1 -1
  62. data/config/initializers/wicked_pdf.rb +6 -4
  63. data/config/locales/ar.yml +0 -7
  64. data/config/locales/bg.yml +1 -3
  65. data/config/locales/ca.yml +7 -14
  66. data/config/locales/cs.yml +5 -13
  67. data/config/locales/de.yml +7 -14
  68. data/config/locales/el.yml +0 -4
  69. data/config/locales/en.yml +6 -13
  70. data/config/locales/es-MX.yml +7 -14
  71. data/config/locales/es-PY.yml +7 -14
  72. data/config/locales/es.yml +6 -13
  73. data/config/locales/eu.yml +51 -58
  74. data/config/locales/fi-plain.yml +6 -13
  75. data/config/locales/fi.yml +21 -28
  76. data/config/locales/fr-CA.yml +3 -5
  77. data/config/locales/fr.yml +2 -4
  78. data/config/locales/ga-IE.yml +0 -1
  79. data/config/locales/gl.yml +0 -4
  80. data/config/locales/he-IL.yml +0 -6
  81. data/config/locales/hu.yml +1 -4
  82. data/config/locales/id-ID.yml +0 -4
  83. data/config/locales/is-IS.yml +0 -8
  84. data/config/locales/it.yml +1 -3
  85. data/config/locales/ja.yml +8 -15
  86. data/config/locales/lb.yml +1 -1
  87. data/config/locales/lt.yml +0 -3
  88. data/config/locales/lv.yml +0 -4
  89. data/config/locales/nl.yml +0 -4
  90. data/config/locales/no.yml +0 -2
  91. data/config/locales/pl.yml +5 -2
  92. data/config/locales/pt-BR.yml +1 -17
  93. data/config/locales/pt.yml +0 -2
  94. data/config/locales/ro-RO.yml +0 -12
  95. data/config/locales/ru.yml +0 -9
  96. data/config/locales/sk.yml +0 -4
  97. data/config/locales/sv.yml +69 -194
  98. data/config/locales/tr-TR.yml +1 -3
  99. data/config/locales/uk.yml +0 -9
  100. data/config/locales/zh-CN.yml +0 -3
  101. data/config/locales/zh-TW.yml +0 -3
  102. data/decidim-initiatives.gemspec +3 -2
  103. data/lib/decidim/api/initiative_api_type.rb +2 -2
  104. data/lib/decidim/initiatives/engine.rb +1 -0
  105. data/lib/decidim/initiatives/menu.rb +12 -1
  106. data/lib/decidim/initiatives/seeds.rb +89 -64
  107. data/lib/decidim/initiatives/version.rb +1 -1
  108. data/lib/decidim/initiatives.rb +0 -12
  109. data/lib/tasks/decidim_initiatives.rake +3 -3
  110. data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +9 -11
  111. metadata +33 -25
  112. data/app/forms/decidim/initiatives/previous_form.rb +0 -24
  113. data/app/packs/entrypoints/decidim_initiatives_admin.scss +0 -1
  114. data/app/packs/stylesheets/decidim/initiatives/admin/initiatives.scss +0 -13
  115. data/app/queries/decidim/initiatives/similar_initiatives.rb +0 -54
  116. data/config/locales/bn-BD.yml +0 -1
  117. data/config/locales/bs-BA.yml +0 -1
@@ -134,8 +134,8 @@ module Decidim
134
134
  return unless permission_action.subject == :initiative
135
135
 
136
136
  case permission_action.action
137
- when :print
138
- toggle_allow(Decidim::Initiatives.print_enabled && user.admin?)
137
+ when :read
138
+ toggle_allow(Decidim::Initiatives.print_enabled)
139
139
  when :publish, :discard
140
140
  toggle_allow(initiative.validating?)
141
141
  when :unpublish
@@ -4,8 +4,6 @@ module Decidim
4
4
  module Initiatives
5
5
  class Permissions < Decidim::DefaultPermissions
6
6
  def permissions
7
- return permission_action if initiative && !initiative.is_a?(Decidim::Initiative)
8
-
9
7
  # Delegate the admin permission checks to the admin permissions class
10
8
  return Decidim::Initiatives::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
11
9
  return permission_action if permission_action.scope != :public
@@ -21,7 +19,6 @@ module Decidim
21
19
  create_initiative?
22
20
  edit_public_initiative?
23
21
  update_public_initiative?
24
- print_initiative?
25
22
 
26
23
  vote_initiative?
27
24
  sign_initiative?
@@ -124,17 +121,6 @@ module Decidim
124
121
  )
125
122
  end
126
123
 
127
- def print_initiative?
128
- return unless permission_action.action == :print &&
129
- permission_action.subject == :initiative
130
-
131
- toggle_allow(Decidim::Initiatives.print_enabled && (authorship_or_admin? || committee_member?))
132
- end
133
-
134
- def committee_member?
135
- InitiativesPromoted.by(user).exists?(id: initiative.id)
136
- end
137
-
138
124
  def vote_initiative?
139
125
  return unless permission_action.action == :vote &&
140
126
  permission_action.subject == :initiative
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Initiatives
5
5
  class InitiativeSerializer < Decidim::Exporters::Serializer
6
- # Serializes an inititative
6
+ # Serializes an initiative
7
7
  def serialize
8
8
  {
9
9
  id: resource.id,
@@ -3,7 +3,7 @@
3
3
  <div class="card-divider">
4
4
  <h2 class="card-title">
5
5
  <%= link_to "#{t ".initiatives"} > ", initiatives_path %>
6
- <%= decidim_sanitize translated_attribute(initiative.title) %>
6
+ <%= decidim_sanitize_translated(initiative.title) %>
7
7
  </h2>
8
8
  </div>
9
9
 
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
 
14
14
  <div class="row column">
15
- <div class="committee_link" id="committee_link">
15
+ <div data-committee_link>
16
16
  <%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
17
17
  <%= icon_link_to "clipboard-line", "#", t(".invite_to_committee_help"), class: "card--list__data__icon invite-users-link" %>
18
18
  </div>
@@ -56,5 +56,4 @@
56
56
  </table>
57
57
  </div>
58
58
 
59
- <%= append_stylesheet_pack_tag "decidim_initiatives_admin" %>
60
59
  <%= append_javascript_pack_tag "decidim_initiatives_admin" %>
@@ -1,4 +1,4 @@
1
- <span class="exports button button__sm button__secondary button--simple" data-toggle="<%= dropdown_id(collection_ids) %>">
1
+ <span class="exports button button__sm button__secondary" data-toggle="<%= dropdown_id(collection_ids) %>">
2
2
  <% if collection_ids.present? %>
3
3
  <%= t("actions.export-selection", scope: "decidim.admin") %>
4
4
  <% else %>
@@ -15,11 +15,11 @@
15
15
  data-close-on-click="true">
16
16
  <ul class="vertical menu add-components">
17
17
  <% %w(CSV JSON).each do |format| %>
18
- <%= link_to export_initiatives_path(format:, collection_ids:) do %>
19
- <li class="exports--format--<%= format.downcase %> exports--initiatives">
20
- <%= t("decidim.admin.exports.export_as", name: t("decidim.initiatives.admin.exports.initiatives"), export_format: format.upcase) %>
21
- </li>
22
- <% end %>
18
+ <li class="exports--format--<%= format.downcase %> exports--initiatives">
19
+ <%= link_to t("decidim.admin.exports.export_as", name: t("decidim.initiatives.admin.exports.initiatives"),
20
+ export_format: format.upcase),
21
+ export_initiatives_path(format:, collection_ids:) %>
22
+ </li>
23
23
  <% end %>
24
24
  </ul>
25
25
  </div>
@@ -10,52 +10,57 @@
10
10
  </h1>
11
11
  </div>
12
12
  <%= admin_filter_selector(:initiatives) %>
13
- <div class="table-scroll">
14
- <table class="table-list">
15
- <thead>
16
- <tr>
17
- <th><%= t("models.initiatives.fields.id", scope: "decidim.admin") %></th>
18
- <th class="!text-left"><%= t("models.initiatives.fields.title", scope: "decidim.admin") %></th>
19
- <th><%= t("models.initiatives.fields.state", scope: "decidim.admin") %></th>
20
- <th><%= sort_link(query, :supports_count, t("models.initiatives.fields.supports_count", scope: "decidim.admin"), default_order: :desc) %></th>
21
- <th><%= sort_link(query, :created_at, t("models.initiatives.fields.created_at", scope: "decidim.admin"), default_order: :desc) %></th>
22
- <th><%= sort_link(query, :published_at, t("models.initiatives.fields.published_at", scope: "decidim.admin"), default_order: :desc) %></th>
23
- <th class="actions"><%= t ".actions_title" %></th>
24
- </tr>
25
- </thead>
26
- <tbody>
27
- <% @initiatives.each do |initiative| %>
13
+
14
+ <% if show_initiative_type_callout? %>
15
+ <% link = link_to(t("button", scope:"decidim.initiatives.admin.index.initiatives_types"), new_initiatives_type_path, class: "button button__sm button__secondary mt-4") %>
16
+ <%= cell("decidim/announcement", t("alert_html", scope:"decidim.initiatives.admin.index.initiatives_types", link:), callout_class: "alert") %>
17
+ <% else %>
18
+ <div class="table-scroll">
19
+ <table class="table-list">
20
+ <thead>
28
21
  <tr>
29
- <td><%= initiative.id %></td>
30
- <td class="!text-left">
31
- <% if allowed_to? :edit, :initiative, initiative: initiative %>
32
- <%= link_to translated_attribute(initiative.title),
33
- decidim_admin_initiatives.edit_initiative_path(initiative.to_param) %>
34
- <% else %>
35
- <%= translated_attribute(initiative.title) %>
36
- <% end %>
37
- </td>
38
- <td><%= humanize_admin_state initiative.state %></td>
39
- <td><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td>
40
- <td class="table-list__date"><%= l initiative.created_at, format: :short %></td>
41
- <td class="table-list__date"><%= initiative.published_at? ? l(initiative.published_at, format: :short) : "" %></td>
42
- <td class="table-list__actions">
43
- <% if allowed_to? :edit, :initiative, initiative: initiative %>
44
- <%= icon_link_to "pencil-line",
45
- decidim_admin_initiatives.edit_initiative_path(initiative.to_param),
46
- t("actions.configure", scope: "decidim.admin"),
47
- class: "action-icon--edit" %>
48
- <% else %>
49
- <span class="action-space icon"></span>
50
- <% end %>
22
+ <th><%= t("models.initiatives.fields.id", scope: "decidim.admin") %></th>
23
+ <th class="!text-left"><%= t("models.initiatives.fields.title", scope: "decidim.admin") %></th>
24
+ <th><%= t("models.initiatives.fields.state", scope: "decidim.admin") %></th>
25
+ <th><%= sort_link(query, :supports_count, t("models.initiatives.fields.supports_count", scope: "decidim.admin"), default_order: :desc) %></th>
26
+ <th><%= sort_link(query, :created_at, t("models.initiatives.fields.created_at", scope: "decidim.admin"), default_order: :desc) %></th>
27
+ <th><%= sort_link(query, :published_at, t("models.initiatives.fields.published_at", scope: "decidim.admin"), default_order: :desc) %></th>
28
+ <th><%= t ".actions_title" %></th>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ <% @initiatives.each do |initiative| %>
33
+ <tr>
34
+ <td><%= initiative.id %></td>
35
+ <td class="!text-left">
36
+ <% if allowed_to? :edit, :initiative, initiative: initiative %>
37
+ <%= link_to translated_attribute(initiative.title),
38
+ decidim_admin_initiatives.edit_initiative_path(initiative.to_param) %>
39
+ <% else %>
40
+ <%= translated_attribute(initiative.title) %>
41
+ <% end %>
42
+ </td>
43
+ <td><%= humanize_admin_state initiative.state %></td>
44
+ <td><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td>
45
+ <td class="table-list__date"><%= l initiative.created_at, format: :short %></td>
46
+ <td class="table-list__date"><%= initiative.published_at? ? l(initiative.published_at, format: :short) : "" %></td>
47
+ <td class="table-list__actions">
48
+ <% if allowed_to? :edit, :initiative, initiative: initiative %>
49
+ <%= icon_link_to "pencil-line",
50
+ decidim_admin_initiatives.edit_initiative_path(initiative.to_param),
51
+ t("actions.configure", scope: "decidim.admin"),
52
+ class: "action-icon--edit" %>
53
+ <% else %>
54
+ <span class="action-space icon"></span>
55
+ <% end %>
51
56
 
52
- <% if allowed_to?(:answer, :initiative, initiative: initiative) %>
53
- <%= icon_link_to "chat-1-line", edit_initiative_answer_path(initiative.slug), t("actions.answer", scope: "decidim.initiatives"), class: "action-icon action-icon--answer" %>
54
- <% else %>
55
- <%= icon "chat-1-line", scope: "decidim.admin", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %>
56
- <% end %>
57
+ <% if allowed_to?(:answer, :initiative, initiative: initiative) %>
58
+ <%= icon_link_to "chat-1-line", edit_initiative_answer_path(initiative.slug), t("actions.answer", scope: "decidim.initiatives"), class: "action-icon action-icon--answer" %>
59
+ <% else %>
60
+ <%= icon "chat-1-line", scope: "decidim.admin", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %>
61
+ <% end %>
57
62
 
58
- <% if allowed_to? :print, :initiative, initiative: initiative %>
63
+ <% if allowed_to? :read, :initiative, initiative: initiative %>
59
64
  <%= icon_link_to "printer-line",
60
65
  decidim_initiatives.print_initiative_path(initiative),
61
66
  t(".print"),
@@ -66,23 +71,24 @@
66
71
  <span class="action-space icon"></span>
67
72
  <% end %>
68
73
 
69
- <% if allowed_to? :preview, :initiative, initiative: initiative %>
70
- <%= icon_link_to "eye-line",
71
- decidim_initiatives.initiative_path(initiative.to_param),
72
- t(".preview"),
73
- class: "action-icon--preview",
74
- target: "_blank",
75
- data: { "external-link": false } %>
76
- <% else %>
77
- <span class="action-space icon"></span>
78
- <% end %>
74
+ <% if allowed_to? :preview, :initiative, initiative: initiative %>
75
+ <%= icon_link_to "eye-line",
76
+ decidim_initiatives.initiative_path(initiative.to_param),
77
+ t(".preview"),
78
+ class: "action-icon--preview",
79
+ target: "_blank",
80
+ data: { "external-link": false } %>
81
+ <% else %>
82
+ <span class="action-space icon"></span>
83
+ <% end %>
79
84
 
80
- <%= free_resource_permissions_link(initiative) || content_tag(:span, nil, class: "action-space icon") %>
81
- </td>
82
- </tr>
83
- <% end %>
84
- </tbody>
85
- </table>
85
+ <%= free_resource_permissions_link(initiative) || content_tag(:span, nil, class: "action-space icon") %>
86
+ </td>
87
+ </tr>
88
+ <% end %>
89
+ </tbody>
90
+ </table>
91
+ <% end %>
86
92
  </div>
87
93
  </div>
88
94
  <%= decidim_paginate @initiatives %>
@@ -2,7 +2,7 @@
2
2
  <div class="card pt-4">
3
3
  <div class="card-section">
4
4
  <div class="row column">
5
- <%= scopes_select_field form, :decidim_scopes_id, root: nil %>
5
+ <%= scopes_select_field form, :decidim_scopes_id, root: nil, options: { include_blank: t("decidim.scopes.global") } %>
6
6
  </div>
7
7
  <div class="row column">
8
8
  <%= form.number_field :supports_required, min: 1, step: 1 %>
@@ -21,7 +21,7 @@
21
21
  <th class="text-right">
22
22
  <%= t("models.initiatives_type_scope.fields.supports_required", scope: "decidim.admin") %>
23
23
  </th>
24
- <th class="actions"></th>
24
+ <th></th>
25
25
  </tr>
26
26
  </thead>
27
27
  <tbody>
@@ -15,7 +15,7 @@
15
15
  <tr>
16
16
  <th><%= t("models.initiatives_types.fields.title", scope: "decidim.admin") %></th>
17
17
  <th><%= t("models.initiatives_types.fields.created_at", scope: "decidim.admin") %></th>
18
- <th class="actions"><%= t("initiatives_type.actions.title", scope: "decidim.resources") %></th>
18
+ <th><%= t("initiatives_type.actions.title", scope: "decidim.resources") %></th>
19
19
  </tr>
20
20
  </thead>
21
21
  <tbody>
@@ -1,13 +1,12 @@
1
1
  <% add_decidim_meta_tags({
2
- image_url: current_initiative.type.attached_uploader(:banner_image).url,
2
+ image_url: current_initiative.type.attached_uploader(:banner_image).path,
3
3
  description: translated_attribute(current_initiative.description),
4
4
  title: translated_attribute(current_initiative.title),
5
- url: initiative_url(current_initiative.id),
6
- twitter_handler: current_organization.twitter_handler
5
+ url: initiative_url(current_initiative.id)
7
6
  }) %>
8
7
 
9
8
  <% add_decidim_page_title(translated_attribute(current_initiative.title)) %>
10
- <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).url %>
9
+ <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).path %>
11
10
 
12
11
  <%= render layout: "layouts/decidim/shared/layout_center" do %>
13
12
  <div class="text-center py-10">
@@ -19,7 +19,7 @@
19
19
  <%= f.text_field :postal_code, required: true %>
20
20
  </div>
21
21
 
22
- <div class="pb-s">
22
+ <div>
23
23
  <small>
24
24
  <%= strip_tags(translated_attribute(extra_data_legal_information)) %>
25
25
  </small>
@@ -1,4 +1,4 @@
1
- <div class="row collapse buttons__row">
1
+ <div class="row collapse">
2
2
  <div class="column collapse">
3
3
  <%= link_to "#comments", class: "button small compact hollow button--nomargin expanded" do %>
4
4
  <%= icon "chat-1-line", class: "icon--small", role: "img", "aria-hidden": true %>
@@ -18,7 +18,7 @@
18
18
  <% end %>
19
19
  <% else %>
20
20
  <% content_for(:redirect_after_login) { create_initiative_url(:select_initiative_type) } %>
21
- <button type="button" class="title-action__action button button__xl button__secondary w-full" data-dialog-open="loginModal" aria-controls="loginModal" aria-haspopup="dialog" tabindex="0">
21
+ <button type="button" class="button button__xl button__secondary w-full" data-dialog-open="loginModal" aria-controls="loginModal" aria-haspopup="dialog" tabindex="0">
22
22
  <%= t("new_initiative", scope: "decidim.initiatives.initiatives.index_header") %>
23
23
  <%= icon "add-fill" %>
24
24
  </button>
@@ -28,7 +28,7 @@
28
28
  <%= unvote_label %>
29
29
  <% end %>
30
30
  <% else %>
31
- <button class='button button__xl w-full button__secondary success light' disabled>
31
+ <button class='button button__xl w-full button__secondary success' disabled>
32
32
  <%= icon "check-line" %>
33
33
  <%= unvote_label %>
34
34
  </button>
@@ -2,10 +2,10 @@
2
2
  <div class="pt-10">
3
3
  <div class="initiative-letterhead">
4
4
  <% if current_organization.logo.present? %>
5
- <%= image_tag current_organization.attached_uploader(:logo).variant_url(variant: :medium), title: current_organization.name %>
5
+ <%= image_tag current_organization.attached_uploader(:logo).path(variant: :medium), title: current_organization_name %>
6
6
  <% end %>
7
7
 
8
- <%= current_organization.name %>
8
+ <%= current_organization_name %>
9
9
  </div>
10
10
  <h3 class="print-section-title"><%= t "section", scope: "decidim.initiatives.initiatives.print" %></h3>
11
11
  <div class="initiative-print-title">
@@ -1,9 +1,8 @@
1
1
  <% add_decidim_meta_tags({
2
- image_url: current_initiative.type.attached_uploader(:banner_image).url,
2
+ image_url: current_initiative.type.attached_uploader(:banner_image).path,
3
3
  description: translated_attribute(current_initiative.description),
4
4
  title: translated_attribute(current_initiative.title),
5
- url: initiative_url(current_initiative.id),
6
- twitter_handler: current_organization.twitter_handler
5
+ url: initiative_url(current_initiative.id)
7
6
  }) %>
8
7
 
9
8
  <%
@@ -1,10 +1,10 @@
1
1
  <div class="process-header">
2
- <div class="process-header__inner">
3
- <div class="row column process-header__main"
4
- style="background-image:url('<%= current_participatory_space.type.attached_uploader(:banner_image).url %>');">
2
+ <div>
3
+ <div class="row column"
4
+ style="background-image:url('<%= current_participatory_space.type.attached_uploader(:banner_image).path %>');">
5
5
  </div>
6
- <div class="process-header__container row collapse column">
7
- <div class="columns mediumlarge-8 process-header__info">
6
+ <div class="row collapse column">
7
+ <div class="columns">
8
8
  <div>
9
9
  <h1>
10
10
  <%= participatory_space_helpers.translated_attribute(current_participatory_space.title) %>
@@ -13,7 +13,7 @@
13
13
  <div>
14
14
  <p>
15
15
  <% if current_participatory_space.hashtag.present? %>
16
- <span class="process-header__hashtag">
16
+ <span>
17
17
  <%= link_to "##{current_participatory_space.hashtag}", twitter_hashtag_url(current_participatory_space.hashtag), target: "_blank" %>
18
18
  </span>
19
19
  <% end %>
@@ -1,7 +1,7 @@
1
1
  <%= append_javascript_pack_tag "decidim_initiatives" %>
2
2
  <%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
3
3
 
4
- <% provide :meta_image_url, current_participatory_space.type.attached_uploader(:banner_image).url %>
4
+ <% provide :meta_image_url, current_participatory_space.type.attached_uploader(:banner_image).path %>
5
5
 
6
6
  <%= render "layouts/decidim/application" do %>
7
7
  <%= render layout: "layouts/decidim/shared/layout_center" do %>
@@ -10,7 +10,7 @@
10
10
  </main>
11
11
  <% if content_for? :expanded %>
12
12
  <div class="expanded">
13
- <div class="wrapper wrapper--inner">
13
+ <div class="wrapper">
14
14
  <div class="row">
15
15
  <%= yield :expanded %>
16
16
  </div>
@@ -1,7 +1,7 @@
1
1
  <%= append_javascript_pack_tag "decidim_initiatives" %>
2
2
  <%= append_stylesheet_pack_tag "decidim_initiatives", media: "all" %>
3
3
 
4
- <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).url %>
4
+ <% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).path %>
5
5
 
6
6
  <%= render partial: "layouts/decidim/header/follow_space_menu_bar_button", locals: { participatory_space: current_participatory_space } %>
7
7
 
@@ -10,12 +10,14 @@
10
10
  #
11
11
  # https://github.com/mileszs/wicked_pdf/blob/master/README.md
12
12
 
13
- WickedPdf.config = {
13
+ WickedPdf.configure do |config|
14
14
  # Path to the wkhtmltopdf executable: This usually is not needed if using
15
15
  # one of the wkhtmltopdf-binary family of gems.
16
- # exe_path: '/usr/local/bin/wkhtmltopdf',
16
+ # or
17
+ # config.exe_path = '/usr/local/bin/wkhtmltopdf',
18
+ config.exe_path = Gem.bin_path("wkhtmltopdf-binary", "wkhtmltopdf")
17
19
 
18
20
  # Layout file to be used for all PDFs
19
21
  # (but can be overridden in `render :pdf` calls)
20
- # layout: 'pdf.html',
21
- }
22
+ # config.layout = 'pdf.html'
23
+ end
@@ -97,7 +97,6 @@ ar:
97
97
  initiative_title: عنوان المبادرة
98
98
  name_and_surname: اسم ولقب
99
99
  postal_code: الكود البريدى
100
- scope: نطاق
101
100
  time_and_date: الوقت و التاريخ
102
101
  timestamp: الطابع الزمني
103
102
  titles:
@@ -315,7 +314,6 @@ ar:
315
314
  full_name: الاسم الكامل
316
315
  initiative:
317
316
  description: 'الوصف:'
318
- print: طباعة
319
317
  result:
320
318
  initiative_rejected_reason: تم رفض هذه المبادرة بسبب افتقارها للتوقيعات.
321
319
  signatures_count:
@@ -327,7 +325,6 @@ ar:
327
325
  other: " التوقيعات"
328
326
  vote_cabin:
329
327
  already_voted: وقعت بالفعل
330
- supports_required: "%{total_supports} التوقيعات المطلوبة"
331
328
  verification_required: تحقق من حسابك لتوقيع المبادرة
332
329
  vote: إشارة
333
330
  votes_blocked: توقيع المعوقين
@@ -361,12 +358,8 @@ ar:
361
358
  menu:
362
359
  initiatives: المبادرات
363
360
  resources:
364
- initiative:
365
- actions:
366
- comment: تعليق
367
361
  initiatives_type:
368
362
  actions:
369
- create: إنشاء
370
363
  title: أفعال
371
364
  vote: إشارة
372
365
  layouts:
@@ -101,7 +101,7 @@ bg:
101
101
  title_or_description_or_id_string_or_author_name_or_author_nickname_cont: Търсете в %{collection} по заглавие, описание, идент. № или име на автора.
102
102
  initiatives_settings:
103
103
  update:
104
- error: Възникна грешка!
104
+ error: Възникна грешка.
105
105
  success: Настройките на инициативите са актуализирани успешно.
106
106
  menu:
107
107
  attachments: Прикачени файлове
@@ -292,7 +292,6 @@ bg:
292
292
  initiatives_types:
293
293
  create:
294
294
  error: Възникна грешка.
295
- success: Успешно е създаден нов тип инициатива.
296
295
  destroy:
297
296
  success: Типът инициатива беше премахнат успешно.
298
297
  edit:
@@ -540,7 +539,6 @@ bg:
540
539
  other: " подписи"
541
540
  vote_cabin:
542
541
  already_voted: Вече подписани
543
- supports_required: "Необходими са %{total_supports} подписа"
544
542
  verification_required: Потвърдете профила си, за да подпишете инициативата
545
543
  vote: Подписване
546
544
  votes_blocked: Подписването е деактивирано
@@ -113,7 +113,7 @@ ca:
113
113
  see_initiative: Veure la iniciativa
114
114
  initiatives_settings: Configuració
115
115
  initiatives_submenu:
116
- info: Quant a aquesta iniciativa
116
+ info: Sobre aquesta iniciativa
117
117
  initiatives_types: Tipus d'iniciatives
118
118
  moderations: Moderacions
119
119
  models:
@@ -237,11 +237,11 @@ ca:
237
237
  most_recent: Més recents
238
238
  exports:
239
239
  initiatives: Iniciatives
240
+ index:
241
+ initiatives_types:
242
+ alert_html: "<p>Has de crear com a mínim un tipus d'iniciativa per tal que les participants puguin començar a crear les seves iniciatives.</p><p>%{link}</p>"
243
+ button: Nou tipus d'iniciativa
240
244
  initiatives:
241
- accept:
242
- success: La iniciativa s'ha acceptat correctament.
243
- discard:
244
- success: La iniciativa s'ha descartat correctament.
245
245
  edit:
246
246
  accept: Accepta la iniciativa
247
247
  confirm: Segur?
@@ -265,12 +265,6 @@ ca:
265
265
  edit: Edita
266
266
  new: Nou
267
267
  photos: Fotografies
268
- publish:
269
- success: La iniciativa s'ha publicat correctament.
270
- reject:
271
- success: La iniciativa s'ha rebutjat correctament.
272
- unpublish:
273
- success: La iniciativa s'ha despublicat correctament.
274
268
  update:
275
269
  error: S'ha produït un error.
276
270
  success: La iniciativa s'ha actualitzat correctament.
@@ -302,7 +296,7 @@ ca:
302
296
  initiatives_types:
303
297
  create:
304
298
  error: S'ha produït un error.
305
- success: S'ha creat correctament un nou tipus d'iniciativa.
299
+ success: S'ha creat amb èxit un nou tipus d'iniciativa. Has de definir com a mínim un àmbit per aquest tipus d'iniciativa perquè es pugui fer servir.
306
300
  destroy:
307
301
  success: S'ha eliminat correctament el tipus d'iniciativa.
308
302
  edit:
@@ -531,7 +525,7 @@ ca:
531
525
  section: 'Si l''organització ho demana, imprimeix i omple aquest formulari per presentar-lo quan s''indiqui:'
532
526
  signature: Signatura
533
527
  result:
534
- answer_title: S'ha respost aquesta iniciativa
528
+ answer_title: S'ha respost aquesta iniciativa.
535
529
  initiative_rejected_reason: Aquesta iniciativa ha estat rebutjada per falta de signatures.
536
530
  show:
537
531
  area: Àrea
@@ -550,7 +544,6 @@ ca:
550
544
  other: " signatures"
551
545
  vote_cabin:
552
546
  already_voted: Ja has signat
553
- supports_required: "Es requereixen %{total_supports} signatures"
554
547
  verification_required: Verifica el teu compte per a signar la iniciativa
555
548
  vote: Signar
556
549
  votes_blocked: S'ha desactivat la signatura
@@ -153,7 +153,7 @@ cs:
153
153
  initiative_title: Název iniciativy
154
154
  name_and_surname: Jméno a příjmení
155
155
  postal_code: Poštovní směrovací číslo
156
- scope: Rozsah
156
+ scope: Oblast působnosti
157
157
  time_and_date: Čas a datum
158
158
  timestamp: Časové razítko
159
159
  titles:
@@ -243,11 +243,10 @@ cs:
243
243
  most_recent: Nejnovější
244
244
  exports:
245
245
  initiatives: Iniciativy
246
+ index:
247
+ initiatives_types:
248
+ button: Nový typ iniciativy
246
249
  initiatives:
247
- accept:
248
- success: Iniciativa byla úspěšně přijata.
249
- discard:
250
- success: Iniciativa byla úspěšně zrušena.
251
250
  edit:
252
251
  accept: Přijmout iniciativu
253
252
  confirm: Jste si jisti?
@@ -271,12 +270,6 @@ cs:
271
270
  edit: Upravit
272
271
  new: Nový
273
272
  photos: Fotky
274
- publish:
275
- success: Iniciativa byla úspěšně publikována.
276
- reject:
277
- success: Iniciativa byla úspěšně zamítnuta.
278
- unpublish:
279
- success: Iniciativa byla úspěšně zneveřejněna.
280
273
  update:
281
274
  error: Došlo k chybě.
282
275
  success: Tato iniciativa byla úspěšně aktualizována.
@@ -308,7 +301,7 @@ cs:
308
301
  initiatives_types:
309
302
  create:
310
303
  error: Došlo k chybě.
311
- success: Nový druh iniciativy byl úspěšně vytvořen
304
+ success: Byl úspěšně vytvořen nový typ iniciativy. Musíte definovat alespoň jeden rozsah pro tento typ iniciativy, aby mohl být použit.
312
305
  destroy:
313
306
  success: Druh iniciativy byl úspěšně odstraněn.
314
307
  edit:
@@ -564,7 +557,6 @@ cs:
564
557
  other: " podpisy"
565
558
  vote_cabin:
566
559
  already_voted: Již jste podepsal
567
- supports_required: "Vyžaduje %{total_supports} podpisů"
568
560
  verification_required: Ověřte svůj účet, abyste podepsali iniciativu
569
561
  vote: Podepsat
570
562
  votes_blocked: Podpis zakázán