Merge pull request #44 from medialab-prado/42-integrate-admin-html-css
Integrate admin html and css from sandbox
This commit is contained in:
@@ -18,6 +18,7 @@ App.MarkdownEditor =
|
|||||||
|
|
||||||
$(this).on 'change input paste keyup', ->
|
$(this).on 'change input paste keyup', ->
|
||||||
App.MarkdownEditor.refresh_preview($(this), md)
|
App.MarkdownEditor.refresh_preview($(this), md)
|
||||||
|
$('.legislation-draft-versions-edit .warning').show()
|
||||||
return
|
return
|
||||||
|
|
||||||
$(this).find('.fullscreen-toggle').on 'click', ->
|
$(this).find('.fullscreen-toggle').on 'click', ->
|
||||||
|
|||||||
@@ -428,6 +428,13 @@ table.investment-projects-summary {
|
|||||||
|
|
||||||
// 06. Legislation
|
// 06. Legislation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
|
.legislation-admin {
|
||||||
|
.menu .active > a {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.legislation-process-save {
|
.legislation-process-save {
|
||||||
@include breakpoint(medium) {
|
@include breakpoint(medium) {
|
||||||
float: right;
|
float: right;
|
||||||
@@ -451,10 +458,6 @@ table.investment-projects-summary {
|
|||||||
|
|
||||||
.legislation-process-edit {
|
.legislation-process-edit {
|
||||||
|
|
||||||
.menu .active > a {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edit_legislation_process {
|
.edit_legislation_process {
|
||||||
|
|
||||||
small {
|
small {
|
||||||
@@ -481,10 +484,6 @@ table.investment-projects-summary {
|
|||||||
|
|
||||||
.legislation-draft-versions-index {
|
.legislation-draft-versions-index {
|
||||||
|
|
||||||
.menu .active > a {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.legislation-process-question {
|
.legislation-process-question {
|
||||||
@include breakpoint(medium) {
|
@include breakpoint(medium) {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -496,11 +495,7 @@ table.investment-projects-summary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.legislation-questions-index {
|
.legislation-questions-form {
|
||||||
|
|
||||||
.menu .active > a {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type]:not([type="submit"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]) {
|
input[type]:not([type="submit"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]) {
|
||||||
background: $white;
|
background: $white;
|
||||||
@@ -561,7 +556,7 @@ table.investment-projects-summary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.legislation-draft-versions-index {
|
.legislation-draft-versions-form {
|
||||||
|
|
||||||
.legislation-process-version {
|
.legislation-process-version {
|
||||||
@include breakpoint(medium) {
|
@include breakpoint(medium) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
// -----------------
|
// -----------------
|
||||||
.brand-heading {
|
.brand-heading {
|
||||||
background: $brand;
|
background: $brand;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
|
||||||
.column {
|
.column {
|
||||||
padding-top: 10rem;
|
padding-top: 10rem;
|
||||||
@@ -25,35 +26,31 @@
|
|||||||
// 02. Sidebar menu
|
// 02. Sidebar menu
|
||||||
// -----------------
|
// -----------------
|
||||||
.legislation-categories {
|
.legislation-categories {
|
||||||
ul {
|
|
||||||
|
.menu.simple {
|
||||||
|
border-bottom: none;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
margin-top: 0;
|
||||||
li {
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
@include breakpoint(medium) {
|
@include breakpoint(medium) {
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
margin-bottom: 2rem;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-weight: 400;
|
|
||||||
color: $text-medium;
|
|
||||||
margin-bottom: 3rem;
|
|
||||||
transition: color 0.25s ease-out, color 0.25s ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover h4, &:active h4 {
|
li.active {
|
||||||
color: $brand;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.active h4 {
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: $brand;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
border-bottom: 2px solid $brand;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,9 +59,6 @@
|
|||||||
// -----------------
|
// -----------------
|
||||||
.legislation {
|
.legislation {
|
||||||
margin: 0 0 4rem 0;
|
margin: 0 0 4rem 0;
|
||||||
}
|
|
||||||
|
|
||||||
.legislation {
|
|
||||||
background: white;
|
background: white;
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
|
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
|
||||||
@@ -117,11 +111,21 @@
|
|||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
|
margin-left: 0.25rem;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
color: #61686E;
|
color: #61686E;
|
||||||
|
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
margin-left: 0.25rem;
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
|
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ class Admin::Legislation::QuestionsController < Admin::Legislation::BaseControll
|
|||||||
@questions = @process.questions
|
@questions = @process.questions
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@question.question_options.build
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@question.author = current_user
|
@question.author = current_user
|
||||||
if @question.save
|
if @question.save
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ module LegislationHelper
|
|||||||
l(date, format: "%d %b %Y") if date
|
l(date, format: "%d %b %Y") if date
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def format_date_for_calendar_form(date)
|
||||||
|
l(date, format: "%d/%m/%Y") if date
|
||||||
|
end
|
||||||
|
|
||||||
def legislation_question_path(question)
|
def legislation_question_path(question)
|
||||||
legislation_process_question_path(question.process, question)
|
legislation_process_question_path(question.process, question)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -53,4 +53,8 @@ class Legislation::Process < ActiveRecord::Base
|
|||||||
today >= final_publication_date
|
today >= final_publication_date
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def total_comments
|
||||||
|
questions.map(&:comments_count).sum
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :changelog %>
|
<%= f.label :changelog %>
|
||||||
|
<small><%= t('admin.legislation.draft_versions.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :changelog, label: false, rows: 5 %>
|
<%= f.text_area :changelog, label: false, rows: 5 %>
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||||
<%= f.radio_button :status, status, label: false %>
|
<%= f.radio_button :status, status, label: false %>
|
||||||
<%= f.label t("admin.legislation.draft_versions.statuses.#{status}") %>
|
<%= f.label t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||||
|
<small><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></small>
|
||||||
<br/>
|
<br/>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,17 +54,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.check_box :final_version, label: false %>
|
<%= f.check_box :final_version, label: false %>
|
||||||
|
<small><%= t("admin.legislation.draft_versions.form.hints.final_version") %></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :body %>
|
<%= f.label :body %>
|
||||||
|
<small><%= t('admin.legislation.draft_versions.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="markdown-editor">
|
<div class="markdown-editor">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column fullscreen-container">
|
||||||
<span class="icon-arrows-expand"></span><%= link_to t("admin.legislation.draft_versions.form.fullscreen_toggle"), "#", class: 'fullscreen-toggle' %>
|
<div class="markdown-editor-header truncate">Consul | Editando <span class="strong">Versión 3</span> del proceso <span class="strong">Licencias urbanísticas, declaraciones</span></div>
|
||||||
|
|
||||||
|
<div class="markdown-editor-buttons">
|
||||||
|
<a class="button secondary" href="#">Previsualizar</a>
|
||||||
|
<%= 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><%= t("admin.legislation.draft_versions.form.fullscreen_toggle")%></span> <span class="icon-expand"></span>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-6 column">
|
<div class="small-12 medium-6 column">
|
||||||
<%= f.text_area :body, label: false %>
|
<%= f.text_area :body, label: false %>
|
||||||
@@ -75,9 +88,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row primary-buttons">
|
||||||
<div class="actions small-12 medium-3 column">
|
<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")) %>
|
<%= f.submit(class: "button expanded", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||||
|
<a class="button secondary" href="#">Previsualizar</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= 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="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
<%= t("admin.legislation.draft_versions.edit.back") %>
|
<%= t("admin.legislation.draft_versions.edit.back") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -9,13 +13,24 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
<%= 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>
|
||||||
|
|
||||||
|
<div class="small-12 medium-9 column">
|
||||||
<h3><%= @draft_version.title %></h3>
|
<h3><%= @draft_version.title %></h3>
|
||||||
|
</div>
|
||||||
<%= render 'form', url: admin_legislation_process_draft_version_path(@process, @draft_version) %>
|
<div class="small-12 medium-3 column legislation-question-delete">
|
||||||
|
<%= link_to t("admin.legislation.draft_versions.index.delete"),
|
||||||
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_draft_version_path(@process, @draft_version),
|
admin_legislation_process_draft_version_path(@process, @draft_version),
|
||||||
method: :delete,
|
method: :delete,
|
||||||
class: 'button hollow alert' %>
|
class: 'button hollow alert' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render 'form', url: admin_legislation_process_draft_version_path(@process, @draft_version) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= 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="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
@@ -9,12 +13,18 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
||||||
|
|
||||||
<%= link_to t("admin.legislation.draft_versions.index.create"),
|
<div class="row">
|
||||||
new_admin_legislation_process_draft_version_path, class: "button float-right" %>
|
<div class="small-12 medium-9 column">
|
||||||
|
<h4><%= t("admin.legislation.draft_versions.index.title") %></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3><%= t("admin.legislation.draft_versions.index.title") %></h3>
|
<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>
|
||||||
|
|
||||||
<table>
|
<table class="stack">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.legislation.draft_versions.table.title") %></th>
|
<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.created_at") %></th>
|
||||||
@@ -22,6 +32,8 @@
|
|||||||
<th><%= t("admin.legislation.draft_versions.table.comments") %></th>
|
<th><%= t("admin.legislation.draft_versions.table.comments") %></th>
|
||||||
<th><%= t("admin.legislation.draft_versions.table.final_version") %></th>
|
<th><%= t("admin.legislation.draft_versions.table.final_version") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<% @process.draft_versions.each do |draft_version| %>
|
<% @process.draft_versions.each do |draft_version| %>
|
||||||
<tr id="<%= dom_id(draft_version) %>">
|
<tr id="<%= dom_id(draft_version) %>">
|
||||||
<td>
|
<td>
|
||||||
@@ -33,6 +45,7 @@
|
|||||||
<td><%= draft_version.final_version %></td>
|
<td><%= draft_version.final_version %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= 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="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
@@ -9,7 +13,11 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'draft_versions' %>
|
<%= 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>
|
<h3><%= t("admin.legislation.draft_versions.new.title") %></h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', url: admin_legislation_process_draft_versions_path(@process) %>
|
<%= render 'form', url: admin_legislation_process_draft_versions_path(@process) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,105 @@
|
|||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% 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-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-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-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>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="small-12 medium-4 column">
|
||||||
|
<%= f.label :final_publication_date %>
|
||||||
|
</div>
|
||||||
|
<div class="small-12 medium-2 column end">
|
||||||
|
<%= f.text_field :final_publication_date,
|
||||||
|
label: false,
|
||||||
|
value: format_date_for_calendar_form(@process.final_publication_date),
|
||||||
|
class: "js-calendar-full",
|
||||||
|
id: "final_publication_date" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
@@ -28,6 +126,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :description %>
|
<%= f.label :description %>
|
||||||
|
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :description,
|
<%= f.text_area :description,
|
||||||
@@ -39,6 +138,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :target %>
|
<%= f.label :target %>
|
||||||
|
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :target,
|
<%= f.text_area :target,
|
||||||
@@ -50,6 +150,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :how_to_participate %>
|
<%= f.label :how_to_participate %>
|
||||||
|
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :how_to_participate,
|
<%= f.text_area :how_to_participate,
|
||||||
@@ -61,6 +162,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :additional_info %>
|
<%= f.label :additional_info %>
|
||||||
|
<small><%= t('admin.legislation.processes.form.use_markdown') %></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :additional_info,
|
<%= f.text_area :additional_info,
|
||||||
@@ -70,85 +172,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-4 column">
|
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||||
<%= f.label :start_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :start_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "start_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :end_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :end_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "end_date" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :debate_start_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :debate_start_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "debate_start_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :debate_end_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :debate_end_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "debate_end_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :draft_publication_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :draft_publication_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "draft_publication_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :allegations_start_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :allegations_start_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "allegations_start_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :allegations_end_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :allegations_end_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "allegations_end_date" %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-4 column">
|
|
||||||
<%= f.label :final_publication_date %>
|
|
||||||
</div>
|
|
||||||
<div class="small-12 medium-8 column">
|
|
||||||
<%= f.text_field :final_publication_date,
|
|
||||||
label: false,
|
|
||||||
class: "js-calendar-full",
|
|
||||||
id: "final_publication_date" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="actions small-12 medium-3 column">
|
|
||||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
<%= f.submit(class: "button expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-process-edit row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="legislation-admin legislation-process-edit row">
|
||||||
|
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
|
|||||||
@@ -1,30 +1,46 @@
|
|||||||
<%= link_to t("admin.legislation.processes.index.create"),
|
<% provide :title do %>
|
||||||
new_admin_legislation_process_path, class: "button success float-right" %>
|
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
|
<div class="legislation-admin legislation-process-index">
|
||||||
|
<div class="row">
|
||||||
|
<div class="small-12 medium-9 column">
|
||||||
|
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
|
||||||
|
</div>
|
||||||
|
<div class="small-12 medium-3 column legislation-process-new">
|
||||||
|
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path, class: "button" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
|
||||||
|
|
||||||
<h3><%= page_entries_info @processes %></h3>
|
<h3><%= page_entries_info @processes %></h3>
|
||||||
|
|
||||||
<table>
|
<table class="stack">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.legislation.processes.process.title") %></th>
|
<th><%= t("admin.legislation.processes.process.title") %></th>
|
||||||
|
<th><%= t("admin.legislation.processes.process.comments") %></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<% @processes.each do |process| %>
|
<% @processes.each do |process| %>
|
||||||
<tr id="<%= dom_id(process) %>">
|
<tr id="<%= dom_id(process) %>">
|
||||||
<td class="small-12 medium-9">
|
<td class="small-12 medium-8">
|
||||||
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
|
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
|
||||||
</td>
|
</td>
|
||||||
|
<td><%= process.total_comments %></td>
|
||||||
<td class="text-right">
|
<td>
|
||||||
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_path(process),
|
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_path(process),
|
||||||
method: :delete,
|
method: :delete,
|
||||||
class: 'button hollow alert' %>
|
class: 'button hollow alert' %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<%= paginate @processes %>
|
<%= paginate @processes %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-process-new row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.new.title") %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="legislation-admin legislation-process-new row">
|
||||||
|
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
|
|||||||
@@ -15,16 +15,14 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :title %>
|
<%= f.label :title %>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_area :title, rows: 5, label: false %>
|
<%= f.text_area :title, rows: 5, label: false %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="small-12 medium-4 column">
|
<div class="small-12 medium-4 column">
|
||||||
<%= f.label :question_options %>
|
<%= f.label :question_options %>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,10 +34,10 @@
|
|||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= link_to_add_association t('.add_option'), f, :question_options %>
|
<%= link_to_add_association t('.add_option'), f, :question_options %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="actions small-12 medium-3 column">
|
<div class="actions small-12 medium-3 column legislation-process-save">
|
||||||
<%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
|
<%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<div class="nested-fields">
|
<div class="nested-fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
<div class="row">
|
||||||
|
<div class="small-12 medium-9 column">
|
||||||
<%= f.text_field :value, label: false %>
|
<%= f.text_field :value, label: false %>
|
||||||
<%= link_to_remove_association t('.remove_option'), f %>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<div class="legislation-questions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= 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="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
<%= t("admin.legislation.questions.edit.back") %>
|
<%= t("admin.legislation.questions.edit.back") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -9,12 +13,17 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||||
|
|
||||||
<h3><%= @question.title %></h3>
|
<div class="row">
|
||||||
|
<div class="small-12 medium-9 column">
|
||||||
<%= render 'form', url: admin_legislation_process_question_path(@process, @question) %>
|
<h3><%= t("admin.legislation.questions.edit.title", question_title: @question.title) %></h3>
|
||||||
|
</div>
|
||||||
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_question_path(@process, @question),
|
<div class="small-12 medium-3 column legislation-question-delete">
|
||||||
|
<%= link_to t("admin.legislation.questions.index.delete"), admin_legislation_process_question_path(@process, @question),
|
||||||
method: :delete,
|
method: :delete,
|
||||||
class: 'button hollow alert' %>
|
class: 'button hollow alert' %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render 'form', url: admin_legislation_process_question_path(@process, @question) %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= t("admin.menu.legislation") %> - <%= @process.title %> - <%= t("admin.legislation.questions.index.title") %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="legislation-admin legislation-draft-versions-index row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
<%= link_to admin_legislation_processes_path, class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
@@ -9,18 +13,26 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
||||||
|
|
||||||
<%= link_to t("admin.legislation.questions.index.create"),
|
<div class="row">
|
||||||
new_admin_legislation_process_question_path, class: "button float-right" %>
|
<div class="small-12 medium-9 column">
|
||||||
|
<h4><%= t("admin.legislation.questions.index.title") %></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3><%= t("admin.legislation.questions.index.title") %></h3>
|
<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>
|
||||||
|
|
||||||
<table>
|
<table class="stack">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.legislation.questions.table.title") %></th>
|
<th><%= t("admin.legislation.questions.table.title") %></th>
|
||||||
<th><%= t("admin.legislation.questions.table.question_options") %></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.answers_count") %></th>
|
||||||
<th><%= t("admin.legislation.questions.table.comments_count") %></th>
|
<th><%= t("admin.legislation.questions.table.comments_count") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<% @process.questions.each do |question| %>
|
<% @process.questions.each do |question| %>
|
||||||
<tr id="<%= dom_id(question) %>">
|
<tr id="<%= dom_id(question) %>">
|
||||||
<td>
|
<td>
|
||||||
@@ -36,9 +48,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= question.answers_count %></td>
|
<td><%= question.answers_count %></td>
|
||||||
<td><%= question.comments.count %></td>
|
<td><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: 'comments') %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<div class="legislation-questions-index row">
|
<% provide :title do %>
|
||||||
|
Admin - <%= 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="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
<%= link_to admin_legislation_process_path(@process), class: "back" do %>
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
@@ -9,7 +13,11 @@
|
|||||||
|
|
||||||
<%= render 'admin/legislation/processes/subnav', process: @process, active: 'questions' %>
|
<%= 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>
|
<h3><%= t("admin.legislation.questions.new.title") %></h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', url: admin_legislation_process_questions_path(@process) %>
|
<%= render 'form', url: admin_legislation_process_questions_path(@process) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,10 +27,15 @@
|
|||||||
<h4><%= t('.how_to_participate') %></h4>
|
<h4><%= t('.how_to_participate') %></h4>
|
||||||
<%= markdown process.how_to_participate %>
|
<%= markdown process.how_to_participate %>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="debate-info" class="small-12 column">
|
||||||
|
<div class="debate-info-wrapper">
|
||||||
|
<%= markdown process.additional_info if process.additional_info %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="center half-gradient">
|
<div class="center half-gradient">
|
||||||
<a class="button big center strong" title="<%= t('.more_info') %>">
|
<a id="js-toggle-debate" class="button big center strong" title="Más información y contexto">
|
||||||
<%= t('.more_info') %>
|
<%= t('.more_info') %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
<% provide :title do %>
|
||||||
|
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="legislation-hero no-margin-top brand-heading">
|
<div class="legislation-hero no-margin-top brand-heading">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-12 column padding">
|
<div class="small-12 medium-12 column padding">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<div class="legislation-admin legislation-draft-versions-index row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<a class="back" href="/admin/legislation/processes">
|
<a class="back" href="/admin/legislation/processes">
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-questions-index row">
|
<div class="legislation-admin legislation-questions-index row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<a class="back" href="/admin/legislation/processes/1">
|
<a class="back" href="/admin/legislation/processes/1">
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<div class="legislation-admin legislation-draft-versions-index row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<a class="back" href="/admin/legislation/processes">
|
<a class="back" href="/admin/legislation/processes">
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-draft-versions-index row">
|
<div class="legislation-admin legislation-draft-versions-edit legislation-draft-versions-form row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<a class="back" href="/admin/legislation/processes/1">
|
<a class="back" href="/admin/legislation/processes/1">
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-process-index">
|
<div class="legislation-admin legislation-process-index">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 medium-9 column">
|
<div class="small-12 medium-9 column">
|
||||||
<h2 class="inline-block">Procesos de legislación colaborativa</h2>
|
<h2 class="inline-block">Procesos de legislación colaborativa</h2>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="legislation-process-edit row">
|
<div class="legislation-admin legislation-process-edit row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<a class="back" href="/admin/legislation/processes">
|
<a class="back" href="/admin/legislation/processes">
|
||||||
<span class="icon-angle-left"></span>
|
<span class="icon-angle-left"></span>
|
||||||
|
|||||||
@@ -108,9 +108,10 @@ en:
|
|||||||
changelog: Changes
|
changelog: Changes
|
||||||
status: Status
|
status: Status
|
||||||
final_version: Final version
|
final_version: Final version
|
||||||
legislation/questions:
|
legislation/question:
|
||||||
title: "Title"
|
title: "Title"
|
||||||
legislation/question_options:
|
question_options: Options
|
||||||
|
legislation/question_option:
|
||||||
value: "Value"
|
value: "Value"
|
||||||
errors:
|
errors:
|
||||||
models:
|
models:
|
||||||
|
|||||||
@@ -108,9 +108,10 @@ es:
|
|||||||
changelog: Cambios
|
changelog: Cambios
|
||||||
status: Estado
|
status: Estado
|
||||||
final_version: Versión final
|
final_version: Versión final
|
||||||
legislation/questions:
|
legislation/question:
|
||||||
title: "Título"
|
title: "Título"
|
||||||
legislation/question_options:
|
question_options: Respuestas
|
||||||
|
legislation/question_option:
|
||||||
value: "Valor"
|
value: "Valor"
|
||||||
errors:
|
errors:
|
||||||
models:
|
models:
|
||||||
|
|||||||
@@ -90,6 +90,13 @@ en:
|
|||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
error: Error
|
error: Error
|
||||||
|
form:
|
||||||
|
process: Process
|
||||||
|
debate_phase: Debate phase
|
||||||
|
allegations_phase: Allegations phase
|
||||||
|
start: Start
|
||||||
|
end: End
|
||||||
|
use_markdown: Use Markdown to format the text
|
||||||
index:
|
index:
|
||||||
create: New process
|
create: New process
|
||||||
delete: Delete
|
delete: Delete
|
||||||
@@ -104,7 +111,8 @@ en:
|
|||||||
title: Create new collaborative legislation process
|
title: Create new collaborative legislation process
|
||||||
submit_button: Create process
|
submit_button: Create process
|
||||||
process:
|
process:
|
||||||
title: Collaborative legislation process title
|
title: Process
|
||||||
|
comments: Comments
|
||||||
subnav:
|
subnav:
|
||||||
info: Information
|
info: Information
|
||||||
draft_texts: Text
|
draft_texts: Text
|
||||||
@@ -113,14 +121,22 @@ en:
|
|||||||
edit:
|
edit:
|
||||||
back: Back
|
back: Back
|
||||||
submit_button: Save changes
|
submit_button: Save changes
|
||||||
|
warning: You've edited the text, don't forget to click on Save to permanently save the changes.
|
||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
error: Error
|
error: Error
|
||||||
form:
|
form:
|
||||||
fullscreen_toggle: Toggle full screen
|
fullscreen_toggle: Toggle full screen
|
||||||
|
use_markdown: Use Markdown to format the text
|
||||||
|
hints:
|
||||||
|
final_version: This version will be published as Final Result for this process. Comments won't be allowed in this version.
|
||||||
|
status:
|
||||||
|
draft: You can preview as admin, no one else can see it
|
||||||
|
published: Visible for everybody
|
||||||
index:
|
index:
|
||||||
title: Draft versions
|
title: Draft versions
|
||||||
create: Create version
|
create: Create version
|
||||||
|
delete: Delete
|
||||||
new:
|
new:
|
||||||
back: Back
|
back: Back
|
||||||
title: Create new version
|
title: Create new version
|
||||||
@@ -137,6 +153,7 @@ en:
|
|||||||
questions:
|
questions:
|
||||||
edit:
|
edit:
|
||||||
back: Back
|
back: Back
|
||||||
|
title: "Edit “%{question_title}”"
|
||||||
submit_button: Save changes
|
submit_button: Save changes
|
||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
@@ -145,8 +162,9 @@ en:
|
|||||||
add_option: Add option
|
add_option: Add option
|
||||||
index:
|
index:
|
||||||
back: Back
|
back: Back
|
||||||
title: Questions
|
title: Questions associated to this process
|
||||||
create: Create question
|
create: Create question
|
||||||
|
delete: Delete
|
||||||
new:
|
new:
|
||||||
back: Back
|
back: Back
|
||||||
title: Create new question
|
title: Create new question
|
||||||
|
|||||||
@@ -88,6 +88,13 @@ es:
|
|||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
error: Error
|
error: Error
|
||||||
|
form:
|
||||||
|
process: Proceso
|
||||||
|
debate_phase: Fase previa
|
||||||
|
allegations_phase: Fase de alegaciones
|
||||||
|
start: Inicio
|
||||||
|
end: Fin
|
||||||
|
use_markdown: Usa Markdown para formatear el texto
|
||||||
index:
|
index:
|
||||||
create: Nuevo proceso
|
create: Nuevo proceso
|
||||||
delete: Borrar
|
delete: Borrar
|
||||||
@@ -102,7 +109,8 @@ es:
|
|||||||
title: Crear nuevo proceso de legislación colaborativa
|
title: Crear nuevo proceso de legislación colaborativa
|
||||||
submit_button: Crear proceso
|
submit_button: Crear proceso
|
||||||
process:
|
process:
|
||||||
title: Título del proceso de legislación colaborativa
|
title: Proceso
|
||||||
|
comments: Comentarios
|
||||||
subnav:
|
subnav:
|
||||||
info: Información
|
info: Información
|
||||||
draft_texts: Texto
|
draft_texts: Texto
|
||||||
@@ -111,14 +119,22 @@ es:
|
|||||||
edit:
|
edit:
|
||||||
back: Volver
|
back: Volver
|
||||||
submit_button: Guardar cambios
|
submit_button: Guardar cambios
|
||||||
|
warning: Ojo, has editado el texto. Para conservar de forma permanente los cambios, no te olvides de hacer click en Guardar.
|
||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
error: Error
|
error: Error
|
||||||
form:
|
form:
|
||||||
fullscreen_toggle: Pantalla completa
|
fullscreen_toggle: Pantalla completa
|
||||||
|
use_markdown: Usa Markdown para formatear el texto
|
||||||
|
hints:
|
||||||
|
final_version: Será la versión que se publique en Publicación de Resultados. Esta versión no se podrá comentar
|
||||||
|
status:
|
||||||
|
draft: Podrás previsualizarlo como logueado, nadie más lo podrá ver
|
||||||
|
published: Será visible para todo el mundo
|
||||||
index:
|
index:
|
||||||
title: Versiones del borrador
|
title: Versiones del borrador
|
||||||
create: Crear versión
|
create: Crear versión
|
||||||
|
delete: Borrar
|
||||||
new:
|
new:
|
||||||
back: Volver
|
back: Volver
|
||||||
title: Crear nueva versión
|
title: Crear nueva versión
|
||||||
@@ -135,6 +151,7 @@ es:
|
|||||||
questions:
|
questions:
|
||||||
edit:
|
edit:
|
||||||
back: Volver
|
back: Volver
|
||||||
|
title: "Editar “%{question_title}”"
|
||||||
submit_button: Guardar cambios
|
submit_button: Guardar cambios
|
||||||
errors:
|
errors:
|
||||||
form:
|
form:
|
||||||
@@ -143,8 +160,9 @@ es:
|
|||||||
add_option: +Añadir respuesta cerrada
|
add_option: +Añadir respuesta cerrada
|
||||||
index:
|
index:
|
||||||
back: Volver
|
back: Volver
|
||||||
title: Preguntas
|
title: Preguntas asociadas a este proceso
|
||||||
create: Crear pregunta
|
create: Crear pregunta
|
||||||
|
delete: Borrar
|
||||||
new:
|
new:
|
||||||
back: Volver
|
back: Volver
|
||||||
title: Crear nueva pregunta
|
title: Crear nueva pregunta
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ feature 'Admin legislation draft versions' do
|
|||||||
fill_in 'legislation_draft_version_changelog', with: 'Version 3 changes'
|
fill_in 'legislation_draft_version_changelog', with: 'Version 3 changes'
|
||||||
fill_in 'legislation_draft_version_body', with: 'Version 3 body'
|
fill_in 'legislation_draft_version_body', with: 'Version 3 body'
|
||||||
|
|
||||||
|
within('.primary-buttons') do
|
||||||
click_button 'Create version'
|
click_button 'Create version'
|
||||||
|
end
|
||||||
|
|
||||||
expect(page).to have_content 'An example legislation process'
|
expect(page).to have_content 'An example legislation process'
|
||||||
expect(page).to have_content 'Version 3'
|
expect(page).to have_content 'Version 3'
|
||||||
|
|||||||
@@ -44,15 +44,15 @@ feature 'Admin legislation processes' do
|
|||||||
fill_in 'legislation_process_how_to_participate', with: 'You can partipate in this thing by doing...'
|
fill_in 'legislation_process_how_to_participate', with: 'You can partipate in this thing by doing...'
|
||||||
|
|
||||||
base_date = Date.current
|
base_date = Date.current
|
||||||
fill_in 'start_date', with: base_date.strftime("%d/%m/%Y")
|
fill_in 'legislation_process[start_date]', with: base_date.strftime("%d/%m/%Y")
|
||||||
fill_in 'end_date', with: (base_date + 5.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[end_date]', with: (base_date + 5.days).strftime("%d/%m/%Y")
|
||||||
|
|
||||||
fill_in 'debate_start_date', with: base_date.strftime("%d/%m/%Y")
|
fill_in 'legislation_process[debate_start_date]', with: base_date.strftime("%d/%m/%Y")
|
||||||
fill_in 'debate_end_date', with: (base_date + 2.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[debate_end_date]', with: (base_date + 2.days).strftime("%d/%m/%Y")
|
||||||
fill_in 'draft_publication_date', with: (base_date + 3.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[draft_publication_date]', with: (base_date + 3.days).strftime("%d/%m/%Y")
|
||||||
fill_in 'allegations_start_date', with: (base_date + 3.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[allegations_start_date]', with: (base_date + 3.days).strftime("%d/%m/%Y")
|
||||||
fill_in 'allegations_end_date', with: (base_date + 5.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[allegations_end_date]', with: (base_date + 5.days).strftime("%d/%m/%Y")
|
||||||
fill_in 'final_publication_date', with: (base_date + 7.days).strftime("%d/%m/%Y")
|
fill_in 'legislation_process[final_publication_date]', with: (base_date + 7.days).strftime("%d/%m/%Y")
|
||||||
|
|
||||||
click_button 'Create process'
|
click_button 'Create process'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user