Merge pull request #1906 from consul/1856-legislation_processes_proposals_phase
[WIP] Legislation Process Proposals
This commit is contained in:
@@ -19,8 +19,10 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
|
||||
|
||||
def update
|
||||
if @process.update(process_params)
|
||||
set_tag_list
|
||||
|
||||
link = legislation_process_path(@process).html_safe
|
||||
redirect_to edit_admin_legislation_process_path(@process), notice: t('admin.legislation.processes.update.notice', link: link)
|
||||
redirect_to :back, notice: t('admin.legislation.processes.update.notice', link: link)
|
||||
else
|
||||
flash.now[:error] = t('admin.legislation.processes.update.error')
|
||||
render :edit
|
||||
@@ -47,12 +49,22 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
|
||||
:draft_publication_date,
|
||||
:allegations_start_date,
|
||||
:allegations_end_date,
|
||||
:proposals_phase_start_date,
|
||||
:proposals_phase_end_date,
|
||||
:result_publication_date,
|
||||
:debate_phase_enabled,
|
||||
:allegations_phase_enabled,
|
||||
:proposals_phase_enabled,
|
||||
:draft_publication_enabled,
|
||||
:result_publication_enabled,
|
||||
:published
|
||||
:published,
|
||||
:proposals_description,
|
||||
:custom_list
|
||||
)
|
||||
end
|
||||
|
||||
def set_tag_list
|
||||
@process.set_tag_list_on(:customs, process_params[:custom_list])
|
||||
@process.save
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
class Admin::Legislation::ProposalsController < Admin::Legislation::BaseController
|
||||
load_and_authorize_resource :process, class: "Legislation::Process"
|
||||
load_and_authorize_resource :proposal, class: "Legislation::Proposal", through: :process
|
||||
|
||||
def index
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user