decidim-admin 0.18.1 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/admin/form.js.es6 +24 -8
- data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +8 -0
- data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +1 -0
- data/app/commands/decidim/admin/create_component.rb +4 -7
- data/app/commands/decidim/admin/create_participatory_space_private_user.rb +4 -2
- data/app/commands/decidim/admin/destroy_newsletter.rb +1 -0
- data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +41 -0
- data/app/commands/decidim/admin/process_user_group_verification_csv.rb +1 -0
- data/app/commands/decidim/admin/reject_user_group.rb +1 -0
- data/app/commands/decidim/admin/remove_admin.rb +1 -1
- data/app/commands/decidim/admin/update_component_permissions.rb +1 -1
- data/app/commands/decidim/admin/update_organization.rb +1 -0
- data/app/commands/decidim/admin/verify_user_group.rb +1 -0
- data/app/controllers/decidim/admin/areas_controller.rb +1 -0
- data/app/controllers/decidim/admin/components_controller.rb +29 -5
- data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +58 -0
- data/app/controllers/decidim/admin/impersonations_controller.rb +19 -2
- data/app/controllers/decidim/admin/resource_permissions_controller.rb +4 -1
- data/app/controllers/decidim/admin/scopes_controller.rb +2 -0
- data/app/forms/decidim/admin/component_form.rb +41 -16
- data/app/forms/decidim/admin/managed_user_promotion_form.rb +1 -0
- data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +13 -0
- data/app/forms/decidim/admin/selective_newsletter_form.rb +1 -0
- data/app/helpers/decidim/admin/application_helper.rb +1 -1
- data/app/helpers/decidim/admin/attributes_display_helper.rb +2 -0
- data/app/helpers/decidim/admin/newsletters_helper.rb +6 -0
- data/app/helpers/decidim/admin/resource_permissions_helper.rb +1 -1
- data/app/helpers/decidim/admin/settings_helper.rb +52 -10
- data/app/jobs/decidim/admin/expire_impersonation_job.rb +1 -0
- data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +27 -0
- data/app/jobs/decidim/admin/newsletter_job.rb +1 -0
- data/app/jobs/decidim/admin/verify_user_group_from_csv_job.rb +1 -0
- data/app/permissions/decidim/admin/permissions.rb +4 -0
- data/app/permissions/decidim/admin/user_manager_permissions.rb +2 -0
- data/app/queries/decidim/admin/newsletter_recipients.rb +3 -0
- data/app/queries/decidim/admin/user_filter.rb +1 -0
- data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -0
- data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
- data/app/views/decidim/admin/attachment_collections/show.html.erb +1 -1
- data/app/views/decidim/admin/attachments/index.html.erb +1 -1
- data/app/views/decidim/admin/attachments/show.html.erb +1 -1
- data/app/views/decidim/admin/categories/index.html.erb +2 -2
- data/app/views/decidim/admin/categories/show.html.erb +1 -1
- data/app/views/decidim/admin/components/_form.html.erb +6 -6
- data/app/views/decidim/admin/components/_settings_fields.html.erb +6 -5
- data/app/views/decidim/admin/impersonations/_form.html.erb +1 -3
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +1 -1
- data/app/views/decidim/admin/organization_appearance/_form.html.erb +0 -7
- data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +4 -3
- data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +19 -0
- data/app/views/decidim/admin/resource_permissions/edit.html.erb +1 -1
- data/app/views/decidim/admin/static_pages/_topic.html.erb +1 -1
- data/app/views/decidim/admin/static_pages/show.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_application.html.erb +6 -6
- data/app/views/layouts/decidim/admin/_header.html.erb +1 -1
- data/config/locales/ar.yml +7 -1
- data/config/locales/ca.yml +23 -11
- data/config/locales/cs.yml +13 -2
- data/config/locales/de.yml +9 -0
- data/config/locales/en.yml +14 -2
- data/config/locales/es-MX.yml +13 -2
- data/config/locales/es-PY.yml +13 -2
- data/config/locales/es.yml +13 -1
- data/config/locales/fi-plain.yml +13 -2
- data/config/locales/fi.yml +14 -2
- data/config/locales/fr.yml +13 -2
- data/config/locales/hu.yml +13 -1
- data/config/locales/it.yml +12 -2
- data/config/locales/nl.yml +13 -1
- data/config/locales/sv.yml +0 -1
- data/config/locales/tr-TR.yml +0 -2
- data/lib/decidim/admin/test/manage_attachments_examples.rb +1 -1
- data/lib/decidim/admin/version.rb +1 -1
- metadata +14 -9
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Admin
|
5
|
+
# A form object used to upload CSV to batch participatory space private users.
|
6
|
+
#
|
7
|
+
class ParticipatorySpacePrivateUserCsvImportForm < Form
|
8
|
+
attribute :file
|
9
|
+
|
10
|
+
validates :file, presence: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -25,7 +25,7 @@ module Decidim
|
|
25
25
|
# Returns a String with a link wrapped in a <li> element.
|
26
26
|
def public_page_link(url)
|
27
27
|
content_tag(:li) do
|
28
|
-
link_to url, class: "button", style: "color: #fff", target: "_blank" do
|
28
|
+
link_to url, class: "button", style: "color: #fff", target: "_blank", rel: "noopener" do
|
29
29
|
I18n.t("decidim.admin.view_public_page")
|
30
30
|
end
|
31
31
|
end
|
@@ -52,6 +52,7 @@ module Decidim
|
|
52
52
|
# Holds the logic to render a label for a given attribute.
|
53
53
|
def display_label(record, attr, locale = nil)
|
54
54
|
return content_tag(:dt, record.class.human_attribute_name(attr)) unless locale
|
55
|
+
|
55
56
|
content_tag(:dt, record.class.human_attribute_name(attr) + " (#{locale})")
|
56
57
|
end
|
57
58
|
|
@@ -70,6 +71,7 @@ module Decidim
|
|
70
71
|
|
71
72
|
def display_available_locales(record)
|
72
73
|
return record.available_locales if record.respond_to?(:available_locales)
|
74
|
+
|
73
75
|
record.organization.available_locales if record.respond_to?(:organization)
|
74
76
|
current_organization.available_locales if respond_to?(:current_organization)
|
75
77
|
end
|
@@ -14,6 +14,7 @@ module Decidim
|
|
14
14
|
|
15
15
|
def participatory_space_types_form_object(form_object, space_type)
|
16
16
|
return if spaces_user_can_admin[space_type.manifest_name.to_sym].blank?
|
17
|
+
|
17
18
|
html = ""
|
18
19
|
form_object.fields_for "participatory_space_types[#{space_type.manifest_name}]", space_type do |ff|
|
19
20
|
html += ff.hidden_field :manifest_name, value: space_type.manifest_name
|
@@ -24,6 +25,7 @@ module Decidim
|
|
24
25
|
|
25
26
|
def select_tag_participatory_spaces(manifest_name, spaces, child_form)
|
26
27
|
return unless spaces
|
28
|
+
|
27
29
|
content_tag :div, class: "#{manifest_name}-block spaces-block-tag cell small-12 medium-6" do
|
28
30
|
child_form.select :ids, options_for_select(spaces),
|
29
31
|
{ prompt: t("select_recipients_to_deliver.none", scope: "decidim.admin.newsletters"),
|
@@ -43,6 +45,7 @@ module Decidim
|
|
43
45
|
def selective_newsletter_to(newsletter)
|
44
46
|
return content_tag(:strong, t("index.not_sent", scope: "decidim.admin.newsletters"), class: "text-warning") unless newsletter.sent?
|
45
47
|
return content_tag(:strong, t("index.all_users", scope: "decidim.admin.newsletters"), class: "text-success") if newsletter.sent? && newsletter.extended_data.blank?
|
48
|
+
|
46
49
|
content_tag :div do
|
47
50
|
concat sent_to_users newsletter
|
48
51
|
concat sent_to_spaces newsletter
|
@@ -64,6 +67,7 @@ module Decidim
|
|
64
67
|
html = "<p style='margin-bottom:0;'> "
|
65
68
|
newsletter.sended_to_partipatory_spaces.try(:each) do |type|
|
66
69
|
next if type["ids"].blank?
|
70
|
+
|
67
71
|
html += t("index.segmented_to", scope: "decidim.admin.newsletters", subject: t("activerecord.models.decidim/#{type["manifest_name"].singularize}.other"))
|
68
72
|
if type["ids"].include?("all")
|
69
73
|
html += "<strong> #{t("index.all", scope: "decidim.admin.newsletters")} </strong>"
|
@@ -106,6 +110,7 @@ module Decidim
|
|
106
110
|
Decidim.participatory_space_manifests.each do |manifest|
|
107
111
|
organization_participatory_space(manifest.name)&.each do |space|
|
108
112
|
next unless space.admins.exists?(id: current_user.id)
|
113
|
+
|
109
114
|
@spaces_user_can_admin[manifest.name] ||= []
|
110
115
|
space_as_option_for_select_data = space_as_option_for_select(space)
|
111
116
|
@spaces_user_can_admin[manifest.name] << space_as_option_for_select_data unless @spaces_user_can_admin[manifest.name].detect do |x|
|
@@ -118,6 +123,7 @@ module Decidim
|
|
118
123
|
|
119
124
|
def space_as_option_for_select(space)
|
120
125
|
return unless space
|
126
|
+
|
121
127
|
[
|
122
128
|
translated_attribute(space.title),
|
123
129
|
space.id,
|
@@ -29,7 +29,7 @@ module Decidim
|
|
29
29
|
return unless resource.allow_resource_permissions? && allowed_to?(:update, resource_key, resource_key => resource)
|
30
30
|
|
31
31
|
icon_link_to "key",
|
32
|
-
send("edit_#{resource_key}_permissions_path", resource
|
32
|
+
send("edit_#{resource_key}_permissions_path", resource, resource_name: resource.resource_manifest.name),
|
33
33
|
t("actions.permissions", scope: "decidim.admin"),
|
34
34
|
class: "action-icon--permissions #{"action-icon--highlighted" if resource.permissions.present?}"
|
35
35
|
end
|
@@ -23,36 +23,78 @@ module Decidim
|
|
23
23
|
#
|
24
24
|
# Returns a rendered form field.
|
25
25
|
def settings_attribute_input(form, attribute, name, options = {})
|
26
|
-
if
|
26
|
+
if name == :amendments_visibility
|
27
|
+
amendments_visibility_form_field(form, options)
|
28
|
+
elsif attribute.translated?
|
27
29
|
form.send(:translated, form_method_for_attribute(attribute), name, options.merge(tabs_id: "#{options[:tabs_prefix]}-#{name}-tabs"))
|
28
30
|
else
|
29
31
|
form.send(form_method_for_attribute(attribute), name, options.merge(extra_options_for(name)))
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
35
|
+
# Returns a translation or nil. If nil, ZURB Foundation won't add the help_text.
|
36
|
+
def help_text_for_component_setting(field_name, settings_name, component_name)
|
37
|
+
key = "decidim.components.#{component_name}.settings.#{settings_name}.#{field_name}_help"
|
38
|
+
return t(key) if I18n.exists?(key)
|
39
|
+
end
|
40
|
+
|
33
41
|
private
|
34
42
|
|
43
|
+
# Returns a radio buttons collection input for the component's step setting
|
44
|
+
# :amendments_visibility; all wrap in a label tag and with help text.
|
45
|
+
def amendments_visibility_form_field(form, options)
|
46
|
+
html = label_tag(:amendments_visibility) do
|
47
|
+
concat options[:label]
|
48
|
+
concat tag(:br)
|
49
|
+
concat form.collection_radio_buttons(:amendments_visibility,
|
50
|
+
Decidim::Amendment::VisibilityStepSetting.options,
|
51
|
+
:last,
|
52
|
+
:first,
|
53
|
+
{ checked: form.object.amendments_visibility },
|
54
|
+
amendments_extra_options) { |b| b.label { b.radio_button + b.text } }
|
55
|
+
end
|
56
|
+
html << content_tag(:p, help_text_for_component_setting(:amendments_visibility, :step, :proposals), class: "help-text")
|
57
|
+
html.html_safe
|
58
|
+
end
|
59
|
+
|
35
60
|
def form_method_for_attribute(attribute)
|
36
61
|
return :editor if attribute.type.to_sym == :text && attribute.editor?
|
62
|
+
|
37
63
|
TYPES[attribute.type.to_sym]
|
38
64
|
end
|
39
65
|
|
40
|
-
#
|
41
|
-
# the Proposals component has existing proposals, and stores the help text
|
42
|
-
# that will be added in a new div via JavaScript in "decidim/admin/form".
|
43
|
-
#
|
44
|
-
# field_name - The name of the field to disable.
|
45
|
-
#
|
66
|
+
# Handles special cases.
|
46
67
|
# Returns an empty Hash or a Hash with extra HTML options.
|
47
68
|
def extra_options_for(field_name)
|
48
|
-
|
49
|
-
|
69
|
+
case field_name
|
70
|
+
when :participatory_texts_enabled
|
71
|
+
participatory_texts_extra_options
|
72
|
+
when :amendment_creation_enabled,
|
73
|
+
:amendment_reaction_enabled,
|
74
|
+
:amendment_promotion_enabled
|
75
|
+
amendments_extra_options
|
76
|
+
else
|
77
|
+
{}
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Marks :participatory_texts_enabled setting with a CSS class if the
|
82
|
+
# Proposals component has existing proposals, so it can be identified
|
83
|
+
# in "decidim/admin/form.js". Also, adds a help_text.
|
84
|
+
def participatory_texts_extra_options
|
85
|
+
return {} unless Decidim::Proposals::Proposal.where(component: @component).any?
|
50
86
|
|
51
87
|
{
|
52
88
|
class: "participatory_texts_disabled",
|
53
|
-
|
89
|
+
help_text: help_text_for_component_setting(:participatory_texts_disabled, :global, :proposals)
|
54
90
|
}
|
55
91
|
end
|
92
|
+
|
93
|
+
# Marks component_step_settings related to amendments with a CSS class,
|
94
|
+
# so they can be identified in "decidim/admin/form.js".
|
95
|
+
def amendments_extra_options
|
96
|
+
{ class: "amendments_step_settings" }
|
97
|
+
end
|
56
98
|
end
|
57
99
|
end
|
58
100
|
end
|
@@ -8,6 +8,7 @@ module Decidim
|
|
8
8
|
def perform(user, current_user)
|
9
9
|
impersonation_log = Decidim::ImpersonationLog.where(admin: current_user, user: user).active.first
|
10
10
|
return unless impersonation_log
|
11
|
+
|
11
12
|
impersonation_log.expired_at = Time.current
|
12
13
|
impersonation_log.save!
|
13
14
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Admin
|
5
|
+
# Custom ApplicationJob scoped to the admin panel.
|
6
|
+
#
|
7
|
+
class ImportParticipatorySpacePrivateUserCsvJob < ApplicationJob
|
8
|
+
queue_as :default
|
9
|
+
|
10
|
+
def perform(email, user_name, privatable_to, current_user)
|
11
|
+
return if email.blank? || user_name.blank?
|
12
|
+
|
13
|
+
params = {
|
14
|
+
name: user_name,
|
15
|
+
email: email.downcase.strip
|
16
|
+
}
|
17
|
+
private_user_form = ParticipatorySpacePrivateUserForm.from_params(params, privatable_to: privatable_to)
|
18
|
+
.with_context(
|
19
|
+
current_user: current_user,
|
20
|
+
current_particiaptory_space: privatable_to
|
21
|
+
)
|
22
|
+
|
23
|
+
Decidim::Admin::CreateParticipatorySpacePrivateUser.call(private_user_form, current_user, privatable_to, true)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -61,6 +61,7 @@ module Decidim
|
|
61
61
|
permission_action.action == :read
|
62
62
|
|
63
63
|
return user_manager_permissions if user_manager?
|
64
|
+
|
64
65
|
toggle_allow(user.admin? || space_allows_admin_access_to_current_action?)
|
65
66
|
end
|
66
67
|
|
@@ -68,6 +69,7 @@ module Decidim
|
|
68
69
|
return unless permission_action.subject == :newsletter
|
69
70
|
return allow! if user.admin?
|
70
71
|
return unless space_allows_admin_access?
|
72
|
+
|
71
73
|
newsletter = context.fetch(:newsletter, nil)
|
72
74
|
|
73
75
|
case permission_action.action
|
@@ -94,6 +96,7 @@ module Decidim
|
|
94
96
|
|
95
97
|
def static_page_action?
|
96
98
|
return unless permission_action.subject == :static_page
|
99
|
+
|
97
100
|
static_page = context.fetch(:static_page, nil)
|
98
101
|
|
99
102
|
case permission_action.action
|
@@ -132,6 +135,7 @@ module Decidim
|
|
132
135
|
|
133
136
|
def user_action?
|
134
137
|
return unless [:user, :impersonatable_user].include?(permission_action.subject)
|
138
|
+
|
135
139
|
subject_user = context.fetch(:user, nil)
|
136
140
|
|
137
141
|
case permission_action.action
|
@@ -5,6 +5,7 @@ module Decidim
|
|
5
5
|
class UserManagerPermissions < Decidim::DefaultPermissions
|
6
6
|
def permissions
|
7
7
|
return permission_action unless user_manager? || user.admin?
|
8
|
+
|
8
9
|
allow! if read_admin_dashboard_action?
|
9
10
|
|
10
11
|
allow! if managed_user_action?
|
@@ -37,6 +38,7 @@ module Decidim
|
|
37
38
|
|
38
39
|
def user_action?
|
39
40
|
return unless [:user, :impersonatable_user].include?(permission_action.subject)
|
41
|
+
|
40
42
|
subject_user = context.fetch(:user, nil)
|
41
43
|
|
42
44
|
case permission_action.action
|
@@ -41,6 +41,7 @@ module Decidim
|
|
41
41
|
|
42
42
|
@form.participatory_space_types.map do |type|
|
43
43
|
next if type.ids.blank?
|
44
|
+
|
44
45
|
object_class = "Decidim::#{type.manifest_name.classify}"
|
45
46
|
if type.ids.include?("all")
|
46
47
|
object_class.constantize.where(organization: @organization)
|
@@ -55,6 +56,7 @@ module Decidim
|
|
55
56
|
def user_id_of_followers
|
56
57
|
return if spaces.blank?
|
57
58
|
return unless @form.send_to_followers
|
59
|
+
|
58
60
|
Decidim::Follow.user_follower_ids_for_participatory_spaces(spaces)
|
59
61
|
end
|
60
62
|
|
@@ -74,6 +76,7 @@ module Decidim
|
|
74
76
|
end
|
75
77
|
end
|
76
78
|
next unless defined?(Decidim::Comments)
|
79
|
+
|
77
80
|
Decidim::Comments.newsletter_participant_entities.flatten.each do |object|
|
78
81
|
klass = Object.const_get(object)
|
79
82
|
participant_ids << klass.newsletter_participant_ids(space)
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% collection_for.attachment_collections.each do |attachment_collection| %>
|
23
23
|
<tr data-id="<%= attachment_collection.id %>">
|
24
24
|
<td>
|
25
|
-
<%= link_to translated_attribute(attachment_collection.name), edit_polymorphic_path([collection_for, attachment_collection]) %><br
|
25
|
+
<%= link_to translated_attribute(attachment_collection.name), edit_polymorphic_path([collection_for, attachment_collection]) %><br>
|
26
26
|
</td>
|
27
27
|
<td class="table-list__actions">
|
28
28
|
<% if allowed_to? :update, :attachment_collection, attachment_collection: attachment_collection %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<h3><%= translated_attribute(@attachment_collection.name) %></h3>
|
2
2
|
|
3
3
|
<div class="actions">
|
4
|
-
<hr
|
4
|
+
<hr>
|
5
5
|
<%= link_to t("decidim.admin.actions.edit"), ["edit", @attachment_collection.collection_for, @attachment_collection], class: "button" if allowed_to? :update, :attachment_collection, attachment_collection: @attachment_collection %>
|
6
6
|
<%= link_to t("decidim.admin.actions.destroy"), [@attachment_collection.collection_for, @attachment_collection], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :attachment_collection, attachment_collection: @attachment_collection %>
|
7
7
|
</div>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<% attached_to.attachments.each do |attachment| %>
|
26
26
|
<tr data-id="<%= attachment.id %>">
|
27
27
|
<td>
|
28
|
-
<%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %><br
|
28
|
+
<%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %><br>
|
29
29
|
</td>
|
30
30
|
<td>
|
31
31
|
<%= translated_attribute(attachment.attachment_collection&.name) %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<h3><%= translated_attribute(@attachment.title) %></h3>
|
2
2
|
|
3
3
|
<div class="actions">
|
4
|
-
<hr
|
4
|
+
<hr>
|
5
5
|
<%= link_to t("decidim.admin.actions.edit"), ["edit", @attachment.attached_to, @attachment] if allowed_to? :update, :attachment, attachment: @attachment %>
|
6
6
|
<%= link_to t("decidim.admin.actions.destroy"), [@attachment.attached_to, @attachment], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :attachment, attachment: @attachment %>
|
7
7
|
</div>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% current_participatory_space.categories.first_class.each do |category| %>
|
23
23
|
<tr>
|
24
24
|
<td>
|
25
|
-
<%= link_to translated_attribute(category.name), edit_category_path(current_participatory_space, category) %><br
|
25
|
+
<%= link_to translated_attribute(category.name), edit_category_path(current_participatory_space, category) %><br>
|
26
26
|
</td>
|
27
27
|
<td class="table-list__actions">
|
28
28
|
<% if allowed_to? :update, :category, category: category %>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<% category.subcategories.each do |subcategory| %>
|
44
44
|
<tr class="extra__table-list__subcategory">
|
45
45
|
<td>
|
46
|
-
<%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br
|
46
|
+
<%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br>
|
47
47
|
</td>
|
48
48
|
<td class="table-list__actions">
|
49
49
|
<% if allowed_to? :update, :category, category: subcategory %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<h3><%= translated_attribute(@category.name) %></h3>
|
2
2
|
|
3
3
|
<div class="actions">
|
4
|
-
<hr
|
4
|
+
<hr>
|
5
5
|
<%= link_to t("decidim.admin.actions.edit"), ["edit", participatory_space, @category] if allowed_to? :update, :category, category: @category %>
|
6
6
|
<%= link_to t("decidim.admin.actions.destroy"), [participatory_space, @category], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :category, category: @category %>
|
7
7
|
</div>
|
@@ -19,8 +19,8 @@
|
|
19
19
|
<%= render partial: "decidim/admin/components/settings_fields",
|
20
20
|
locals: {
|
21
21
|
form: settings_fields,
|
22
|
-
|
23
|
-
settings_name:
|
22
|
+
manifest: form.object.manifest,
|
23
|
+
settings_name: :global,
|
24
24
|
tabs_prefix: "global-settings"
|
25
25
|
} %>
|
26
26
|
<% end %>
|
@@ -46,8 +46,8 @@
|
|
46
46
|
<%= render partial: "decidim/admin/components/settings_fields",
|
47
47
|
locals: {
|
48
48
|
form: settings_fields,
|
49
|
-
|
50
|
-
settings_name:
|
49
|
+
manifest: form.object.manifest,
|
50
|
+
settings_name: :step,
|
51
51
|
tabs_prefix: "step-#{step.id}-settings"
|
52
52
|
} %>
|
53
53
|
<% end %>
|
@@ -68,8 +68,8 @@
|
|
68
68
|
<%= render partial: "decidim/admin/components/settings_fields",
|
69
69
|
locals: {
|
70
70
|
form: settings_fields,
|
71
|
-
|
72
|
-
settings_name:
|
71
|
+
manifest: form.object.manifest,
|
72
|
+
settings_name: :step,
|
73
73
|
tabs_prefix: "default-step-settings"
|
74
74
|
} %>
|
75
75
|
<% end %>
|