Unifies styles and views for admin legislation processes
This commit is contained in:
@@ -13,80 +13,66 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :title %>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_field :title, label: false, placeholder: t('admin.legislation.draft_versions.form.title_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :title %>
|
||||
<%= f.text_field :title, label: false, placeholder: t("admin.legislation.draft_versions.form.title_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :changelog %>
|
||||
<small><%= t('admin.legislation.draft_versions.form.use_markdown') %></small>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_area :changelog, label: false, rows: 5, placeholder: t('admin.legislation.draft_versions.form.changelog_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :changelog %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.use_markdown") %></span>
|
||||
<%= f.text_area :changelog, label: false, rows: 5, placeholder: t("admin.legislation.draft_versions.form.changelog_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :status %>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<small><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></small>
|
||||
<br/>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :status %>
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></span>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :final_version %>
|
||||
<%= f.check_box :final_version, label: false %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.final_version") %></span>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :body %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.use_markdown") %></span>
|
||||
</div>
|
||||
|
||||
<div class="markdown-editor clear">
|
||||
<div class="small-12 medium-8 column fullscreen-container">
|
||||
<div class="markdown-editor-header truncate">
|
||||
<%= t("admin.legislation.draft_versions.form.title_html",
|
||||
draft_version_title: @draft_version.title,
|
||||
process_title: @process.title ) %>
|
||||
</div>
|
||||
|
||||
<div class="markdown-editor-buttons">
|
||||
<%= f.submit(class: "button", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
<%= link_to "#", class: 'fullscreen-toggle' do %>
|
||||
<span data-closed-text="<%= t("admin.legislation.draft_versions.form.launch_text_editor")%>"
|
||||
data-open-text="<%= t("admin.legislation.draft_versions.form.close_text_editor")%>">
|
||||
<strong><%= t("admin.legislation.draft_versions.form.launch_text_editor")%></strong>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :final_version %>
|
||||
<div class="small-12 medium-6 column markdown-area">
|
||||
<%= f.text_area :body, label: false, placeholder: t("admin.legislation.draft_versions.form.body_placeholder") %>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.check_box :final_version, label: false %>
|
||||
<small><%= t("admin.legislation.draft_versions.form.hints.final_version") %></small>
|
||||
|
||||
<div id="markdown-preview" class="small-12 medium-6 column markdown-preview">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :body %>
|
||||
<small><%= t('admin.legislation.draft_versions.form.use_markdown') %></small>
|
||||
</div>
|
||||
<div class="markdown-editor">
|
||||
<div class="small-12 medium-8 column fullscreen-container">
|
||||
<div class="markdown-editor-header truncate"><%= t('admin.legislation.draft_versions.form.title_html', draft_version_title: @draft_version.title, process_title: @process.title ) %></div>
|
||||
|
||||
<div class="markdown-editor-buttons">
|
||||
<%= f.submit(class: "button", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
<%= link_to "#", class: 'fullscreen-toggle' do %>
|
||||
<span data-closed-text="<%= t("admin.legislation.draft_versions.form.launch_text_editor")%>"
|
||||
data-open-text="<%= t("admin.legislation.draft_versions.form.close_text_editor")%>">
|
||||
<strong><%= t("admin.legislation.draft_versions.form.launch_text_editor")%></strong>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column markdown-area">
|
||||
<%= f.text_area :body, label: false, placeholder: t('admin.legislation.draft_versions.form.body_placeholder') %>
|
||||
</div>
|
||||
<div id="markdown-preview" class="small-12 medium-6 column markdown-preview">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-top primary-buttons">
|
||||
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column clear end margin-top">
|
||||
<%= f.submit(class: "button success expanded", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %> - <%= @draft_version.title %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %> - <%= @draft_version.title %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-draft-versions-edit legislation-draft-versions-form row">
|
||||
<div class="legislation-draft-versions-edit legislation-draft-versions-form">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_process_draft_versions_path(@process),
|
||||
t("admin.legislation.draft_versions.edit.back") %>
|
||||
@@ -11,17 +11,16 @@
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="callout warning" style="display: none;">
|
||||
<%= t("admin.legislation.draft_versions.edit.warning") %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<div class="callout warning" style="display: none;">
|
||||
<%= t("admin.legislation.draft_versions.edit.warning") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<h3><%= @draft_version.title %></h3>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column legislation-question-delete">
|
||||
<div class="small-12 column">
|
||||
<h3 class="inline-block"><%= @draft_version.title %></h3>
|
||||
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.legislation.draft_versions.index.delete"),
|
||||
admin_legislation_process_draft_version_path(@process, @draft_version),
|
||||
method: :delete,
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-draft-versions-index row">
|
||||
<div class="legislation-draft-versions-index">
|
||||
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.edit.back") %>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.edit.back") %>
|
||||
<h4 class="inline-block"><%= t("admin.legislation.draft_versions.index.title") %></h4>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<h4><%= t("admin.legislation.draft_versions.index.title") %></h4>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column legislation-process-version">
|
||||
<%= link_to t("admin.legislation.draft_versions.index.create"), new_admin_legislation_process_draft_version_path, class: "button" %>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.legislation.draft_versions.index.create"), new_admin_legislation_process_draft_version_path, class: "button" %>
|
||||
</div>
|
||||
|
||||
<% if @process.draft_versions.any? %>
|
||||
@@ -27,8 +24,8 @@
|
||||
<th><%= t("admin.legislation.draft_versions.table.title") %></th>
|
||||
<th><%= t("admin.legislation.draft_versions.table.created_at") %></th>
|
||||
<th><%= t("admin.legislation.draft_versions.table.status") %></th>
|
||||
<th><%= t("admin.legislation.draft_versions.table.comments") %></th>
|
||||
<th><%= t("admin.legislation.draft_versions.table.final_version") %></th>
|
||||
<th class="text-center"><%= t("admin.legislation.draft_versions.table.comments") %></th>
|
||||
<th class="text-center"><%= t("admin.legislation.draft_versions.table.final_version") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -46,8 +43,8 @@
|
||||
<%= t("admin.legislation.draft_versions.statuses.published") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= draft_version.total_comments %></td>
|
||||
<td>
|
||||
<td class="text-center"><%= draft_version.total_comments %></td>
|
||||
<td class="text-center">
|
||||
<% if draft_version.final_version %>
|
||||
<span class="icon-check" title="<%= draft_version.final_version %>"></span>
|
||||
<% else %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %> - <%= t("admin.legislation.draft_versions.new.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.draft_versions.index.title") %> - <%= t("admin.legislation.draft_versions.new.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-draft-versions-new legislation-draft-versions-form row">
|
||||
<div class="legislation-draft-versions-new legislation-draft-versions-form">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_process_draft_versions_path(@process),
|
||||
t("admin.legislation.draft_versions.new.back") %>
|
||||
@@ -11,10 +11,8 @@
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<h3><%= t("admin.legislation.draft_versions.new.title") %></h3>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<h3><%= t("admin.legislation.draft_versions.new.title") %></h3>
|
||||
</div>
|
||||
|
||||
<%= render 'form', url: admin_legislation_process_draft_versions_path(@process) %>
|
||||
|
||||
@@ -15,236 +15,197 @@
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t('admin.legislation.processes.form.process') %></label>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-start">
|
||||
<%= t('admin.legislation.processes.form.start') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "start_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-end">
|
||||
<%= t('admin.legislation.processes.form.end') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :published, checked: @process.published?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t("admin.legislation.processes.form.process") %></label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t('admin.legislation.processes.form.debate_phase') %></label>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-start">
|
||||
<%= t('admin.legislation.processes.form.start') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :debate_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.debate_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "debate_start_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-end">
|
||||
<%= t('admin.legislation.processes.form.end') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :debate_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.debate_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "debate_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :debate_phase_enabled, checked: @process.debate_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :start_date, t("admin.legislation.processes.form.start") %>
|
||||
<%= f.text_field :start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "start_date" %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t('admin.legislation.processes.form.proposals_phase') %></label>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-start">
|
||||
<%= t('admin.legislation.processes.form.start') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :proposals_phase_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.proposals_phase_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "proposals_phase_start_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-end">
|
||||
<%= t('admin.legislation.processes.form.end') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :proposals_phase_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.proposals_phase_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "proposals_phase_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :proposals_phase_enabled, checked: @process.proposals_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :end_date, t("admin.legislation.processes.form.end") %>
|
||||
<%= f.text_field :end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :published, checked: @process.published?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t('admin.legislation.processes.form.allegations_phase') %></label>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-start">
|
||||
<%= t('admin.legislation.processes.form.start') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :allegations_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.allegations_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "allegations_start_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-1 column legislation-process-end">
|
||||
<%= t('admin.legislation.processes.form.end') %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.text_field :allegations_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.allegations_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "allegations_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :draft_publication_date %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= f.text_field :draft_publication_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.draft_publication_date),
|
||||
class: "js-calendar-full",
|
||||
id: "draft_publication_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :draft_publication_enabled, checked: @process.draft_publication.enabled?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t("admin.legislation.processes.form.debate_phase") %></label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :result_publication_date %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= f.text_field :result_publication_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.result_publication_date),
|
||||
class: "js-calendar-full",
|
||||
id: "result_publication_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= f.check_box :result_publication_enabled, checked: @process.result_publication.enabled?, label: t('admin.legislation.processes.form.enabled') %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :debate_start_date, t("admin.legislation.processes.form.start") %>
|
||||
<%= f.text_field :debate_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.debate_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "debate_start_date" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :debate_end_date, t("admin.legislation.processes.form.end") %>
|
||||
<%= f.text_field :debate_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.debate_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "debate_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :debate_phase_enabled, checked: @process.debate_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t("admin.legislation.processes.form.proposals_phase") %></label>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :proposals_phase_start_date, t("admin.legislation.processes.form.start") %>
|
||||
<%= f.text_field :proposals_phase_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.proposals_phase_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "proposals_phase_start_date" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :proposals_phase_end_date, t("admin.legislation.processes.form.end") %>
|
||||
<%= f.text_field :proposals_phase_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.proposals_phase_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "proposals_phase_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :proposals_phase_enabled, checked: @process.proposals_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<label><%= t("admin.legislation.processes.form.allegations_phase") %></label>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :allegations_start_date, t("admin.legislation.processes.form.start") %>
|
||||
<%= f.text_field :allegations_start_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.allegations_start_date),
|
||||
class: "js-calendar-full",
|
||||
id: "allegations_start_date" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :allegations_end_date, t("admin.legislation.processes.form.end") %>
|
||||
<%= f.text_field :allegations_end_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.allegations_end_date),
|
||||
class: "js-calendar-full",
|
||||
id: "allegations_end_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= f.label :draft_publication_date %>
|
||||
<%= f.text_field :draft_publication_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.draft_publication_date),
|
||||
class: "js-calendar-full",
|
||||
id: "draft_publication_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :draft_publication_enabled, checked: @process.draft_publication.enabled?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= f.label :result_publication_date %>
|
||||
<%= f.text_field :result_publication_date,
|
||||
label: false,
|
||||
value: format_date_for_calendar_form(@process.result_publication_date),
|
||||
class: "js-calendar-full",
|
||||
id: "result_publication_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column margin-top">
|
||||
<%= f.check_box :result_publication_enabled, checked: @process.result_publication.enabled?, label: t("admin.legislation.processes.form.enabled") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="documents small-12 column">
|
||||
<%= render 'documents/nested_documents', documentable: @process, f: f %>
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :title %>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_field :title,
|
||||
label: false,
|
||||
placeholder: t('admin.legislation.processes.form.title_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :summary %>
|
||||
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_area :summary,
|
||||
label: false,
|
||||
rows: 2,
|
||||
placeholder: t('admin.legislation.processes.form.summary_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :title %>
|
||||
<%= f.text_field :title,
|
||||
label: false,
|
||||
placeholder: t("admin.legislation.processes.form.title_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :description %>
|
||||
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_area :description,
|
||||
label: false,
|
||||
rows: 5,
|
||||
placeholder: t('admin.legislation.processes.form.description_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :summary %>
|
||||
<span class="help-text"><%= t("admin.legislation.processes.form.use_markdown") %></span>
|
||||
<%= f.text_area :summary,
|
||||
label: false,
|
||||
rows: 2,
|
||||
placeholder: t("admin.legislation.processes.form.summary_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :additional_info %>
|
||||
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_area :additional_info,
|
||||
label: false,
|
||||
rows: 10,
|
||||
placeholder: t('admin.legislation.processes.form.additional_info_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :description %>
|
||||
<span class="help-text"><%= t("admin.legislation.processes.form.use_markdown") %></span>
|
||||
<%= f.text_area :description,
|
||||
label: false,
|
||||
rows: 5,
|
||||
placeholder: t("admin.legislation.processes.form.description_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :additional_info %>
|
||||
<span class="help-text"><%= t("admin.legislation.processes.form.use_markdown") %></span>
|
||||
<%= f.text_area :additional_info,
|
||||
label: false,
|
||||
rows: 10,
|
||||
placeholder: t("admin.legislation.processes.form.additional_info_placeholder") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column clear end">
|
||||
<%= f.submit(class: "button success expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-process-edit row">
|
||||
<div class="legislation-process-edit">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.edit.back") %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.edit.back") %>
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
<%= render 'subnav', process: @process, active: 'info' %>
|
||||
|
||||
<%= render 'subnav', process: @process, active: 'info' %>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
|
||||
<% end %>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
|
||||
|
||||
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path,
|
||||
class: "button success float-right" %>
|
||||
class: "button float-right" %>
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<th><%= t("admin.legislation.processes.process.title") %></th>
|
||||
<th><%= t("admin.legislation.processes.process.status") %></th>
|
||||
<th><%= t("admin.legislation.processes.process.creation_date") %></th>
|
||||
<th><%= t("admin.legislation.processes.process.comments") %></th>
|
||||
<th class="text-center"><%= t("admin.legislation.processes.process.comments") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -26,16 +26,16 @@
|
||||
<tbody>
|
||||
<% @processes.each do |process| %>
|
||||
<tr id="<%= dom_id(process) %>">
|
||||
<td class="small-12 medium-8">
|
||||
<td class="small-12 medium-6">
|
||||
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
|
||||
</td>
|
||||
<td><%= t("admin.legislation.processes.process.status_#{process.status}") %></td>
|
||||
<td><%= I18n.l process.created_at.to_date %></td>
|
||||
<td><%= process.total_comments %></td>
|
||||
<td class="text-center"><%= process.total_comments %></td>
|
||||
<td>
|
||||
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_path(process),
|
||||
method: :delete,
|
||||
class: 'button hollow alert' %>
|
||||
class: 'button hollow alert expanded' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.new.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.new.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-process-new row">
|
||||
<div class="legislation-process-new">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.new.back") %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.processes.new.back") %>
|
||||
<h2><%= t("admin.legislation.processes.new.title") %></h2>
|
||||
|
||||
<h2><%= t("admin.legislation.processes.new.title") %></h2>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
|
||||
@@ -15,23 +15,17 @@
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= label_tag t('admin.legislation.proposals.form.custom_categories') %>
|
||||
<small><%= t('admin.legislation.proposals.form.custom_categories_description') %></small>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s,
|
||||
label: false,
|
||||
placeholder: t("proposals.form.tags_placeholder"),
|
||||
class: 'js-tag-list',
|
||||
aria: {describedby: "tag-list-help-text"} %>
|
||||
</div>
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :custom_list, t("admin.legislation.proposals.form.custom_categories") %>
|
||||
<span class="help-text"><%= t("admin.legislation.proposals.form.custom_categories_description") %></span>
|
||||
<%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s,
|
||||
label: false,
|
||||
placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"),
|
||||
class: 'js-tag-list',
|
||||
aria: {describedby: "tag-list-help-text"} %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column clear end">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.proposals.index.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.proposals.index.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-draft-versions-index row">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.proposals.index.back") %>
|
||||
<div class="legislation-admin legislation-draft-versions-index">
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.proposals.index.back") %>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'proposals' %>
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render "form" %>
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'proposals' %>
|
||||
|
||||
</div>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column margin">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to_add_association t("admin.legislation.questions.form.add_option"),
|
||||
f, :question_options, class: "button hollow medium" %>
|
||||
f, :question_options, class: "button hollow" %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 large-4 column end">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
|
||||
<div class="small-12 medium-6 large-3 clear column end margin-top">
|
||||
<%= f.submit(class: "button success expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<div class="nested-fields">
|
||||
<div class="field">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.text_field :value, label: false, placeholder: t("admin.legislation.questions.form.value_placeholder") %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= link_to_remove_association "<span class=\"icon-x\" aria-hidden=\"true\"></span> <span>#{t(".remove_option")}</span>".html_safe, f %>
|
||||
</div>
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.text_field :value, label: false, placeholder: t("admin.legislation.questions.form.value_placeholder") %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= link_to_remove_association t("admin.legislation.questions.question_option_fields.remove_option"), f, class: "delete"%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %> - <%= @question.title %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %> - <%= @question.title %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-questions-edit legislation-questions-form row">
|
||||
<div class="legislation-questions-edit legislation-questions-form">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_process_questions_path(@process), t("admin.legislation.questions.edit.back") %>
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<h3><%= t("admin.legislation.questions.edit.title", question_title: @question.title) %></h3>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column legislation-question-delete">
|
||||
<div class="small-12 column">
|
||||
<h3 class="inline-block"><%= t("admin.legislation.questions.edit.title", question_title: @question.title) %></h3>
|
||||
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.legislation.questions.index.delete"), admin_legislation_process_question_path(@process, @question),
|
||||
method: :delete,
|
||||
class: 'button hollow alert' %>
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-draft-versions-index row">
|
||||
<div class="legislation-draft-versions-index">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.questions.index.back") %>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_processes_path, t("admin.legislation.questions.index.back") %>
|
||||
<h4 class="inline-block"><%= t("admin.legislation.questions.index.title") %></h4>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<h4><%= t("admin.legislation.questions.index.title") %></h4>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column legislation-process-question">
|
||||
<%= link_to t("admin.legislation.questions.index.create"), new_admin_legislation_process_question_path, class: "button" %>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<%= link_to t("admin.legislation.questions.index.create"), new_admin_legislation_process_question_path, class: "button" %>
|
||||
</div>
|
||||
|
||||
<% if @process.questions.any? %>
|
||||
@@ -26,8 +22,8 @@
|
||||
<tr>
|
||||
<th><%= t("admin.legislation.questions.table.title") %></th>
|
||||
<th><%= t("admin.legislation.questions.table.question_options") %></th>
|
||||
<th><%= t("admin.legislation.questions.table.answers_count") %></th>
|
||||
<th><%= t("admin.legislation.questions.table.comments_count") %></th>
|
||||
<th class="text-center"><%= t("admin.legislation.questions.table.answers_count") %></th>
|
||||
<th class="text-center"><%= t("admin.legislation.questions.table.comments_count") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -45,8 +41,8 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= question.answers_count %></td>
|
||||
<td><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: 'comments') %></td>
|
||||
<td class="text-center"><%= question.answers_count %></td>
|
||||
<td class="text-center"><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: 'comments') %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
<% provide :title do %>
|
||||
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %> - <%= t("admin.legislation.questions.new.title") %>
|
||||
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %> - <%= t("admin.legislation.questions.new.title") %>
|
||||
<% end %>
|
||||
|
||||
<div class="legislation-admin legislation-questions-new legislation-questions-form row">
|
||||
<div class="legislation-questions-new legislation-questions-form">
|
||||
|
||||
<%= back_link_to admin_legislation_process_questions_path(@process), t("admin.legislation.questions.new.back") %>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to admin_legislation_process_questions_path(@process), t("admin.legislation.questions.new.back") %>
|
||||
|
||||
<h2><%= @process.title %></h2>
|
||||
|
||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<h3><%= t("admin.legislation.questions.new.title") %></h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'form', url: admin_legislation_process_questions_path(@process) %>
|
||||
<h3><%= t("admin.legislation.questions.new.title") %></h3>
|
||||
</div>
|
||||
|
||||
<%= render 'form', url: admin_legislation_process_questions_path(@process) %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user