decidim-initiatives 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_initiatives_manifest.css +0 -1
  3. data/app/assets/config/decidim_initiatives_manifest.js +0 -1
  4. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +1 -1
  5. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +2 -0
  6. data/app/cells/decidim/initiatives_votes/vote/show.erb +1 -1
  7. data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +1 -0
  8. data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +1 -0
  9. data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +1 -0
  10. data/app/commands/decidim/initiatives/create_initiative.rb +1 -0
  11. data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -0
  12. data/app/commands/decidim/initiatives/vote_initiative.rb +1 -0
  13. data/app/controllers/concerns/decidim/initiatives/orderable.rb +1 -19
  14. data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +1 -1
  15. data/app/controllers/decidim/initiatives/initiative_votes_controller.rb +1 -1
  16. data/app/controllers/decidim/initiatives/initiatives_controller.rb +1 -1
  17. data/app/helpers/decidim/initiatives/initiative_helper.rb +2 -0
  18. data/app/mailers/decidim/initiatives/initiatives_mailer.rb +4 -0
  19. data/app/models/decidim/initiative.rb +5 -7
  20. data/app/models/decidim/initiatives_committee_member.rb +1 -1
  21. data/app/permissions/decidim/initiatives/admin/permissions.rb +1 -0
  22. data/app/permissions/decidim/initiatives/permissions.rb +2 -0
  23. data/app/services/decidim/initiatives/initiative_search.rb +1 -0
  24. data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +1 -1
  25. data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +2 -2
  26. data/app/views/decidim/initiatives/admin/initiatives/show.html.erb +3 -3
  27. data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +1 -1
  28. data/app/views/decidim/initiatives/committee_requests/new.html.erb +1 -1
  29. data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +1 -1
  30. data/app/views/decidim/initiatives/create_initiative/finish.html.erb +1 -1
  31. data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +1 -1
  32. data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +1 -1
  33. data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +2 -2
  34. data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +1 -1
  35. data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +1 -1
  36. data/app/views/decidim/initiatives/initiatives/_filters.html.erb +1 -1
  37. data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +1 -1
  38. data/app/views/decidim/initiatives/initiatives/_result.html.erb +2 -2
  39. data/app/views/decidim/initiatives/initiatives/show.html.erb +1 -3
  40. data/app/views/decidim/initiatives/initiatives/signature_identities.html.erb +1 -1
  41. data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +1 -1
  42. data/app/views/decidim/initiatives/initiatives_mailer/notify_progress.html.erb +1 -1
  43. data/app/views/decidim/initiatives/initiatives_mailer/notify_state_change.html.erb +1 -1
  44. data/app/views/decidim/initiatives/initiatives_mailer/notify_validating_request.html.erb +1 -1
  45. data/app/views/layouts/decidim/admin/initiatives_votes.pdf.erb +2 -2
  46. data/lib/decidim/initiatives/participatory_space.rb +1 -1
  47. data/lib/decidim/initiatives/version.rb +1 -1
  48. data/lib/tasks/decidim_initiatives.rake +0 -2
  49. metadata +27 -44
  50. data/app/assets/javascripts/decidim/initiatives/social_share.js +0 -2
  51. data/app/assets/stylesheet/decidim/initiatives/social_share.css.scss +0 -19
  52. data/config/initializers/social_share_button.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11cb5c7fec64173953d9698c00786b686986dc1a14d500b5e242d560ded33138
4
- data.tar.gz: 797522a6d703b5db23ed89ac594f34b1841c9c9ec3aa036091f99a7daa4d1b93
3
+ metadata.gz: 93cc6571aa86c1b7226857bae6067e594c5916a1cfb37b04fa9de4e70ff6272d
4
+ data.tar.gz: da66cd9b4eaf1eb96e7243e794a69e965063a3a415c332012b6fc6c5a947f953
5
5
  SHA512:
6
- metadata.gz: 198bf9aa9771deb92671b43d22c819053b64e0bb6c87dc3253ce02c27535a641736419973dc6445e0d132d28753453aa4eab53e83fa727e81471cc29d942e47b
7
- data.tar.gz: 389929096f25cef4a4a0850dcc17652ea256c97d2aafc1fcf033f7203b76be38a4ec9eb2667913d3cb1ef9e84d461a1f21e23549ef2c963c7051fb20cd0eda58
6
+ metadata.gz: c7a85d429198247f6afbb1872f619f9afb6e2ac9297f9e4791761b114cc66261c5cac18fbb84ec99de374046c18798aed7b112a5f580af4024c978fcd5cdb68b
7
+ data.tar.gz: 2e8006fd534e54a1abc8a6f02e27d6dc919eb1b31d39b4bed35730bc9bcfe2960ea0b38a617bde28911e635eee866434fd38aff28a56fe357bc83463bae765aa
@@ -1,4 +1,3 @@
1
1
  /*
2
2
  *= link decidim/initiatives/initiatives.css
3
- *= link decidim/initiatives/social_share.css
4
3
  */
@@ -1,4 +1,3 @@
1
- //= link decidim/initiatives/social_share.js
2
1
  //= link decidim/initiatives/application.js
3
2
  //= link decidim/initiatives/identity_selector_dialog.js
4
3
  //= link decidim/initiatives/scoped_type.js
@@ -10,7 +10,7 @@
10
10
  <% end %>
11
11
  <div class="card__content">
12
12
  <%= link_to decidim_initiatives.initiative_path(initiative), class: "card__link" do %>
13
- <h4 class="card__title"><%= translated_attribute initiative.title %></h4>
13
+ <h4 class="card__title"><%= decidim_html_escape(translated_attribute(initiative.title)) %></h4>
14
14
  <% end %>
15
15
  </div>
16
16
  </article>
@@ -4,6 +4,8 @@ module Decidim
4
4
  module Initiatives
5
5
  module ContentBlocks
6
6
  class HighlightedInitiativesCell < Decidim::ViewModel
7
+ include Decidim::SanitizeHelper
8
+
7
9
  delegate :current_organization, to: :controller
8
10
 
9
11
  def show
@@ -1,4 +1,4 @@
1
- <br />
1
+ <br>
2
2
  <div class="initiatives-votes-table-row" style="width: 100%; display: inline-block; min-height: 33pt; border-bottom: 1pt solid black;">
3
3
  <div class="initiatives-votes-table-cell w11" style="width: 10.8%; padding-left: 5pt; word-wrap: break-word; display: inline-block; float: left; min-height: 36pt;">
4
4
  <%= initiative_id %>
@@ -20,6 +20,7 @@ module Decidim
20
20
  # Returns nothing.
21
21
  def call
22
22
  return broadcast(:invalid) if form.invalid?
23
+
23
24
  initiative_type = create_initiative_type
24
25
 
25
26
  if initiative_type.persisted?
@@ -20,6 +20,7 @@ module Decidim
20
20
  # Returns nothing.
21
21
  def call
22
22
  return broadcast(:invalid) if form.invalid?
23
+
23
24
  initiative_type_scope = create_initiative_type_scope
24
25
 
25
26
  if initiative_type_scope.persisted?
@@ -23,6 +23,7 @@ module Decidim
23
23
  # Returns nothing.
24
24
  def call
25
25
  return broadcast(:invalid) if form.invalid?
26
+
26
27
  initiative_type.update(attributes)
27
28
 
28
29
  if initiative_type.valid?
@@ -23,6 +23,7 @@ module Decidim
23
23
  # Returns nothing.
24
24
  def call
25
25
  return broadcast(:invalid) if form.invalid?
26
+
26
27
  initiative = create_initiative
27
28
 
28
29
  if initiative.persisted?
@@ -22,6 +22,7 @@ module Decidim
22
22
  # Returns nothing.
23
23
  def call
24
24
  return broadcast(:invalid) if form.invalid?
25
+
25
26
  request = create_request
26
27
 
27
28
  if request.persisted?
@@ -22,6 +22,7 @@ module Decidim
22
22
  # Returns nothing.
23
23
  def call
24
24
  return broadcast(:invalid) if form.invalid?
25
+
25
26
  build_initiative_vote
26
27
  set_vote_timestamp
27
28
 
@@ -9,19 +9,7 @@ module Decidim
9
9
  extend ActiveSupport::Concern
10
10
 
11
11
  included do
12
- helper_method :order, :available_orders, :random_seed
13
-
14
- private
15
-
16
- # Gets how the proposals should be ordered based on the choice
17
- # made by the user.
18
- def order
19
- @order ||= detect_order(params[:order]) || default_order
20
- end
21
-
22
- def detect_order(candidate)
23
- available_orders.detect { |order| order == candidate }
24
- end
12
+ include Decidim::Orderable
25
13
 
26
14
  # Available orders based on enabled settings
27
15
  def available_orders
@@ -47,12 +35,6 @@ module Decidim
47
35
  initiatives.order_randomly(random_seed)
48
36
  end
49
37
  end
50
-
51
- # Returns: A random float number between -1 and 1 to be used as a
52
- # random seed at the database.
53
- def random_seed
54
- @random_seed ||= (params[:random_seed] ? params[:random_seed].to_f : (rand * 2 - 1))
55
- end
56
38
  end
57
39
  end
58
40
  end
@@ -52,7 +52,7 @@ module Decidim
52
52
  on(:invalid) do
53
53
  render json: {
54
54
  error: I18n.t("create.error", scope: "decidim.initiatives.initiative_votes")
55
- }, status: 422
55
+ }, status: :unprocessable_entity
56
56
  end
57
57
  end
58
58
  end
@@ -24,7 +24,7 @@ module Decidim
24
24
  on(:invalid) do
25
25
  render json: {
26
26
  error: I18n.t("initiative_votes.create.error", scope: "decidim.initiatives")
27
- }, status: 422
27
+ }, status: :unprocessable_entity
28
28
  end
29
29
  end
30
30
  end
@@ -22,7 +22,7 @@ module Decidim
22
22
 
23
23
  include FilterResource
24
24
  include Paginable
25
- include Orderable
25
+ include Decidim::Initiatives::Orderable
26
26
  include TypeSelectorOptions
27
27
  include NeedsInitiative
28
28
 
@@ -14,6 +14,7 @@ module Decidim
14
14
  # Returns a String.
15
15
  def state_badge_css_class(initiative)
16
16
  return "success" if initiative.accepted?
17
+
17
18
  "warning"
18
19
  end
19
20
 
@@ -57,6 +58,7 @@ module Decidim
57
58
  return "popularity--level3" if popularity_level3?(initiative)
58
59
  return "popularity--level4" if popularity_level4?(initiative)
59
60
  return "popularity--level5" if popularity_level5?(initiative)
61
+
60
62
  ""
61
63
  end
62
64
 
@@ -13,6 +13,7 @@ module Decidim
13
13
  # Notifies initiative creation
14
14
  def notify_creation(initiative)
15
15
  return if initiative.author.email.blank?
16
+
16
17
  @initiative = initiative
17
18
  @organization = initiative.organization
18
19
 
@@ -29,6 +30,7 @@ module Decidim
29
30
  # Notify changes in state
30
31
  def notify_state_change(initiative, user)
31
32
  return if user.email.blank?
33
+
32
34
  @organization = initiative.organization
33
35
 
34
36
  with_user(user) do
@@ -52,6 +54,7 @@ module Decidim
52
54
  # Notify an initiative requesting technical validation
53
55
  def notify_validating_request(initiative, user)
54
56
  return if user.email.blank?
57
+
55
58
  @organization = initiative.organization
56
59
  @link = decidim_admin_initiatives.edit_initiative_url(initiative, host: @organization.host)
57
60
 
@@ -72,6 +75,7 @@ module Decidim
72
75
  # Notify progress to all initiative subscribers.
73
76
  def notify_progress(initiative, user)
74
77
  return if user.email.blank?
78
+
75
79
  @organization = initiative.organization
76
80
  @link = initiative_url(initiative, host: @organization.host)
77
81
 
@@ -17,6 +17,7 @@ module Decidim
17
17
  include Decidim::Initiatives::InitiativeSlug
18
18
  include Decidim::Resourceable
19
19
  include Decidim::HasReference
20
+ include Decidim::Randomable
20
21
 
21
22
  belongs_to :organization,
22
23
  foreign_key: "decidim_organization_id",
@@ -94,13 +95,6 @@ module Decidim
94
95
  after_save :notify_state_change
95
96
  after_create :notify_creation
96
97
 
97
- def self.order_randomly(seed)
98
- transaction do
99
- connection.execute("SELECT setseed(#{connection.quote(seed)})")
100
- select('"decidim_initiatives".*, RANDOM()').order(Arel.sql("RANDOM()")).load
101
- end
102
- end
103
-
104
98
  def self.future_spaces
105
99
  none
106
100
  end
@@ -217,6 +211,7 @@ module Decidim
217
211
  # Returns true if the record was properly saved, false otherwise.
218
212
  def publish!
219
213
  return false if published?
214
+
220
215
  update(
221
216
  published_at: Time.current,
222
217
  state: "published",
@@ -231,6 +226,7 @@ module Decidim
231
226
  # Returns true if the record was properly saved, false otherwise.
232
227
  def unpublish!
233
228
  return false unless published?
229
+
234
230
  update(published_at: nil, state: "discarded")
235
231
  end
236
232
 
@@ -290,6 +286,7 @@ module Decidim
290
286
  # RETURNS boolean
291
287
  def has_authorship?(user)
292
288
  return true if author.id == user.id
289
+
293
290
  committee_members.approved.where(decidim_users_id: user.id).any?
294
291
  end
295
292
 
@@ -336,6 +333,7 @@ module Decidim
336
333
 
337
334
  def notify_state_change
338
335
  return unless saved_change_to_state?
336
+
339
337
  notifier = Decidim::Initiatives::StatusChangeNotifier.new(initiative: self)
340
338
  notifier.notify
341
339
  end
@@ -10,7 +10,7 @@ module Decidim
10
10
 
11
11
  belongs_to :user,
12
12
  foreign_key: "decidim_users_id",
13
- class_name: "Decidim::User"
13
+ class_name: "Decidim::User"
14
14
 
15
15
  enum state: [:requested, :rejected, :accepted]
16
16
 
@@ -165,6 +165,7 @@ module Decidim
165
165
  def read_initiative_list_action?
166
166
  return unless permission_action.subject == :initiative &&
167
167
  permission_action.action == :list
168
+
168
169
  allow!
169
170
  end
170
171
 
@@ -48,6 +48,7 @@ module Decidim
48
48
 
49
49
  return allow! if initiative.published? || initiative.rejected? || initiative.accepted?
50
50
  return allow! if user && (initiative.has_authorship?(user) || user.admin?)
51
+
51
52
  disallow!
52
53
  end
53
54
 
@@ -99,6 +100,7 @@ module Decidim
99
100
 
100
101
  def user_can_read_admin_dashboard?
101
102
  return unless user
103
+
102
104
  allow! if has_initiatives?
103
105
  end
104
106
 
@@ -59,6 +59,7 @@ module Decidim
59
59
 
60
60
  def search_scope_id
61
61
  return if scope_id.nil?
62
+
62
63
  query
63
64
  .joins(:scoped_type)
64
65
  .where(
@@ -29,7 +29,7 @@
29
29
  {
30
30
  disabled: !@form.signature_type_updatable?,
31
31
  "data-scope-selector": "initiative_decidim_scope_id",
32
- "data-scope-id": current_initiative.scoped_type.id,
32
+ "data-scope-id": form.object.decidim_scope_id,
33
33
  "data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
34
34
  "data-signature-types-selector": "initiative_signature_type",
35
35
  "data-signature-type": current_initiative.signature_type,
@@ -37,8 +37,8 @@
37
37
  </div>
38
38
  </div>
39
39
  </div>
40
- <br />
41
- <br />
40
+ <br>
41
+ <br>
42
42
  <div class="initiatives-votes-table" style="width: 100%; display: block; border: 1pt solid black;">
43
43
  <div class="initiatives-votes-table-header" style="background-color: lightgray; display: inline-block; width: 100%; font-size: 12pt; font-weight: bold; border-bottom: 1pt solid black;">
44
44
  <div class="initiatives-votes-table-cell w11" style="width: 10.8%; padding-left: 5pt; word-wrap: break-word; display: inline-block; float: left; min-height: 36pt;">
@@ -75,7 +75,7 @@
75
75
  </div>
76
76
  </div>
77
77
  </div>
78
- <br /><br />
78
+ <br><br>
79
79
  <div class="print-table">
80
80
  <div class="print-table-header">
81
81
  Membres de la comissió promotora de la iniciativa
@@ -106,7 +106,7 @@
106
106
  <%= decidim_sanitize translated_attribute(current_initiative.description) %>
107
107
 
108
108
  <h2 class="print-section-title">Exposició de motius:</h2>
109
- <br /><br /><br /><br /><br />
109
+ <br><br><br><br><br>
110
110
 
111
111
  <h2 class="print-section-title page-break">En cas de Consulta, especificar:</h2>
112
112
  <ul>
@@ -161,7 +161,7 @@
161
161
  </div>
162
162
  </div>
163
163
  </div>
164
- <br />
164
+ <br>
165
165
  <div class="print-table no-border">
166
166
  <div class="print-table-row no-border">
167
167
  <div class="print-table-cell w50 no-border" style="font-weight: bold">Lloc i data de la sol·licitud</div>
@@ -10,6 +10,6 @@
10
10
  data: { confirm: t(".confirm_destroy") } %>
11
11
  <% end %>
12
12
  </div>
13
- <br />
13
+ <br>
14
14
  <%= render partial: "initiative_type_scopes", locals: { initiative_type: current_initiative_type } %>
15
15
  <% end %>
@@ -9,7 +9,7 @@
9
9
  <% add_decidim_page_title(translated_attribute(current_initiative.title)) %>
10
10
  <% provide :meta_image_url, current_initiative.type.banner_image.url %>
11
11
 
12
- <br /><br />
12
+ <br><br>
13
13
  <div class="row column">
14
14
  <h2 class="heading2"><%= translated_attribute(current_initiative.title) %></h2>
15
15
  <%= render partial: "decidim/initiatives/initiatives/author", locals: { initiative: current_initiative } %>
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  </div>
16
- <br />
16
+ <br>
17
17
  <div class="row">
18
18
  <div class="medium-centered">
19
19
  <div class="card">
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  </div>
16
- <br />
16
+ <br>
17
17
  <div class="row">
18
18
  <div class="small-12 medium-centered">
19
19
  <div class="card">
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  </div>
16
- <br />
16
+ <br>
17
17
  <div class="row">
18
18
  <div class="medium-centered">
19
19
  <div class="card">
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  </div>
16
- <br />
16
+ <br>
17
17
  <div class="row">
18
18
  <div class="small-12 medium-centered">
19
19
  <%= render partial: "share_committee_link" %>
@@ -12,7 +12,7 @@
12
12
  <%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>.
13
13
  </div>
14
14
  </div>
15
- <br />
15
+ <br>
16
16
  <div class="row column">
17
17
  <div class="main-container">
18
18
  <div class="row collapse main-container--side-panel">
@@ -39,7 +39,7 @@
39
39
  <div>
40
40
  <%= raw translated_attribute type.description %>
41
41
  </div>
42
- <br />
42
+ <br>
43
43
  <%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { id: "new_initiative_#{type.id}", class: "form select-initiative_type-form" }) do |f| %>
44
44
  <%= f.hidden_field :type_id, value: type.id, id: "initiative_type_id_#{ type.id }" %>
45
45
  <%= f.submit t(".select"), class: "button" %>
@@ -10,7 +10,7 @@
10
10
  <%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>.
11
11
  </div>
12
12
  </div>
13
- <br />
13
+ <br>
14
14
 
15
15
  <div class="row small-up-1 medium-up-2 card-grid">
16
16
  <%= render similar_initiatives %>
@@ -10,7 +10,7 @@
10
10
  <%= render partial: "wizard_steps" %>
11
11
 
12
12
  <div class="card">
13
- <br />
13
+ <br>
14
14
  <div class="column actions">
15
15
  <%= link_to t(".back_to_initiative"), initiative_path(current_initiative), class: "button white-button expanded" %>
16
16
  </div>
@@ -39,7 +39,7 @@
39
39
  </fieldset>
40
40
  </div>
41
41
 
42
- <%= scopes_picker_field form, :scope_id, root: true %>
42
+ <%= scopes_picker_field form, :scope_id, root: nil %>
43
43
 
44
44
  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
45
45
  <% end %>
@@ -11,4 +11,4 @@
11
11
  <div class="row small-up-1 medium-up-2 card-grid">
12
12
  <%= render initiatives %>
13
13
  </div>
14
- <%= decidim_paginate initiatives, random_seed: random_seed %>
14
+ <%= decidim_paginate initiatives %>
@@ -1,5 +1,5 @@
1
1
  <% if initiative.answered? && translated_attribute(initiative.answer).present? %>
2
- <br />
2
+ <br>
3
3
  <div class="row column">
4
4
  <div class="callout success">
5
5
  <h5><%= t(initiative.state, scope: "decidim.initiatives.initiatives.result.answer_title") %>:</h5>
@@ -17,7 +17,7 @@
17
17
  <% end %>
18
18
 
19
19
  <% if initiative.rejected? %>
20
- <br />
20
+ <br>
21
21
  <div class="row column">
22
22
  <div class="callout warning">
23
23
  <h5><%= t(".initiative_rejected_reason") %></h5>
@@ -64,7 +64,7 @@ edit_link(
64
64
  </h2>
65
65
  <%= render partial: "author", locals: { initiative: current_initiative } %>
66
66
  </div>
67
- <br />
67
+ <br>
68
68
  <div class="row column">
69
69
  <%= render partial: "initiative_badge", locals: { initiative: current_initiative } %>
70
70
  <%= decidim_sanitize translated_attribute(current_initiative.description) %>
@@ -81,5 +81,3 @@ edit_link(
81
81
  </div>
82
82
 
83
83
  <%= comments_for current_initiative if current_initiative.published? %>
84
- <%= javascript_include_tag "decidim/initiatives/social_share" %>
85
- <%= stylesheet_link_tag "decidim/initiatives/social_share" %>
@@ -12,7 +12,7 @@
12
12
  } unless current_initiative.offline? %>
13
13
 
14
14
  <% Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.each do |g| %>
15
- <br />
15
+ <br>
16
16
  <% if @voted_groups.include? g.id %>
17
17
  <%= button_to(
18
18
  g.name,
@@ -13,7 +13,7 @@
13
13
  decidim_initiatives.new_initiative_committee_request_url(@initiative, host: @organization.host) %>
14
14
  </p>
15
15
  <% end %>
16
- <br /><br />
16
+ <br><br>
17
17
 
18
18
  <p>
19
19
  <%= t("check_initiative_details", scope: "decidim.initiatives.initiatives_mailer.initiative_link") %>
@@ -1,3 +1,3 @@
1
1
  <%= decidim_sanitize @body %>
2
- <br /><br />
2
+ <br><br>
3
3
  <%= render partial: "initiative_link" %>
@@ -1,3 +1,3 @@
1
1
  <%= decidim_sanitize @body %>
2
- <br /><br />
2
+ <br><br>
3
3
  <%= render partial: "initiative_link" %>
@@ -1,3 +1,3 @@
1
1
  <%= decidim_sanitize @body %>
2
- <br /><br />
2
+ <br><br>
3
3
  <%= render partial: "initiative_link" %>
@@ -1,8 +1,8 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="<%= I18n.locale %>" class="no-js">
3
3
  <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <meta name="viewport" content="width=device-width" />
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <meta name="viewport" content="width=device-width">
6
6
  <%= wicked_pdf_stylesheet_link_tag "decidim/initiatives/initiatives-votes" %>
7
7
  </head>
8
8
  <body>
@@ -71,7 +71,7 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
71
71
  state: state,
72
72
  signature_type: "online",
73
73
  signature_start_date: Date.current - 7.days,
74
- signature_end_date: Date.current + 7.days,
74
+ signature_end_date: Date.current + 7.days,
75
75
  published_at: Time.current - 7.days,
76
76
  author: Decidim::User.reorder(Arel.sql("RANDOM()")).first,
77
77
  organization: organization
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-initiatives version.
5
5
  module Initiatives
6
6
  def self.version
7
- "0.18.1"
7
+ "0.19.0"
8
8
  end
9
9
  end
10
10
  end
@@ -27,7 +27,6 @@ namespace :decidim_initiatives do
27
27
  .published
28
28
  .where.not(first_progress_notification_at: nil)
29
29
  .where(second_progress_notification_at: nil).find_each do |initiative|
30
-
31
30
  if initiative.percentage >= Decidim::Initiatives.second_notification_percentage
32
31
  notifier = Decidim::Initiatives::ProgressNotifier.new(initiative: initiative)
33
32
  notifier.notify
@@ -40,7 +39,6 @@ namespace :decidim_initiatives do
40
39
  Decidim::Initiative
41
40
  .published
42
41
  .where(first_progress_notification_at: nil).find_each do |initiative|
43
-
44
42
  if initiative.percentage >= Decidim::Initiatives.first_notification_percentage
45
43
  notifier = Decidim::Initiatives::ProgressNotifier.new(initiative: initiative)
46
44
  notifier.notify
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-initiatives
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Salvador Perez Garcia
@@ -16,112 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.1
19
+ version: 0.19.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.18.1
26
+ version: 0.19.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-comments
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.18.1
33
+ version: 0.19.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.18.1
40
+ version: 0.19.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.18.1
47
+ version: 0.19.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.18.1
54
+ version: 0.19.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-verifications
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.18.1
61
+ version: 0.19.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.18.1
68
+ version: 0.19.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: kaminari
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: '1.1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: '1.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: origami
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: social-share-button
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '1.0'
89
+ version: '2.1'
104
90
  type: :runtime
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '1.0'
96
+ version: '2.1'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: virtus-multiparams
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: '0.1'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: '0.1'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: wicked
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -140,44 +126,44 @@ dependencies:
140
126
  name: wicked_pdf
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ">="
129
+ - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '0'
131
+ version: '1.4'
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ">="
136
+ - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '0'
138
+ version: '1.4'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: wkhtmltopdf-binary
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - ">="
143
+ - - "~>"
158
144
  - !ruby/object:Gem::Version
159
- version: '0'
145
+ version: '0.12'
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - ">="
150
+ - - "~>"
165
151
  - !ruby/object:Gem::Version
166
- version: '0'
152
+ version: '0.12'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: decidim-dev
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - '='
172
158
  - !ruby/object:Gem::Version
173
- version: 0.18.1
159
+ version: 0.19.0
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - '='
179
165
  - !ruby/object:Gem::Version
180
- version: 0.18.1
166
+ version: 0.19.0
181
167
  description: Citizen initiatives plugin for decidim.
182
168
  email:
183
169
  - jsperezg@gmail.com
@@ -196,13 +182,11 @@ files:
196
182
  - app/assets/javascripts/decidim/initiatives/application.js
197
183
  - app/assets/javascripts/decidim/initiatives/identity_selector_dialog.js
198
184
  - app/assets/javascripts/decidim/initiatives/scoped_type.js
199
- - app/assets/javascripts/decidim/initiatives/social_share.js
200
185
  - app/assets/stylesheet/decidim/initiatives/admin.css.scss
201
186
  - app/assets/stylesheet/decidim/initiatives/initiatives-votes.css.scss
202
187
  - app/assets/stylesheet/decidim/initiatives/initiatives.scss
203
188
  - app/assets/stylesheet/decidim/initiatives/popularity_item.css.scss
204
189
  - app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss
205
- - app/assets/stylesheet/decidim/initiatives/social_share.css.scss
206
190
  - app/assets/stylesheet/decidim/initiatives/statistics.css.scss
207
191
  - app/cells/decidim/initiative_activity_cell.rb
208
192
  - app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb
@@ -375,7 +359,6 @@ files:
375
359
  - app/views/layouts/decidim/initiative_creation.html.erb
376
360
  - app/views/layouts/decidim/initiative_signature_creation.html.erb
377
361
  - config/initializers/mail_previews.rb
378
- - config/initializers/social_share_button.rb
379
362
  - config/initializers/wicked_pdf.rb
380
363
  - config/locales/ar-SA.yml
381
364
  - config/locales/ar.yml
@@ -1,2 +0,0 @@
1
- // = require social-share-button
2
- // = require_self
@@ -1,19 +0,0 @@
1
- //= require social-share-button
2
- $size: 45px;
3
-
4
- .share-link:hover{
5
- text-decoration: underline;
6
- cursor: pointer;
7
- }
8
-
9
- .social-share-button{
10
- display: inline-block;
11
- vertical-align: top;
12
-
13
- .ssb-icon{
14
- margin-right: 5px;
15
- background-size: $size $size;
16
- height: $size;
17
- width: $size;
18
- }
19
- }
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- SocialShareButton.configure do |config|
4
- config.allow_sites = %w(twitter facebook google_plus)
5
- end