decidim-proposals 0.26.0 → 0.26.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c38f3f49f8f2faf7009488fd029ead96309aee1e36a9deadfe98b629da781113
4
- data.tar.gz: 68997b38f3851b3cdb308f1a613088caf23502a0e3efb0e33b1b631e554413d4
3
+ metadata.gz: 780ee0ac53cb23a08139f9b32520908bd94c41583dac77e7afe1b02770e6889d
4
+ data.tar.gz: 75282ea943b4ef24ccc0f3a899dc45ae7a3a3cced8f856a7a9c6b9aa13e9f56f
5
5
  SHA512:
6
- metadata.gz: fbf1fba0cc32479cba82cd9fa9adb7d2e2a7cf4e7c5aff2dfc5c8053a86194d967f74903bacba3b29a200603bd74dd82a38ebd82b45449ec3f87f11588d78741
7
- data.tar.gz: f32885a1e51562bb44a0aba83aaa2ff76d1b55fcde574b439b5eeae32fdd72e6941f8c1889e3deb0c96a415144233a549ee3e49b91620dbd3d70877fa563fbdf
6
+ metadata.gz: 0c00aa88356e7d1c4d4057a3508455b00b4f26b28ccb16bb596e989b490fe77c812afd74f4ae8017a567063a6aeaddc1059e8c2077611776d18e335f9d7801ac
7
+ data.tar.gz: 50eb47648016874df8c9343ddfbb231b76a88231a70986741be5f07431986ed7023f45203f439df0b206878baa70fb1007e566c01c0751425c771fba67d91e5a
@@ -22,7 +22,7 @@ module Decidim
22
22
  end
23
23
 
24
24
  def resource_path
25
- resource_locator(model).path(filter_link_params)
25
+ resource_locator(model).path
26
26
  end
27
27
 
28
28
  def current_participatory_space
@@ -39,7 +39,7 @@ module Decidim
39
39
  end
40
40
 
41
41
  def resource_path
42
- resource_locator(model).path(filter_link_params)
42
+ resource_locator(model).path
43
43
  end
44
44
 
45
45
  def amend_resource_path
@@ -22,7 +22,7 @@ module Decidim
22
22
  end
23
23
 
24
24
  def resource_path
25
- resource_locator(model).path(filter_link_params)
25
+ resource_locator(model).path
26
26
  end
27
27
 
28
28
  def current_participatory_space
@@ -122,7 +122,7 @@ module Decidim
122
122
  end
123
123
 
124
124
  def resource_image_path
125
- @resource_image_path ||= has_image? ? model.attachments.find_by("content_type like '%image%'").url : nil
125
+ @resource_image_path ||= has_image? ? model.attachments.find_by("content_type like '%image%'").thumbnail_url : nil
126
126
  end
127
127
 
128
128
  def cache_hash
@@ -143,6 +143,8 @@ module Decidim
143
143
  hash << Digest::MD5.hexdigest(model.authors.map(&:cache_key_with_version).to_s)
144
144
  hash << (model.must_render_translation?(model.organization) ? 1 : 0) if model.respond_to?(:must_render_translation?)
145
145
  hash << model.component.participatory_space.active_step.id if model.component.participatory_space.try(:active_step)
146
+ hash << has_footer?
147
+ hash << has_actions?
146
148
 
147
149
  hash.join(Decidim.cache_key_separator)
148
150
  end
@@ -82,7 +82,7 @@ module Decidim
82
82
  # Finds the Meetings of the current participatory space
83
83
  def meetings
84
84
  @meetings ||= Decidim.find_resource_manifest(:meetings).try(:resource_scope, current_component)
85
- &.order(title: :asc)
85
+ &.published&.order(title: :asc)
86
86
  end
87
87
 
88
88
  # Return the meeting as author
@@ -28,9 +28,9 @@
28
28
  <%= render partial: "voting_rules" %>
29
29
  <div class="row columns">
30
30
  <div class="title-action">
31
- <h3 id="proposals-count" class="title-action__title section-heading">
31
+ <h2 id="proposals-count" class="title-action__title section-heading">
32
32
  <%= render partial: "count" %>
33
- </h3>
33
+ </h2>
34
34
  <% if current_settings.creation_enabled && current_component.participatory_space.can_participate?(current_user) %>
35
35
  <%= action_authorized_link_to :create, new_proposal_path, class: "title-action__action button small", data: { "redirect_url" => new_proposal_path } do %>
36
36
  <%= t(".new_proposal") %>
@@ -35,16 +35,16 @@ extra_admin_link(
35
35
  <div class="row column view-header">
36
36
 
37
37
  <div class="m-bottom">
38
- <%= link_to proposals_path(filter_link_params), class: "small hollow" do %>
38
+ <%= link_to proposals_path, class: "small hollow js-back-to-list" do %>
39
39
  <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
40
40
  <%= t(".back_to_list") %>
41
41
  <% end %>
42
42
  </div>
43
43
 
44
44
  <% if @proposal.emendation? %>
45
- <h3 class="heading3"><%= t(".changes_at_title", title: present(@proposal.amendable).title(links: true, html_escape: true)) %></h3>
45
+ <h2 class="heading3"><%= t(".changes_at_title", title: present(@proposal.amendable).title(links: true, html_escape: true)) %></h2>
46
46
  <% else %>
47
- <h3 class="heading3"><%= present(@proposal).title(links: true, html_escape: true) %></h3>
47
+ <h2 class="heading3"><%= present(@proposal).title(links: true, html_escape: true) %></h2>
48
48
  <% end %>
49
49
  <% unless component_settings.participatory_texts_enabled? %>
50
50
  <%= cell("decidim/coauthorships", @proposal, has_actions: true, size: 3, context: { current_user: current_user }) %>
@@ -94,6 +94,8 @@ ar:
94
94
  admin:
95
95
  filters:
96
96
  proposals:
97
+ category_id_eq:
98
+ label: الفئة
97
99
  valuator_role_ids_has:
98
100
  label: تم إسناده إلى مُقيِّم
99
101
  components:
@@ -620,6 +622,7 @@ ar:
620
622
  many: "%{count} مقترحات"
621
623
  other: "%{count} مقترحات"
622
624
  edit:
625
+ add_documents: المستندات
623
626
  attachment_legend: "(اختياري) إضافة مرفق"
624
627
  back: الى الخلف
625
628
  select_a_category: الرجاء تحديد الفئة
@@ -711,7 +711,7 @@ de:
711
711
  one: "%{count} Vorschlag"
712
712
  other: "%{count} Vorschläge"
713
713
  edit:
714
- add_documents: Dokumente
714
+ add_documents: Unterlagen
715
715
  add_images: Datei
716
716
  attachment_legend: "(Optional) Fügen Sie einen Anhang hinzu"
717
717
  back: Zurück
@@ -667,6 +667,7 @@ el:
667
667
  one: "%{count} πρόταση"
668
668
  other: "%{count} προτάσεις"
669
669
  edit:
670
+ add_documents: Έγγραφα
670
671
  attachment_legend: "(Προαιρετικά) Προσθήκη συνημμένου"
671
672
  back: Πίσω
672
673
  select_a_category: Επιλέξτε μια κατηγορία
@@ -221,7 +221,7 @@ fi:
221
221
  admin:
222
222
  proposal_note_created:
223
223
  email_intro: Joku on jättänyt huomion ehdotukseen "%{resource_title}". Tutustu siihen <a href="%{admin_proposal_info_url}">hallintapaneelin kautta</a>
224
- email_outro: Saat tämän ilmoituksen, koska voit arvioida ehdotuksen.
224
+ email_outro: Tämä ilmoitus on lähetetty sinulle, koska voit arvioida ehdotuksen.
225
225
  email_subject: Joku on jättänyt huomion ehdotukseen %{resource_title}.
226
226
  notification_title: Joku on jättänyt huomion ehdotukseen <a href="%{resource_path}">%{resource_title}</a>. Tutustu siihen <a href="%{admin_proposal_info_path}">hallintapaneelin kautta</a>
227
227
  collaborative_draft_access_accepted:
@@ -681,6 +681,7 @@ hu:
681
681
  one: "%{count} javaslat"
682
682
  other: "%{count} javaslatot"
683
683
  edit:
684
+ add_documents: Dokumentumok
684
685
  attachment_legend: "(Nem kötelező) Melléklet hozzáadása"
685
686
  back: Vissza
686
687
  select_a_category: Válassz kategóriát
@@ -45,7 +45,7 @@ ja:
45
45
  participatory_text:
46
46
  attributes:
47
47
  document:
48
- invalid_document_type: '無効なドキュメントの種類です。承認されたフォーマットは次のとおりです: %{valid_mime_types}'
48
+ invalid_document_type: '無効な種類のドキュメントです。承認されたフォーマットは次のとおりです: %{valid_mime_types}'
49
49
  proposal:
50
50
  attributes:
51
51
  add_documents:
@@ -424,7 +424,7 @@ ja:
424
424
  success: おめでとうございます。次のセクションが提案に変換されました。公開する前に確認して調整できます。
425
425
  index:
426
426
  info_1: 次のセクションが提案に変換されました。公開する前に確認して調整できます。
427
- publish_document: 文書を公開
427
+ publish_document: ドキュメントを公開
428
428
  save_draft: 下書きを保存
429
429
  title: 参加者のテキストをプレビュー
430
430
  new_import:
@@ -666,6 +666,7 @@ lv:
666
666
  one: "%{count} priekšlikums"
667
667
  other: "%{count} priekšlikumi"
668
668
  edit:
669
+ add_documents: Dokumenti
669
670
  attachment_legend: "(Pēc izvēles) Pievienojiet pielikumu"
670
671
  back: Atpakaļ
671
672
  select_a_category: Lūdzu, izvēlieties kategoriju
@@ -713,6 +713,7 @@
713
713
  one: "%{count} forslag"
714
714
  other: "%{count} forslag"
715
715
  edit:
716
+ add_documents: Dokumenter
716
717
  attachment_legend: "(Valgfritt) Legg til et vedlegg"
717
718
  back: Tilbake
718
719
  select_a_category: Velg en kategori
@@ -674,6 +674,7 @@ sk:
674
674
  many: "%{count} návrhov"
675
675
  other: "%{count} návrhov"
676
676
  edit:
677
+ add_documents: Dokumenty
677
678
  attachment_legend: "(Voliteľné) Pridanie prílohy"
678
679
  back: Zadná
679
680
  select_a_category: Vyberte kategóriu
@@ -109,6 +109,8 @@ sr:
109
109
  valuator: Procenjivač
110
110
  valuators: Procenjivači
111
111
  proposals:
112
+ edit:
113
+ add_documents: Dokumenti
112
114
  show:
113
115
  back_to_list: Nazad na listu
114
116
  estimated_cost: Procenjen trošak
@@ -586,7 +586,7 @@ sv:
586
586
  evaluating: Utvärderas
587
587
  not_answered: Ej besvarat
588
588
  rejected: Avvisat
589
- withdrawn: Tillbakadragna
589
+ withdrawn: Tillbakadraget
590
590
  application_helper:
591
591
  filter_category_values:
592
592
  all: Alla
@@ -871,7 +871,7 @@ sv:
871
871
  read_more: Läs mer
872
872
  report: Rapport
873
873
  withdraw_btn_hint: Du kan dra tillbaka ett förslag om du ändrar dig, så länge som det inte har fått något stöd. Förslaget raderas inte utan kommer att visas i listan över förslag som dragits tillbaka.
874
- withdraw_confirmation_html: Är du säker på att du vill återkalla förslaget?<br><br><strong>Denna åtgärd kan inte avbrytas!</strong>
874
+ withdraw_confirmation_html: Är du säker på att du vill dra tillbaka förslaget?<br><br><strong>Denna åtgärd kan inte ångras!</strong>
875
875
  withdraw_proposal: Dra tillbaka förslaget
876
876
  tags:
877
877
  changed_from: "(ändrad från <u>%{previous_name}</u> av en administratör)"
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "decidim/components/namer"
4
+ require "decidim/meetings"
4
5
 
5
6
  Decidim.register_component(:proposals) do |component|
6
7
  component.engine = Decidim::Proposals::Engine
@@ -33,7 +33,10 @@ module Decidim
33
33
 
34
34
  # Saves the proposal
35
35
  def finish!
36
- super # resource.save!
36
+ Decidim.traceability.perform_action!(:create, self.class.resource_klass, context[:current_user], visibility: "admin-only") do
37
+ resource.save!
38
+ resource
39
+ end
37
40
  notify(resource)
38
41
  publish(resource)
39
42
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.26.0"
7
+ "0.26.1"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-22 00:00:00.000000000 Z
13
+ date: 2022-03-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.26.0
21
+ version: 0.26.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.26.0
28
+ version: 0.26.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-core
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.26.0
35
+ version: 0.26.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.26.0
42
+ version: 0.26.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: doc2text
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -80,84 +80,84 @@ dependencies:
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.26.0
83
+ version: 0.26.1
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - '='
89
89
  - !ruby/object:Gem::Version
90
- version: 0.26.0
90
+ version: 0.26.1
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: decidim-assemblies
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 0.26.0
97
+ version: 0.26.1
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.26.0
104
+ version: 0.26.1
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: decidim-budgets
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.26.0
111
+ version: 0.26.1
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 0.26.0
118
+ version: 0.26.1
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: decidim-dev
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 0.26.0
125
+ version: 0.26.1
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 0.26.0
132
+ version: 0.26.1
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: decidim-meetings
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 0.26.0
139
+ version: 0.26.1
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - '='
145
145
  - !ruby/object:Gem::Version
146
- version: 0.26.0
146
+ version: 0.26.1
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: decidim-participatory_processes
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: 0.26.0
153
+ version: 0.26.1
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - '='
159
159
  - !ruby/object:Gem::Version
160
- version: 0.26.0
160
+ version: 0.26.1
161
161
  description: A proposals component for decidim's participatory spaces.
162
162
  email:
163
163
  - josepjaume@gmail.com