decidim-initiatives 0.23.5 → 0.24.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheet/decidim/initiatives/initiatives.scss +6 -0
- data/app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss +22 -0
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +4 -8
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +5 -1
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb +2 -1
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb +12 -1
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +3 -3
- data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +3 -3
- data/app/commands/decidim/initiatives/approve_membership_request.rb +40 -0
- data/app/commands/decidim/initiatives/create_initiative.rb +5 -4
- data/app/commands/decidim/initiatives/revoke_membership_request.rb +40 -0
- data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +57 -0
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +18 -0
- data/app/commands/decidim/initiatives/update_initiative.rb +74 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +15 -4
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +18 -0
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +32 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +58 -1
- data/app/events/decidim/initiatives/approve_membership_request_event.rb +61 -0
- data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +19 -0
- data/app/events/decidim/initiatives/revoke_membership_request_event.rb +61 -0
- data/app/events/decidim/initiatives/spawn_committee_request_event.rb +61 -0
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +8 -4
- data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +3 -0
- data/app/forms/decidim/initiatives/initiative_form.rb +25 -2
- data/app/forms/decidim/initiatives/vote_form.rb +1 -1
- data/app/helpers/decidim/initiatives/admin/initiative_admin_menu_helper.rb +15 -0
- data/app/helpers/decidim/initiatives/create_initiative_helper.rb +3 -2
- data/app/models/concerns/decidim/initiatives/has_area.rb +1 -1
- data/app/models/decidim/initiative.rb +0 -1
- data/app/permissions/decidim/initiatives/admin/permissions.rb +5 -4
- data/app/permissions/decidim/initiatives/permissions.rb +63 -30
- data/app/queries/decidim/initiatives/initiatives_promoted.rb +1 -1
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +13 -2
- data/app/serializers/decidim/initiatives/initiative_serializer.rb +3 -0
- data/app/services/decidim/initiatives/dummy_timestamp.rb +1 -1
- data/app/services/decidim/initiatives/initiative_search.rb +15 -13
- data/app/services/decidim/initiatives/pdf_signature_example.rb +27 -27
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +1 -1
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +6 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +24 -17
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -11
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +1 -1
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +2 -7
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +4 -17
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +11 -11
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +73 -0
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +112 -0
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +8 -0
- data/app/views/decidim/initiatives/initiatives/edit.html.erb +78 -0
- data/app/views/decidim/initiatives/initiatives/print.html.erb +156 -0
- data/app/views/decidim/initiatives/initiatives/show.html.erb +19 -7
- data/app/views/layouts/decidim/admin/initiative.html.erb +0 -1
- data/app/views/layouts/decidim/admin/initiatives.html.erb +2 -15
- data/config/locales/ar.yml +2 -28
- data/config/locales/ca.yml +90 -30
- data/config/locales/cs.yml +98 -38
- data/config/locales/de.yml +90 -30
- data/config/locales/el.yml +2 -34
- data/config/locales/en.yml +94 -34
- data/config/locales/es-MX.yml +93 -33
- data/config/locales/es-PY.yml +93 -33
- data/config/locales/es.yml +91 -31
- data/config/locales/eu.yml +2 -28
- data/config/locales/fi-plain.yml +94 -34
- data/config/locales/fi.yml +94 -34
- data/config/locales/fr-CA.yml +94 -34
- data/config/locales/fr.yml +94 -34
- data/config/locales/gl.yml +2 -36
- data/config/locales/hu.yml +2 -31
- data/config/locales/id-ID.yml +2 -28
- data/config/locales/is-IS.yml +2 -13
- data/config/locales/it.yml +2 -34
- data/config/locales/ja.yml +2 -35
- data/config/locales/lv.yml +2 -32
- data/config/locales/nl.yml +31 -34
- data/config/locales/no.yml +2 -32
- data/config/locales/pl.yml +93 -33
- data/config/locales/pt-BR.yml +2 -28
- data/config/locales/pt.yml +2 -34
- data/config/locales/ro-RO.yml +2 -35
- data/config/locales/ru.yml +2 -21
- data/config/locales/sk.yml +2 -30
- data/config/locales/sr-CS.yml +0 -7
- data/config/locales/sv.yml +52 -34
- data/config/locales/tr-TR.yml +68 -34
- data/config/locales/uk.yml +2 -21
- data/config/locales/zh-CN.yml +2 -35
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +0 -1
- data/db/migrate/20191107134847_add_scopes_to_initiatives_votes.rb +1 -1
- data/db/migrate/20191118105634_allow_multiple_offline_votes.rb +1 -1
- data/db/migrate/20210310120720_add_followable_counter_cache_to_initiatives.rb +16 -0
- data/lib/decidim/api/initiative_api_type.rb +26 -0
- data/lib/decidim/api/initiative_committee_member_type.rb +18 -0
- data/lib/decidim/api/initiative_type.rb +49 -0
- data/lib/decidim/api/initiative_type_interface.rb +8 -3
- data/lib/decidim/initiatives.rb +1 -0
- data/lib/decidim/initiatives/admin_engine.rb +23 -1
- data/lib/decidim/initiatives/api.rb +3 -0
- data/lib/decidim/initiatives/engine.rb +14 -9
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +19 -12
- data/lib/decidim/initiatives/participatory_space.rb +6 -6
- data/lib/decidim/initiatives/query_extensions.rb +42 -19
- data/lib/decidim/initiatives/test/factories.rb +36 -0
- data/lib/decidim/initiatives/version.rb +1 -1
- metadata +33 -17
- data/app/types/decidim/initiatives/initiative_api_type.rb +0 -26
- data/app/types/decidim/initiatives/initiative_committee_member_type.rb +0 -18
- data/app/types/decidim/initiatives/initiative_type.rb +0 -42
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= link_to t(".send_to_technical_validation"),
|
8
8
|
send_to_technical_validation_initiative_path(current_initiative),
|
9
9
|
class: "button muted",
|
10
|
-
data: { confirm: t(".
|
10
|
+
data: { confirm: t(".confirm_send_to_technical_validation") } %>
|
11
11
|
<% elsif current_initiative.created? %>
|
12
12
|
<%= link_to t(".send_to_technical_validation"), "#", class: "button muted disabled" %>
|
13
13
|
<% end %>
|
@@ -45,6 +45,8 @@
|
|
45
45
|
t(".preview"),
|
46
46
|
class: "action-icon--preview",
|
47
47
|
target: "_blank" %>
|
48
|
+
<% else %>
|
49
|
+
<span class="action-space icon"></span>
|
48
50
|
<% end %>
|
49
51
|
|
50
52
|
<% if allowed_to? :edit, :initiative, initiative: initiative %>
|
@@ -52,6 +54,8 @@
|
|
52
54
|
decidim_admin_initiatives.edit_initiative_path(initiative.to_param),
|
53
55
|
t("actions.configure", scope: "decidim.admin"),
|
54
56
|
class: "action-icon--edit" %>
|
57
|
+
<% else %>
|
58
|
+
<span class="action-space icon"></span>
|
55
59
|
<% end %>
|
56
60
|
|
57
61
|
<% if allowed_to?(:answer, :initiative, initiative: initiative) %>
|
@@ -65,6 +69,8 @@
|
|
65
69
|
decidim_admin_initiatives.initiative_path(initiative.to_param),
|
66
70
|
t(".print",),
|
67
71
|
class: "action-icon--print" %>
|
72
|
+
<% else %>
|
73
|
+
<span class="action-space icon"></span>
|
68
74
|
<% end %>
|
69
75
|
</td>
|
70
76
|
<% end %>
|
@@ -1,21 +1,28 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title"><%= t ".title" %></h2>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="card-section">
|
7
|
+
<div class="row column">
|
4
8
|
|
5
|
-
<%= decidim_form_for @form,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
<%= decidim_form_for @form,
|
10
|
+
url: initiatives_type_initiatives_type_scope_path(params[:initiatives_type_id], current_initiative_type_scope),
|
11
|
+
html: { class: "form edit_initiative_type_scope" } do |f| %>
|
12
|
+
<%= render partial: "form", object: f %>
|
13
|
+
<div class="button--double form-general-submit">
|
14
|
+
<%= f.submit t(".update"), class: "button" %>
|
11
15
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
<% if allowed_to? :destroy, :initiative_type_scope, initiative_type_scope: current_initiative_type_scope %>
|
17
|
+
<%= link_to t(".destroy"), initiatives_type_initiatives_type_scope_path(params[:initiatives_type_id], current_initiative_type_scope),
|
18
|
+
method: :delete,
|
19
|
+
class: "alert button",
|
20
|
+
data: { confirm: t(".confirm_destroy") } %>
|
21
|
+
<% end %>
|
18
22
|
|
19
|
-
|
23
|
+
<%= link_to t(".back"), edit_initiatives_type_path(params[:initiatives_type_id]), class: "button" %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
20
27
|
</div>
|
21
|
-
|
28
|
+
</div>
|
@@ -1,14 +1,20 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title"><%= t ".title" %></h2>
|
4
|
+
</div>
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
<div class="card-section">
|
7
|
+
<div class="row column">
|
8
|
+
<%= decidim_form_for @form,
|
9
|
+
url: initiatives_type_initiatives_type_scopes_path(params[:initiatives_type_id]),
|
10
|
+
html: { class: "form new_initiatives_type_scopes" } do |f| %>
|
11
|
+
<%= render partial: "form", object: f %>
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
<div class="button--double form-general-submit">
|
14
|
+
<%= f.submit t(".create") %>
|
15
|
+
<%= link_to t(".back"), edit_initiatives_type_path(params[:initiatives_type_id]), class: "button" %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
13
19
|
</div>
|
14
|
-
|
20
|
+
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t "decidim.admin.titles.initiatives_types" %>
|
5
5
|
<%= link_to t("actions.new_initiative_type", scope: "decidim.admin"),
|
6
|
-
[
|
6
|
+
[:new, :initiatives_type],
|
7
7
|
class: "button tiny button--title" if allowed_to? :create, :initiative_type %>
|
8
8
|
</h2>
|
9
9
|
</div>
|
@@ -1,7 +1,2 @@
|
|
1
|
-
<p
|
2
|
-
<
|
3
|
-
<li><%= t ".help_for_organizations" %></li>
|
4
|
-
<li><%= t ".help_in_person_signatures" %></li>
|
5
|
-
</ul>
|
6
|
-
<p><%== t ".initiatives_page_link", link: link_to(t(".page"), decidim.page_path("initiatives"), target: "_blank") %></p>
|
7
|
-
<p><%= t ".access_reminder" %></p>
|
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", state: "" })) %></p>
|
@@ -78,24 +78,11 @@
|
|
78
78
|
|
79
79
|
<% if initiative_type.attachments_enabled? %>
|
80
80
|
<fieldset>
|
81
|
-
<legend><%= t("attachment_legend", scope: "decidim.
|
82
|
-
<%= f.fields_for :attachment, @form.attachment do |nested_form| %>
|
83
|
-
<div class="field">
|
84
|
-
<%= nested_form.text_field :title %>
|
85
|
-
</div>
|
81
|
+
<legend><%= t("attachment_legend", scope: "decidim.initiatives.form") %></legend>
|
86
82
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<% if @form.errors[:attachment].present? %>
|
92
|
-
<% @form.errors[:attachment].each do |message| %>
|
93
|
-
<small class="form-error is-visible">
|
94
|
-
<%= message %>
|
95
|
-
</small>
|
96
|
-
<% end %>
|
97
|
-
<% end %>
|
98
|
-
<% end %>
|
83
|
+
<div class="row column">
|
84
|
+
<%= f.file_field :add_documents, multiple: true, label: t("add_attachments", scope: "decidim.initiatives.form") %>
|
85
|
+
</div>
|
99
86
|
</fieldset>
|
100
87
|
<% end %>
|
101
88
|
</div>
|
@@ -19,18 +19,18 @@
|
|
19
19
|
<div class="card">
|
20
20
|
<div class="card__content">
|
21
21
|
<%= render partial: "finish_help" %>
|
22
|
-
</div>
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
23
|
+
<div class="actions">
|
24
|
+
<% unless promotal_committee_required? %>
|
25
|
+
<%= link_to t(".send_my_initiative"),
|
26
|
+
decidim_initiatives.send_to_technical_validation_initiative_path(current_initiative),
|
27
|
+
class: "button success light expanded",
|
28
|
+
data: { confirm: t(".confirm") } %>
|
29
|
+
<% end %>
|
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", state: "" }), class: "button expanded" %>
|
32
|
+
<%= link_to t(".back_to_initiatives"), initiatives_path, class: "button white-button expanded" %>
|
33
|
+
</div>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
</div>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<fieldset>
|
2
|
+
<legend><%= t ".title" %></legend>
|
3
|
+
|
4
|
+
<div class="card-section">
|
5
|
+
<div class="row column">
|
6
|
+
<%= t ".invite_to_committee_help" %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="row column">
|
10
|
+
<div class="card card--list">
|
11
|
+
<div class="card--list__item">
|
12
|
+
<div class="card--list__text">
|
13
|
+
<div>
|
14
|
+
<h6 class="card--list__heading heading6 lowercase" id="committee_link">
|
15
|
+
<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
|
16
|
+
</h6>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="card--list__data">
|
20
|
+
<%= icon_link_to "clipboard", "#", t(".invite_to_committee_help"), class: "card--list__data__icon invite-users-link" %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<div class="card-section">
|
27
|
+
<div class="table-scroll">
|
28
|
+
<table class="table-list">
|
29
|
+
<thead>
|
30
|
+
<tr>
|
31
|
+
<th><%= t ".title" %></th>
|
32
|
+
<th></th>
|
33
|
+
</tr>
|
34
|
+
</thead>
|
35
|
+
<tbody>
|
36
|
+
<% if current_initiative.committee_members.empty? %>
|
37
|
+
<tr>
|
38
|
+
<td><%= t ".no_members_yet" %></td>
|
39
|
+
<td></td>
|
40
|
+
</tr>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<% current_initiative.committee_members.each do |request| %>
|
44
|
+
<tr data-id="<%= request.id %>">
|
45
|
+
<td>
|
46
|
+
<%= link_to request.user.name, "mailto:#{request.user.email}" %>
|
47
|
+
</td>
|
48
|
+
<td class="table-list__actions">
|
49
|
+
<% if allowed_to? :approve, :initiative_committee_member, initiative: current_initiative, request: request %>
|
50
|
+
<%= icon_link_to "check",
|
51
|
+
approve_initiative_committee_request_path(current_initiative, request),
|
52
|
+
t(".approve"),
|
53
|
+
class: "action-icon--check" %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% if allowed_to? :revoke, :initiative_committee_member, initiative: current_initiative, request: request %>
|
57
|
+
<%= icon_link_to "circle-x",
|
58
|
+
revoke_initiative_committee_request_path(current_initiative, request),
|
59
|
+
t(".revoke"),
|
60
|
+
class: "action-icon--remove",
|
61
|
+
method: :delete,
|
62
|
+
data: { confirm: t(".confirm_revoke") } %>
|
63
|
+
<% end %>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
<% end %>
|
67
|
+
</tbody>
|
68
|
+
</table>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
</fieldset>
|
72
|
+
|
73
|
+
<%= javascript_include_tag "decidim/initiatives/admin/invite_users.js" %>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<%= form_required_explanation %>
|
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
|
+
<%= form.editor :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
|
+
<% unless single_initiative_type? %>
|
23
|
+
<div class="field">
|
24
|
+
<%= form.select :type_id,
|
25
|
+
initiative_type_options,
|
26
|
+
{},
|
27
|
+
{
|
28
|
+
disabled: !@form.signature_type_updatable?,
|
29
|
+
"data-scope-selector": "initiative_decidim_scope_id",
|
30
|
+
"data-scope-id": form.object.scope_id.to_s,
|
31
|
+
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
32
|
+
"data-signature-types-selector": "initiative_signature_type",
|
33
|
+
"data-signature-type": current_initiative.signature_type,
|
34
|
+
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
35
|
+
} %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<div class="field">
|
40
|
+
<%= form.select :scope_id,
|
41
|
+
@form.available_scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] },
|
42
|
+
{ disabled: !@form.state_updatable? } %>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<% if can_edit_custom_signature_end_date?(current_initiative) %>
|
46
|
+
<div class="row column">
|
47
|
+
<%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
48
|
+
</div>
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% if current_initiative.area_enabled? %>
|
52
|
+
<div class="field">
|
53
|
+
<%= form.areas_select :area_id,
|
54
|
+
areas_for_select(current_organization),
|
55
|
+
{
|
56
|
+
selected: current_initiative.decidim_area_id,
|
57
|
+
include_blank: current_initiative.decidim_area_id.blank? || current_initiative.created?
|
58
|
+
},
|
59
|
+
disabled: !@form.area_updatable? %>
|
60
|
+
</div>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
<div class="field">
|
64
|
+
<%= form.select :signature_type, [], {}, { disabled: !@form.signature_type_updatable? } %>
|
65
|
+
</div>
|
66
|
+
<% if current_initiative.type.attachments_enabled? %>
|
67
|
+
<fieldset>
|
68
|
+
<legend><%= t("attachment_legend", scope: "decidim.initiatives.form") %></legend>
|
69
|
+
|
70
|
+
<% if @form.photos.any? %>
|
71
|
+
<% @form.photos.each do |photo| %>
|
72
|
+
<div class="callout gallery__item" data-closable>
|
73
|
+
<%= image_tag photo.thumbnail_url, class: "thumbnail", alt: photo.file.file.filename %>
|
74
|
+
<%= form.hidden_field :photos, multiple: true, value: photo.id, id: "photo-#{photo.id}" %>
|
75
|
+
<button class="close-button"
|
76
|
+
aria-label="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
77
|
+
title="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
78
|
+
type="button"
|
79
|
+
data-close>
|
80
|
+
<span aria-hidden="true">×</span>
|
81
|
+
</button>
|
82
|
+
</div>
|
83
|
+
<% end %>
|
84
|
+
<% end %>
|
85
|
+
|
86
|
+
<% if @form.documents.any? %>
|
87
|
+
<% @form.documents.each do |document| %>
|
88
|
+
<div class="callout" data-closable>
|
89
|
+
<%= link_to translated_attribute(document.title), document.url %>
|
90
|
+
<small><%= document.file_type %> <%= number_to_human_size(document.file_size) %></small>
|
91
|
+
<%= form.hidden_field :documents, multiple: true, value: document.id, id: "document-#{document.id}" %>
|
92
|
+
<button class="close-button"
|
93
|
+
aria-label="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
94
|
+
title="<%= t("delete_attachment", scope: "decidim.initiatives.form") %>"
|
95
|
+
type="button" data-close>
|
96
|
+
<span aria-hidden="true">×</span>
|
97
|
+
</button>
|
98
|
+
</div>
|
99
|
+
<% end %>
|
100
|
+
<% end %>
|
101
|
+
|
102
|
+
<div class="row column">
|
103
|
+
<%= form.file_field :add_documents, multiple: true, label: t("add_attachments", scope: "decidim.initiatives.form") %>
|
104
|
+
</div>
|
105
|
+
</fieldset>
|
106
|
+
<% end %>
|
107
|
+
|
108
|
+
<% if current_initiative.type.promoting_committee_enabled? %>
|
109
|
+
<%= render partial: "committee_members" %>
|
110
|
+
<% end %>
|
111
|
+
|
112
|
+
<%= javascript_include_tag "decidim/initiatives/scoped_type" %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<br>
|
3
3
|
<div class="row column">
|
4
4
|
<div class="callout success">
|
5
|
-
<h5><%= t(
|
5
|
+
<h5><%= t("decidim.initiatives.initiatives.result.answer_title") %>:</h5>
|
6
6
|
<p>
|
7
7
|
<% if initiative.answer_url.present? %>
|
8
8
|
<a href="<%= initiative.answer_url %>" target="_blank">
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if allowed_to? :send_to_technical_validation, :initiative, initiative: current_initiative %>
|
2
|
+
<%= link_to title,
|
3
|
+
send_to_technical_validation_initiative_path(current_initiative),
|
4
|
+
class: "button expanded",
|
5
|
+
data: { confirm: confirm } %>
|
6
|
+
<% else %>
|
7
|
+
<%= link_to title, "#", class: "button expanded disabled" %>
|
8
|
+
<% end %>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<% add_decidim_page_title(action_name) %>
|
2
|
+
|
3
|
+
<div class="row columns">
|
4
|
+
<%= link_to :back, class: "muted-link" do %>
|
5
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
6
|
+
<%= t("back", scope: "decidim.initiatives.edit") %>
|
7
|
+
<% end %>
|
8
|
+
<h2 class="section-heading"><%= t("title", scope: "decidim.initiatives.edit") %></h2>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="row">
|
12
|
+
<div class="columns large-6 medium-centered">
|
13
|
+
<div class="card">
|
14
|
+
<div class="card__content">
|
15
|
+
<%= decidim_form_for @form, html: { class: "form edit_initiative" } do |f| %>
|
16
|
+
<%= render partial: "form", object: f %>
|
17
|
+
<div class="actions">
|
18
|
+
<%= f.submit t("update", scope: "decidim.initiatives.edit"), class: "button expanded" if allowed_to? :update, :initiative, initiative: current_initiative %>
|
19
|
+
|
20
|
+
<% if allowed_to? :publish, :initiative, initiative: current_initiative %>
|
21
|
+
<%= link_to t("actions.publish", scope: "decidim.admin"),
|
22
|
+
publish_initiative_path(current_initiative),
|
23
|
+
method: :post,
|
24
|
+
class: "button hollow expanded",
|
25
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% if allowed_to? :unpublish, :initiative, initiative: current_initiative %>
|
29
|
+
<%= link_to t("actions.unpublish", scope: "decidim.admin"),
|
30
|
+
unpublish_initiative_path(current_initiative),
|
31
|
+
method: :delete,
|
32
|
+
class: "button alert expanded",
|
33
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<% if allowed_to? :accept, :initiative, initiative: current_initiative %>
|
37
|
+
<%= link_to t("accept", scope: "decidim.initiatives.edit"),
|
38
|
+
accept_initiative_path(current_initiative),
|
39
|
+
method: :post,
|
40
|
+
class: "button hollow expanded",
|
41
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% if allowed_to? :reject, :initiative, initiative: current_initiative %>
|
45
|
+
<%= link_to t("reject", scope: "decidim.initiatives.edit"),
|
46
|
+
reject_initiative_path(current_initiative),
|
47
|
+
method: :delete,
|
48
|
+
class: "button alert expanded",
|
49
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% if allowed_to? :discard, :initiative, initiative: current_initiative %>
|
53
|
+
<%= link_to t("discard", scope: "decidim.initiatives.edit"),
|
54
|
+
discard_initiative_path(current_initiative),
|
55
|
+
method: :delete,
|
56
|
+
class: "button alert expanded",
|
57
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
58
|
+
<% end %>
|
59
|
+
|
60
|
+
<% if allowed_to? :export_votes, :initiative, initiative: current_initiative %>
|
61
|
+
<%= link_to t("export_votes", scope: "decidim.initiatives.edit"),
|
62
|
+
export_votes_initiative_path(current_initiative, format: :csv),
|
63
|
+
class: "button alert expanded",
|
64
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
65
|
+
<% end %>
|
66
|
+
|
67
|
+
<% if allowed_to? :export_pdf_signatures, :initiative, initiative: current_initiative %>
|
68
|
+
<%= link_to t("export_pdf_signatures", scope: "decidim.initiatives.edit"),
|
69
|
+
export_pdf_signatures_initiative_path(current_initiative, format: :pdf),
|
70
|
+
class: "button alert expanded",
|
71
|
+
data: { confirm: t("confirm", scope: "decidim.initiatives.edit") } %>
|
72
|
+
<% end %>
|
73
|
+
</div>
|
74
|
+
<% end %>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|