Allow admin set published_proposal field
This commit is contained in:
@@ -55,7 +55,7 @@ class Admin::Dashboard::ActionsController < Admin::Dashboard::BaseController
|
||||
.require(:dashboard_action)
|
||||
.permit(
|
||||
:title, :description, :short_description, :request_to_administrators, :day_offset,
|
||||
:required_supports, :order, :active, :action_type,
|
||||
:required_supports, :order, :active, :action_type, :published_proposal,
|
||||
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy],
|
||||
links_attributes: [:id, :label, :url, :open_in_new_tab, :_destroy]
|
||||
)
|
||||
|
||||
@@ -33,6 +33,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row expanded margin-top">
|
||||
<div class="small-12 medium-12 column">
|
||||
<%= f.check_box :published_proposal, label: t("admin.dashboard.actions.form.published_proposal") %>
|
||||
<p class="help-text"><%= t("admin.dashboard.actions.form.published_proposal_help_text") %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row expanded margin-top">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :day_offset %>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<th><%= t("admin.dashboard.actions.index.action_title") %></th>
|
||||
<th><%= t("admin.dashboard.actions.index.action_type") %></th>
|
||||
<th class="text-center"><%= t("admin.dashboard.actions.index.action_active") %></th>
|
||||
<th class="text-center"><%= t("admin.dashboard.actions.index.published_proposal") %></th>
|
||||
<th class="text-center"><%= t("admin.dashboard.actions.index.day_offset") %></th>
|
||||
<th class="text-center"><%= t("admin.dashboard.actions.index.required_supports") %></th>
|
||||
<th class="text-center"><%= t("admin.dashboard.actions.index.order") %></th>
|
||||
@@ -30,6 +31,7 @@
|
||||
<td><%= action.title %></td>
|
||||
<td><%= t("admin.dashboard.actions.action_type.#{action.action_type}") %></td>
|
||||
<td class="text-center"><%= active_human_readable(action.active) %></td>
|
||||
<td class="text-center"><%= active_human_readable(action.published_proposal) %></td>
|
||||
<td class="text-center"><%= number_with_delimiter(action.day_offset, delimiter: '.') %></td>
|
||||
<td class="text-center"><%= number_with_delimiter(action.required_supports, delimiter: '.') %></td>
|
||||
<td class="text-center"><%= action.order %></td>
|
||||
|
||||
@@ -337,6 +337,7 @@ en:
|
||||
day_offset: Required days
|
||||
action_active: Active
|
||||
order: Order
|
||||
published_proposal: Published proposal
|
||||
new:
|
||||
creating: New action for the proposals dashboard
|
||||
back: Back to list
|
||||
@@ -352,6 +353,8 @@ en:
|
||||
day_offset_help_text: Enter 0 so that this value is not taken into account
|
||||
required_supports_help_text: Enter 0 so that this value is not taken into account
|
||||
order_help_text: Order to show to user
|
||||
published_proposal: For published proposals?
|
||||
published_proposal_help_text: Mark this checkbox to create the action only for published proposals
|
||||
administrator_tasks:
|
||||
index:
|
||||
title: Pending tasks
|
||||
|
||||
@@ -337,6 +337,7 @@ es:
|
||||
day_offset: Días necesarios
|
||||
action_active: Activo
|
||||
order: Orden
|
||||
published_proposal: Propuesta publicada
|
||||
new:
|
||||
creating: Nueva acción para el dashboard de propuestas
|
||||
back: Volver a la lista
|
||||
@@ -350,6 +351,8 @@ es:
|
||||
day_offset_help_text: Introduce 0 para que este valor no se tenga en cuenta
|
||||
required_supports_help_text: Introduce 0 para que este valor no se tenga en cuenta
|
||||
order_help_text: Orden para mostrar al usuario
|
||||
published_proposal: ¿Para propuestas publicadas?
|
||||
published_proposal_help_text: Marca este checkbox para crear la acción solo para propuestas publicadas
|
||||
delete:
|
||||
success: Acción borrada con éxito
|
||||
administrator_tasks:
|
||||
|
||||
Reference in New Issue
Block a user