decidim-proposals 0.32.0.rc2 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/proposals/proposal_vote/show.erb +1 -16
- data/app/{views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb → cells/decidim/proposals/proposal_votes_count/participatory_texts.erb} +17 -17
- data/app/cells/decidim/proposals/proposal_votes_count/show.erb +12 -0
- data/app/cells/decidim/proposals/proposal_votes_count_cell.rb +81 -0
- data/app/commands/decidim/proposals/admin/update_proposal.rb +1 -1
- data/app/commands/decidim/proposals/create_proposal.rb +1 -1
- data/app/commands/decidim/proposals/update_proposal.rb +1 -1
- data/app/forms/decidim/proposals/admin/proposal_form.rb +4 -53
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +0 -1
- data/app/forms/decidim/proposals/admin/proposals_merge_form.rb +2 -2
- data/app/forms/decidim/proposals/proposal_form.rb +3 -3
- data/app/jobs/decidim/proposals/admin/import_proposals_job.rb +3 -1
- data/app/models/decidim/proposals/proposal.rb +7 -1
- data/app/packs/src/decidim/proposals/admin/proposals_merge.js +0 -3
- data/app/views/decidim/proposals/admin/proposal_states/index.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_actions.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_merge.html.erb +1 -0
- data/app/views/decidim/proposals/admin/proposals/show.html.erb +5 -5
- data/app/views/decidim/proposals/admin/proposals_merges/_form.html.erb +1 -1
- data/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +1 -1
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_proposal_actions.html.erb +4 -4
- data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +1 -1
- data/config/locales/ar.yml +0 -16
- data/config/locales/bg.yml +0 -16
- data/config/locales/ca-IT.yml +18 -22
- data/config/locales/ca.yml +18 -19
- data/config/locales/cs.yml +1 -20
- data/config/locales/de.yml +1 -21
- data/config/locales/el.yml +0 -16
- data/config/locales/en.yml +17 -18
- data/config/locales/es-MX.yml +18 -19
- data/config/locales/es-PY.yml +18 -19
- data/config/locales/es.yml +18 -19
- data/config/locales/eu.yml +31 -32
- data/config/locales/fi-plain.yml +17 -18
- data/config/locales/fi.yml +17 -18
- data/config/locales/fr-CA.yml +5 -19
- data/config/locales/fr.yml +5 -19
- data/config/locales/gl.yml +0 -15
- data/config/locales/hu.yml +0 -15
- data/config/locales/id-ID.yml +0 -15
- data/config/locales/is-IS.yml +0 -3
- data/config/locales/it.yml +0 -16
- data/config/locales/ja.yml +6 -18
- data/config/locales/lt.yml +0 -16
- data/config/locales/lv.yml +0 -15
- data/config/locales/nl.yml +0 -16
- data/config/locales/no.yml +0 -16
- data/config/locales/pl.yml +0 -16
- data/config/locales/pt-BR.yml +0 -20
- data/config/locales/pt.yml +0 -16
- data/config/locales/ro-RO.yml +0 -16
- data/config/locales/ru.yml +0 -11
- data/config/locales/sk.yml +0 -20
- data/config/locales/sv.yml +1 -20
- data/config/locales/tr-TR.yml +2 -18
- data/config/locales/uk.yml +0 -11
- data/config/locales/zh-CN.yml +0 -15
- data/config/locales/zh-TW.yml +0 -16
- data/decidim-proposals.gemspec +1 -1
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +22 -23
- data/app/commands/decidim/proposals/gallery_methods.rb +0 -17
- data/app/packs/entrypoints/decidim_proposals_geocoding.js +0 -2
- data/app/views/decidim/proposals/proposals/_votes_count.html.erb +0 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76f8028076056c19ad5ce823a1d2907352d566302d0772a1da36b64c3c3e380e
|
|
4
|
+
data.tar.gz: 99c6c69cbe9aaa138371363daeb32334543da6a42b6e1f562c351c81217af5e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cee4638c6cdd360b71bae094d98a65daade5926ecd34094b4cc0abfb3c97c4148b77f0f088dba2992e095301fd86470fd541c4f472b5d52307df9b7b0c0887d
|
|
7
|
+
data.tar.gz: 24650eff90d924e95ca68f827238989da1d53cb83f0a959f08788e03a68f7cbdc9b24cfa47acbe9daad95680cc5212930f168386ff17ab99345f0752ac9d7eaa
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
<% if component_settings.participatory_texts_enabled? && from_proposals_list %>
|
|
3
|
-
<%= render partial: "decidim/proposals/proposals/participatory_texts/proposal_votes_count", locals: { proposal: resource, from_proposals_list: true } %>
|
|
4
|
-
<% else %>
|
|
5
|
-
<% progress ||= resource.proposal_votes_count || 0 %>
|
|
6
|
-
<% total ||= resource.maximum_votes || 0 %>
|
|
7
|
-
<%= cell(
|
|
8
|
-
"decidim/progress_bar",
|
|
9
|
-
progress,
|
|
10
|
-
total:,
|
|
11
|
-
units_name: "decidim.proposals.proposals.votes_count.count",
|
|
12
|
-
element_id: "proposal-#{resource.id}-votes-count",
|
|
13
|
-
class: total.positive? ? "card__proposals-votes-limited" : "card__proposals-votes-unlimited"
|
|
14
|
-
) %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% end %>
|
|
1
|
+
<%= cell("decidim/proposals/proposal_votes_count", resource, from_proposals_list:) %>
|
|
17
2
|
|
|
18
3
|
<% button_classes = "button button__sm button__secondary w-full" %>
|
|
19
4
|
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<% if
|
|
1
|
+
<% if resource.rejected? %>
|
|
2
2
|
<div></div>
|
|
3
3
|
<% else %>
|
|
4
4
|
<% if !current_user %>
|
|
5
5
|
<% if current_settings.votes_blocked? %>
|
|
6
|
-
<button type="button" name="button" class="column button button--sc disabled" disabled id="
|
|
7
|
-
<%=
|
|
6
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
|
|
7
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
8
8
|
</button>
|
|
9
9
|
<% else %>
|
|
10
|
-
<button type="button" name="button" class="column button button--sc" id="
|
|
11
|
-
<%=
|
|
10
|
+
<button type="button" name="button" class="column button button--sc" id="<%= element_id %>">
|
|
11
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
12
12
|
</button>
|
|
13
13
|
<% end %>
|
|
14
14
|
<% else %>
|
|
15
|
-
<% if proposal_voted_by_user?(
|
|
16
|
-
<button type="button" name="button" class="column button success button--sc" id="
|
|
17
|
-
<%=
|
|
15
|
+
<% if proposal_voted_by_user?(resource) %>
|
|
16
|
+
<button type="button" name="button" class="column button success button--sc" id="<%= element_id %>">
|
|
17
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
18
18
|
</button>
|
|
19
19
|
<% else %>
|
|
20
|
-
<% if
|
|
21
|
-
<button type="button" name="button" class="column button button--sc disabled" disabled id="
|
|
22
|
-
<%=
|
|
20
|
+
<% if resource.maximum_votes_reached? && !resource.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
|
|
21
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
|
|
22
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
23
23
|
</button>
|
|
24
24
|
<% else %>
|
|
25
25
|
<% if vote_limit_enabled? && remaining_votes_count_for_user == 0 %>
|
|
26
|
-
<button type="button" name="button" class="column button button--sc" disabled id="
|
|
27
|
-
<%=
|
|
26
|
+
<button type="button" name="button" class="column button button--sc" disabled id="<%= element_id %>">
|
|
27
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
28
28
|
</button>
|
|
29
29
|
<% elsif current_settings.votes_blocked? || !current_component.participatory_space.can_participate?(current_user) %>
|
|
30
|
-
<button type="button" name="button" class="column button button--sc disabled" disabled id="
|
|
31
|
-
<%=
|
|
30
|
+
<button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
|
|
31
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
32
32
|
</button>
|
|
33
33
|
<% else %>
|
|
34
|
-
<button type="button" name="button" class="column button button--sc" id="
|
|
35
|
-
<%=
|
|
34
|
+
<button type="button" name="button" class="column button button--sc" id="<%= element_id %>">
|
|
35
|
+
<%= resource.proposal_votes_count || 0 %>
|
|
36
36
|
</button>
|
|
37
37
|
<% end %>
|
|
38
38
|
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<% if participatory_texts_variant? %>
|
|
2
|
+
<%= render :participatory_texts %>
|
|
3
|
+
<% else %>
|
|
4
|
+
<%= cell(
|
|
5
|
+
"decidim/progress_bar",
|
|
6
|
+
progress,
|
|
7
|
+
total:,
|
|
8
|
+
units_name: "decidim.proposals.proposals.votes_count.count",
|
|
9
|
+
element_id:,
|
|
10
|
+
class: progress_bar_class
|
|
11
|
+
) %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Decidim
|
|
4
|
+
module Proposals
|
|
5
|
+
# Renders the votes count (progress bar or participatory texts variant)
|
|
6
|
+
# for a given proposal
|
|
7
|
+
class ProposalVotesCountCell < Decidim::ViewModel
|
|
8
|
+
include Cell::ViewModel::Partial
|
|
9
|
+
include Decidim::Proposals::ProposalVotesHelper
|
|
10
|
+
|
|
11
|
+
alias resource model
|
|
12
|
+
|
|
13
|
+
def show
|
|
14
|
+
return unless can_see_votes?
|
|
15
|
+
|
|
16
|
+
render
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def can_see_votes?
|
|
22
|
+
return false if component.current_settings.votes_hidden?
|
|
23
|
+
|
|
24
|
+
space_member? || admin? || transparent_space?
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def space_member?
|
|
28
|
+
participatory_space.can_participate?(current_user)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def admin?
|
|
32
|
+
current_user&.admin?
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def transparent_space?
|
|
36
|
+
participatory_space.try(:transparent?)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def participatory_texts_variant?
|
|
40
|
+
component.settings.participatory_texts_enabled? && from_proposals_list?
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def component
|
|
44
|
+
resource.component
|
|
45
|
+
end
|
|
46
|
+
alias current_component component
|
|
47
|
+
|
|
48
|
+
def participatory_space
|
|
49
|
+
component.participatory_space
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def current_settings
|
|
53
|
+
component.current_settings
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def component_settings
|
|
57
|
+
component.settings
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def from_proposals_list?
|
|
61
|
+
options[:from_proposals_list]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def progress
|
|
65
|
+
resource.proposal_votes_count || 0
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def total
|
|
69
|
+
resource.maximum_votes || 0
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def progress_bar_class
|
|
73
|
+
total.positive? ? "card__proposals-votes-limited" : "card__proposals-votes-unlimited"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def element_id
|
|
77
|
+
"proposal-#{resource.id}-votes-count"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -36,7 +36,7 @@ module Decidim
|
|
|
36
36
|
transaction do
|
|
37
37
|
update_proposal
|
|
38
38
|
update_proposal_author
|
|
39
|
-
|
|
39
|
+
attachment_cleanup!(include_all_attachments: true)
|
|
40
40
|
create_attachments(first_weight: first_attachment_weight) if process_attachments?
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -82,7 +82,7 @@ module Decidim
|
|
|
82
82
|
)
|
|
83
83
|
|
|
84
84
|
proposal.taxonomizations = form.taxonomizations if form.taxonomizations.present?
|
|
85
|
-
proposal.
|
|
85
|
+
proposal.attachments = form.attachments if form.attachments.present?
|
|
86
86
|
if form.geocoded?
|
|
87
87
|
proposal.latitude = form.latitude
|
|
88
88
|
proposal.longitude = form.longitude
|
|
@@ -14,7 +14,7 @@ module Decidim
|
|
|
14
14
|
translatable_attribute :body, Decidim::Attributes::RichText
|
|
15
15
|
attribute :attachment, AttachmentForm
|
|
16
16
|
|
|
17
|
-
attachments_attribute :
|
|
17
|
+
attachments_attribute :attachments
|
|
18
18
|
|
|
19
19
|
validates :title, :body, translatable_presence: true
|
|
20
20
|
validates :title, :body, translated_etiquette: true
|
|
@@ -27,61 +27,12 @@ module Decidim
|
|
|
27
27
|
|
|
28
28
|
self.title = presenter.title(all_locales: title.is_a?(Hash))
|
|
29
29
|
self.body = presenter.editor_body(all_locales: body.is_a?(Hash))
|
|
30
|
-
self.
|
|
31
|
-
self.
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def documents=(value)
|
|
35
|
-
case value
|
|
36
|
-
when String
|
|
37
|
-
super(parse_string_documents(value))
|
|
38
|
-
when Integer
|
|
39
|
-
super([value])
|
|
40
|
-
else
|
|
41
|
-
super
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def documents
|
|
46
|
-
result = super
|
|
47
|
-
|
|
48
|
-
if should_use_add_documents?(result)
|
|
49
|
-
extract_ids_from_add_documents
|
|
50
|
-
else
|
|
51
|
-
result.is_a?(Array) ? result : []
|
|
52
|
-
end
|
|
30
|
+
self.attachments = model.attachments.ids
|
|
31
|
+
self.add_attachments = model.attachments.map { |att| { id: att.id, title: att.title } }
|
|
53
32
|
end
|
|
54
33
|
|
|
55
34
|
def notify_missing_attachment_if_errored
|
|
56
|
-
errors.add(:
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
private
|
|
60
|
-
|
|
61
|
-
def should_use_add_documents?(result)
|
|
62
|
-
(result.blank? || result.is_a?(String)) && add_documents.present?
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def extract_ids_from_add_documents
|
|
66
|
-
add_documents
|
|
67
|
-
.select { |doc| doc.is_a?(Hash) && (doc[:id].present? || doc["id"].present?) }
|
|
68
|
-
.map { |doc| (doc[:id] || doc["id"]).to_i }
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def parse_string_documents(value)
|
|
72
|
-
return [] if value.blank?
|
|
73
|
-
|
|
74
|
-
parse_document_ids(value)
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def parse_document_ids(value)
|
|
78
|
-
ids = begin
|
|
79
|
-
Array(JSON.parse(value))
|
|
80
|
-
rescue JSON::ParserError
|
|
81
|
-
value.split(",").map(&:strip)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
ids.map(&:to_i).reject(&:zero?)
|
|
35
|
+
errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
|
|
85
36
|
end
|
|
86
37
|
end
|
|
87
38
|
end
|
|
@@ -16,7 +16,7 @@ module Decidim
|
|
|
16
16
|
attribute :target_component_id, Array[Integer]
|
|
17
17
|
attribute :proposal_ids, Array
|
|
18
18
|
|
|
19
|
-
attachments_attribute :
|
|
19
|
+
attachments_attribute :attachments
|
|
20
20
|
|
|
21
21
|
validates :target_component, :proposals, :current_component, presence: true
|
|
22
22
|
validates :proposal_ids, length: { minimum: 2 }
|
|
@@ -62,7 +62,7 @@ module Decidim
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def notify_missing_attachment_if_errored
|
|
65
|
-
errors.add(:
|
|
65
|
+
errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
@@ -19,7 +19,7 @@ module Decidim
|
|
|
19
19
|
attribute :longitude, Float
|
|
20
20
|
attribute :attachment, AttachmentForm
|
|
21
21
|
|
|
22
|
-
attachments_attribute :
|
|
22
|
+
attachments_attribute :attachments
|
|
23
23
|
|
|
24
24
|
validates :title, :body, presence: true
|
|
25
25
|
validates :title, :body, etiquette: true
|
|
@@ -42,7 +42,7 @@ module Decidim
|
|
|
42
42
|
presenter = ProposalPresenter.new(model)
|
|
43
43
|
self.body = presenter.editor_body(all_locales: body.is_a?(Hash))
|
|
44
44
|
|
|
45
|
-
self.
|
|
45
|
+
self.attachments = model.attachments
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def participatory_space_manifest
|
|
@@ -73,7 +73,7 @@ module Decidim
|
|
|
73
73
|
# in any other field. This is needed because when the form has an error, the attachment
|
|
74
74
|
# is lost, so we need a way to inform the user of this problem.
|
|
75
75
|
def notify_missing_attachment_if_errored
|
|
76
|
-
errors.add(:
|
|
76
|
+
errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -32,7 +32,9 @@ module Decidim
|
|
|
32
32
|
def proposals
|
|
33
33
|
proposals = Decidim::Proposals::Proposal.not_hidden.not_withdrawn.where(component: origin_component)
|
|
34
34
|
|
|
35
|
-
if @form["states"].
|
|
35
|
+
if @form["states"].blank?
|
|
36
|
+
proposals
|
|
37
|
+
elsif @form["states"].include?("not_answered")
|
|
36
38
|
proposals.not_answered.or(proposals.where(id: proposals.only_status(@form["states"]).pluck(:id)))
|
|
37
39
|
else
|
|
38
40
|
proposals.only_status(@form["states"])
|
|
@@ -426,8 +426,14 @@ module Decidim
|
|
|
426
426
|
# Create the :search_text ransacker alias for searching from both of these.
|
|
427
427
|
ransacker_i18n_multi :search_text, [:title, :body]
|
|
428
428
|
|
|
429
|
+
ransacker_i18n :translated_title, :title
|
|
430
|
+
|
|
429
431
|
def self.ransackable_attributes(_auth_object = nil)
|
|
430
|
-
%w(
|
|
432
|
+
%w(
|
|
433
|
+
id_string search_text title translated_title body is_emendation
|
|
434
|
+
comments_count proposal_votes_count published_at proposal_notes_count
|
|
435
|
+
state_published evaluation_assignments_count
|
|
436
|
+
)
|
|
431
437
|
end
|
|
432
438
|
|
|
433
439
|
def self.ransackable_associations(_auth_object = nil)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createDialog } from "src/decidim/a11y"
|
|
2
|
-
import createEditor from "src/decidim/editor";
|
|
3
2
|
import attachGeocoding from "src/decidim/geocoding/attach_input";
|
|
4
3
|
import { initializeUploadFields } from "src/decidim/direct_uploads/upload_field";
|
|
5
4
|
import { initializeReverseGeocoding } from "src/decidim/geocoding/reverse_geocoding"
|
|
@@ -14,8 +13,6 @@ document.addEventListener("decidim:loaded", () => {
|
|
|
14
13
|
const activateDrawerForm = () => {
|
|
15
14
|
const saveForm = drawer.dialog.querySelector("#form-merge-proposals");
|
|
16
15
|
|
|
17
|
-
// Handles editor initialization
|
|
18
|
-
saveForm.querySelectorAll(".editor-container").forEach((element) => createEditor(element));
|
|
19
16
|
const form = document.querySelector(".proposals_merge_form_admin");
|
|
20
17
|
|
|
21
18
|
// Handles meeting checkbox
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<% else %>
|
|
59
59
|
<li class="dropdown__item">
|
|
60
60
|
<div class="dropdown__button-disabled">
|
|
61
|
-
<%= with_tooltip t("tooltips.deleted_proposal_states_info", scope: "decidim.admin") do %>
|
|
61
|
+
<%= with_tooltip t("tooltips.deleted_proposal_states_info", scope: "decidim.admin"), class: :left do %>
|
|
62
62
|
<%= icon "delete-bin-line", class: "text-gray" %>
|
|
63
63
|
<span>
|
|
64
64
|
<%= t("actions.destroy", scope: "decidim.proposals") %>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<% else %>
|
|
23
23
|
<li class="dropdown__item">
|
|
24
24
|
<div class="dropdown__button-disabled">
|
|
25
|
-
<%= with_tooltip t("tooltips.cannot_edit_proposal_info", scope: "decidim.admin") do %>
|
|
25
|
+
<%= with_tooltip t("tooltips.cannot_edit_proposal_info", scope: "decidim.admin"), class: :left do %>
|
|
26
26
|
<%= icon "pencil-line", class: "text-gray" %>
|
|
27
27
|
<span>
|
|
28
28
|
<%= t("actions.edit_proposal", scope: "decidim.proposals") %>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<% end %>
|
|
74
74
|
<% else %>
|
|
75
75
|
<div class="dropdown__button-disabled">
|
|
76
|
-
<%= with_tooltip t("tooltips.deleted_proposals_info", scope: "decidim.admin") do %>
|
|
76
|
+
<%= with_tooltip t("tooltips.deleted_proposals_info", scope: "decidim.admin"), class: :left do %>
|
|
77
77
|
<%= icon "pencil-line", class: "text-gray" %>
|
|
78
78
|
<span>
|
|
79
79
|
<%= t("actions.edit_proposal", scope: "decidim.proposals") %>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<% if component_settings.attachments_allowed? %>
|
|
38
38
|
<div class="row column">
|
|
39
|
-
<%= form.attachment :
|
|
39
|
+
<%= form.attachment :attachments,
|
|
40
40
|
multiple: true,
|
|
41
41
|
label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
42
42
|
button_label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
</div>
|
|
5
5
|
<%# form_build automatically adds this tag when the editor form field is called but as this is rendered with ajax it will be ignored so we manually put here %>
|
|
6
|
+
<%= append_javascript_pack_tag "decidim_editor", defer: false %>
|
|
6
7
|
<%= append_stylesheet_pack_tag "decidim_editor" %>
|
|
7
8
|
<%= append_stylesheet_pack_tag "decidim_geocoding" %>
|
|
8
9
|
<% end %>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<%= render partial: "decidim/admin/shared/adjacent_navigation", locals: { adjacent_paths: filtered_adjacent_paths(proposal, :proposal_path) } %>
|
|
7
7
|
<div class="component__show_header">
|
|
8
8
|
<h2 class="component__show_header-title">
|
|
9
|
-
<%=
|
|
9
|
+
<%= present(proposal).title(html_escape: true) %>
|
|
10
10
|
</h2>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<li class="component__show_nav-author-title">
|
|
21
21
|
<%= link_to_if(
|
|
22
22
|
presented_author.profile_path.present?,
|
|
23
|
-
presented_author.name,
|
|
23
|
+
decidim_html_escape(presented_author.name),
|
|
24
24
|
presented_author.profile_path,
|
|
25
25
|
target: :blank
|
|
26
26
|
) %>
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
<div class="card-section">
|
|
48
48
|
<div class="row column">
|
|
49
49
|
<span class="component__show-title"><%= t ".body" %></span>
|
|
50
|
-
<
|
|
51
|
-
<%=
|
|
52
|
-
</
|
|
50
|
+
<div class="component__show-text editor-content">
|
|
51
|
+
<%= render_proposal_body(proposal) %>
|
|
52
|
+
</div>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<% end %>
|
|
34
34
|
<% if component_settings.attachments_allowed? %>
|
|
35
35
|
<div class="row column pt-4">
|
|
36
|
-
<%= form.attachment :
|
|
36
|
+
<%= form.attachment :attachments,
|
|
37
37
|
multiple: true,
|
|
38
38
|
label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
39
39
|
button_label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var $proposalVotesCount = $('#proposal-<%= proposal.id %>-votes-count');
|
|
4
4
|
|
|
5
5
|
if($proposalVotesCount[0]) {
|
|
6
|
-
morphdom($proposalVotesCount[0], '<%= j(
|
|
6
|
+
morphdom($proposalVotesCount[0], '<%= j(cell("decidim/proposals/proposal_votes_count", proposal, from_proposals_list: @from_proposals_list).to_s).strip.html_safe %>');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
var $proposalVoteButton = $('#proposal-<%= proposal.id %>-vote-button');
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<% end %>
|
|
24
24
|
<% end %>
|
|
25
25
|
<% if component_settings.attachments_allowed? && (new_proposal || @proposal) %>
|
|
26
|
-
<%= form.attachment :
|
|
26
|
+
<%= form.attachment :attachments,
|
|
27
27
|
multiple: true,
|
|
28
28
|
label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
29
29
|
button_label: t("decidim.proposals.proposals.edit.add_attachments"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if @proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal) %>
|
|
2
|
-
<li role="
|
|
3
|
-
<%= link_to edit_proposal_path(@proposal), class: "dropdown__button" do %>
|
|
2
|
+
<li role="presentation" class="dropdown__item">
|
|
3
|
+
<%= link_to edit_proposal_path(@proposal), class: "dropdown__button", role: "menuitem" do %>
|
|
4
4
|
<span><%= t("edit_proposal", scope: "decidim.proposals.proposals.show") %></span>
|
|
5
5
|
<%= icon "pencil-line" %>
|
|
6
6
|
<% end %>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
<% end %>
|
|
11
11
|
|
|
12
12
|
<% if @proposal.withdrawable_by?(current_user) %>
|
|
13
|
-
<li role="
|
|
14
|
-
<%= action_authorized_link_to :withdraw, withdraw_proposal_path(@proposal), resource: @proposal, method: :put, class: "dropdown__button", title: t("withdraw_btn_hint", scope: "decidim.proposals.proposals.show" ), data: { confirm: t("withdraw_confirmation_html", scope: "decidim.proposals.proposals.show" ) } do %>
|
|
13
|
+
<li role="presentation" class="dropdown__item">
|
|
14
|
+
<%= action_authorized_link_to :withdraw, withdraw_proposal_path(@proposal), resource: @proposal, method: :put, class: "dropdown__button", role: "menuitem", title: t("withdraw_btn_hint", scope: "decidim.proposals.proposals.show" ), data: { confirm: t("withdraw_confirmation_html", scope: "decidim.proposals.proposals.show" ) } do %>
|
|
15
15
|
<span><%= t("withdraw_proposal", scope: "decidim.proposals.proposals.show") %></span>
|
|
16
16
|
<%= icon "arrow-go-back-line" %>
|
|
17
17
|
<% end %>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<section class="layout-aside__section">
|
|
3
3
|
<div class="proposal__aside-vote layout-aside__ctas-buttons" data-controller="sticky-buttons">
|
|
4
4
|
<%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } unless @proposal.withdrawn? %>
|
|
5
|
-
<%=
|
|
5
|
+
<%= cell("decidim/proposals/proposal_votes_count", @proposal, from_proposals_list: false) %>
|
|
6
6
|
</div>
|
|
7
7
|
</section>
|
|
8
8
|
<% end %>
|
data/config/locales/ar.yml
CHANGED
|
@@ -44,10 +44,6 @@ ar:
|
|
|
44
44
|
allowed_file_content_types: 'نوع الوثيقة غير صالح. يسمح فقط بالملفات ذات الإضافات التالية: %{types}'
|
|
45
45
|
proposal:
|
|
46
46
|
attributes:
|
|
47
|
-
add_documents:
|
|
48
|
-
needs_to_be_reattached: يحتاج إلى إعادة ربط
|
|
49
|
-
add_photos:
|
|
50
|
-
needs_to_be_reattached: يحتاج إلى إعادة ربط
|
|
51
47
|
body:
|
|
52
48
|
cant_be_equal_to_template: لا يمكن أن يساوي القالب
|
|
53
49
|
identical: لا يمكن أن يكون العنوان متطابقًا
|
|
@@ -125,7 +121,6 @@ ar:
|
|
|
125
121
|
attachments_allowed: السماح للمرفقات
|
|
126
122
|
collaborative_drafts_enabled: تم تمكين المسودات التعاونية
|
|
127
123
|
comments_enabled: تم تمكين التعليقات
|
|
128
|
-
comments_max_length: الحد الأقصى لطول التعليقات (اترك 0 لاستعمال القيمة الافتراضية)
|
|
129
124
|
default_sort_order: التصنيف الافتراضي للاقتراح
|
|
130
125
|
default_sort_order_options:
|
|
131
126
|
most_commented: صاحبة الأكثر تعليقات
|
|
@@ -187,17 +182,14 @@ ar:
|
|
|
187
182
|
email_intro: 'تم قبول %{requester_name} لأن يكون مسجلاً كمساهم في المسودة التعاونية <a href="%{resource_url}">%{resource_title}</a>.'
|
|
188
183
|
email_outro: لقد تلقيت هذا الإشعار لأنك مساهم مع <a href="%{resource_url}">%{resource_title}</a>.
|
|
189
184
|
email_subject: "تم قبول %{requester_name} للوصول كمساهم في %{resource_title}."
|
|
190
|
-
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> كان <strong>مقبولة للوصول كمساهم</strong> من <a href="%{resource_path}">%{resource_title}</a> مشروع تعاوني.
|
|
191
185
|
collaborative_draft_access_rejected:
|
|
192
186
|
email_intro: 'تم رفض %{requester_name} لأن يكون مسجلاً كمساهم في المسودة التعاونية <a href="%{resource_url}">%{resource_title}</a>.'
|
|
193
187
|
email_outro: لقد تلقيت هذا الإشعار لأنك مساهم مع <a href="%{resource_url}">%{resource_title}</a>.
|
|
194
188
|
email_subject: "تم رفض %{requester_name} للوصول كمساهم في المسودة التعاونية %{resource_title}."
|
|
195
|
-
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> تم رفض الوصول إلى <strong>كمساهم</strong> في المسودة التعاونية <a href="%{resource_path}">%{resource_title}</a>.
|
|
196
189
|
collaborative_draft_access_requested:
|
|
197
190
|
email_intro: 'طلب %{requester_name} إمكانية المشاركة كمساهم. يمكنك <strong>قبول أو رفض الطلب</strong> من صفحة المسودة التعاونية <a href="%{resource_url}">%{resource_title}</a>.'
|
|
198
191
|
email_outro: لقد تلقيت هذا الإشعار لأنك مساهم مع <a href="%{resource_url}">%{resource_title}</a>.
|
|
199
192
|
email_subject: "%{requester_name} طلب الوصول للمساهمة في %{resource_title}."
|
|
200
|
-
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> طلب الوصول للمساهمة في المسودة التعاونية <a href="%{resource_path}">%{resource_title}</a> . يرجى <strong>قبول أو رفض الطلب</strong>.
|
|
201
193
|
collaborative_draft_access_requester_accepted:
|
|
202
194
|
email_intro: تم قبول طلبك للمشاركة كمساهم في المسودة التعاونية <a href="%{resource_url}">%{resource_title}</a>.
|
|
203
195
|
email_outro: لقد تلقيت هذا الإشعار لأنك طلبت أن تصبح مساهماً مع <a href="%{resource_url}">%{resource_title}</a>.
|
|
@@ -209,10 +201,7 @@ ar:
|
|
|
209
201
|
email_subject: لقد تم رفضك كمساهم بـ %{resource_title}.
|
|
210
202
|
notification_title: لقد تم رفض دخولك <strong>كمساهم</strong> في المسودة التعاونية <a href="%{resource_path}">%{resource_title}</a>.
|
|
211
203
|
collaborative_draft_withdrawn:
|
|
212
|
-
email_intro: <a href="%{author_url}">%{author_name} %{author_nickname}</a> سحب <a href="%{resource_url}">%{resource_title}</a> المسودة التعاونية.
|
|
213
204
|
email_outro: لقد تلقيت هذا الإشعار لأنك مساهم مع <a href="%{resource_url}">%{resource_title}</a>.
|
|
214
|
-
email_subject: "%{author_name} %{author_nickname} سحب المشروع %{resource_title} التعاوني."
|
|
215
|
-
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong>سحبت</strong> مشروع <a href="%{resource_path}">%{resource_title}</a> التعاوني.
|
|
216
205
|
creation_enabled:
|
|
217
206
|
email_intro: 'يمكنك الآن إنشاء مقترحات جديدة في %{participatory_space_title}! ابدأ المشاركة في هذه الصفحة:'
|
|
218
207
|
email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{participatory_space_title}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
|
|
@@ -222,11 +211,6 @@ ar:
|
|
|
222
211
|
email_outro: لقد تلقيت هذا الإشعار لأنك مؤلف "%{resource_title}".
|
|
223
212
|
email_subject: تم ذكر اقتراحك "%{mentioned_proposal_title}"
|
|
224
213
|
notification_title: لقد تم ذكر اقتراحك "%{mentioned_proposal_title}" <a href="%{resource_path}">في هذه المساحة</a> في التعليقات.
|
|
225
|
-
proposal_published:
|
|
226
|
-
email_intro: '%{author_name} %{author_nickname}، الذي تتابعه ، بنشر اقتراح جديد يسمى "%{resource_title}". التحقق من ذلك والمساهمة:'
|
|
227
|
-
email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{author_nickname}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
|
|
228
|
-
email_subject: اقتراح جديد "%{resource_title}" من %{author_nickname}
|
|
229
|
-
notification_title: تم نشر مقترح <a href="%{resource_path}">%{resource_title}</a> بواسطة <a href="%{author_path}">%{author_name} %{author_nickname}</a>.
|
|
230
214
|
proposal_published_for_space:
|
|
231
215
|
email_intro: تمت إضافة الاقتراح "%{resource_title}" إلى "%{participatory_space_title}" الذي تتابعه.
|
|
232
216
|
email_outro: لقد تلقيت هذا الإشعار لأنك تتابع "%{participatory_space_title}". يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
|