decidim-proposals 0.0.5 → 0.0.6
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/commands/decidim/proposals/admin/create_proposal.rb +4 -1
- data/app/commands/decidim/proposals/create_proposal.rb +4 -1
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +4 -0
- data/app/controllers/decidim/proposals/proposals_controller.rb +12 -6
- data/app/forms/decidim/proposals/admin/proposal_form.rb +13 -2
- data/app/forms/decidim/proposals/proposal_form.rb +13 -2
- data/app/helpers/decidim/proposals/application_helper.rb +3 -0
- data/app/helpers/decidim/proposals/map_helper.rb +19 -0
- data/app/helpers/decidim/proposals/proposal_order_helper.rb +16 -0
- data/app/models/decidim/proposals/abilities/admin_user.rb +2 -0
- data/app/models/decidim/proposals/abilities/current_user.rb +3 -0
- data/app/models/decidim/proposals/abilities/process_admin_user.rb +2 -1
- data/app/models/decidim/proposals/proposal.rb +12 -3
- data/app/services/decidim/proposals/proposal_search.rb +0 -5
- data/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +8 -2
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +12 -14
- data/app/views/decidim/proposals/proposals/_filters.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_filters_small_view.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_tags.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/index.html.erb +27 -0
- data/app/views/decidim/proposals/proposals/new.html.erb +8 -2
- data/app/views/decidim/proposals/proposals/show.html.erb +18 -1
- data/config/i18n-tasks.yml +3 -1
- data/config/locales/ca.yml +11 -8
- data/config/locales/en.yml +9 -6
- data/config/locales/es.yml +14 -11
- data/config/locales/eu.yml +119 -1
- data/config/locales/fi.yml +143 -0
- data/db/migrate/20170215113152_create_proposal_reports.rb +14 -0
- data/db/migrate/20170215131720_add_report_count_to_proposals.rb +5 -0
- data/db/migrate/20170215132030_add_reference_to_proposals.rb +7 -0
- data/db/migrate/20170220152416_add_hidden_at_to_proposals.rb +5 -0
- data/db/migrate/20170228105156_add_geolocalization_fields_to_proposals.rb +7 -0
- data/db/migrate/20170307085300_migrate_proposal_reports_data_to_reports.rb +26 -0
- data/lib/decidim/proposals/feature.rb +4 -3
- data/lib/decidim/proposals/test/factories.rb +8 -0
- metadata +25 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 656e8df89f7b5ea02254e410d14a3df00eaa09fa
|
4
|
+
data.tar.gz: 38eb1d3a952dd96d9172a1e3fc4bf1efa3dc8e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23eddcced0afdb41078c2af58a3e89762d424da02406a34eb44af66f174a062e2df76898ded03d0c4723892d248ebaf7307f11694686e6f864a6c193c6d4bd37
|
7
|
+
data.tar.gz: 2884c6ef31744369f99efc80afb34556e100e225f45af3410949478832598669c9c941f7cfd2b75b49e490b1bcdd9fb682e3913e59538a41bc9820ea68738ebc
|
@@ -37,7 +37,10 @@ module Decidim
|
|
37
37
|
scope: form.scope,
|
38
38
|
author: @current_user,
|
39
39
|
decidim_user_group_id: form.user_group_id,
|
40
|
-
feature: form.feature
|
40
|
+
feature: form.feature,
|
41
|
+
address: form.address,
|
42
|
+
latitude: form.latitude,
|
43
|
+
longitude: form.longitude
|
41
44
|
)
|
42
45
|
end
|
43
46
|
end
|
@@ -7,17 +7,14 @@ module Decidim
|
|
7
7
|
include FormFactory
|
8
8
|
include FilterResource
|
9
9
|
|
10
|
-
helper_method :order, :random_seed
|
10
|
+
helper_method :order, :random_seed, :geocoded_proposals
|
11
11
|
|
12
12
|
before_action :authenticate_user!, only: [:new, :create]
|
13
13
|
|
14
|
-
def show
|
15
|
-
@proposal = Proposal.where(feature: current_feature).find(params[:id])
|
16
|
-
end
|
17
|
-
|
18
14
|
def index
|
19
15
|
@proposals = search
|
20
16
|
.results
|
17
|
+
.not_hidden
|
21
18
|
.includes(:author)
|
22
19
|
.includes(:category)
|
23
20
|
.includes(:scope)
|
@@ -35,6 +32,11 @@ module Decidim
|
|
35
32
|
end
|
36
33
|
end
|
37
34
|
|
35
|
+
def show
|
36
|
+
@proposal = Proposal.not_hidden.where(feature: current_feature).find(params[:id])
|
37
|
+
@report_form = form(Decidim::ReportForm).from_params(reason: "spam")
|
38
|
+
end
|
39
|
+
|
38
40
|
def new
|
39
41
|
authorize! :create, Proposal
|
40
42
|
|
@@ -86,6 +88,10 @@ module Decidim
|
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
91
|
+
def geocoded_proposals
|
92
|
+
@geocoded_proposals ||= search.results.not_hidden.select(&:geocoded?)
|
93
|
+
end
|
94
|
+
|
89
95
|
def search_klass
|
90
96
|
ProposalSearch
|
91
97
|
end
|
@@ -97,7 +103,7 @@ module Decidim
|
|
97
103
|
activity: "",
|
98
104
|
category_id: "",
|
99
105
|
state: "all",
|
100
|
-
scope_id:
|
106
|
+
scope_id: nil,
|
101
107
|
related_to: ""
|
102
108
|
}
|
103
109
|
end
|
@@ -8,15 +8,26 @@ module Decidim
|
|
8
8
|
|
9
9
|
attribute :title, String
|
10
10
|
attribute :body, String
|
11
|
+
attribute :address, String
|
12
|
+
attribute :latitude, Float
|
13
|
+
attribute :longitude, Float
|
11
14
|
attribute :category_id, Integer
|
12
15
|
attribute :scope_id, Integer
|
13
16
|
|
14
17
|
validates :title, :body, presence: true
|
18
|
+
validates :address, geocoding: true, if: -> { current_feature.settings.geocoding_enabled? }
|
15
19
|
validates :category, presence: true, if: ->(form) { form.category_id.present? }
|
16
20
|
validates :scope, presence: true, if: ->(form) { form.scope_id.present? }
|
17
21
|
|
18
22
|
delegate :categories, to: :current_feature, prefix: false
|
19
|
-
|
23
|
+
|
24
|
+
def organization_scopes
|
25
|
+
current_organization.scopes
|
26
|
+
end
|
27
|
+
|
28
|
+
def process_scope
|
29
|
+
current_feature.participatory_process.scope
|
30
|
+
end
|
20
31
|
|
21
32
|
alias feature current_feature
|
22
33
|
|
@@ -31,7 +42,7 @@ module Decidim
|
|
31
42
|
#
|
32
43
|
# Returns a Decidim::Scope
|
33
44
|
def scope
|
34
|
-
@scope ||=
|
45
|
+
@scope ||= process_scope || organization_scopes.where(id: scope_id).first
|
35
46
|
end
|
36
47
|
end
|
37
48
|
end
|
@@ -7,6 +7,9 @@ module Decidim
|
|
7
7
|
|
8
8
|
attribute :title, String
|
9
9
|
attribute :body, String
|
10
|
+
attribute :address, String
|
11
|
+
attribute :latitude, Float
|
12
|
+
attribute :longitude, Float
|
10
13
|
attribute :category_id, Integer
|
11
14
|
attribute :scope_id, Integer
|
12
15
|
attribute :user_group_id, Integer
|
@@ -14,11 +17,19 @@ module Decidim
|
|
14
17
|
validates :title, :body, presence: true, etiquette: true
|
15
18
|
validates :title, length: { maximum: 150 }
|
16
19
|
validates :body, length: { maximum: 500 }, etiquette: true
|
20
|
+
validates :address, geocoding: true, if: -> { current_feature.settings.geocoding_enabled? }
|
17
21
|
validates :category, presence: true, if: ->(form) { form.category_id.present? }
|
18
22
|
validates :scope, presence: true, if: ->(form) { form.scope_id.present? }
|
19
23
|
|
20
24
|
delegate :categories, to: :current_feature
|
21
|
-
|
25
|
+
|
26
|
+
def organization_scopes
|
27
|
+
current_organization.scopes
|
28
|
+
end
|
29
|
+
|
30
|
+
def process_scope
|
31
|
+
current_feature.participatory_process.scope
|
32
|
+
end
|
22
33
|
|
23
34
|
alias feature current_feature
|
24
35
|
|
@@ -33,7 +44,7 @@ module Decidim
|
|
33
44
|
#
|
34
45
|
# Returns a Decidim::Scope
|
35
46
|
def scope
|
36
|
-
@scope ||=
|
47
|
+
@scope ||= process_scope || organization_scopes.where(id: scope_id).first
|
37
48
|
end
|
38
49
|
end
|
39
50
|
end
|
@@ -7,6 +7,9 @@ module Decidim
|
|
7
7
|
include Decidim::Comments::CommentsHelper
|
8
8
|
include PaginateHelper
|
9
9
|
include ProposalVotesHelper
|
10
|
+
include ProposalOrderHelper
|
11
|
+
include Decidim::MapHelper
|
12
|
+
include Decidim::Proposals::MapHelper
|
10
13
|
|
11
14
|
# Public: The state of a proposal in a way a human can understand.
|
12
15
|
#
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
module Proposals
|
4
|
+
# This helper include some methods for rendering proposals dynamic maps.
|
5
|
+
module MapHelper
|
6
|
+
# Serialize a collection of geocoded proposals to be used by the dynamic map component
|
7
|
+
#
|
8
|
+
# geocoded_proposals - A collection of geocoded proposals
|
9
|
+
def proposals_data_for_map(geocoded_proposals)
|
10
|
+
geocoded_proposals.map do |proposal|
|
11
|
+
proposal.slice(:latitude, :longitude, :address).merge(title: proposal.title,
|
12
|
+
body: truncate(proposal.body, length: 100),
|
13
|
+
icon: icon("proposals", width: 40, height: 70, remove_icon_class: true),
|
14
|
+
link: proposal_path(proposal))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
module Proposals
|
4
|
+
# Simple helpers to handle proposals ordering
|
5
|
+
module ProposalOrderHelper
|
6
|
+
# Returns the options the user will see to order proposals
|
7
|
+
def order_fields
|
8
|
+
@order_fields ||= begin
|
9
|
+
order_fields = [:random, :recent]
|
10
|
+
order_fields << :most_voted if current_settings.votes_enabled?
|
11
|
+
order_fields
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -18,7 +18,8 @@ module Decidim
|
|
18
18
|
can :manage, Proposal do |proposal|
|
19
19
|
participatory_processes.include?(proposal.feature.participatory_process)
|
20
20
|
end
|
21
|
-
|
21
|
+
can :unreport, Proposal
|
22
|
+
can :hide, Proposal
|
22
23
|
cannot :create, Proposal unless can_create_proposal?
|
23
24
|
cannot :update, Proposal unless can_update_proposal?
|
24
25
|
end
|
@@ -7,7 +7,9 @@ module Decidim
|
|
7
7
|
include Decidim::Authorable
|
8
8
|
include Decidim::HasFeature
|
9
9
|
include Decidim::HasScope
|
10
|
+
include Decidim::HasReference
|
10
11
|
include Decidim::HasCategory
|
12
|
+
include Decidim::Reportable
|
11
13
|
include Decidim::Comments::Commentable
|
12
14
|
|
13
15
|
feature_manifest_name "proposals"
|
@@ -16,8 +18,10 @@ module Decidim
|
|
16
18
|
|
17
19
|
validates :title, :body, presence: true
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
+
geocoded_by :address, http_headers: lambda { |proposal| { "Referer" => proposal.feature.organization.host } }
|
22
|
+
|
23
|
+
scope :accepted, -> { where(state: "accepted") }
|
24
|
+
scope :rejected, -> { where(state: "rejected") }
|
21
25
|
|
22
26
|
def author_name
|
23
27
|
user_group&.name || author&.name || I18n.t("decidim.proposals.models.proposal.fields.official_proposal")
|
@@ -62,7 +66,7 @@ module Decidim
|
|
62
66
|
|
63
67
|
# Public: Overrides the `accepts_new_comments?` Commentable concern method.
|
64
68
|
def accepts_new_comments?
|
65
|
-
|
69
|
+
commentable? && !feature.active_step_settings.comments_blocked
|
66
70
|
end
|
67
71
|
|
68
72
|
# Public: Overrides the `comments_have_alignment?` Commentable concern method.
|
@@ -74,6 +78,11 @@ module Decidim
|
|
74
78
|
def comments_have_votes?
|
75
79
|
true
|
76
80
|
end
|
81
|
+
|
82
|
+
# Public: Overrides the `reported_content` Reportable concern method.
|
83
|
+
def reported_content
|
84
|
+
"<h3>#{title}</h3><p>#{body}</p>"
|
85
|
+
end
|
77
86
|
end
|
78
87
|
end
|
79
88
|
end
|
@@ -6,14 +6,20 @@
|
|
6
6
|
<%= form.text_area :body, rows: 10 %>
|
7
7
|
</div>
|
8
8
|
|
9
|
+
<% if feature_settings.geocoding_enabled? %>
|
10
|
+
<div class="field">
|
11
|
+
<%= form.text_field :address %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
|
9
15
|
<% if @form.categories&.any? %>
|
10
16
|
<div class="field">
|
11
17
|
<%= form.categories_select :category_id, @form.categories, prompt: t(".select_a_category") %>
|
12
18
|
</div>
|
13
19
|
<% end %>
|
14
20
|
|
15
|
-
<% if
|
21
|
+
<% if !@form.process_scope %>
|
16
22
|
<div class="field">
|
17
|
-
<%= form.
|
23
|
+
<%= form.collection_select :scope_id, organization_scopes, :id, :name %>
|
18
24
|
</div>
|
19
25
|
<% end %>
|
@@ -1,19 +1,17 @@
|
|
1
1
|
<h2><%= t(".title") %></h2>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<div class="actions title">
|
4
|
+
<% if feature_settings.official_proposals_enabled %>
|
5
5
|
<%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class: 'new' if can? :manage, current_feature %>
|
6
|
-
|
7
|
-
|
6
|
+
<% end %>
|
7
|
+
</div>
|
8
8
|
|
9
9
|
<table class="stack">
|
10
10
|
<thead>
|
11
11
|
<tr>
|
12
12
|
<th><%= t("models.proposal.fields.title", scope: "decidim.proposals") %></th>
|
13
13
|
<th><%= t("models.proposal.fields.category", scope: "decidim.proposals") %></th>
|
14
|
-
|
15
|
-
<th><%= t("models.proposal.fields.scope", scope: "decidim.proposals") %></th>
|
16
|
-
<% end %>
|
14
|
+
<th><%= t("models.proposal.fields.scope", scope: "decidim.proposals") %></th>
|
17
15
|
<th><%= t("models.proposal.fields.state", scope: "decidim.proposals") %></th>
|
18
16
|
<th class="actions"><%= t("actions.title", scope: "decidim.proposals") %></th>
|
19
17
|
</tr>
|
@@ -29,13 +27,13 @@
|
|
29
27
|
<%= translated_attribute proposal.category.name %>
|
30
28
|
<% end %>
|
31
29
|
</td>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
30
|
+
<td>
|
31
|
+
<% if proposal.scope %>
|
32
|
+
<%= proposal.scope.name %>
|
33
|
+
<% else %>
|
34
|
+
<%= t("decidim.participatory_processes.scopes.global") %>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
39
37
|
<td>
|
40
38
|
<%= humanize_proposal_state proposal.state %>
|
41
39
|
</td>
|
@@ -28,8 +28,8 @@
|
|
28
28
|
<%= form.collection_check_boxes :activity, [["voted", t('.voted')]], :first, :last, legend_title: t('.activity') %>
|
29
29
|
<% end %>
|
30
30
|
|
31
|
-
<% if current_organization.scopes.any? &&
|
32
|
-
<%= form.collection_check_boxes :scope_id,
|
31
|
+
<% if current_organization.scopes.any? && !current_participatory_process.scope %>
|
32
|
+
<%= form.collection_check_boxes :scope_id, search_organization_scopes, lambda {|scope| scope.id.to_s}, :name, legend_title: t('.scopes') %>
|
33
33
|
<% end %>
|
34
34
|
|
35
35
|
<% if current_feature.categories.any? %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<div class="reveal" id="filter-box" data-reveal>
|
9
9
|
<div class="reveal__header">
|
10
|
-
<h3 class="reveal__title"><%= t ".
|
10
|
+
<h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
|
11
11
|
<button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
|
12
12
|
<span aria-hidden="true">×</span>
|
13
13
|
</button>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= order_selector
|
1
|
+
<%= order_selector order_fields, i18n_scope: "decidim.proposals.proposals.orders" %>
|
2
2
|
<div class="row small-up-1 medium-up-2 card-grid">
|
3
3
|
<%= render @proposals %>
|
4
4
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% if proposal.category.present? %>
|
4
4
|
<li><%= link_to translated_attribute(proposal.category.name), decidim_proposals.proposals_path(filter: { category_id: proposal.category.id }) %></li>
|
5
5
|
<% end %>
|
6
|
-
<% if proposal.scope.present? &&
|
6
|
+
<% if proposal.scope.present? && !current_participatory_process.scope %>
|
7
7
|
<li><%= link_to proposal.scope.name, decidim_proposals.proposals_path(filter: { scope_id: [proposal.scope.id] }) %></li>
|
8
8
|
<% end %>
|
9
9
|
</ul>
|
@@ -1,3 +1,30 @@
|
|
1
|
+
<% if feature_settings.geocoding_enabled? %>
|
2
|
+
<%= dynamic_map_for proposals_data_for_map(geocoded_proposals) do %>
|
3
|
+
<template id="marker-popup">
|
4
|
+
<div class="map-info__content">
|
5
|
+
<h3>${title}</h3>
|
6
|
+
<div id="bodyContent">
|
7
|
+
<p>{{html body}}</p>
|
8
|
+
<div class="map__date-adress">
|
9
|
+
<div class="address card__extra">
|
10
|
+
<div class="address__icon">{{html icon}}</div>
|
11
|
+
<div class="address__details">
|
12
|
+
<span>${address}</span><br />
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="map-info__button">
|
17
|
+
<a href="${link}" class="button button--sc">
|
18
|
+
<%= t('.view_proposal') %>
|
19
|
+
</a>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</template>
|
24
|
+
<%= stylesheet_link_tag "decidim/map" %>
|
25
|
+
<%= javascript_include_tag "decidim/map" %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
1
28
|
<%= render partial: "votes_limit" %>
|
2
29
|
<div class="row columns">
|
3
30
|
<div class="title-action">
|
@@ -18,15 +18,21 @@
|
|
18
18
|
<%= form.text_area :body, rows: 10 %>
|
19
19
|
</div>
|
20
20
|
|
21
|
+
<% if feature_settings.geocoding_enabled? %>
|
22
|
+
<div class="field">
|
23
|
+
<%= form.text_field :address %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
|
21
27
|
<% if @form.categories&.any? %>
|
22
28
|
<div class="field">
|
23
29
|
<%= form.categories_select :category_id, @form.categories, prompt: t(".select_a_category") %>
|
24
30
|
</div>
|
25
31
|
<% end %>
|
26
32
|
|
27
|
-
<% if
|
33
|
+
<% if !@form.process_scope %>
|
28
34
|
<div class="field">
|
29
|
-
<%= form.
|
35
|
+
<%= form.collection_select :scope_id, organization_scopes, :id, :name %>
|
30
36
|
</div>
|
31
37
|
<% end %>
|
32
38
|
|
@@ -19,6 +19,11 @@
|
|
19
19
|
</span>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
|
+
<div class="author-data__extra">
|
23
|
+
<button type="button" data-open="<%= current_user.present? ? 'flagModal' : 'loginModal' %>" title="<%= t('.report') %>" aria-controls="<%= current_user.present? ? 'flagModal' : 'loginModal' %>" aria-haspopup="true" tabindex="0">
|
24
|
+
<%= icon "flag", aria_label: t('.report'), class: 'icon--small' %>
|
25
|
+
</button>
|
26
|
+
</div>
|
22
27
|
</div>
|
23
28
|
</div>
|
24
29
|
<div class="row">
|
@@ -35,12 +40,16 @@
|
|
35
40
|
</div>
|
36
41
|
</div>
|
37
42
|
<% end %>
|
43
|
+
<%= feature_reference(@proposal) %>
|
38
44
|
<%= render partial: "decidim/shared/share_modal" %>
|
39
45
|
</div>
|
40
46
|
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
41
47
|
<div class="section">
|
42
48
|
<%= render partial: "proposal_badge", locals: { proposal: @proposal } %>
|
43
49
|
<p><%= @proposal.body %></p>
|
50
|
+
<% if feature_settings.geocoding_enabled? %>
|
51
|
+
<%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @proposal } %>
|
52
|
+
<% end %>
|
44
53
|
<%= render partial: "tags", locals: { proposal: @proposal } %>
|
45
54
|
</div>
|
46
55
|
<% if @proposal.answered? && translated_attribute(@proposal.answer).present? %>
|
@@ -48,7 +57,7 @@
|
|
48
57
|
<div class="section">
|
49
58
|
<div class="callout success">
|
50
59
|
<h5><%= t(".proposal_accepted_reason") %></h5>
|
51
|
-
<p
|
60
|
+
<p><%== translated_attribute @proposal.answer %></p>
|
52
61
|
</div>
|
53
62
|
</div>
|
54
63
|
<% else %>
|
@@ -70,3 +79,11 @@
|
|
70
79
|
|
71
80
|
<%= javascript_include_tag "decidim/proposals/social_share" %>
|
72
81
|
<%= stylesheet_link_tag "decidim/proposals/social_share" %>
|
82
|
+
|
83
|
+
<%=
|
84
|
+
render partial: "decidim/shared/flag_modal", locals: {
|
85
|
+
reportable: @proposal,
|
86
|
+
form: @report_form,
|
87
|
+
url: decidim.report_path(sgid: @proposal.to_sgid.to_s)
|
88
|
+
}
|
89
|
+
%>
|
data/config/i18n-tasks.yml
CHANGED
@@ -4,7 +4,9 @@ ignore_unused:
|
|
4
4
|
- "decidim.features.proposals.name"
|
5
5
|
- "decidim.features.proposals.settings.*"
|
6
6
|
- "decidim.resource_links.*"
|
7
|
-
- "activemodel.attributes
|
7
|
+
- "activemodel.attributes.*"
|
8
8
|
- "decidim.proposals.answers.*"
|
9
9
|
- "decidim.features.proposals.actions.*"
|
10
10
|
- "decidim.proposals.proposals.orders.*"
|
11
|
+
ignore_missing:
|
12
|
+
- decidim.participatory_processes.scopes.global
|
data/config/locales/ca.yml
CHANGED
@@ -7,19 +7,21 @@ ca:
|
|
7
7
|
scope_id: Àmbit
|
8
8
|
title: Títol
|
9
9
|
user_group_id: Crear proposta
|
10
|
+
proposal_answer:
|
11
|
+
answer: Resposta
|
10
12
|
decidim:
|
11
13
|
features:
|
12
14
|
proposals:
|
13
15
|
actions:
|
14
16
|
create: Crear propostes
|
15
|
-
vote:
|
17
|
+
vote: Donar suport
|
16
18
|
name: Propostes
|
17
19
|
settings:
|
18
20
|
global:
|
19
21
|
comments_enabled: Comentaris habilitats
|
22
|
+
geocoding_enabled: Geocodificació habilitada
|
20
23
|
official_proposals_enabled: Propostes oficials habilitades
|
21
24
|
proposal_answering_enabled: Resposta oficial a propostes activades
|
22
|
-
scoped_proposals_enabled: Propostes amb àmbits
|
23
25
|
vote_limit: Límit de vot
|
24
26
|
step:
|
25
27
|
comments_blocked: Comentaris bloquejats
|
@@ -51,7 +53,6 @@ ca:
|
|
51
53
|
success: Proposta creada correctament
|
52
54
|
form:
|
53
55
|
select_a_category: Selecciona una categoria
|
54
|
-
select_a_scope: Seleccioneu un àmbit
|
55
56
|
index:
|
56
57
|
title: Propostes
|
57
58
|
new:
|
@@ -94,10 +95,11 @@ ca:
|
|
94
95
|
filters_small_view:
|
95
96
|
close_modal: Tancar finestra
|
96
97
|
filter: Filtra
|
97
|
-
|
98
|
+
filter_by: Filtrar per
|
98
99
|
unfold: Desplegar
|
99
100
|
index:
|
100
101
|
new_proposal: Nova proposta
|
102
|
+
view_proposal: Veure proposta
|
101
103
|
linked_proposals:
|
102
104
|
proposal_votes:
|
103
105
|
one: <span class="card--list__data__number">1</span>suport
|
@@ -105,7 +107,6 @@ ca:
|
|
105
107
|
new:
|
106
108
|
back: Enrere
|
107
109
|
select_a_category: Si us plau, seleccioni una categoria
|
108
|
-
select_a_scope: Si us plau, seleccioni un àmbit
|
109
110
|
send: Enviar
|
110
111
|
title: Nova proposta
|
111
112
|
orders:
|
@@ -118,10 +119,11 @@ ca:
|
|
118
119
|
show:
|
119
120
|
proposal_accepted_reason: 'Aquesta proposta ha estat acceptada perquè:'
|
120
121
|
proposal_rejected_reason: 'Aquesta proposta ha estat rebutjada perquè:'
|
122
|
+
report: Informe
|
121
123
|
vote_button:
|
122
124
|
already_voted: Ja has votat
|
123
125
|
no_votes_remaining: No hi ha suports restants
|
124
|
-
vote:
|
126
|
+
vote: Donar suport
|
125
127
|
votes_blocked: Recollida de suports desactivada
|
126
128
|
votes_count:
|
127
129
|
count:
|
@@ -135,6 +137,7 @@ ca:
|
|
135
137
|
votes: Suports
|
136
138
|
resource_links:
|
137
139
|
included_proposals:
|
138
|
-
|
140
|
+
proposal_projects: 'Proposta formulada en aquests projectes:'
|
141
|
+
proposal_results: 'La proposta apareix en aquests resultats:'
|
139
142
|
proposals_from_meeting:
|
140
|
-
|
143
|
+
proposal_meetings: Trobades relacionades
|