decidim-initiatives 0.27.2 → 0.27.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/initiatives/create_initiative.rb +3 -2
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/exports_controller.rb +14 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/application_controller.rb +7 -0
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +17 -2
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/initiatives_type_signature_types_controller.rb +1 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +3 -0
- data/app/helpers/decidim/initiatives/{create_initiative_helper.rb → signature_type_options_helper.rb} +1 -1
- data/app/permissions/decidim/initiatives/admin/permissions.rb +1 -0
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +1 -1
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +2 -0
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +1 -0
- data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +2 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +1 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +1 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +2 -2
- data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +1 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +2 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +1 -0
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +1 -1
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +27 -12
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +1 -1
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +29 -23
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +3 -3
- data/app/views/decidim/initiatives/initiatives/print.html.erb +1 -1
- data/config/environment.rb +0 -0
- data/config/locales/ar.yml +8 -6
- data/config/locales/ca.yml +7 -6
- data/config/locales/cs.yml +9 -3
- data/config/locales/de.yml +21 -4
- data/config/locales/el.yml +5 -6
- data/config/locales/en.yml +2 -1
- data/config/locales/es-MX.yml +4 -3
- data/config/locales/es-PY.yml +4 -3
- data/config/locales/es.yml +6 -5
- data/config/locales/eu.yml +2 -8
- data/config/locales/fa-IR.yml +1 -0
- data/config/locales/fi-plain.yml +4 -3
- data/config/locales/fi.yml +5 -4
- data/config/locales/fr-CA.yml +7 -8
- data/config/locales/fr.yml +7 -8
- data/config/locales/gl.yml +3 -6
- data/config/locales/hu.yml +13 -7
- data/config/locales/id-ID.yml +4 -6
- data/config/locales/is-IS.yml +3 -6
- data/config/locales/it.yml +2 -8
- data/config/locales/ja.yml +5 -4
- data/config/locales/kaa.yml +1 -0
- data/config/locales/lb.yml +1 -14
- data/config/locales/lt.yml +0 -6
- data/config/locales/lv.yml +5 -6
- data/config/locales/nl.yml +4 -6
- data/config/locales/no.yml +1 -7
- data/config/locales/pl.yml +0 -6
- data/config/locales/pt-BR.yml +6 -3
- data/config/locales/pt.yml +0 -6
- data/config/locales/ro-RO.yml +22 -9
- data/config/locales/ru.yml +5 -6
- data/config/locales/sk.yml +4 -6
- data/config/locales/sv.yml +1 -7
- data/config/locales/tr-TR.yml +1 -7
- data/config/locales/uk.yml +5 -6
- data/config/locales/zh-CN.yml +5 -6
- data/config/locales/zh-TW.yml +642 -0
- data/db/migrate/20181003082010_fix_user_groups_ids_on_initiatives.rb +18 -3
- data/lib/decidim/initiatives/engine.rb +2 -1
- data/lib/decidim/initiatives/participatory_space.rb +1 -1
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +20 -0
- metadata +24 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59d295e16fde2eada468ccb94da312ecf5a2b48154627275645bd2f4f20943fa
|
4
|
+
data.tar.gz: 86e6dc47360ed063ef296422bf44c61a141ce82f68d33fbe49a0ed0fff5d1a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c4f7bde0ad8c721a92012e4a4a30847dbb6e92c0ade84334db0e0d3250b018bdec64024bcb68a593b9f80333c1e931f2ff4b8d8d5065d9e006bcd1b740db168
|
7
|
+
data.tar.gz: 837ab0a2cda44e0e9b673bc2812e565c5bb8ef53cc7eeedd3b6921259eb71ed7305481b02df5ce06957c9846d10a5a0829053a8724f42ab91e303ec086627864
|
@@ -73,7 +73,8 @@ module Decidim
|
|
73
73
|
area: area,
|
74
74
|
signature_type: form.signature_type,
|
75
75
|
signature_end_date: signature_end_date,
|
76
|
-
state: "created"
|
76
|
+
state: "created",
|
77
|
+
hashtag: form.hashtag
|
77
78
|
)
|
78
79
|
end
|
79
80
|
|
@@ -105,7 +106,7 @@ module Decidim
|
|
105
106
|
participatory_space: initiative
|
106
107
|
)
|
107
108
|
|
108
|
-
initialize_pages(component) if component_name
|
109
|
+
initialize_pages(component) if component_name.in? ["pages", :pages]
|
109
110
|
end
|
110
111
|
end
|
111
112
|
|
@@ -41,7 +41,7 @@ module Decidim
|
|
41
41
|
private
|
42
42
|
|
43
43
|
def membership_request
|
44
|
-
@membership_request ||= InitiativesCommitteeMember.find(params[:id])
|
44
|
+
@membership_request ||= InitiativesCommitteeMember.where(initiative: current_participatory_space).find(params[:id])
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Initiatives
|
5
|
+
module Admin
|
6
|
+
# This controller allows exporting things.
|
7
|
+
# It is targeted for customizations for exporting things that lives under
|
8
|
+
# a participatory process.
|
9
|
+
class ExportsController < Decidim::Admin::ExportsController
|
10
|
+
include InitiativeAdmin
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -14,7 +14,7 @@ module Decidim
|
|
14
14
|
|
15
15
|
helper ::Decidim::Admin::ResourcePermissionsHelper
|
16
16
|
helper Decidim::Initiatives::InitiativeHelper
|
17
|
-
helper Decidim::Initiatives::
|
17
|
+
helper Decidim::Initiatives::SignatureTypeOptionsHelper
|
18
18
|
|
19
19
|
# GET /admin/initiatives
|
20
20
|
def index
|
@@ -69,7 +69,7 @@ module Decidim
|
|
69
69
|
private
|
70
70
|
|
71
71
|
def current_initiative_type_scope
|
72
|
-
@current_initiative_type_scope ||= InitiativesTypeScope.find(params[:id])
|
72
|
+
@current_initiative_type_scope ||= InitiativesTypeScope.joins(:type).where(decidim_initiatives_types: { organization: current_organization }).find(params[:id])
|
73
73
|
end
|
74
74
|
|
75
75
|
def initiative_type_scope_form
|
@@ -84,7 +84,7 @@ module Decidim
|
|
84
84
|
private
|
85
85
|
|
86
86
|
def current_initiative_type
|
87
|
-
@current_initiative_type ||= InitiativesType.find(params[:id])
|
87
|
+
@current_initiative_type ||= InitiativesType.where(organization: current_organization).find(params[:id])
|
88
88
|
end
|
89
89
|
|
90
90
|
def initiative_type_form
|
@@ -11,6 +11,13 @@ module Decidim
|
|
11
11
|
::Decidim::Admin::Permissions,
|
12
12
|
::Decidim::Permissions)
|
13
13
|
|
14
|
+
before_action do
|
15
|
+
if Decidim::InitiativesType.joins(:scopes).where(organization: current_organization).all.empty?
|
16
|
+
flash[:alert] = t("index.uninitialized", scope: "decidim.initiatives")
|
17
|
+
redirect_to(decidim.root_path)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
14
21
|
def permissions_context
|
15
22
|
super.merge(
|
16
23
|
current_participatory_space: try(:current_participatory_space)
|
@@ -70,7 +70,7 @@ module Decidim
|
|
70
70
|
private
|
71
71
|
|
72
72
|
def membership_request
|
73
|
-
@membership_request ||= InitiativesCommitteeMember.find(params[:id])
|
73
|
+
@membership_request ||= InitiativesCommitteeMember.where(initiative: current_participatory_space).find(params[:id])
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -16,6 +16,8 @@ module Decidim
|
|
16
16
|
|
17
17
|
helper Decidim::Admin::IconLinkHelper
|
18
18
|
helper InitiativeHelper
|
19
|
+
helper SignatureTypeOptionsHelper
|
20
|
+
|
19
21
|
helper_method :similar_initiatives
|
20
22
|
helper_method :scopes
|
21
23
|
helper_method :areas
|
@@ -23,6 +25,8 @@ module Decidim
|
|
23
25
|
helper_method :initiative_type
|
24
26
|
helper_method :promotal_committee_required?
|
25
27
|
|
28
|
+
before_action :authenticate_user!
|
29
|
+
|
26
30
|
steps :select_initiative_type,
|
27
31
|
:previous_form,
|
28
32
|
:show_similar_initiatives,
|
@@ -30,6 +34,8 @@ module Decidim
|
|
30
34
|
:promotal_committee,
|
31
35
|
:finish
|
32
36
|
|
37
|
+
before_action :ensure_type_exists, only: :show
|
38
|
+
|
33
39
|
def show
|
34
40
|
enforce_permission_to :create, :initiative
|
35
41
|
send("#{step}_step", initiative: session_initiative)
|
@@ -42,6 +48,15 @@ module Decidim
|
|
42
48
|
|
43
49
|
private
|
44
50
|
|
51
|
+
def ensure_type_exists
|
52
|
+
destination_step = single_initiative_type? ? :previous_form : :select_initiative_type
|
53
|
+
|
54
|
+
return if step == destination_step
|
55
|
+
return if initiative_type_id.present? && initiative_type.present?
|
56
|
+
|
57
|
+
redirect_to wizard_path(destination_step)
|
58
|
+
end
|
59
|
+
|
45
60
|
def select_initiative_type_step(_parameters)
|
46
61
|
@form = form(Decidim::Initiatives::SelectInitiativeTypeForm).instance
|
47
62
|
session[:initiative] = {}
|
@@ -148,11 +163,11 @@ module Decidim
|
|
148
163
|
end
|
149
164
|
|
150
165
|
def current_initiative
|
151
|
-
Initiative.
|
166
|
+
Initiative.where(organization: current_organization).find_by(id: session_initiative[:id]) if session_initiative.has_key?(:id)
|
152
167
|
end
|
153
168
|
|
154
169
|
def initiative_type
|
155
|
-
@initiative_type ||= InitiativesType.
|
170
|
+
@initiative_type ||= InitiativesType.where(organization: current_organization).find_by(id: initiative_type_id)
|
156
171
|
end
|
157
172
|
|
158
173
|
def initiative_type_id
|
@@ -18,6 +18,8 @@ module Decidim
|
|
18
18
|
helper Decidim::ResourceReferenceHelper
|
19
19
|
helper PaginateHelper
|
20
20
|
helper InitiativeHelper
|
21
|
+
helper SignatureTypeOptionsHelper
|
22
|
+
|
21
23
|
include InitiativeSlug
|
22
24
|
include FilterResource
|
23
25
|
include Paginable
|
@@ -86,6 +88,7 @@ module Decidim
|
|
86
88
|
enforce_permission_to :update, :initiative, initiative: current_initiative
|
87
89
|
|
88
90
|
params[:id] = params[:slug]
|
91
|
+
params[:type_id] = current_initiative.type&.id
|
89
92
|
@form = form(Decidim::Initiatives::InitiativeForm)
|
90
93
|
.from_params(params, initiative_type: current_initiative.type, initiative: current_initiative)
|
91
94
|
|
@@ -14,7 +14,7 @@ module Decidim
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def allowed_signature_types_for_initiatives
|
17
|
-
@allowed_signature_types_for_initiatives ||= InitiativesType.find(params[:type_id]).allowed_signature_types_for_initiatives
|
17
|
+
@allowed_signature_types_for_initiatives ||= InitiativesType.where(organization: current_organization).find(params[:type_id]).allowed_signature_types_for_initiatives
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -39,6 +39,9 @@ module Decidim
|
|
39
39
|
def map_model(model)
|
40
40
|
self.type_id = model.type.id
|
41
41
|
self.scope_id = model.scope&.id
|
42
|
+
self.signature_type = model.signature_type
|
43
|
+
self.title = translated_attribute(model.title)
|
44
|
+
self.description = translated_attribute(model.description)
|
42
45
|
end
|
43
46
|
|
44
47
|
def signature_type_updatable?
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Initiatives
|
5
5
|
# Helper methods for the create initiative wizard.
|
6
|
-
module
|
6
|
+
module SignatureTypeOptionsHelper
|
7
7
|
def signature_type_options(initiative_form)
|
8
8
|
return all_signature_type_options unless initiative_form.signature_type_updatable?
|
9
9
|
|
@@ -163,6 +163,7 @@ module Decidim
|
|
163
163
|
|
164
164
|
def initiative_export_action?
|
165
165
|
allow! if permission_action.subject == :initiatives && permission_action.action == :export
|
166
|
+
allow! if permission_action.action == :export && permission_action.subject == :component_data
|
166
167
|
end
|
167
168
|
|
168
169
|
def initiatives_settings_action?
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<div class="row column">
|
12
|
-
<%= form.translated :editor, :description,
|
12
|
+
<%= form.translated :editor, :description, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<div class="row column">
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% add_decidim_page_title(t("decidim.initiatives.admin.initiatives_settings.form.title")) %>
|
2
|
+
|
1
3
|
<%= decidim_form_for(@form, html: { class: "form edit_initiatives_settings" }, url: initiatives_setting_path, method: :put) do |f| %>
|
2
4
|
<%= render partial: "form", object: f %>
|
3
5
|
<div class="button--double form-general-submit">
|
@@ -9,12 +9,12 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<div class="row column">
|
12
|
-
<%= form.translated :editor, :description
|
12
|
+
<%= form.translated :editor, :description %>
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<div class="row">
|
16
16
|
<div class="columns xlarge-6">
|
17
|
-
<%= form.upload :banner_image,
|
17
|
+
<%= form.upload :banner_image, required: true %>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
</div>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<p><%== t ".publish_helper_text" %>
|
2
|
-
<p><%== t ".access_reminder", link: link_to(t("myself", scope: "decidim.initiatives.initiatives.filters"), decidim_initiatives.initiatives_path(filter: { author: "myself",
|
2
|
+
<p><%== t ".access_reminder", link: link_to(t("myself", scope: "decidim.initiatives.initiatives.filters"), decidim_initiatives.initiatives_path(filter: { author: "myself", with_any_state: "" })) %></p>
|
@@ -20,12 +20,23 @@
|
|
20
20
|
<div class="card__content">
|
21
21
|
<%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { class: "form new_initiative_form" }) do |f| %>
|
22
22
|
<%= form_required_explanation %>
|
23
|
-
<%= f.hidden_field :type_id %>
|
24
23
|
<div class=section>
|
25
|
-
<%
|
24
|
+
<% if single_initiative_type? %>
|
25
|
+
<%= f.hidden_field :type_id %>
|
26
|
+
<% else %>
|
26
27
|
<div class="field">
|
27
|
-
|
28
|
-
|
28
|
+
<%= f.select :type_id,
|
29
|
+
initiative_type_options,
|
30
|
+
{},
|
31
|
+
{
|
32
|
+
disabled: !@form.signature_type_updatable?,
|
33
|
+
"data-scope-selector": "initiative_decidim_scope_id",
|
34
|
+
"data-scope-id": f.object.scope_id.to_s,
|
35
|
+
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
36
|
+
"data-signature-types-selector": "initiative_signature_type",
|
37
|
+
"data-signature-type": current_initiative&.signature_type,
|
38
|
+
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
39
|
+
} %>
|
29
40
|
</div>
|
30
41
|
<% end %>
|
31
42
|
|
@@ -34,7 +45,11 @@
|
|
34
45
|
</div>
|
35
46
|
|
36
47
|
<div class="field">
|
37
|
-
<%= text_editor_for(f, :description, lines: 8, toolbar: :
|
48
|
+
<%= text_editor_for(f, :description, lines: 8, toolbar: :content) %>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="field">
|
52
|
+
<%= f.text_field :hashtag %>
|
38
53
|
</div>
|
39
54
|
|
40
55
|
<% signature_type_options = signature_type_options(f.object) %>
|
@@ -46,6 +61,12 @@
|
|
46
61
|
</div>
|
47
62
|
<% end %>
|
48
63
|
|
64
|
+
<% if initiative_type.custom_signature_end_date_enabled? %>
|
65
|
+
<div class="field">
|
66
|
+
<%= f.date_field :signature_end_date %>
|
67
|
+
</div>
|
68
|
+
<% end %>
|
69
|
+
|
49
70
|
<% if scopes.length == 1 %>
|
50
71
|
<%= f.hidden_field :scope_id, value: scopes.first.scope&.id %>
|
51
72
|
<% else %>
|
@@ -57,12 +78,6 @@
|
|
57
78
|
</div>
|
58
79
|
<% end %>
|
59
80
|
|
60
|
-
<% if initiative_type.custom_signature_end_date_enabled? %>
|
61
|
-
<div class="field">
|
62
|
-
<%= f.date_field :signature_end_date %>
|
63
|
-
</div>
|
64
|
-
<% end %>
|
65
|
-
|
66
81
|
<% if initiative_type.area_enabled? %>
|
67
82
|
<div class="field">
|
68
83
|
<%= f.areas_select :area_id, areas_for_select(current_organization), prompt: t(".select_area") %>
|
@@ -73,7 +88,7 @@
|
|
73
88
|
<div class="field">
|
74
89
|
<%= f.select :decidim_user_group_id,
|
75
90
|
Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map { |g| [g.name, g.id] },
|
76
|
-
include_blank: current_user.name %>
|
91
|
+
include_blank: current_user.name, help_text: t(".decidim_user_group_id_help") %>
|
77
92
|
</div>
|
78
93
|
<% end %>
|
79
94
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
data: { confirm: t(".confirm") } %>
|
29
29
|
<% end %>
|
30
30
|
<%= link_to t(".edit_my_initiative"), edit_initiative_path(current_initiative), class: "button expanded light secondary" %>
|
31
|
-
<%= link_to t(".go_to_my_initiatives"), decidim_initiatives.initiatives_path(filter: { author: "myself",
|
31
|
+
<%= link_to t(".go_to_my_initiatives"), decidim_initiatives.initiatives_path(filter: { author: "myself", with_any_state: "" }), class: "button expanded" %>
|
32
32
|
<%= link_to t(".back_to_initiatives"), initiatives_path, class: "button white-button expanded" %>
|
33
33
|
</div>
|
34
34
|
</div>
|
@@ -1,24 +1,5 @@
|
|
1
1
|
<%= form_required_explanation %>
|
2
2
|
|
3
|
-
<div class="field">
|
4
|
-
<%= form.text_field :title, autofocus: true, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.title) %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="field">
|
8
|
-
<%= text_editor_for(form, :description, toolbar: :full, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.description)) %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="field">
|
12
|
-
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<div class="field">
|
16
|
-
<%= form.select :state,
|
17
|
-
Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] },
|
18
|
-
{},
|
19
|
-
{ disabled: !@form.state_updatable? } %>
|
20
|
-
</div>
|
21
|
-
|
22
3
|
<% unless single_initiative_type? %>
|
23
4
|
<div class="field">
|
24
5
|
<%= form.select :type_id,
|
@@ -37,17 +18,38 @@
|
|
37
18
|
<% end %>
|
38
19
|
|
39
20
|
<div class="field">
|
40
|
-
<%= form.
|
41
|
-
@form.available_scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] },
|
42
|
-
{ disabled: !@form.state_updatable? } %>
|
21
|
+
<%= form.text_field :title, autofocus: true, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.title) %>
|
43
22
|
</div>
|
44
23
|
|
24
|
+
<div class="field">
|
25
|
+
<%= text_editor_for(form, :description, toolbar: :content, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), value: translated_attribute(@form.description)) %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="field">
|
29
|
+
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<% signature_type_options = signature_type_options(form.object) %>
|
33
|
+
<% if signature_type_options.length == 1 %>
|
34
|
+
<%= form.hidden_field :signature_type %>
|
35
|
+
<% else %>
|
36
|
+
<div class="field">
|
37
|
+
<%= form.select :signature_type, signature_type_options, {}, { disabled: !@form.signature_type_updatable? } %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
|
45
41
|
<% if can_edit_custom_signature_end_date?(current_initiative) %>
|
46
42
|
<div class="row column">
|
47
43
|
<%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
48
44
|
</div>
|
49
45
|
<% end %>
|
50
46
|
|
47
|
+
<div class="field">
|
48
|
+
<%= form.select :scope_id,
|
49
|
+
@form.available_scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] },
|
50
|
+
{ disabled: !@form.state_updatable? } %>
|
51
|
+
</div>
|
52
|
+
|
51
53
|
<% if current_initiative.area_enabled? %>
|
52
54
|
<div class="field">
|
53
55
|
<%= form.areas_select :area_id,
|
@@ -61,8 +63,12 @@
|
|
61
63
|
<% end %>
|
62
64
|
|
63
65
|
<div class="field">
|
64
|
-
<%= form.select :
|
66
|
+
<%= form.select :state,
|
67
|
+
Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] },
|
68
|
+
{},
|
69
|
+
{ disabled: !@form.state_updatable? } %>
|
65
70
|
</div>
|
71
|
+
|
66
72
|
<% if current_initiative.type.attachments_enabled? %>
|
67
73
|
<fieldset class="attachments_container">
|
68
74
|
<legend><%= t("attachment_legend", scope: "decidim.initiatives.form") %></legend>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<ul class="tags tags--initiative">
|
2
|
-
<li><%= link_to translated_attribute(resource.type.title), initiatives_path(filter: {
|
3
|
-
<li><%= link_to translated_attribute(resource.scope_name), initiatives_path(filter: {
|
2
|
+
<li><%= link_to translated_attribute(resource.type.title), initiatives_path(filter: { with_any_type: [resource.type.id] }) %></li>
|
3
|
+
<li><%= link_to translated_attribute(resource.scope_name), initiatives_path(filter: { with_any_scope: [resource.scope&.id] }) %></li>
|
4
4
|
<% if resource.area %>
|
5
|
-
<li><%= link_to translated_attribute(resource.area_name), initiatives_path(filter: {
|
5
|
+
<li><%= link_to translated_attribute(resource.area_name), initiatives_path(filter: { with_any_area: [resource.area.id] }) %></li>
|
6
6
|
<% end %>
|
7
7
|
</ul>
|
File without changes
|
data/config/locales/ar.yml
CHANGED
@@ -232,6 +232,8 @@ ar:
|
|
232
232
|
published: نشرت
|
233
233
|
validating: المصادقة الفنية
|
234
234
|
application_helper:
|
235
|
+
filter_area_values:
|
236
|
+
all: الكل
|
235
237
|
filter_scope_values:
|
236
238
|
all: الكل
|
237
239
|
filter_state_values:
|
@@ -253,7 +255,6 @@ ar:
|
|
253
255
|
fill_data:
|
254
256
|
back: الى الخلف
|
255
257
|
continue: استمر
|
256
|
-
initiative_type: نوع المبادرة
|
257
258
|
more_information: "(معلومات اكثر)"
|
258
259
|
select_scope: حدد النطاق
|
259
260
|
finish:
|
@@ -293,6 +294,8 @@ ar:
|
|
293
294
|
email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{author_nickname}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق.
|
294
295
|
email_subject: المبادرة التي أقرتها %{author_nickname}
|
295
296
|
notification_title: تمت الموافقة على مبادرة <a href="%{resource_path}">%{resource_title}</a> من قبل <a href="%{author_path}">%{author_name} %{author_nickname}</a>.
|
297
|
+
form:
|
298
|
+
delete_attachment: حذف
|
296
299
|
index:
|
297
300
|
title: المبادرات
|
298
301
|
initiative_signatures:
|
@@ -333,6 +336,8 @@ ar:
|
|
333
336
|
few: و %{count} المزيد من الناس
|
334
337
|
many: و %{count} المزيد من الناس
|
335
338
|
other: و %{count} المزيد من الناس
|
339
|
+
committee_members:
|
340
|
+
revoke: سحب
|
336
341
|
count:
|
337
342
|
title:
|
338
343
|
zero: "%{count} مبادرات"
|
@@ -372,6 +377,7 @@ ar:
|
|
372
377
|
recent: الأحدث
|
373
378
|
print:
|
374
379
|
city: مدينة
|
380
|
+
full_name: الاسم الكامل
|
375
381
|
initiative:
|
376
382
|
description: 'الوصف:'
|
377
383
|
result:
|
@@ -414,13 +420,9 @@ ar:
|
|
414
420
|
status_change_for: لقد غيرت المبادرة %{title} حالتها
|
415
421
|
last_activity:
|
416
422
|
new_initiative: مبادرة جديدة
|
417
|
-
pages:
|
418
|
-
home:
|
419
|
-
highlighted_initiatives:
|
420
|
-
active_initiatives: المبادرات النشطة
|
421
|
-
see_all_initiatives: رؤية جميع المبادرات
|
422
423
|
show:
|
423
424
|
badge_name:
|
425
|
+
accepted: ما يكفي من التوقيعات
|
424
426
|
validating: تحقق تقني
|
425
427
|
states:
|
426
428
|
accepted: وافقت
|
data/config/locales/ca.yml
CHANGED
@@ -334,7 +334,7 @@ ca:
|
|
334
334
|
validating: Validació tècnica
|
335
335
|
application_helper:
|
336
336
|
filter_area_values:
|
337
|
-
all:
|
337
|
+
all: Tots
|
338
338
|
filter_scope_values:
|
339
339
|
all: Tots
|
340
340
|
filter_state_values:
|
@@ -363,8 +363,8 @@ ca:
|
|
363
363
|
fill_data:
|
364
364
|
back: Torna
|
365
365
|
continue: Continua
|
366
|
+
decidim_user_group_id_help: No és possible canviar l'autoria de la iniciativa després de crear-la
|
366
367
|
fill_data_help: "<ul> <li>Revisa el contingut de la teva iniciativa. El títol és fàcil d'entendre? L'objectiu de la teva iniciativa és clar?</li> <li>Has d'escollir el tipus de signatura. Presencial, digital o una combinació de totes dues.</li> <li>Quin és l'àmbit geogràfic de la iniciativa?</li> </ul>"
|
367
|
-
initiative_type: Tipus d'iniciativa
|
368
368
|
more_information: "(Més informació)"
|
369
369
|
select_area: Selecciona una àrea
|
370
370
|
select_scope: Selecciona un àmbit d'aplicació
|
@@ -442,9 +442,10 @@ ca:
|
|
442
442
|
form:
|
443
443
|
add_attachments: Documents
|
444
444
|
attachment_legend: "(Opcional) Afegir un fitxer adjunt"
|
445
|
-
delete_attachment:
|
445
|
+
delete_attachment: Suprimeix
|
446
446
|
index:
|
447
447
|
title: Iniciatives
|
448
|
+
uninitialized: Les iniciatives no han estat configurades encara des de l'administració.
|
448
449
|
initiative_signatures:
|
449
450
|
fill_personal_data:
|
450
451
|
continue: Continua
|
@@ -603,8 +604,8 @@ ca:
|
|
603
604
|
signature_interval:
|
604
605
|
title: Període de recollida de signatures
|
605
606
|
states:
|
606
|
-
accepted:
|
607
|
-
expired:
|
607
|
+
accepted: Acceptada
|
608
|
+
expired: Vençuda
|
608
609
|
unavailable_scope: Àmbit no disponible
|
609
610
|
update:
|
610
611
|
error: S'ha produït un error
|
@@ -625,7 +626,7 @@ ca:
|
|
625
626
|
layouts:
|
626
627
|
decidim:
|
627
628
|
initiative_creation_header:
|
628
|
-
back:
|
629
|
+
back: Torna
|
629
630
|
fill_data: Crear
|
630
631
|
finish: Acabar
|
631
632
|
previous_form: Començar
|