decidim-participatory_processes 0.21.0 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/_all_processes.erb +4 -1
  3. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb +5 -9
  4. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +10 -5
  5. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +1 -1
  6. data/app/cells/decidim/participatory_processes/process_filters/show.erb +2 -2
  7. data/app/cells/decidim/participatory_processes/process_group_m/footer.erb +4 -5
  8. data/app/cells/decidim/participatory_processes/process_m/data.erb +1 -1
  9. data/app/cells/decidim/participatory_processes/process_m/footer.erb +5 -6
  10. data/app/cells/decidim/participatory_processes/process_m/tags.erb +2 -2
  11. data/app/cells/decidim/participatory_processes/process_m_cell.rb +21 -0
  12. data/app/cells/decidim/participatory_processes/statistics/show.erb +2 -2
  13. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb +2 -1
  14. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +3 -3
  15. data/app/commands/decidim/participatory_processes/admin/notify_role_assigned_to_participatory_process.rb +22 -0
  16. data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +10 -5
  17. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb +3 -1
  18. data/app/controllers/decidim/participatory_processes/admin/participatory_process_exports_controller.rb +4 -0
  19. data/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +2 -1
  20. data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +11 -2
  21. data/app/controllers/decidim/participatory_processes/{participatory_process_widgets_controller.rb → widgets_controller.rb} +2 -2
  22. data/app/events/decidim/participatory_process_role_assigned_event.rb +28 -0
  23. data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +5 -6
  24. data/app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb +4 -1
  25. data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +3 -0
  26. data/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +3 -2
  27. data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +11 -0
  28. data/app/models/decidim/participatory_process.rb +13 -1
  29. data/app/models/decidim/participatory_process_group.rb +5 -0
  30. data/app/models/decidim/participatory_process_step.rb +3 -0
  31. data/app/permissions/decidim/participatory_processes/permissions.rb +1 -0
  32. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_group_presenter.rb +2 -2
  33. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb +2 -2
  34. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_user_role_presenter.rb +2 -2
  35. data/app/presenters/decidim/participatory_processes/participatory_process_metric_charts_presenter.rb +2 -2
  36. data/app/queries/decidim/participatory_processes/stats_participants_count.rb +8 -6
  37. data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +6 -4
  38. data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +1 -1
  39. data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +3 -2
  40. data/app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb +8 -3
  41. data/app/views/decidim/participatory_processes/participatory_processes/_metrics.html.erb +1 -1
  42. data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +13 -6
  43. data/app/views/decidim/participatory_processes/participatory_processes/_statistics.html.erb +0 -0
  44. data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +24 -12
  45. data/app/views/layouts/decidim/_process_header.html.erb +1 -1
  46. data/app/views/layouts/decidim/_process_header_steps.html.erb +1 -1
  47. data/app/views/layouts/decidim/participatory_process.html.erb +1 -0
  48. data/config/locales/am-ET.yml +1 -0
  49. data/config/locales/bg-BG.yml +19 -0
  50. data/config/locales/bg.yml +19 -0
  51. data/config/locales/ca.yml +22 -1
  52. data/config/locales/cs.yml +33 -12
  53. data/config/locales/da-DK.yml +1 -0
  54. data/config/locales/da.yml +1 -0
  55. data/config/locales/de.yml +76 -24
  56. data/config/locales/el.yml +452 -0
  57. data/config/locales/en.yml +22 -1
  58. data/config/locales/eo.yml +1 -0
  59. data/config/locales/es-MX.yml +21 -0
  60. data/config/locales/es-PY.yml +21 -0
  61. data/config/locales/es.yml +21 -0
  62. data/config/locales/et-EE.yml +1 -0
  63. data/config/locales/et.yml +1 -0
  64. data/config/locales/fi-plain.yml +22 -1
  65. data/config/locales/fi.yml +97 -76
  66. data/config/locales/fr-CA.yml +456 -0
  67. data/config/locales/fr.yml +29 -0
  68. data/config/locales/ga-IE.yml +1 -0
  69. data/config/locales/hr-HR.yml +1 -0
  70. data/config/locales/hr.yml +1 -0
  71. data/config/locales/is.yml +215 -0
  72. data/config/locales/it.yml +31 -5
  73. data/config/locales/ja-JP.yml +445 -0
  74. data/config/locales/ja.yml +445 -0
  75. data/config/locales/ko-KR.yml +1 -0
  76. data/config/locales/ko.yml +1 -0
  77. data/config/locales/lt-LT.yml +1 -0
  78. data/config/locales/lt.yml +1 -0
  79. data/config/locales/lv.yml +445 -0
  80. data/config/locales/mt-MT.yml +1 -0
  81. data/config/locales/mt.yml +1 -0
  82. data/config/locales/nl.yml +26 -0
  83. data/config/locales/no.yml +147 -136
  84. data/config/locales/om-ET.yml +1 -0
  85. data/config/locales/pl.yml +198 -149
  86. data/config/locales/pt-BR.yml +1 -1
  87. data/config/locales/pt.yml +169 -120
  88. data/config/locales/ro-RO.yml +461 -0
  89. data/config/locales/si-LK.yml +1 -0
  90. data/config/locales/sk-SK.yml +451 -0
  91. data/config/locales/sk.yml +451 -0
  92. data/config/locales/sl.yml +9 -0
  93. data/config/locales/so-SO.yml +1 -0
  94. data/config/locales/sr-CS.yml +33 -0
  95. data/config/locales/sv.yml +154 -112
  96. data/config/locales/sw-KE.yml +1 -0
  97. data/config/locales/ti-ER.yml +1 -0
  98. data/config/locales/tr-TR.yml +53 -1
  99. data/config/locales/vi-VN.yml +1 -0
  100. data/config/locales/vi.yml +1 -0
  101. data/config/locales/zh-CN.yml +445 -0
  102. data/config/locales/zh-TW.yml +1 -0
  103. data/db/migrate/20200320105908_index_foreign_keys_in_decidim_attachments.rb +7 -0
  104. data/db/migrate/20200320105924_index_foreign_keys_in_decidim_participatory_process_user_roles.rb +7 -0
  105. data/db/migrate/20200320105925_index_foreign_keys_in_decidim_participatory_processes.rb +8 -0
  106. data/db/migrate/20201006072346_fix_attachments_titles.rb +38 -0
  107. data/db/seeds/city.jpeg +0 -0
  108. data/db/seeds/city2.jpeg +0 -0
  109. data/lib/decidim/participatory_processes/admin_engine.rb +1 -0
  110. data/lib/decidim/participatory_processes/engine.rb +1 -1
  111. data/lib/decidim/participatory_processes/participatory_space.rb +16 -12
  112. data/lib/decidim/participatory_processes/test/factories.rb +3 -3
  113. data/lib/decidim/participatory_processes/version.rb +1 -1
  114. metadata +57 -14
@@ -8,6 +8,7 @@ module Decidim
8
8
  #
9
9
  class ParticipatoryProcessGroupForm < Form
10
10
  include TranslatableAttributes
11
+ include Decidim::HasUploadValidations
11
12
 
12
13
  translatable_attribute :name, String
13
14
  translatable_attribute :description, String
@@ -20,7 +21,9 @@ module Decidim
20
21
 
21
22
  validates :name, :description, translatable_presence: true
22
23
 
23
- validates :hero_image, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] }
24
+ validates :hero_image, passthru: { to: Decidim::ParticipatoryProcessGroup }
25
+
26
+ alias organization current_organization
24
27
  end
25
28
  end
26
29
  end
@@ -13,6 +13,9 @@ module Decidim
13
13
  # Accepted mime types
14
14
  # keys: are used for dynamic help text on admin form.
15
15
  # values: are used to validate the file format of imported document.
16
+ #
17
+ # WARNING: consider adding/removing the relative translation key at
18
+ # decidim.participatory_processes.admin.new_import.accepted_types when modifying this hash
16
19
  ACCEPTED_TYPES = {
17
20
  json: JSON_MIME_TYPE
18
21
  }.freeze
@@ -13,10 +13,11 @@ module Decidim
13
13
  attribute :email, String
14
14
  attribute :role, String
15
15
 
16
- validates :email, :role, presence: true
17
- validates :name, presence: true
16
+ validates :name, :email, :role, presence: true
18
17
  validates :role, inclusion: { in: Decidim::ParticipatoryProcessUserRole::ROLES }
19
18
 
19
+ validates :name, format: { with: UserBaseEntity::REGEXP_NAME }
20
+
20
21
  def roles
21
22
  Decidim::ParticipatoryProcessUserRole::ROLES.map do |role|
22
23
  [
@@ -21,6 +21,17 @@ module Decidim
21
21
  dates = [participatory_process_step.start_date, participatory_process_step.end_date]
22
22
  dates.map { |date| date ? localize(date.to_date, format: :default) : "?" }.join(" - ")
23
23
  end
24
+
25
+ # Public: Returns the path for the participatory process cta button
26
+ #
27
+ # Returns a String with path.
28
+ def participatory_process_cta_path(process)
29
+ return participatory_process_path(process) if process.active_step&.cta_path.blank?
30
+
31
+ path, params = participatory_process_path(process).split("?")
32
+
33
+ "#{path}/#{process.active_step.cta_path}" + (params.present? ? "?#{params}" : "")
34
+ end
24
35
  end
25
36
  end
26
37
  end
@@ -11,7 +11,7 @@ module Decidim
11
11
  include Decidim::HasAttachmentCollections
12
12
  include Decidim::Participable
13
13
  include Decidim::Publicable
14
- include Decidim::Scopable
14
+ include Decidim::ScopableParticipatorySpace
15
15
  include Decidim::Followable
16
16
  include Decidim::HasReference
17
17
  include Decidim::Traceable
@@ -19,6 +19,11 @@ module Decidim
19
19
  include Decidim::Loggable
20
20
  include Decidim::ParticipatorySpaceResourceable
21
21
  include Decidim::Searchable
22
+ include Decidim::HasUploadValidations
23
+ include Decidim::TranslatableResource
24
+
25
+ translatable_fields :title, :subtitle, :short_description, :description, :developer_group, :meta_scope, :local_area,
26
+ :target, :participatory_scope, :participatory_structure, :announcement
22
27
 
23
28
  belongs_to :organization,
24
29
  foreign_key: "decidim_organization_id",
@@ -61,7 +66,10 @@ module Decidim
61
66
  validates :slug, uniqueness: { scope: :organization }
62
67
  validates :slug, presence: true, format: { with: Decidim::ParticipatoryProcess.slug_format }
63
68
 
69
+ validates_upload :hero_image
64
70
  mount_uploader :hero_image, Decidim::HeroImageUploader
71
+
72
+ validates_upload :banner_image
65
73
  mount_uploader :banner_image, Decidim::BannerImageUploader
66
74
 
67
75
  scope :past, -> { where(arel_table[:end_date].lt(Date.current)) }
@@ -160,6 +168,10 @@ module Decidim
160
168
  roles.where(role: role_name)
161
169
  end
162
170
 
171
+ def attachment_context
172
+ :admin
173
+ end
174
+
163
175
  # Allow ransacker to search for a key in a hstore column (`title`.`en`)
164
176
  ransacker :title do |parent|
165
177
  Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
@@ -4,6 +4,10 @@ module Decidim
4
4
  class ParticipatoryProcessGroup < ApplicationRecord
5
5
  include Decidim::Resourceable
6
6
  include Decidim::Traceable
7
+ include Decidim::HasUploadValidations
8
+ include Decidim::TranslatableResource
9
+
10
+ translatable_fields :name, :description
7
11
 
8
12
  has_many :participatory_processes,
9
13
  foreign_key: "decidim_participatory_process_group_id",
@@ -15,6 +19,7 @@ module Decidim
15
19
  foreign_key: "decidim_organization_id",
16
20
  class_name: "Decidim::Organization"
17
21
 
22
+ validates_upload :hero_image
18
23
  mount_uploader :hero_image, Decidim::HeroImageUploader
19
24
 
20
25
  def self.log_presenter_class_for(_log)
@@ -5,9 +5,12 @@ module Decidim
5
5
  # components that will show up in the depending on what step is currently
6
6
  # active.
7
7
  class ParticipatoryProcessStep < ApplicationRecord
8
+ include Decidim::TranslatableResource
8
9
  include Traceable
9
10
  include Loggable
10
11
 
12
+ translatable_fields :title, :description, :cta_text
13
+
11
14
  belongs_to :participatory_process, foreign_key: "decidim_participatory_process_id", class_name: "Decidim::ParticipatoryProcess"
12
15
  has_one :organization, through: :participatory_process
13
16
 
@@ -233,6 +233,7 @@ module Decidim
233
233
  :process,
234
234
  :process_step,
235
235
  :process_user_role,
236
+ :space_private_user,
236
237
  :export_space,
237
238
  :import
238
239
  ].include?(permission_action.subject)
@@ -35,8 +35,8 @@ module Decidim
35
35
  "activemodel.attributes.participatory_process_group"
36
36
  end
37
37
 
38
- def has_diff?
39
- action == "unpublish" || super
38
+ def diff_actions
39
+ super + %w(unpublish)
40
40
  end
41
41
  end
42
42
  end
@@ -48,8 +48,8 @@ module Decidim
48
48
  "activemodel.attributes.participatory_process"
49
49
  end
50
50
 
51
- def has_diff?
52
- action == "unpublish" || super
51
+ def diff_actions
52
+ super + %w(unpublish)
53
53
  end
54
54
  end
55
55
  end
@@ -31,8 +31,8 @@ module Decidim
31
31
  ).changeset
32
32
  end
33
33
 
34
- def has_diff?
35
- action == "delete" || super
34
+ def diff_actions
35
+ super + %w(delete)
36
36
  end
37
37
 
38
38
  def action_string
@@ -8,8 +8,8 @@ module Decidim
8
8
 
9
9
  def params
10
10
  capture do
11
- concat(content_tag(:input, nil, type: :hidden, id: :"metrics-space_type", value: participatory_process.class))
12
- concat(content_tag(:input, nil, type: :hidden, id: :"metrics-space_id", value: participatory_process.id))
11
+ concat(hidden_field_tag(:metrics_space_type, participatory_process.class.name, id: :"metrics-space_type"))
12
+ concat(hidden_field_tag(:metrics_space_id, participatory_process.id, id: :"metrics-space_id"))
13
13
  end
14
14
  end
15
15
 
@@ -49,8 +49,8 @@ module Decidim
49
49
  end
50
50
 
51
51
  def endorsements_query
52
- Decidim::Proposals::ProposalEndorsement
53
- .where(proposal: proposals_components)
52
+ Decidim::Endorsement
53
+ .where(resource: space_components)
54
54
  .pluck(:decidim_author_id)
55
55
  .uniq
56
56
  end
@@ -76,10 +76,12 @@ module Decidim
76
76
  end
77
77
 
78
78
  def project_supports_query
79
- Decidim::Budgets::Order
80
- .where(component: space_components)
81
- .pluck(:decidim_user_id)
82
- .uniq
79
+ Decidim::Budgets::Order.joins(budget: [:component])
80
+ .where(budget: {
81
+ decidim_components: { id: space_components.pluck(:id) }
82
+ })
83
+ .pluck(:decidim_user_id)
84
+ .uniq
83
85
  end
84
86
 
85
87
  def survey_answer_query
@@ -122,11 +122,11 @@ module Decidim
122
122
  attachment = Attachment.new(
123
123
  title: file["title"],
124
124
  description: file["description"],
125
- file: file_tmp,
126
- file_size: file_tmp.size,
127
125
  content_type: file_tmp.content_type,
128
126
  attached_to: @imported_process,
129
- weight: file["weight"]
127
+ weight: file["weight"],
128
+ file: file_tmp, # Define attached_to before this
129
+ file_size: file_tmp.size
130
130
  )
131
131
  attachment.create_attachment_collection(file["attachment_collection"])
132
132
  attachment.save!
@@ -169,7 +169,9 @@ module Decidim
169
169
 
170
170
  accepted = ["image", "application/pdf"]
171
171
  url = URI.parse(url)
172
- Net::HTTP.start(url.host, url.port) do |http|
172
+ http_connection = Net::HTTP.new(url.host, url.port)
173
+ http_connection.use_ssl = true if url.scheme == "https"
174
+ http_connection.start do |http|
173
175
  return http.head(url.request_uri)["Content-Type"].start_with?(*accepted)
174
176
  end
175
177
  rescue StandardError
@@ -7,7 +7,7 @@
7
7
  <span class="timeline__date text-small">
8
8
  <%= participatory_space_helpers.step_dates(participatory_process_step) %>
9
9
  </span>
10
- <h6 class="timeline__title heading6"><%= translated_attribute(participatory_process_step.title) %></h6>
10
+ <h4 class="timeline__title heading4"><%= translated_attribute(participatory_process_step.title) %></h4>
11
11
  </div>
12
12
  <div class="timeline__content">
13
13
  <%= translated_attribute(participatory_process_step.description).html_safe %>
@@ -1,6 +1,7 @@
1
+ <% add_decidim_page_title(translated_attribute(group.name)) %>
1
2
  <% add_decidim_meta_tags(title: t("participatory_process_groups.show.title", scope: "decidim")) %>
2
3
 
3
- <main class="wrapper">
4
+ <div class="wrapper">
4
5
  <section id="processes-grid" class="section row collapse">
5
6
  <h1 class="section-heading"><%= t("participatory_process_groups.show.group_participatory_processes", scope: "decidim", count: participatory_processes.count, group: translated_attribute(group.name)) %></h1>
6
7
  <div class="row small-up-1 medium-up-2 large-up-3 card-grid">
@@ -8,4 +9,4 @@
8
9
  </div>
9
10
  </section>
10
11
  <%= render_participatory_processes_hook(:process_group_highlighted_elements) %>
11
- </main>
12
+ </div>
@@ -1,14 +1,19 @@
1
1
  <% add_decidim_page_title(t("participatory_process_steps.index.title", scope: "decidim")) %>
2
2
 
3
- <main class="steps">
3
+ <div class="steps">
4
4
  <div class="row column">
5
5
  <div class="row">
6
6
  <div class="columns mediumlarge-9 large-7">
7
7
  <div class="section">
8
- <h4 class="section-heading"><%= t("participatory_process_steps.index.process_steps", scope: "decidim") %></h4>
8
+ <%= link_to participatory_process_path(current_participatory_space), class: "small hollow" do %>
9
+ <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
10
+ <%= t(".back_to_process") %>
11
+ <% end %>
12
+
13
+ <h3 class="section-heading"><%= t("participatory_process_steps.index.process_steps", scope: "decidim") %></h3>
9
14
  <%= render partial: "timeline" %>
10
15
  </div>
11
16
  </div>
12
17
  </div>
13
18
  </div>
14
- </main>
19
+ </div>
@@ -1,5 +1,5 @@
1
1
  <div class="section" id="metrics">
2
- <h4 class="section-heading"><%= t("decidim.pages.participatory_space.metrics.headline", name: translated_attribute(current_participatory_space.title)) %></h4>
2
+ <h3 class="section-heading"><%= t("decidim.pages.participatory_space.metrics.headline", name: translated_attribute(current_participatory_space.title)) %></h3>
3
3
  <%= metrics.params %>
4
4
  <div class="row mb-sm">
5
5
  <%= metrics.highlighted %>
@@ -1,12 +1,13 @@
1
- <article class="card card--full card--process">
1
+ <div class="card card--full card--process">
2
2
  <div class="row collapse card--process__row">
3
3
  <div class="columns mediumlarge-8 large-6 card--process__column">
4
4
  <div class="card__content">
5
5
  <%= link_to participatory_process_path(promoted_process), class: "card__link" do %>
6
- <h2 class="card__title"><%= translated_attribute promoted_process.title %></h2>
6
+ <h2 class="card__title"><%= decidim_html_escape(translated_attribute(promoted_process.title)).html_safe %></h2>
7
7
  <% end %>
8
8
  <%= decidim_sanitize html_truncate(translated_attribute(promoted_process.short_description), length: 630, separator: "...") %>
9
- <%= link_to participatory_process_path(promoted_process), class: "button secondary small hollow card__button" do %>
9
+ <%= link_to participatory_process_path(promoted_process), class: "button small hollow card__button" do %>
10
+ <span class="show-for-sr"><%= decidim_html_escape(translated_attribute(promoted_process.title)) %></span>
10
11
  <%= t("participatory_processes.promoted_process.more_info", scope: "layouts.decidim") %>
11
12
  <% end %>
12
13
  </div>
@@ -16,8 +17,14 @@
16
17
  style="background-image:url(<%= promoted_process.hero_image.url %>)">
17
18
  <div class="card__content row collapse">
18
19
  <div class="large-6 large-offset-6 columns">
19
- <%= link_to participatory_process_path(promoted_process), class: "button expanded button--sc" do %>
20
- <%= t(promoted_process.cta_button_text_key, scope: "layouts.decidim.participatory_processes.promoted_process") %>
20
+ <%= link_to participatory_process_cta_path(promoted_process), class: "button expanded button--sc" do %>
21
+ <% if translated_in_current_locale?(promoted_process.active_step&.cta_text) %>
22
+ <span class="show-for-sr"><%= translated_attribute(promoted_process.active_step.cta_text) %></span>
23
+ <span aria-hidden="true"><%= translated_attribute(promoted_process.active_step.cta_text) %></span>
24
+ <% else %>
25
+ <span class="show-for-sr"><%= t(promoted_process.cta_button_text_key_accessible, resource_name: translated_attribute(promoted_process.title), scope: "layouts.decidim.participatory_processes.promoted_process") %></span>
26
+ <span aria-hidden="true"><%= t(promoted_process.cta_button_text_key, scope: "layouts.decidim.participatory_processes.promoted_process") %></span>
27
+ <% end %>
21
28
  <% if promoted_process.active_step %>
22
29
  <span class="button__info">
23
30
  <%= t("participatory_processes.promoted_process.active_step", scope: "layouts.decidim") %> <%= translated_attribute promoted_process.active_step.title %>
@@ -29,4 +36,4 @@
29
36
  </div>
30
37
  </div>
31
38
  </div>
32
- </article>
39
+ </div>
@@ -1,17 +1,17 @@
1
1
  <% add_decidim_meta_tags({
2
- image_url: current_participatory_space.hero_image.url,
3
- description: translated_attribute(current_participatory_space.short_description),
4
- url: participatory_process_url(current_participatory_space),
5
- twitter_handler: current_organization.twitter_handler
6
- }) %>
2
+ image_url: current_participatory_space.hero_image.url,
3
+ description: translated_attribute(current_participatory_space.short_description),
4
+ url: participatory_process_url(current_participatory_space),
5
+ twitter_handler: current_organization.twitter_handler
6
+ }) %>
7
7
 
8
8
  <%
9
- edit_link(
10
- resource_locator(current_participatory_space).edit,
11
- :update,
12
- :process,
13
- process: current_participatory_space
14
- )
9
+ edit_link(
10
+ resource_locator(current_participatory_space).edit,
11
+ :update,
12
+ :process,
13
+ process: current_participatory_space
14
+ )
15
15
  %>
16
16
 
17
17
  <%= participatory_space_floating_help %>
@@ -48,6 +48,18 @@ edit_link(
48
48
  </div>
49
49
  </div>
50
50
  <% end %>
51
+
52
+ <% if linked_assemblies.any? %>
53
+ <div class="section">
54
+ <h4 class="section-heading"><%= t("participatory_process.show.related_assemblies", scope: "decidim") %></h4>
55
+ <div class="row small-up-1 medium-up-2 card-grid">
56
+ <% linked_assemblies.each do |linked_assembly| %>
57
+ <%= card_for(linked_assembly) %>
58
+ <% end %>
59
+ </div>
60
+ </div>
61
+ <% end %>
62
+
51
63
  </div>
52
64
  <div class="section columns medium-5 mediumlarge-4 large-3">
53
65
  <div class="card extra">
@@ -126,7 +138,7 @@ edit_link(
126
138
  </div>
127
139
  <%= resource_reference(current_participatory_space) %>
128
140
  <%= render partial: "decidim/shared/share_modal" %>
129
- <%= embed_modal_for participatory_process_participatory_process_widget_url(current_participatory_space, format: :js) %>
141
+ <%= embed_modal_for participatory_process_widget_url(current_participatory_space, format: :js) %>
130
142
  </div>
131
143
  </div>
132
144
 
@@ -14,7 +14,7 @@
14
14
  <h2 class="text-highlight heading-small">
15
15
  <% if current_participatory_space.hashtag.present? %>
16
16
  <span class="process-header__hashtag">
17
- <%= link_to "##{current_participatory_space.hashtag}", "https://twitter.com/hashtag/#{current_participatory_space.hashtag}", target: "_blank" %>
17
+ <%= link_to "##{decidim_html_escape(current_participatory_space.hashtag)}", "https://twitter.com/hashtag/#{decidim_html_escape(current_participatory_space.hashtag)}", target: "_blank" %>
18
18
  </span>
19
19
  <% end %>
20
20
  <%= translated_attribute(current_participatory_space.subtitle) %>
@@ -30,7 +30,7 @@
30
30
  class: "button small button--sc show-for-medium"
31
31
  ) %>
32
32
  <% else %>
33
- <%= link_to t(".view_steps"), decidim_participatory_processes.participatory_process_participatory_process_steps_path(current_participatory_space), class: "button small button--sc show-for-medium" %>
33
+ <%= link_to t(".view_steps"), decidim_participatory_processes.participatory_process_participatory_process_steps_path(current_participatory_space) %>
34
34
  <% end %>
35
35
  </div>
36
36
  </div>
@@ -7,6 +7,7 @@
7
7
 
8
8
  <%= render "layouts/decidim/application" do %>
9
9
  <%= render partial: "layouts/decidim/process_header" %>
10
+ <%= cell "decidim/translation_bar", current_organization %>
10
11
  <div class="wrapper">
11
12
  <%= yield %>
12
13
  </div>
@@ -0,0 +1 @@
1
+ am:
@@ -0,0 +1,19 @@
1
+ bg:
2
+ activemodel:
3
+ attributes:
4
+ participatory_process:
5
+ announcement: Обявление
6
+ area_id: Район
7
+ banner_image: Банер изображение
8
+ copy_categories: Копирай категории
9
+ copy_components: Копирай компоненти
10
+ copy_steps: Копирай стъпки
11
+ decidim_area_id: Район
12
+ description: Описание
13
+ developer_group: Група за популяризиране
14
+ domain: Домейн
15
+ end_date: Крайна дата
16
+ hashtag: Хаштаг
17
+ hero_image: Изображение за начална страница
18
+ local_area: Район на организацията
19
+ meta_scope: Метаданни сфера