decidim-proposals 0.25.0 → 0.25.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: fcbc05060c74a0d2a571bc0bf918d9fd299b0dcec051c37363232b215aa93a1a
4
- data.tar.gz: 0445507b0557f9bfda5930f2962890379f3f04682a9dd954afd8cf26ebf87ae8
3
+ metadata.gz: 55c259beae9fa79f1a0c93000a53a032af8538025a154fedfdc0a1b273965d5b
4
+ data.tar.gz: 2bd5eff8fa4f65df3e4c1ded51db2a9c0937b8b8b730c4df45ec946c6b3f71d9
5
5
  SHA512:
6
- metadata.gz: f64ef4865607f8e874a23733387f06d0715e32e38f86cf5f88da12aa76ce6fe859ea01fdba242a49b79105c23260a818ae396c5dc514fffee63c1da4a8b262b8
7
- data.tar.gz: 51af55d39551b937a5209b1704a3bfec9d1706057f032d9f6ab5d0e9c558b66491ca0edf2c62f3e6407102cef7d5fbd5a8b3ded4f6c3026599e365a1f48e6c1b
6
+ metadata.gz: e2dafbbaf79c82e48d2e84ba609733b83c1f9b634baa642ee9a4e31cf31d9593379e598549d74787a51ea9231c16ad116699840dc73f949d72377ce6dc157f1d
7
+ data.tar.gz: bdffc9889742538195e18b7d182a8626cf0e81cf21d2d046b06391a8c6470cd02742f7880cfc14d21f967d51f60227b0b905247856475dc5c96a3148a52e8893
@@ -91,6 +91,7 @@ module Decidim
91
91
  end
92
92
 
93
93
  def compare
94
+ enforce_permission_to :edit, :proposal, proposal: @proposal
94
95
  @step = :step_2
95
96
  @similar_proposals ||= Decidim::Proposals::SimilarProposals
96
97
  .for(current_component, @proposal)
@@ -103,7 +104,7 @@ module Decidim
103
104
  end
104
105
 
105
106
  def complete
106
- enforce_permission_to :create, :proposal
107
+ enforce_permission_to :edit, :proposal, proposal: @proposal
107
108
  @step = :step_3
108
109
 
109
110
  @form = form_proposal_model
@@ -112,11 +113,13 @@ module Decidim
112
113
  end
113
114
 
114
115
  def preview
116
+ enforce_permission_to :edit, :proposal, proposal: @proposal
115
117
  @step = :step_4
116
118
  @form = form(ProposalForm).from_model(@proposal)
117
119
  end
118
120
 
119
121
  def publish
122
+ enforce_permission_to :edit, :proposal, proposal: @proposal
120
123
  @step = :step_4
121
124
  PublishProposal.call(@proposal, current_user) do
122
125
  on(:ok) do
@@ -278,7 +278,7 @@ module Decidim
278
278
  #
279
279
  # user - the user to check for authorship
280
280
  def editable_by?(user)
281
- return true if draft?
281
+ return true if draft? && created_by?(user)
282
282
 
283
283
  !published_state? && within_edit_time_limit? && !copied_from_other_component? && created_by?(user)
284
284
  end
@@ -6,8 +6,14 @@ $(() => {
6
6
  const $addressInput = $("#address_input");
7
7
  const $addressInputField = $("input", $addressInput);
8
8
  const $map = $("#address_map");
9
- const latFieldName = getCoordinateInputName("latitude", $addressInputField, {})
10
- const longFieldName = getCoordinateInputName("longitude", $addressInputField, {})
9
+ let latFieldName = "latitude";
10
+ let longFieldName = "longitude";
11
+
12
+ if ($addressInputField.length > 0) {
13
+ latFieldName = getCoordinateInputName("latitude", $addressInputField, {})
14
+ longFieldName = getCoordinateInputName("longitude", $addressInputField, {})
15
+ }
16
+
11
17
  $map.hide();
12
18
 
13
19
  if ($checkbox.length > 0) {
@@ -278,7 +278,7 @@ eu:
278
278
  follower:
279
279
  email_intro: '"%{resource_title}" proposamena baztertu egin da. Orri honetan erantzun dezakezu:'
280
280
  email_outro: Jakinarazpena jaso duzu "%{resource_title}" jarraitzen ari zarenagatik. Aurreko esteka estekan jarrai dezakezu.
281
- email_subject: Ondorengo proposamen bat baztertu egin da
281
+ email_subject: Jarraitzen ari zaren propposamen bat ukatu egin da
282
282
  notification_title: <a href="%{resource_path}">%{resource_title}</a> proposamena baztertu da.
283
283
  proposal_update_category:
284
284
  email_intro: 'Administratzaileak "%{resource_title}" proposamenaren kategoria eguneratu du, check it out:'
@@ -288,6 +288,8 @@ eu:
288
288
  proposal_update_scope:
289
289
  email_intro: 'Administratzaile batek %{resource_title} zure proposamenaren eremua eguneratu du, orri honetan egiazta dezakezu:'
290
290
  email_outro: Jakinarazpen hau jaso duzu proposamenaren egilea delako.
291
+ email_subject: '%{resource_title} proposamenaren eremua eguneratu da'
292
+ notification_title: <a href="%{resource_path}">%{resource_title}</a> proposamenaren eremua administratzaile batek eguneratu du.
291
293
  voting_enabled:
292
294
  email_intro: 'Proposamenak bozkatu ditzakezu %{participatory_space_title}-n! Hasi orri honetan parte hartzea:'
293
295
  email_outro: Jakinarazpena jaso duzu %{participatory_space_title}jarraituz gero. Aurreko esteka jarraituz jakinarazpenak jasotzeari uztea erabaki dezakezu.
@@ -49,9 +49,9 @@ gl:
49
49
  proposal:
50
50
  attributes:
51
51
  add_documents:
52
- needs_to_be_reattached: Necesita ser reenxerado
52
+ needs_to_be_reattached: É preciso anexar de novo o ficheiro
53
53
  add_photos:
54
- needs_to_be_reattached: Necesita ser reenxerado
54
+ needs_to_be_reattached: É preciso anexar de novo o ficheiro
55
55
  body:
56
56
  cant_be_equal_to_template: non pode ser igual ao modelo
57
57
  identical: E o título non pode ser idéntico
@@ -119,6 +119,7 @@ gl:
119
119
  name: Propostas
120
120
  settings:
121
121
  global:
122
+ allow_card_image: Permitir cartón con imaxe
122
123
  amendments_enabled: Modificacións habilitadas
123
124
  announcement: Anuncio
124
125
  attachments_allowed: Permitir anexos
@@ -625,7 +625,7 @@ pl:
625
625
  new_collaborative_draft: Nowy wspólny szkic
626
626
  orders:
627
627
  label: 'Sortuj szkice według:'
628
- most_contributed: Najwięcej kontrybucji
628
+ most_contributed: Najbardziej wspierane
629
629
  random: Losowo
630
630
  recent: Najnowszy
631
631
  requests:
@@ -683,7 +683,7 @@ pl:
683
683
  success: Szkic propozycji został usunięty.
684
684
  last_activity:
685
685
  new_proposal_at_html: "<span>Nowa propozycja pod %{link}</span>"
686
- proposal_updated_at_html: "<span>Wniosek zaktualizowany o %{link}</span>"
686
+ proposal_updated_at_html: "<span>Propozycja zaktualizowana o %{link}</span>"
687
687
  models:
688
688
  collaborative_draft:
689
689
  fields: