decidim-proposals 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/admin/decidim_proposals_manifest.js +1 -0
  3. data/app/assets/images/decidim/gamification/badges/accepted_proposals.svg +1 -234
  4. data/app/assets/images/decidim/gamification/badges/proposal_votes.svg +1 -95
  5. data/app/assets/images/decidim/gamification/badges/proposals.svg +1 -229
  6. data/app/assets/images/decidim/proposals/icon.svg +1 -3
  7. data/app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6 +0 -5
  8. data/app/assets/javascripts/decidim/proposals/admin/proposals_picker.js.es6 +35 -0
  9. data/app/cells/decidim/proposals/collaborative_draft_link_to_proposal_cell.rb +1 -1
  10. data/app/cells/decidim/proposals/collaborative_draft_m/footer.erb +1 -1
  11. data/app/cells/decidim/proposals/collaborative_draft_m_cell.rb +1 -1
  12. data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +3 -3
  13. data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +1 -1
  14. data/app/cells/decidim/proposals/irreversible_action_modal/show.erb +2 -2
  15. data/app/cells/decidim/proposals/irreversible_action_modal_cell.rb +1 -1
  16. data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +1 -1
  17. data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +1 -1
  18. data/app/cells/decidim/proposals/proposal_m/footer.erb +4 -1
  19. data/app/cells/decidim/proposals/proposal_m_cell.rb +28 -8
  20. data/app/cells/decidim/proposals/proposal_tags/show.erb +8 -2
  21. data/app/cells/decidim/proposals/proposals_picker/proposals.erb +12 -0
  22. data/app/cells/decidim/proposals/proposals_picker/show.erb +14 -0
  23. data/app/cells/decidim/proposals/proposals_picker_cell.rb +72 -0
  24. data/app/commands/decidim/proposals/admin/create_proposal.rb +1 -1
  25. data/app/commands/decidim/proposals/admin/create_proposal_note.rb +15 -0
  26. data/app/commands/decidim/proposals/admin/update_proposal.rb +1 -1
  27. data/app/commands/decidim/proposals/create_collaborative_draft.rb +1 -1
  28. data/app/commands/decidim/proposals/create_proposal.rb +1 -1
  29. data/app/commands/decidim/proposals/gallery_methods.rb +2 -51
  30. data/app/commands/decidim/proposals/update_proposal.rb +1 -1
  31. data/app/controllers/concerns/decidim/proposals/admin/picker.rb +21 -0
  32. data/app/controllers/concerns/decidim/proposals/orderable.rb +1 -1
  33. data/app/controllers/decidim/proposals/proposals_controller.rb +4 -5
  34. data/app/controllers/decidim/proposals/versions_controller.rb +8 -18
  35. data/app/events/decidim/proposals/admin/proposal_note_created_event.rb +27 -0
  36. data/app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb +13 -0
  37. data/app/forms/decidim/proposals/admin/preview_participatory_text_form.rb +2 -2
  38. data/app/forms/decidim/proposals/admin/proposal_base_form.rb +129 -0
  39. data/app/forms/decidim/proposals/admin/proposal_form.rb +2 -120
  40. data/app/forms/decidim/proposals/proposal_form.rb +4 -0
  41. data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +5 -1
  42. data/app/helpers/decidim/proposals/admin/filterable_helper.rb +2 -2
  43. data/app/helpers/decidim/proposals/admin/proposal_rankings_helper.rb +2 -2
  44. data/app/helpers/decidim/proposals/admin/proposals_picker_helper.rb +30 -0
  45. data/app/helpers/decidim/proposals/application_helper.rb +6 -6
  46. data/app/helpers/decidim/proposals/control_version_helper.rb +1 -37
  47. data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +0 -145
  48. data/app/helpers/decidim/proposals/proposal_votes_helper.rb +2 -2
  49. data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +24 -7
  50. data/app/helpers/decidim/proposals/proposals_helper.rb +6 -0
  51. data/app/models/decidim/proposals/proposal.rb +4 -14
  52. data/app/permissions/decidim/proposals/permissions.rb +1 -22
  53. data/app/presenters/decidim/proposals/proposal_presenter.rb +14 -2
  54. data/app/queries/decidim/proposals/metrics/accepted_proposals_metric_manage.rb +1 -2
  55. data/app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb +15 -12
  56. data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +5 -4
  57. data/app/queries/decidim/proposals/metrics/proposals_metric_manage.rb +2 -8
  58. data/app/queries/decidim/proposals/metrics/votes_metric_manage.rb +3 -9
  59. data/app/services/decidim/proposals/diff_renderer.rb +2 -0
  60. data/app/services/decidim/proposals/proposal_builder.rb +1 -1
  61. data/app/services/decidim/proposals/proposal_search.rb +2 -2
  62. data/app/types/decidim/proposals/proposal_input_sort.rb +1 -7
  63. data/app/types/decidim/proposals/proposal_type.rb +1 -11
  64. data/app/types/decidim/proposals/proposals_type.rb +10 -0
  65. data/app/validators/proposal_length_validator.rb +38 -0
  66. data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +9 -1
  67. data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +2 -2
  68. data/app/views/decidim/proposals/admin/proposals/_form.html.erb +3 -23
  69. data/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
  70. data/app/views/decidim/proposals/admin/proposals/show.html.erb +1 -1
  71. data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +6 -4
  72. data/app/views/decidim/proposals/collaborative_drafts/_filters.html.erb +9 -7
  73. data/app/views/decidim/proposals/collaborative_drafts/_new_collaborative_draft_button.html.erb +4 -4
  74. data/app/views/decidim/proposals/collaborative_drafts/_reject_request_access_form.html.erb +1 -1
  75. data/app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb +4 -2
  76. data/app/views/decidim/proposals/collaborative_drafts/compare.html.erb +2 -0
  77. data/app/views/decidim/proposals/collaborative_drafts/complete.html.erb +2 -0
  78. data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +3 -1
  79. data/app/views/decidim/proposals/collaborative_drafts/index.html.erb +4 -2
  80. data/app/views/decidim/proposals/collaborative_drafts/new.html.erb +4 -0
  81. data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +29 -30
  82. data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +5 -3
  83. data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +0 -16
  84. data/app/views/decidim/proposals/proposals/_filters.html.erb +12 -10
  85. data/app/views/decidim/proposals/proposals/_proposal_preview.html.erb +1 -11
  86. data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +2 -2
  87. data/app/views/decidim/proposals/proposals/_proposals.html.erb +14 -0
  88. data/app/views/decidim/proposals/proposals/_vote_button.html.erb +13 -6
  89. data/app/views/decidim/proposals/proposals/_wizard_aside.html.erb +4 -2
  90. data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +4 -3
  91. data/app/views/decidim/proposals/proposals/compare.html.erb +2 -0
  92. data/app/views/decidim/proposals/proposals/complete.html.erb +2 -0
  93. data/app/views/decidim/proposals/proposals/edit.html.erb +3 -1
  94. data/app/views/decidim/proposals/proposals/edit_draft.html.erb +2 -0
  95. data/app/views/decidim/proposals/proposals/index.html.erb +5 -10
  96. data/app/views/decidim/proposals/proposals/new.html.erb +5 -1
  97. data/app/views/decidim/proposals/proposals/participatory_texts/_index.html.erb +1 -1
  98. data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +10 -3
  99. data/app/views/decidim/proposals/proposals/participatory_texts/_view_index.html.erb +1 -1
  100. data/app/views/decidim/proposals/proposals/preview.html.erb +7 -8
  101. data/app/views/decidim/proposals/proposals/show.html.erb +52 -34
  102. data/app/views/decidim/proposals/versions/index.html.erb +14 -32
  103. data/app/views/decidim/proposals/versions/show.html.erb +16 -34
  104. data/config/locales/ar.yml +8 -64
  105. data/config/locales/bg-BG.yml +237 -0
  106. data/config/locales/ca.yml +68 -61
  107. data/config/locales/cs.yml +78 -68
  108. data/config/locales/da-DK.yml +1 -0
  109. data/config/locales/de.yml +142 -58
  110. data/config/locales/el.yml +875 -0
  111. data/config/locales/en.yml +74 -67
  112. data/config/locales/es-MX.yml +68 -61
  113. data/config/locales/es-PY.yml +68 -61
  114. data/config/locales/es.yml +68 -61
  115. data/config/locales/et-EE.yml +1 -0
  116. data/config/locales/eu.yml +5 -43
  117. data/config/locales/fi-plain.yml +68 -61
  118. data/config/locales/fi.yml +109 -102
  119. data/config/locales/fr-CA.yml +876 -0
  120. data/config/locales/fr.yml +128 -60
  121. data/config/locales/ga-IE.yml +1 -0
  122. data/config/locales/gl.yml +5 -43
  123. data/config/locales/hr-HR.yml +1 -0
  124. data/config/locales/hu.yml +38 -61
  125. data/config/locales/id-ID.yml +5 -42
  126. data/config/locales/is-IS.yml +1 -27
  127. data/config/locales/it.yml +136 -76
  128. data/config/locales/ja-JP.yml +886 -0
  129. data/config/locales/lt-LT.yml +1 -0
  130. data/config/locales/lv-LV.yml +858 -0
  131. data/config/locales/mt-MT.yml +1 -0
  132. data/config/locales/nl.yml +114 -59
  133. data/config/locales/no.yml +11 -64
  134. data/config/locales/pl.yml +170 -60
  135. data/config/locales/pt-BR.yml +6 -47
  136. data/config/locales/pt.yml +419 -331
  137. data/config/locales/ro-RO.yml +840 -0
  138. data/config/locales/ru.yml +1 -40
  139. data/config/locales/sk-SK.yml +896 -0
  140. data/config/locales/sk.yml +869 -0
  141. data/config/locales/sl.yml +26 -0
  142. data/config/locales/sr-CS.yml +126 -0
  143. data/config/locales/sv.yml +228 -156
  144. data/config/locales/tr-TR.yml +5 -43
  145. data/config/locales/uk.yml +1 -40
  146. data/db/migrate/20181003074440_fix_user_groups_ids_in_proposals_endorsements.rb +4 -0
  147. data/db/migrate/20191206154128_add_endorsements_counter_cache_to_proposals.rb +7 -0
  148. data/db/migrate/20200120215928_move_proposal_endorsements_to_core_endorsements.rb +52 -0
  149. data/db/migrate/20200730131631_move_proposal_endorsed_event_notifications_to_resource_endorsed_event.rb +20 -0
  150. data/lib/decidim/proposals/component.rb +8 -4
  151. data/lib/decidim/proposals/engine.rb +1 -5
  152. data/lib/decidim/proposals/test/capybara_proposals_picker.rb +49 -0
  153. data/lib/decidim/proposals/test/factories.rb +3 -12
  154. data/lib/decidim/proposals/version.rb +1 -1
  155. metadata +55 -34
  156. data/app/assets/javascripts/decidim/proposals/identity_selector_dialog.js.es6 +0 -56
  157. data/app/cells/decidim/proposals/endorsers_list/show.erb +0 -17
  158. data/app/cells/decidim/proposals/endorsers_list_cell.rb +0 -31
  159. data/app/commands/decidim/proposals/attachment_methods.rb +0 -43
  160. data/app/commands/decidim/proposals/endorse_proposal.rb +0 -59
  161. data/app/commands/decidim/proposals/unendorse_proposal.rb +0 -40
  162. data/app/controllers/decidim/proposals/proposal_endorsements_controller.rb +0 -60
  163. data/app/models/decidim/proposals/proposal_endorsement.rb +0 -37
  164. data/app/views/decidim/proposals/proposal_endorsements/_identity.html.erb +0 -9
  165. data/app/views/decidim/proposals/proposal_endorsements/identities.html.erb +0 -12
  166. data/app/views/decidim/proposals/proposal_endorsements/update_buttons_and_counters.js.erb +0 -20
  167. data/app/views/decidim/proposals/proposals/_endorsement_button.html.erb +0 -11
  168. data/app/views/decidim/proposals/proposals/_endorsement_identities_cabin.html.erb +0 -13
  169. data/app/views/decidim/proposals/versions/_version.html.erb +0 -20
@@ -2,8 +2,8 @@
2
2
  <div class="m-bottom">
3
3
  <% unless @step == :step_2 %>
4
4
  <%= link_to proposal_wizard_aside_link_to_back(@step) do %>
5
- <%= icon "chevron-left", class: "icon--small" %>
6
- <%= wizard_aside_back_text %>
5
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
6
+ <%= wizard_aside_back_text(@step) %>
7
7
  <% end %>
8
8
  <% end %>
9
9
  </div>
@@ -13,6 +13,8 @@
13
13
  </p>
14
14
  </div>
15
15
  <div class="show-for-large">
16
+ <div><%= proposal_wizard_steps_title %></div>
17
+ <div><%= proposal_wizard_current_step_of(@step) %></div>
16
18
  <%= proposal_wizard_stepper(@step) %>
17
19
  </div>
18
20
  </div>
@@ -23,9 +23,10 @@
23
23
  </h2>
24
24
 
25
25
  <div class="hide-for-large m-bottom">
26
- <%= proposal_wizard_current_step_of(@step) %>
26
+ <div><%= proposal_wizard_steps_title %></div>
27
+ <div><%= proposal_wizard_current_step_of(@step) %></div>
27
28
 
28
- <ol id="steps" class="wizard__steps steps-toggle is-hidden" data-toggler=".is-hidden">
29
+ <div id="steps" class="wizard__steps steps-toggle is-hidden" data-toggler=".is-hidden">
29
30
  <%= proposal_wizard_stepper(@step) %>
30
- </ol>
31
+ </div>
31
32
  </div>
@@ -1,3 +1,5 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row">
2
4
  <%= render partial: "wizard_aside" %>
3
5
 
@@ -1,3 +1,5 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row">
2
4
  <%= render partial: "wizard_aside" %>
3
5
 
@@ -1,6 +1,8 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row columns">
2
4
  <%= link_to :back, class: "muted-link" do %>
3
- <%= icon "chevron-left", class: "icon--small" %>
5
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
4
6
  <%= t(".back") %>
5
7
  <% end %>
6
8
  <h2 class="section-heading"><%= t(".title") %></h2>
@@ -1,3 +1,5 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row">
2
4
  <%= render partial: "wizard_aside" %>
3
5
 
@@ -30,19 +30,14 @@
30
30
  <%= render partial: "voting_rules" %>
31
31
  <div class="row columns">
32
32
  <div class="title-action">
33
- <h2 id="proposals-count" class="title-action__title section-heading">
33
+ <h3 id="proposals-count" class="title-action__title section-heading">
34
34
  <%= render partial: "count" %>
35
- </h2>
35
+ </h3>
36
36
  <% if current_settings.creation_enabled && current_component.participatory_space.can_participate?(current_user) %>
37
37
  <%= action_authorized_link_to :create, new_proposal_path, class: "title-action__action button small", data: { "redirect_url" => new_proposal_path } do %>
38
38
  <%= t(".new_proposal") %>
39
- <%= icon "plus" %>
39
+ <%= icon "plus", role: "img", "aria-hidden": true %>
40
40
  <% end %>
41
- <% else %>
42
- <span class="title-action__action button small hollow disabled">
43
- <%= t(".new_proposal") %>
44
- <%= icon "plus" %>
45
- </span>
46
41
  <% end %>
47
42
 
48
43
  <% if component_settings.collaborative_drafts_enabled? %>
@@ -57,7 +52,7 @@
57
52
  <%= render partial: "filters" %>
58
53
  </div>
59
54
  </div>
60
- <div id="proposals" class="columns mediumlarge-8 large-9">
55
+ <div id="proposals" class="columns mediumlarge-8 large-9" aria-live="polite">
61
56
  <%= render partial: "proposals" %>
62
57
  </div>
63
58
  </div>
@@ -67,4 +62,4 @@
67
62
  </div>
68
63
  </div>
69
64
  <%= javascript_include_tag("decidim/filters") %>
70
- <%= javascript_include_tag "decidim/orders" %>
65
+ <%= javascript_include_tag "decidim/results_listing" %>
@@ -1,3 +1,5 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row">
2
4
  <%= render partial: "decidim/proposals/proposals/wizard_aside" %>
3
5
 
@@ -7,8 +9,10 @@
7
9
  <div class="card">
8
10
  <div class="card__content">
9
11
  <%= decidim_form_for(@form) do |form| %>
12
+ <%= form_required_explanation %>
13
+
10
14
  <div class="field hashtags__container">
11
- <%= form.text_field :title, class: "js-hashtags", hashtaggable: true %>
15
+ <%= form.text_field :title, class: "js-hashtags" %>
12
16
  </div>
13
17
 
14
18
  <div class="field hashtags__container">
@@ -8,7 +8,7 @@
8
8
  <% if proposal.participatory_text_level == "article" %>
9
9
  <u><%= decidim_html_escape(present(proposal).title).html_safe %></u>
10
10
  <% else %>
11
- <u class="text-uppercase"><%= decidim_html_escape(present(proposal).title).html_safe %></u>
11
+ <u><%= decidim_html_escape(present(proposal).title).html_safe %></u>
12
12
  <% end %>
13
13
  <br>
14
14
  <% end %>
@@ -6,7 +6,10 @@
6
6
  <% if current_settings.votes_blocked? %>
7
7
  <%= action_authorized_button_to :vote, t("decidim.proposals.proposals.vote_button.votes_blocked"), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), resource: proposal, class: "column button light button--sc disabled", disabled: true %>
8
8
  <% else %>
9
- <%= action_authorized_button_to :vote, t("decidim.proposals.proposals.vote_button.vote"), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), resource: proposal, class: "column button light button--sc", data: { disable: true, "redirect-url": proposal_path(proposal) } %>
9
+ <%= action_authorized_button_to :vote, proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), resource: proposal, class: "column button light button--sc", data: { disable: true, "redirect-url": proposal_path(proposal) } do %>
10
+ <%= t("decidim.proposals.proposals.vote_button.vote") %>
11
+ <span class="show-for-sr"><%= decidim_html_escape(present(proposal).title) %></span>
12
+ <% end %>
10
13
  <% end %>
11
14
  <% else %>
12
15
  <% if @voted_proposals ? @voted_proposals.include?(proposal.id) : proposal.voted_by?(current_user) %>
@@ -25,8 +28,9 @@
25
28
  class: "column button light button--sc success",
26
29
  id: "vote_button-#{proposal.id}"
27
30
  ) do %>
28
- <%= icon("check", class: "icon--small") %>
31
+ <%= icon("check", class: "icon--small", role: "img", "aria-hidden": true) %>
29
32
  <%= t("decidim.proposals.proposals.vote_button.already_voted") %>
33
+ <span class="show-for-sr"><%= decidim_html_escape(present(proposal).title) %></span>
30
34
  <% end %>
31
35
  <% else %>
32
36
  <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
@@ -37,7 +41,10 @@
37
41
  <% elsif current_settings.votes_blocked? || !current_component.participatory_space.can_participate?(current_user) %>
38
42
  <%= content_tag :span, t("decidim.proposals.proposals.vote_button.votes_blocked"), class: "column button light button--sc disabled", disabled: true %>
39
43
  <% else %>
40
- <%= action_authorized_button_to :vote, t("decidim.proposals.proposals.vote_button.vote"), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), resource: proposal, remote: true, data: { disable: true, "redirect-url": proposal_path(proposal) }, class: "column button light button--sc" %>
44
+ <%= action_authorized_button_to :vote, proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), resource: proposal, remote: true, data: { disable: true, "redirect-url": proposal_path(proposal) }, class: "column button light button--sc" do %>
45
+ <%= t("decidim.proposals.proposals.vote_button.vote") %>
46
+ <span class="show-for-sr"><%= decidim_html_escape(present(proposal).title) %></span>
47
+ <% end %>
41
48
  <% end %>
42
49
  <% end %>
43
50
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="card card__link p-xs flex--fsc reveal__trigger" data-open="participatory-text-index">
2
- <%= icon "list", class: "mr-s" %>
2
+ <%= icon "list", class: "mr-s", role: "img", "aria-hidden": true %>
3
3
  <strong><%= t(".see_index") %></strong>
4
4
  </div>
5
5
  <div id="participatory-text-index" class="reveal large" data-reveal>
@@ -1,16 +1,15 @@
1
+ <% add_decidim_page_title(proposal_wizard_step_title(action_name)) %>
2
+
1
3
  <div class="row">
2
4
  <%= render partial: "wizard_aside" %>
3
5
 
4
6
  <div class="columns large-6">
5
7
  <%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %>
6
- <div class="card">
7
- <div class="p-l">
8
- <%= render partial: "proposal_preview", locals: { proposal: @proposal } %>
9
- <div class="row column flex-center">
10
- <%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %>
11
-
12
- <%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %>
13
- </div>
8
+ <%= render partial: "proposal_preview", locals: { proposal: @proposal } %>
9
+ <div class="p-l">
10
+ <div class="row column flex-center">
11
+ <%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %>
12
+ <%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %>
14
13
  </div>
15
14
  </div>
16
15
  </div>
@@ -33,19 +33,52 @@ extra_admin_link(
33
33
  <% end %>
34
34
  <%= emendation_announcement_for @proposal %>
35
35
  <div class="row column view-header">
36
+
37
+ <%= link_to :proposals, class: "small hollow" do %>
38
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
39
+ <%= t(".back_to_list") %>
40
+ <% end %>
41
+
36
42
  <% if @proposal.emendation? %>
37
- <h2 class="heading2"><%= t(".changes_at_title", title: present(@proposal.amendable).title(links: true, html_escape: true)) %></h2>
43
+ <h3 class="heading3"><%= t(".changes_at_title", title: present(@proposal.amendable).title(links: true, html_escape: true)) %></h3>
38
44
  <% else %>
39
- <h2 class="heading2"><%= present(@proposal).title(links: true, html_escape: true) %></h2>
45
+ <h3 class="heading3"><%= present(@proposal).title(links: true, html_escape: true) %></h3>
40
46
  <% end %>
41
47
  <% unless component_settings.participatory_texts_enabled? %>
42
48
  <%= cell("decidim/coauthorships", @proposal, has_actions: true, size: 3, context: { current_user: current_user }) %>
43
49
  <% end %>
44
50
  </div>
45
51
  <div class="row">
46
- <div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
52
+ <div class="columns mediumlarge-8 large-9">
53
+ <div class="section">
54
+ <% if @proposal.emendation? %>
55
+ <%= cell("decidim/diff", proposal_presenter.versions.last) %>
56
+ <% elsif not ["section","subsection"].include? @proposal.participatory_text_level %>
57
+ <%== cell("decidim/proposals/proposal_m", @proposal, full_badge: true).badge %>
58
+ <%= render_proposal_body(@proposal) %>
59
+ <% end %>
60
+ <% if component_settings.geocoding_enabled? %>
61
+ <%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @proposal } %>
62
+ <% end %>
63
+ <% if proposal_has_costs? && current_settings.answers_with_costs? %>
64
+ <%= cell("decidim/proposals/cost_report", @proposal) %>
65
+ <% end %>
66
+ <%= cell "decidim/proposals/proposal_tags", @proposal %>
67
+ </div>
68
+
69
+ <%= cell("decidim/announcement", proposal_reason_callout_args) if @proposal.answered? && @proposal.published_state? %>
70
+
71
+ <%= linked_resources_for @proposal, :results, "included_proposals" %>
72
+ <%= linked_resources_for @proposal, :projects, "included_proposals" %>
73
+ <%= linked_resources_for @proposal, :meetings, "proposals_from_meeting" %>
74
+ <%= linked_resources_for @proposal, :proposals, "copied_from_component" %>
75
+
76
+ <%= cell "decidim/endorsers_list", @proposal %>
77
+ <%= amendments_for @proposal %>
78
+ </div>
79
+ <div class="columns section view-side mediumlarge-4 large-3">
47
80
  <% if @proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal) %>
48
- <%= link_to t(".edit_proposal"), edit_proposal_path(@proposal), class: "button secondary hollow expanded button-sc button--icon follow-button" %>
81
+ <%= link_to t(".edit_proposal"), edit_proposal_path(@proposal), class: "button hollow expanded button--sc" %>
49
82
  <% else %>
50
83
  <%= amend_button_for @proposal %>
51
84
  <% end %>
@@ -68,7 +101,19 @@ extra_admin_link(
68
101
  <%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
69
102
  <%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } %>
70
103
  <% end %>
71
- <%= render partial: "endorsements_card_row", locals: { proposal: @proposal } %>
104
+ <div class="row collapse buttons__row">
105
+ <% if endorsements_enabled? %>
106
+ <div class="column small-9 collapse">
107
+ <%= endorsement_buttons_cell(@proposal) %>
108
+ </div>
109
+ <% end %>
110
+ <div class="column collapse <%= endorsements_enabled? ? "small-3" : "" %>">
111
+ <%= link_to "#comments", class: "button small compact hollow secondary button--nomargin expanded" do %>
112
+ <span class="show-for-sr"><%= present(@proposal).title(html_escape: true) %></span>
113
+ <%= icon "comment-square", class: "icon--small", aria_label: t(".comments"), role: "img" %> <%= @proposal.comments.count %>
114
+ <% end %>
115
+ </div>
116
+ </div>
72
117
  <br>
73
118
  <%= follow_button_for(@proposal) %>
74
119
  </div>
@@ -81,38 +126,11 @@ extra_admin_link(
81
126
  <%= resource_reference(@proposal) %>
82
127
  <%= resource_version(proposal_presenter, versions_path: proposal_versions_path(@proposal)) %>
83
128
  <%= cell("decidim/fingerprint", @proposal) %>
84
- <%= render partial: "decidim/shared/share_modal" %>
85
- <%= embed_modal_for proposal_proposal_widget_url(@proposal, format: :js) %>
129
+ <%= render partial: "decidim/shared/share_modal", locals: { resource: @proposal } %>
130
+ <%= embed_modal_for proposal_proposal_widget_url(@proposal, format: :js), locals: { resource: @proposal } %>
86
131
  <%= cell "decidim/proposals/proposal_link_to_collaborative_draft", @proposal %>
87
132
  <%= cell "decidim/proposals/proposal_link_to_rejected_emendation", @proposal %>
88
133
  </div>
89
- <div class="columns mediumlarge-8 mediumlarge-pull-4">
90
- <div class="section">
91
- <% if @proposal.emendation? %>
92
- <%= cell("decidim/diff", proposal_presenter.versions.last) %>
93
- <% elsif not ["section","subsection"].include? @proposal.participatory_text_level %>
94
- <%== cell("decidim/proposals/proposal_m", @proposal, full_badge: true).badge %>
95
- <%= render_proposal_body(@proposal) %>
96
- <% end %>
97
- <% if component_settings.geocoding_enabled? %>
98
- <%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @proposal } %>
99
- <% end %>
100
- <% if proposal_has_costs? && current_settings.answers_with_costs? %>
101
- <%= cell("decidim/proposals/cost_report", @proposal) %>
102
- <% end %>
103
- <%= cell "decidim/proposals/proposal_tags", @proposal %>
104
- </div>
105
-
106
- <%= cell("decidim/announcement", proposal_reason_callout_args) if @proposal.answered? && @proposal.published_state? %>
107
-
108
- <%= linked_resources_for @proposal, :results, "included_proposals" %>
109
- <%= linked_resources_for @proposal, :projects, "included_proposals" %>
110
- <%= linked_resources_for @proposal, :meetings, "proposals_from_meeting" %>
111
- <%= linked_resources_for @proposal, :proposals, "copied_from_component" %>
112
-
113
- <%= cell "decidim/proposals/endorsers_list", @proposal, context: { current_user: current_user } %>
114
- <%= amendments_for @proposal %>
115
- </div>
116
134
  </div>
117
135
  <%= attachments_for @proposal %>
118
136
 
@@ -1,34 +1,16 @@
1
- <div class="row">
2
- <div class="small-12 columns">
3
- <h2 class="heading2">
4
- <%= t("changes_at_title", scope: "decidim.proposals.versions", title: item.title) %>
5
- </h2>
6
-
7
- <h3 class="section-heading">
8
- <%= t(".title") %>
9
- </h3>
10
-
11
- <div class="row">
12
- <div class="mediumlarge-8 columns">
13
- <div class="section">
14
- <div class="card card--list">
15
- <% item.versions.each_with_index do |version, index| %>
16
- <%= render partial: "version", locals: { version: version, index: index } %>
17
- <% end %>
18
- </div>
19
- </div>
20
- </div>
1
+ <% add_decidim_page_title(t(".title")) %>
2
+ <% add_decidim_page_title(versioned_resource.title) %>
3
+ <%
4
+ if versioned_resource.is_a?(Decidim::Proposals::CollaborativeDraft)
5
+ add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2))
6
+ end
7
+ %>
21
8
 
22
- <div class="columns section mediumlarge-4 large-3">
23
- <div class="card extra definition-data">
24
- <div class="definition-data__item versions_count">
25
- <span class="definition-data__title"><%= t("versions.stats.number_of_versions", scope: "decidim.proposals") %></span>
26
- <%= item.versions.count %>
27
-
28
- <%= link_to back_to_resource_path_text, back_to_resource_path, class: "button button--sc hollow secondary small expanded" %>
29
- </div>
30
- </div>
31
- </div>
32
- </div>
33
- </div>
9
+ <div class="row">
10
+ <%= cell(
11
+ "decidim/versions_list",
12
+ versioned_resource,
13
+ version_path: proc { |version_index| url_for(action: :show, id: version_index) },
14
+ i18n_scope: "decidim.proposals.versions.#{item_name.to_s.pluralize}"
15
+ ) %>
34
16
  </div>
@@ -1,36 +1,18 @@
1
- <div class="row">
2
- <div class="small-12 columns">
3
- <h2 class="heading2">
4
- <%= t("changes_at_title", scope: "decidim.proposals.versions", title: item.title) %>
5
- </h2>
6
-
7
- <div class="row">
8
- <div class="mediumlarge-8 columns">
9
- <div class="section">
10
- <%= cell("decidim/diff", current_version) %>
11
- </div>
12
- </div>
1
+ <% add_decidim_page_title(t("changes_at_title", scope: "decidim.version.show", title: versioned_resource.title)) %>
2
+ <% add_decidim_page_title(t("decidim.proposals.versions.index.title")) %>
3
+ <%
4
+ if versioned_resource.is_a?(Decidim::Proposals::CollaborativeDraft)
5
+ add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2))
6
+ end
7
+ %>
13
8
 
14
- <div class="columns section mediumlarge-4 large-3">
15
- <div class="card extra definition-data">
16
- <div class="definition-data__item versions_count">
17
- <span class="definition-data__title"><%= t("versions.stats.version_number", scope: "decidim.proposals") %></span>
18
- <%= t("versions.stats.version_number_out_of_total", scope: "decidim.proposals", current_version: params[:id], total_count: item.versions_count) %>
19
- <%= link_to t("versions.stats.show_all_versions", scope: "decidim.proposals"), resource_all_versions_path, class: "button button--sc hollow secondary small expanded" %>
20
- <%= link_to back_to_resource_path_text, back_to_resource_path, class: "button button--sc hollow secondary small expanded" %>
21
- </div>
22
- <% if current_version.whodunnit.present? %>
23
- <div class="definition-data__item last_revision_by">
24
- <span class="definition-data__title"><%= t("versions.stats.version_author", scope: "decidim.proposals") %></span>
25
- <%= render_resource_editor(current_version) %>
26
- </div>
27
- <% end %>
28
- <div class="definition-data__item versions_count">
29
- <span class="definition-data__title"><%= t("versions.stats.version_created_at", scope: "decidim.proposals") %></span>
30
- <%= l current_version.created_at, format: :decidim_short %>
31
- </div>
32
- </div>
33
- </div>
34
- </div>
35
- </div>
9
+ <div class="row">
10
+ <%= cell(
11
+ "decidim/version",
12
+ current_version,
13
+ index: params[:id],
14
+ versioned_resource: versioned_resource,
15
+ versions_path: proc { url_for(action: :index) },
16
+ i18n_scope: "decidim.proposals.versions.#{item_name.to_s.pluralize}"
17
+ ) %>
36
18
  </div>
@@ -54,7 +54,6 @@ ar:
54
54
  decidim/proposals/creation_enabled_event: تمكين إنشاء الاقتراح
55
55
  decidim/proposals/endorsing_enabled_event: تمكين اقتراح الاقتراح
56
56
  decidim/proposals/evaluating_proposal_event: يجري تقييم الاقتراح
57
- decidim/proposals/proposal_endorsed_event: تمت الموافقة على الاقتراح
58
57
  decidim/proposals/proposal_mentioned_event: الاقتراح المذكور
59
58
  decidim/proposals/publish_proposal_event: تم نشر الاقتراح
60
59
  decidim/proposals/rejected_proposal_event: تم رفض الاقتراح
@@ -75,13 +74,6 @@ ar:
75
74
  few: اقتراحات
76
75
  many: اقتراحات
77
76
  other: اقتراحات
78
- decidim/proposals/proposal_endorsement:
79
- zero: موافقات
80
- one: المصادقة
81
- two: موافقات
82
- few: موافقات
83
- many: موافقات
84
- other: موافقات
85
77
  decidim/proposals/proposal_note:
86
78
  zero: ملاحظات
87
79
  one: ملحوظة
@@ -99,21 +91,9 @@ ar:
99
91
  decidim:
100
92
  admin:
101
93
  filters:
102
- is_emendation_true:
103
- label: نوع
104
- values:
105
- 'false': اقتراحات
106
- 'true': تعديلات
107
- state_eq:
108
- values:
109
- evaluating: تقييم
110
- withdrawn: سحب
111
- state_null:
112
- label: الحالة
113
- values:
114
- 'true': بلا جواب
115
- valuator_role_ids_has:
116
- label: تم إسناده إلى مُقيِّم
94
+ proposals:
95
+ valuator_role_ids_has:
96
+ label: تم إسناده إلى مُقيِّم
117
97
  components:
118
98
  proposals:
119
99
  actions:
@@ -213,11 +193,6 @@ ar:
213
193
  notification_title: تم قبول اقتراحك <a href="%{resource_path}">%{resource_title}</a>.
214
194
  follower:
215
195
  notification_title: لقد تم قبول المُقتَرح <a href="%{resource_path}">%{resource_title}</a>.
216
- proposal_endorsed:
217
- email_intro: '%{endorser_name} %{endorser_nickname}، الذي تتابعه ، وافق للتو على الاقتراح "%{resource_title}" ونعتقد أنه قد يكون مثيرا للاهتمام بالنسبة لك. التحقق من ذلك والمساهمة:'
218
- email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{endorser_nickname}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
219
- email_subject: "%{endorser_nickname} قد صادق على اقتراح جديد"
220
- notification_title: تمت الموافقة على اقتراح <a href="%{resource_path}">%{resource_title}</a> من قبل <a href="%{endorser_path}">%{endorser_name} %{endorser_nickname}</a>.
221
196
  proposal_evaluating:
222
197
  affected_user:
223
198
  email_intro: 'يتم حاليًا تقييم الاقتراح الخاص بك "%{resource_title}". يمكنك التحقق من وجود إجابة في هذه الصفحة:'
@@ -391,10 +366,8 @@ ar:
391
366
  title: تحديث الاقتراح
392
367
  update: تحديث
393
368
  form:
394
- add_images: إضافة صور
395
369
  attachment_legend: "(اختياري) إضافة مرفق"
396
370
  created_in_meeting: هذا الاقتراح يأتي من اجتماع
397
- gallery_legend: "(اختياري) إضافة معرض للصور"
398
371
  select_a_category: اختر تصنيف
399
372
  select_a_meeting: اختيار اجتماع
400
373
  index:
@@ -591,14 +564,11 @@ ar:
591
564
  many: و %{count} المزيد من الناس
592
565
  other: و %{count} المزيد من الناس
593
566
  info-message: هذا هو <strong>مشروع تعاوني</strong> لاقتراح. هذا يعني أنه يمكنك مساعدة مؤلفيها في صياغة الاقتراح باستخدام قسم التعليقات أدناه أو تحسينه مباشرةً من خلال طلب الوصول لتحريره. بمجرد أن يمنحك المؤلفون حق الوصول ، ستتمكن من إجراء تغييرات على هذه المسودة.
594
- of_versions: "(من %{number})"
595
567
  publish: نشر
596
568
  publish_info: نشر هذا الإصدار من المسودة أو
597
569
  published_proposal: الاقتراح المنشور
598
570
  request_access: طلب الدخول
599
571
  requested_access: طلب الوصول
600
- see_other_versions: رؤية الإصدارات الأخرى
601
- version: الإصدار %{number}
602
572
  version_history: انظر تاريخ الإصدار لهذا الاقتراح
603
573
  withdraw: سحب المشروع
604
574
  states:
@@ -635,7 +605,6 @@ ar:
635
605
  fields:
636
606
  category: الفئة
637
607
  comments: تعليقات
638
- endorsements: موافقات
639
608
  id: هوية شخصية
640
609
  notes: ملاحظات
641
610
  official_proposal: الاقتراح الرسمي
@@ -654,19 +623,6 @@ ar:
654
623
  amend: تعديل
655
624
  comment: تعليق
656
625
  comments: تعليقات
657
- endorse: تأييد
658
- proposal_endorsements:
659
- create:
660
- error: كانت هناك مشكلة في تأييد الاقتراح.
661
- identities:
662
- done: فعله
663
- select_identity: حدد الهوية
664
- proposal_endorsements_helper:
665
- endorsement_button:
666
- already_endorsed: أيد
667
- endorse: تأييد
668
- render_endorsements_button_card_part:
669
- endorse: تأييد
670
626
  proposal_votes:
671
627
  create:
672
628
  error: كانت هناك مشكلة في دعم الاقتراح.
@@ -697,10 +653,6 @@ ar:
697
653
  discard_confirmation: هل أنت متأكد من أنك تريد التخلص من مسودة الاقتراح؟
698
654
  send: معاينة
699
655
  title: تحرير مسودة الاقتراح
700
- endorsement_identities_cabin:
701
- endorse: تأييد
702
- endorsements_card_row:
703
- comments: تعليقات
704
656
  filters:
705
657
  activity: نشاطي
706
658
  all: الكل
@@ -766,6 +718,7 @@ ar:
766
718
  answer: إجابة
767
719
  back_to: ارجع الى
768
720
  changes_at_title: تعديل على "%{title}"
721
+ comments: تعليقات
769
722
  edit_proposal: تعديل الاقتراح
770
723
  endorsements_list: قائمة المصادقة
771
724
  estimated_cost: التكلفة التقديرية
@@ -786,7 +739,6 @@ ar:
786
739
  read_more: اقرأ المزيد
787
740
  report: أبلغ عن
788
741
  withdraw_btn_hint: يمكنك سحب اقتراحك إذا غيرت رأيك ، طالما أنك لم تتلق أي دعم. لم يتم حذف الاقتراح ، وسوف يظهر في قائمة المقترحات المسحوبة.
789
- withdraw_confirmation: هل أنت متأكد أنك تريد سحب هذا الاقتراح؟
790
742
  withdraw_proposal: سحب الاقتراح
791
743
  vote_button:
792
744
  already_voted: معتمد بالفعل
@@ -841,20 +793,12 @@ ar:
841
793
  error: حدثت مشكلة في حفظ المسودة التعاونية.
842
794
  success: تم تحديث مسودة الاقتراح بنجاح.
843
795
  versions:
844
- changes_at_title: التغييرات في "%{title}"
796
+ collaborative_drafts:
797
+ back_to_resource: العودة إلى المسودة التعاونية
845
798
  index:
846
799
  title: إصدارات
847
- stats:
848
- back_to_collaborative_draft: العودة إلى المسودة التعاونية
849
- back_to_proposal: العودة إلى الاقتراح
850
- number_of_versions: إصدارات
851
- show_all_versions: عرض جميع الإصدارات
852
- version_author: مؤلف الإصدار
853
- version_created_at: تم إنشاء الإصدار في
854
- version_number: رقم الإصدار
855
- version_number_out_of_total: "%{current_version} من %{total_count}"
856
- version:
857
- version_index: الإصدار %{index}
800
+ proposals:
801
+ back_to_resource: العودة إلى الاقتراح
858
802
  withdraw:
859
803
  errors:
860
804
  has_supports: لا يمكن سحب هذا الاقتراح لأنه تلقى دعما مِن قَبل.