Merge pull request #2666 from consul/admin-ui

Admin UI
This commit is contained in:
Alberto
2018-06-11 17:23:08 +02:00
committed by GitHub
41 changed files with 489 additions and 431 deletions

View File

@@ -12,12 +12,8 @@ module AdminHelper
t("#{namespace}.header.title")
end
def menu_tags?
["tags"].include?(controller_name)
end
def menu_moderated_content?
["proposals", "debates", "comments", "hidden_users"].include?(controller_name) && controller.class.parent != Admin::Legislation
["proposals", "debates", "comments", "hidden_users", "activity"].include?(controller_name) && controller.class.parent != Admin::Legislation
end
def menu_budget?
@@ -29,15 +25,15 @@ module AdminHelper
end
def menu_profiles?
%w[administrators organizations officials moderators valuators managers users activity].include?(controller_name)
%w[administrators organizations officials moderators valuators managers users].include?(controller_name)
end
def menu_banners?
["banners"].include?(controller_name)
def menu_settings?
["settings", "tags", "geozones", "images", "content_blocks"].include?(controller_name)
end
def menu_customization?
["pages", "images", "content_blocks"].include?(controller_name) || menu_homepage?
["pages", "banners"].include?(controller_name) || menu_homepage?
end
def menu_homepage?

View File

@@ -1,18 +1,124 @@
<div class="admin-sidebar" data-equalizer-watch>
<ul id="admin_menu" data-accordion-menu data-multi-open="false">
<% if feature?(:polls) %>
<li class="section-title">
<a href="#">
<span class="icon-checkmark-circle"></span>
<strong><%= t("admin.menu.title_polls") %></strong>
</a>
<ul id="polls_menu" <%= "class=is-active" if menu_polls? || controller.class.parent == Admin::Poll::Questions::Answers %>>
<li <%= "class=is-active" if controller_name == "polls" && action_name != "booth_assignments" ||
%w(booth_assignments officer_assignments recounts results).include?(controller_name) %>>
<%= link_to t("admin.menu.polls"), admin_polls_path %>
</li>
<li class="section-title">
<li <%= "class=is-active" if %w(questions answers).include?(controller_name) ||
controller.class.parent == Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
</li>
<li <%= "class=is-active" if controller_name == "officers" %>>
<%= link_to t("admin.menu.poll_officers"), admin_officers_path %>
</li>
<li <%= "class=is-active" if controller_name == "booths" &&
action_name != "available" %>>
<%= link_to t("admin.menu.poll_booths"), admin_booths_path %>
</li>
<li <%= "class=is-active" if (controller_name == "polls" && action_name == "booth_assignments") ||
(controller_name == "booth_assignments" && action_name == "manage") %>>
<%= link_to t("admin.menu.poll_booth_assignments"), booth_assignments_admin_polls_path %>
</li>
<li <%= "class=is-active" if %w(shifts booths).include?(controller_name) &&
action_name == "available" %>>
<%= link_to t("admin.menu.poll_shifts"), available_admin_booths_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:legislation) %>
<li class="section-title <%= "is-active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %>
<span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong>
<% end %>
</li>
<% end %>
<% if feature?(:budgets) %>
<li class="section-title <%= "is-active" if controller_name == "budgets" %>">
<%= link_to admin_budgets_path do %>
<span class="icon-budget"></span>
<strong><%= t("admin.menu.budgets") %></strong>
<% end %>
</li>
<% end %>
<% if feature?(:spending_proposals) %>
<li class="section-title">
<a href="#">
<span class="icon-budget"></span>
<strong><%= t("admin.menu.title_budgets") %></strong>
</a>
<ul <%= "class=is-active" if menu_budget? %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" %>>
<%= link_to t("admin.menu.spending_proposals"), admin_spending_proposals_path %>
</li>
</ul>
</li>
<% end %>
<% messages_sections = %w(newsletters emails_download) %>
<% messages_menu_active = messages_sections.include?(controller_name) %>
<li class="section-title" <%= "class=is-active" if messages_menu_active %>>
<a href="#">
<span class="icon-proposals"></span>
<strong><%= t("admin.menu.title_categories") %></strong>
<span class="icon-zip"></span>
<strong><%= t("admin.menu.emails") %></strong>
</a>
<ul <%= "class=is-active" if menu_tags? %>>
<li <%= "class=is-active" if controller_name == "tags" %>>
<%= link_to t("admin.menu.proposals_topics"), admin_tags_path %>
<ul <%= "class=is-active" if messages_menu_active %>>
<li <%= "class=is-active" if controller_name == "newsletters" %>>
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
</li>
<li <%= "class=is-active" if controller_name == "emails_download" %>>
<%= link_to t("admin.menu.emails_download"), admin_emails_download_index_path %>
</li>
</ul>
</li>
<li class="section-title">
<a href="#">
<span class="icon-edit"></span>
<strong><%= t("admin.menu.title_site_customization") %></strong>
</a>
<ul <%= "class=is-active" if menu_customization? &&
controller.class.parent != Admin::Poll::Questions::Answers %>>
<li <%= "class=active" if menu_homepage? %>>
<%= link_to t("admin.menu.site_customization.homepage"), admin_homepage_path %>
</li>
<li <%= "class=is-active" if controller_name == "pages" %>>
<%= link_to t("admin.menu.site_customization.pages"), admin_site_customization_pages_path %>
</li>
<li <%= "class=is-active" if controller_name == "banners" %>>
<%= link_to t("admin.menu.banner"), admin_banners_path %>
</li>
</ul>
</li>
<% if feature?(:signature_sheets) %>
<li class="section-title <%= "is-active" if controller_name == "signature_sheets" %>">
<%= link_to admin_signature_sheets_path do %>
<span class="icon-file-text-o"></span>
<strong><%= t("admin.menu.signature_sheets") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title">
<a href="#">
<span class="icon-eye"></span>
@@ -38,71 +144,13 @@
<li <%= "class=is-active" if controller_name == "hidden_users" %>>
<%= link_to t("admin.menu.hidden_users"), admin_hidden_users_path %>
</li>
<li <%= "class=is-active" if controller_name == "activity" %>>
<%= link_to t("admin.menu.activity"), admin_activity_path %>
</li>
</ul>
</li>
<% if feature?(:spending_proposals) %>
<li class="section-title">
<a href="#">
<span class="icon-budget"></span>
<strong><%= t("admin.menu.title_budgets") %></strong>
</a>
<ul <%= "class=is-active" if menu_budget? %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" %>>
<%= link_to t("admin.menu.spending_proposals"), admin_spending_proposals_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:polls) %>
<li class="section-title">
<a href="#">
<span class="icon-checkmark-circle"></span>
<strong><%= t("admin.menu.title_polls") %></strong>
</a>
<ul id="polls_menu" <%= "class=is-active" if menu_polls? || controller.class.parent == Admin::Poll::Questions::Answers %>>
<li <%= "class=is-active" if controller_name == "polls" && action_name != "booth_assignments" ||
%w(booth_assignments officer_assignments recounts results).include?(controller_name) %>>
<%= link_to t('admin.menu.polls'), admin_polls_path %>
</li>
<li <%= "class=is-active" if %w(questions answers).include?(controller_name) ||
controller.class.parent == Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
</li>
<li <%= "class=is-active" if controller_name == "officers" %>>
<%= link_to t('admin.menu.poll_officers'), admin_officers_path %>
</li>
<li <%= "class=is-active" if controller_name == "booths" &&
action_name != "available" %>>
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
</li>
<li <%= "class=is-active" if (controller_name == "polls" && action_name == "booth_assignments") ||
(controller_name == "booth_assignments" && action_name == "manage") %>>
<%= link_to t('admin.menu.poll_booth_assignments'), booth_assignments_admin_polls_path %>
</li>
<li <%= "class=is-active" if %w(shifts booths).include?(controller_name) &&
action_name == "available" %>>
<%= link_to t('admin.menu.poll_shifts'), available_admin_booths_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:budgets) %>
<li class="section-title <%= "is-active" if controller_name == "budgets" %>">
<%= link_to admin_budgets_path do %>
<span class="icon-budget"></span>
<strong><%= t("admin.menu.budgets") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title">
<a href="#">
<span class="icon-organizations"></span>
@@ -121,58 +169,46 @@
<%= link_to t("admin.menu.officials"), admin_officials_path %>
</li>
<li <%= "class=is-active" if %w(moderators activity).include?(controller_name) %>>
<%= link_to t('admin.menu.moderators'), admin_moderators_path%>
<li <%= "class=is-active" if controller_name == "moderators" %>>
<%= link_to t("admin.menu.moderators"), admin_moderators_path%>
</li>
<li <%= "class=is-active" if controller_name == "valuators" %>>
<%= link_to t('admin.menu.valuators'), admin_valuators_path %>
<%= link_to t("admin.menu.valuators"), admin_valuators_path %>
</li>
<li <%= "class=is-active" if controller_name == "managers" %>>
<%= link_to t('admin.menu.managers'), admin_managers_path %>
<%= link_to t("admin.menu.managers"), admin_managers_path %>
</li>
<li <%= 'class=is-active' if controller_name == 'users' %>>
<%= link_to t('admin.menu.users'), admin_users_path %>
<li <%= "class=is-active" if controller_name == "users" %>>
<%= link_to t("admin.menu.users"), admin_users_path %>
</li>
</ul>
</li>
<% if feature?(:legislation) %>
<li class="section-title <%= "is-active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %>
<span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title">
<a href="#">
<span class="icon-banner"></span>
<strong><%= t("admin.menu.title_banners") %></strong>
</a>
<ul <%= "class=is-active" if menu_banners? %>>
<li <%= "class=is-active" if controller_name == "banners" %>>
<%= link_to t("admin.menu.banner"), admin_banners_path %>
</li>
</ul>
<li class="section-title" <%= "class=is-active" if controller_name == "stats" %>>
<%= link_to admin_stats_path do %>
<span class="icon-stats"></span><%= t("admin.menu.stats") %>
<% end %>
</li>
<li class="section-title">
<a href="#">
<span class="icon-edit"></span>
<strong><%= t("admin.menu.title_site_customization") %></strong>
<span class="icon-settings"></span>
<strong><%= t("admin.menu.title_settings") %></strong>
</a>
<ul <%= "class=is-active" if menu_customization? &&
controller.class.parent != Admin::Poll::Questions::Answers %>>
<li <%= "class=active" if menu_homepage? %>>
<%= link_to t("admin.menu.site_customization.homepage"), admin_homepage_path %>
<ul <%="class=is-active" if menu_settings? %>>
<li <%= "class=is-active" if controller_name == "settings" %>>
<%= link_to t("admin.menu.settings"), admin_settings_path %>
</li>
<li <%= "class=active" if controller_name == "pages" %>>
<%= link_to t("admin.menu.site_customization.pages"), admin_site_customization_pages_path %>
<li <%= "class=is-active" if controller_name == "tags" %>>
<%= link_to t("admin.menu.proposals_topics"), admin_tags_path %>
</li>
<li <%= "class=is-active" if controller_name == "geozones" %>>
<%= link_to t("admin.menu.geozones"), admin_geozones_path %>
</li>
<li <%= "class=is-active" if controller_name == "images" &&
@@ -186,43 +222,5 @@
</ul>
</li>
<li class="section-title <%= "is-active" if controller_name == "geozones" %>">
<%= link_to admin_geozones_path do %>
<span class="icon-map-marker"></span>
<strong><%= t('admin.menu.geozones') %></strong>
<% end %>
</li>
<% if feature?(:signature_sheets) %>
<li class="section-title <%= "is-active" if controller_name == "signature_sheets" %>">
<%= link_to admin_signature_sheets_path do %>
<span class="icon-file-text-o"></span>
<strong><%= t("admin.menu.signature_sheets") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title" <%= "class=is-active" if %w(newsletters emails_download).include?(controller_name) %>>
<a href="#">
<span class="icon-zip"></span>
<strong><%= t("admin.menu.emails") %></strong>
</a>
<ul id="emails_menu" <%= "class=is-active" if %w(newsletters emails_download).include?(controller_name) %>>
<li <%= "class=is-active" if controller_name == "newsletters" %>>
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
</li>
<li <%= "class=is-active" if controller_name == "emails_download" %>>
<%= link_to t("admin.menu.emails_download"), admin_emails_download_index_path %>
</li>
</ul>
</li>
<li class="section-title <%= "active" if controller_name == "settings" %>">
<%= link_to admin_settings_path do %>
<span class="icon-settings"></span>
<strong><%= t("admin.settings.index.title") %></strong>
<% end %>
</li>
</ul>
</div>

View File

@@ -36,21 +36,18 @@
<thead>
<tr>
<th><%= t("admin.budget_investments.index.table_id") %></th>
<th><%= t("admin.budget_investments.index.table_title") %></th>
<th class="small-3"><%= t("admin.budget_investments.index.table_title") %></th>
<th><%= t("admin.budget_investments.index.table_supports") %></th>
<th><%= t("admin.budget_investments.index.table_admin") %></th>
<th><%= t("admin.budget_investments.index.table_valuator") %></th>
<th><%= t("admin.budget_investments.index.table_valuation_group") %></th>
<th>
<%= t("admin.budget_investments.index.table_valuation_group") %>
<%= t("admin.budget_investments.index.table_valuator") %>
</th>
<th><%= t("admin.budget_investments.index.table_geozone") %></th>
<th><%= t("admin.budget_investments.index.table_feasibility") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_valuation_finished") %></th>
<th class="text-center">
<% if params[:filter] == "under_valuation" %>
<%= t("admin.budget_investments.index.table_evaluation") %>
<% else %>
<%= t("admin.budget_investments.index.table_selection") %>
<% end %>
</th>
<th class="text-center"><%= t("admin.budget_investments.index.table_evaluation") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_selection") %></th>
<% if params[:filter] == "selected" %>
<th class="text-center"><%= t("admin.budget_investments.index.table_incompatible") %></th>
<% end %>
@@ -75,20 +72,19 @@
</td>
<td class="small">
<% if investment.administrator.present? %>
<span title="<%= t('admin.budget_investments.index.assigned_admin') %>">
<span title="<%= t("admin.budget_investments.index.assigned_admin") %>">
<%= investment.administrator.name %>
</span>
<% else %>
<%= t("admin.budget_investments.index.no_admin_assigned") %>
<% end %>
</td>
<td class="small">
<% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %>
<%= investment.assigned_valuators || no_valuators_assigned %>
</td>
<td class="small">
<% no_valuation_groups = t("admin.budget_investments.index.no_valuation_groups") %>
<%= investment.assigned_valuation_groups || no_valuation_groups %>
<br>
<% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %>
<%= investment.assigned_valuators || no_valuators_assigned %>
</td>
<td class="small">
<%= investment.heading.name %>
@@ -100,15 +96,15 @@
<td class="small text-center">
<%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %>
</td>
<td class="small text-center">
<% if params[:filter] == "under_valuation" %>
<td class="small text-center">
<%= form_for [:admin, investment.budget, investment], remote: true do |f| %>
<%= f.check_box :visible_to_valuators,
label: false,
class: "js-submit-on-change",
id: "budget_investment_visible_to_valuators" %>
<% end %>
<% else %>
</td>
<td class="small text-center">
<% if investment.selected? %>
<%= link_to_unless investment.budget.finished?,
t("admin.budget_investments.index.selected"),
@@ -136,7 +132,6 @@
remote: true,
class: "button small hollow expanded" %>
<% end %>
<% end %>
</td>
<% if params[:filter] == "selected" %>
<td class="small text-center">

View File

@@ -1,16 +1,18 @@
<h3 class="inline-block"><%= t('admin.budgets.show.groups', count: groups.count) %></h3>
<%= link_to t("admin.budgets.form.add_group"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#new-group-form" } %>
<% if groups.blank? %>
<div class="callout primary">
<div class="callout primary clear">
<%= t("admin.budgets.form.no_groups") %>
<strong><%= link_to t("admin.budgets.form.add_group"), "#",
class: "js-toggle-link",
data: { "toggle-selector" => "#new-group-form" } %></strong>
</div>
<% else %>
<%= link_to t("admin.budgets.form.add_group"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#new-group-form" } %>
<% end %>
<%= render 'admin/budgets/group_form', budget: @budget, group: Budget::Group.new, id: "new-group-form", button_title: t("admin.budgets.form.create_group"), css_class: '' %>
<%= render 'admin/budgets/group_form',
budget: @budget,
group: Budget::Group.new,
id: "new-group-form",
button_title: t("admin.budgets.form.create_group"),
css_class: '' %>
<% groups.each do |group| %>
<div id="<%= dom_id(group) %>">

View File

@@ -13,9 +13,6 @@
edit_admin_budget_budget_group_budget_heading_path(budget_id: group.budget.id, budget_group_id: group.id, id: heading.id),
class: "button hollow",
remote: true %>
<%= link_to t("admin.budget_investments.index.title"),
admin_budget_budget_investments_path(budget_id: group.budget.id, heading_id: heading.id),
class: "button hollow" %>
<% if heading.can_be_deleted? %>
<%= link_to t('admin.administrators.administrator.delete'),
#admin_budget_budget_group_budget_headings_path(group.budget.id, group.id),

View File

@@ -27,8 +27,10 @@
<td class="small">
<%= t("budgets.phase.#{budget.phase}") %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.budget_investments"), admin_budget_budget_investments_path(budget_id: budget.id) %>
<td>
<%= link_to t("admin.budgets.index.budget_investments"),
admin_budget_budget_investments_path(budget_id: budget.id),
class: "button hollow medium" %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.edit_groups"), admin_budget_path(budget) %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.comments.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>
@@ -7,7 +8,7 @@
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-8"><%= t("admin.shared.description") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.debates.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %>
@@ -9,7 +10,7 @@
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @debates.each do |debate| %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.hidden_users.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %>
@@ -7,7 +8,7 @@
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.hidden_users.index.user") %></th>
<th scope="col" class="small-8"><%= t("admin.hidden_users.index.user") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>

View File

@@ -81,39 +81,6 @@
</div>
</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>
<div class="row">
<div class="small-12 medium-4 column">
<label><%= t('admin.legislation.processes.form.proposals_phase') %></label>
@@ -147,6 +114,39 @@
</div>
</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>
<div class="row">
<div class="small-12 medium-4 column">
<%= f.label :draft_publication_date %>

View File

@@ -2,32 +2,28 @@
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<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>
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path,
class: "button success float-right" %>
<% if @processes.any? %>
<h3><%= page_entries_info @processes %></h3>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
<table class="stack">
<thead>
<tr>
<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></th>
</tr>
</thead>
<tbody>
<% if @processes.any? %>
<h3><%= page_entries_info @processes %></h3>
<table class="stack">
<thead>
<tr>
<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><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @processes.each do |process| %>
<tr id="<%= dom_id(process) %>">
<td class="small-12 medium-8">
@@ -43,14 +39,12 @@
</td>
</tr>
<% end %>
</tbody>
</table>
</tbody>
</table>
<%= paginate @processes %>
<% else %>
<div class="callout primary">
<%= page_entries_info @processes %>
</div>
<% end %>
</div>
<%= paginate @processes %>
<% else %>
<div class="callout primary">
<%= page_entries_info @processes %>
</div>
<% end %>

View File

@@ -1,40 +1,41 @@
<%= form_for [:admin, @process, @question], url: url, html: {data: {watch_changes: true}} do |f| %>
<% if @question.errors.any? %>
<div id="error_explanation" data-alert class="callout alert" data-closable>
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
<span aria-hidden="true">&times;</span>
</button>
<div class="small-12 medium-9 column">
<div id="error_explanation" data-alert class="callout alert" data-closable>
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
<span aria-hidden="true">&times;</span>
</button>
<strong>
<%= @question.errors.count %>
<%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %>
</strong>
<strong>
<%= @question.errors.count %>
<%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %>
</strong>
</div>
</div>
<% end %>
<div class="small-12 medium-4 column">
<%= f.label :title %>
</div>
<div class="small-12 medium-8 column">
<%= f.text_area :title, rows: 5, label: false, placeholder: t('admin.legislation.questions.form.title_placeholder') %>
<div class="small-12 medium-9 column">
<%= f.label :title, t("admin.legislation.questions.form.title") %>
<%= f.text_area :title, rows: 5, label: false, placeholder: t("admin.legislation.questions.form.title_placeholder") %>
</div>
<div class="small-12 medium-4 column">
<%= f.label :question_options %>
<div class="small-12 medium-9 column">
<%= f.label :question_options, t("admin.legislation.questions.form.question_options") %>
</div>
<div class="small-12 medium-8 column">
<div>
<%= f.fields_for :question_options do |ff| %>
<%= render 'question_option_fields', f: ff %>
<% end %>
</div>
<div class="small-12 medium-8 column">
<%= link_to_add_association t('.add_option'), f, :question_options %>
<div class="small-12 medium-9 column margin">
<%= link_to_add_association t("admin.legislation.questions.form.add_option"),
f, :question_options, class: "button hollow medium" %>
</div>
<div class="row">
<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")) %>
</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>
<% end %>

View File

@@ -1,11 +1,12 @@
<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 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>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<%= link_to t('admin.menu.activity'), admin_activity_path, class: "button hollow float-right" %>
<%= link_to t('admin.menu.activity'), admin_activity_path, class: "button float-right" %>
<h2 class="inline-block"><%= t("admin.moderators.index.title") %></h2>

View File

@@ -4,7 +4,8 @@
<%= f.select :segment_recipient, options_for_select(user_segments_options,
@newsletter[:segment_recipient]) %>
<%= f.text_field :subject %>
<%= f.text_field :from %>
<%= f.label :from, t("admin.newsletters.new.from") %>
<%= f.text_field :from, label: false %>
<%= f.cktext_area :body, ckeditor: { language: I18n.locale } %>
<div class="margin-top">

View File

@@ -7,7 +7,7 @@
<div class="small-12 column">
<div class="callout highlight">
<div class="row">
<div class="small-12 medium-4 column">
<div class="small-12 medium-2 column">
<strong><%= t("admin.newsletters.show.sent_at") %></strong><br>
<% if @newsletter.draft? %>
<%= t("admin.newsletters.index.draft") %>
@@ -15,7 +15,7 @@
<%= l @newsletter.sent_at.to_date %>
<% end %>
</div>
<div class="small-12 medium-4 column">
<div class="small-12 medium-6 column">
<strong><%= t("admin.newsletters.show.from") %></strong><br>
<%= @newsletter.from %>
</div>
@@ -24,7 +24,7 @@
<%= @newsletter.subject %>
</div>
</div>
<div class="row">
<div class="row margin-top">
<div class="small-12 column">
<strong><%= t("admin.newsletters.show.segment_recipient") %></strong><br>
<%= segment_name(@newsletter.segment_recipient) %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.proposals.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %>
@@ -9,7 +10,7 @@
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @proposals.each do |proposal| %>

View File

@@ -34,15 +34,3 @@
</div>
<% end %>
<h3><%= t('.content_blocks_information') %></h3>
<p><%= t('.content_block_about') %></p>
<p><%= t('.content_block_top_links_html') %></p>
<code>&lt;li&gt;&lt;a href=&quot;http://site1.com&quot;&gt;Site 1&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site2.com&quot;&gt;Site 2&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site3.com&quot;&gt;Site 3&lt;/a&gt;&lt;/li&gt;</code><br>
<p class="margin-top"><%= t('.content_block_footer_html') %></p>

View File

@@ -6,25 +6,42 @@
<h2 class="inline-block"><%= t("admin.site_customization.content_blocks.index.title") %></h2>
<table class="cms-page-list">
<thead>
<tr>
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td>
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_content_block_path(content_block),
method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<h3><%= t("admin.site_customization.content_blocks.information") %></h3>
<p><%= t("admin.site_customization.content_blocks.about") %></p>
<p><%= t("admin.site_customization.content_blocks.top_links_html") %></p>
<code>&lt;li&gt;&lt;a href=&quot;http://site1.com&quot;&gt;Site 1&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site2.com&quot;&gt;Site 2&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site3.com&quot;&gt;Site 3&lt;/a&gt;&lt;/li&gt;</code><br>
<p class="margin-top"><%= t("admin.site_customization.content_blocks.footer_html") %></p>
<% if @content_blocks.any? %>
<table class="cms-page-list">
<thead>
<tr>
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td>
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_content_block_path(content_block),
method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div class="callout primary">
<%= t("admin.site_customization.content_blocks.no_blocks") %>
</div>
<% end %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.tags.index.add_tag") %></h2>
<p><%= t("admin.tags.index.help") %></p>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="small-12 medium-6">

View File

@@ -1,6 +1,6 @@
<h2 class="inline-block"><%= t("admin.valuators.index.title") %></h2>
<%= link_to t("admin.valuators.index.valuator_groups"), admin_valuator_groups_path, class: "button hollow float-right" %>
<%= link_to t("admin.valuators.index.valuator_groups"), admin_valuator_groups_path, class: "button float-right" %>
<%= render "admin/shared/user_search", url: search_admin_valuators_path %>

View File

@@ -18,23 +18,23 @@
<header class="header">
<div class="top-links">
<div class="expanded row">
<%= render 'shared/locale_switcher' %>
<%= render "shared/locale_switcher" %>
</div>
</div>
<div class="expanded row">
<div class="expanded row admin-top-bar">
<div class="top-bar">
<%= link_to setting['org_name'], management_root_path, class: "logo show-for-small-only" %>
<div class="top-bar-title">
<h1>
<%= link_to management_root_path do %>
<%= setting['org_name'] %>
<br><small><%= t("management.dashboard.index.title") %></small>
<% end %>
</h1>
</div>
<div class="top-bar-left">
<ul class="menu">
<li class="menu-text">
<h1>
<%= link_to management_root_path do %>
<%= setting["org_name"] %>
<br><small><%= t("management.dashboard.index.title") %></small>
<% end %>
</h1>
</li>
</ul>
</div>
</div>
</div>

View File

@@ -1,42 +1,3 @@
<%= link_to t("admin.dashboard.index.back", org: setting['org_name']), root_path, class: "button float-right" %>
<h2 class="inline-block"><%= t("moderation.dashboard.index.title") %></h2>
<p>Desde aquí puedes moderar el sistema, a través de las siguientes acciones:<p>
<div class="small-12 medium-9">
<ul class="accordion" data-accordion data-multi-expand="true" data-allow-all-closed="true">
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">Propuestas / Debates / Comentarios</a>
<div class="accordion-content" data-tab-content>
<p>Cuando un usuario marca en una Propuesta/Debate/Comentario la opción de "denunciar como inapropiado", aparecerá en esta lista. Respecto a cada uno aparecerá el <em>título, fecha, número de denuncias</em> (cuántos usuarios diferentes han marcado la opción de denuncia) y el <em>texto de la Propuesta/Debate/Comentario</em>.</p>
<p>A la derecha de cada elemento aparece una caja que podemos marcar para seleccionar todos los que queramos de la lista. Una vez seleccionados uno o varios, encontramos al final de la página <strong>tres botones para realizar acciones</strong> sobre ellos:</p>
<ul>
<li><strong>Ocultar</strong>: hará que esos elementos dejen de mostrarse en la web.</li>
<li><strong>Bloquear autores</strong>: hará que el autor de ese elemento deje de poder acceder a la web, y que además todos las Propuestas/Debates/Comentarios de ese usuario dejen de mostrarse en la web.</li>
<li><strong>Marcar como revisados</strong> cuando consideramos que esos elementos no deben ser moderados, que su contenido es correcto, y que por lo tanto deben dejar de ser mostrados en esta lista de elementos inapropiados.</li>
</ul>
<p>Para facilitar la gestión, arriba encontramos un <strong>filtro</strong> con las secciones:</p>
<ul>
<li><strong>Pendientes</strong>: las Propuestas/Debates/Comentarios sobre los que todavía no se ha pulsado "ocultar", "bloquear" o "marcar como revisados", y que por lo tanto deberían ser revisados todavía</li>
<li><strong>Todos</strong>: mostrando todos las Propuestas/Debates/Comentarios de la web, y no sólo los marcados como inapropiados.</li>
<li><strong>Marcados como revisados</strong>: los que algún moderador ha marcado como revisados y por lo tanto parecen correctos.</li>
</ul>
<p><em>Es recomendable revisar regularmente la sección "pendientes".</em></p>
</div>
</li>
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">Bloquear usuarios</a>
<div class="accordion-content" data-tab-content>
<p>Un buscador nos permite encontrar cualquier usuario introduciendo su <em>nombre de usuario o correo electrónico</em>, y bloquearlo una vez encontrado. Al bloquearlo, <strong>el usuario no podrá volver a acceder a la web</strong>, y todas sus Propuestas/Debates/Comentarios serán ocultados y dejarán de ser visibles en la web.</p>
</div>
</li>
</ul>
</div>

View File

@@ -201,6 +201,7 @@ en:
body: Body
legislation/process:
title: Process Title
summary: Summary
description: Description
additional_info: Additional info
start_date: Start date

View File

@@ -5,7 +5,7 @@ en:
actions:
actions: Actions
confirm: Are you sure?
confirm_hide: Confirm
confirm_hide: Confirm moderation
hide: Hide
hide_author: Hide author
restore: Restore
@@ -71,7 +71,7 @@ en:
filters:
open: Open
finished: Finished
budget_investments: See budget investments
budget_investments: Manage projects
table_name: Name
table_phase: Phase
table_investments: Investments
@@ -332,7 +332,7 @@ en:
enabled: Enabled
process: Process
debate_phase: Debate phase
allegations_phase: Allegations phase
allegations_phase: Drafting phase
proposals_phase: Proposals phase
start: Start
end: End
@@ -364,7 +364,7 @@ en:
status_planned: Planned
subnav:
info: Information
draft_texts: Text
draft_texts: Drafting
questions: Debate
proposals: Proposals
proposals:
@@ -439,8 +439,10 @@ en:
error: Error
form:
add_option: Add option
title_placeholder: Add a title
title: Question
title_placeholder: Add question
value_placeholder: Add a closed answer
question_options: "Possible answers (optional, by default open answers)"
index:
back: Back
title: Questions associated to this process
@@ -472,7 +474,7 @@ en:
activity: Moderator activity
admin: Admin menu
banner: Manage banners
poll_questions: Poll questions
poll_questions: Questions
proposals_topics: Proposals topics
budgets: Participatory budgets
geozones: Manage geozones
@@ -494,7 +496,7 @@ en:
poll_shifts: Manage shifts
officials: Officials
organizations: Organisations
settings: Configuration settings
settings: Global settings
spending_proposals: Spending proposals
stats: Statistics
signature_sheets: Signature Sheets
@@ -503,13 +505,12 @@ en:
pages: Custom Pages
images: Custom Images
content_blocks: Custom content blocks
title_categories: Categories
title_moderated_content: Moderated content
title_budgets: Budgets
title_polls: Polls
title_profiles: Profiles
title_banners: Banners
title_site_customization: Site customization
title_settings: Settings
title_site_customization: Site content
legislation: Collaborative Legislation
users: Users
administrators:
@@ -564,6 +565,7 @@ en:
empty_newsletters: There are no newsletters to show
new:
title: New newsletter
from: E-mail address that will appear as sending the newsletter
edit:
title: Edit newsletter
show:
@@ -573,7 +575,7 @@ en:
sent_at: Sent at
subject: Subject
segment_recipient: Recipients
from: From
from: E-mail address that will appear as sending the newsletter
body: Email content
body_help_text: This is how the users will see the email
send_alert: Are you sure you want to send this newsletter to %{n} users?
@@ -721,8 +723,8 @@ en:
table_location: "Location"
polls:
index:
title: "List of polls"
no_polls: "There are no polls."
title: "List of active polls"
no_polls: "There are no polls coming up."
create: "Create poll"
name: "Name"
dates: "Dates"
@@ -834,8 +836,8 @@ en:
title: "Results by booth"
booths:
index:
title: "List of booths"
no_booths: "There are no booths."
title: "List of active booths"
no_booths: "There are no active booths for any upcoming poll."
add_booth: "Add booth"
name: "Name"
location: "Location"
@@ -963,6 +965,7 @@ en:
description: Description
image: Image
show_image: Show image
moderated_content: "Check the content moderated by the moderators, and confirm if the moderation has been done correctly."
spending_proposals:
index:
geozone_filter_all: All zones
@@ -1125,6 +1128,7 @@ en:
add_tag: Add a new proposal topic
title: Proposal topics
topic: Topic
help: "When a user creates a proposal, the following topics are suggested as default tags."
name:
placeholder: Type the name of the topic
users:
@@ -1147,11 +1151,11 @@ en:
title: Incomplete verifications
site_customization:
content_blocks:
form:
content_blocks_information: Information about content blocks
content_block_about: You can create HTML content blocks to be inserted in the header or the footer of your CONSUL.
content_block_top_links_html: "<strong>Header blocks (top_links)</strong> are blocks of links that must have this format:"
content_block_footer_html: "<strong>Footer blocks</strong> can have any format and can be used to insert Javascript, CSS or custom HTML."
information: Information about content blocks
about: You can create HTML content blocks to be inserted in the header or the footer of your CONSUL.
top_links_html: "<strong>Header blocks (top_links)</strong> are blocks of links that must have this format:"
footer_html: "<strong>Footer blocks</strong> can have any format and can be used to insert Javascript, CSS or custom HTML."
no_blocks: "There are no content blocks."
create:
notice: Content block created successfully
error: Content block couldn't be created

View File

@@ -30,14 +30,14 @@ en:
unselected: See investments not selected for balloting phase
phase:
drafting: Draft (Not visible to the public)
informing: Informing
informing: Information
accepting: Accepting projects
reviewing: Reviewing projects
selecting: Selecting projects
valuating: Valuating projects
publishing_prices: Publishing projects prices
balloting: Balloting projects
reviewing_ballots: Reviewing Ballots
balloting: Voting projects
reviewing_ballots: Reviewing voting
finished: Finished budget
index:
title: Participatory budgets

View File

@@ -70,7 +70,7 @@ en:
support_budget_investments: Support Budget Investments
users: Users
edit_user_accounts: Edit user account
user_invites: User's invites
user_invites: Send invitations
permissions:
create_proposals: Create proposals
debates: Engage in debates
@@ -140,8 +140,8 @@ en:
new:
label: Emails
info: "Enter the emails separated by commas (',')"
submit: Send invites
title: User's invites
submit: Send invitations
title: Send invitations
create:
success_html: <strong>%{count} invitations</strong> have been sent.
title: User's invites
title: Send invitations

View File

@@ -201,6 +201,7 @@ es:
body: Contenido
legislation/process:
title: Título del proceso
summary: Resumen
description: En qué consiste
additional_info: Información adicional
start_date: Fecha de inicio del proceso

View File

@@ -5,7 +5,7 @@ es:
actions:
actions: Acciones
confirm: '¿Estás seguro?'
confirm_hide: Confirmar
confirm_hide: Confirmar moderación
hide: Ocultar
hide_author: Bloquear al autor
restore: Volver a mostrar
@@ -71,7 +71,7 @@ es:
filters:
open: Abiertos
finished: Terminados
budget_investments: Ver proyectos de gasto
budget_investments: Gestionar proyectos de gasto
table_name: Nombre
table_phase: Fase
table_investments: Proyectos de gasto
@@ -331,8 +331,8 @@ es:
form:
enabled: Habilitado
process: Proceso
debate_phase: Fase previa
allegations_phase: Fase de alegaciones
debate_phase: Fase de debate
allegations_phase: Fase de redacción
proposals_phase: Fase de propuestas
start: Inicio
end: Fin
@@ -364,7 +364,7 @@ es:
status_planned: Próximamente
subnav:
info: Información
draft_texts: Texto
draft_texts: Redacción
questions: Debate
proposals: Propuestas
proposals:
@@ -439,8 +439,10 @@ es:
error: Error
form:
add_option: +Añadir respuesta cerrada
title: Pregunta
title_placeholder: Escribe un título a la pregunta
value_placeholder: Escribe una respuesta cerrada
question_options: "Posibles respuestas (opcional, por defecto respuestas abiertas)"
index:
back: Volver
title: Preguntas asociadas a este proceso
@@ -472,7 +474,7 @@ es:
activity: Actividad de moderadores
admin: Menú de administración
banner: Gestionar banners
poll_questions: Preguntas ciudadanas
poll_questions: Preguntas
proposals_topics: Temas de propuestas
budgets: Presupuestos participativos
geozones: Gestionar distritos
@@ -503,13 +505,12 @@ es:
pages: Personalizar páginas
images: Personalizar imágenes
content_blocks: Personalizar bloques
title_categories: Categorías
title_moderated_content: Contenido moderado
title_budgets: Presupuestos
title_polls: Votaciones
title_profiles: Perfiles
title_banners: Banners
title_site_customization: Personalizar sitio
title_settings: Configuración
title_site_customization: Contenido del sitio
legislation: Legislación colaborativa
users: Usuarios
administrators:
@@ -564,6 +565,7 @@ es:
empty_newsletters: No hay newsletters para mostrar
new:
title: Nueva newsletter
from: Dirección de correo electrónico que aparecerá como remitente de la newsletter
edit:
title: Editar newsletter
show:
@@ -573,7 +575,7 @@ es:
sent_at: Enviado
subject: Asunto
segment_recipient: Destinatarios
from: Enviado por
from: Dirección de correo electrónico que aparecerá como remitente de la newsletter
body: Contenido del email
body_help_text: Así es como verán el email los usuarios
send_alert: ¿Estás seguro/a de que quieres enviar esta newsletter a %{n} usuarios?
@@ -721,8 +723,8 @@ es:
table_location: "Ubicación"
polls:
index:
title: "Listado de votaciones"
no_polls: "No hay ninguna votación."
title: "Listado de votaciones activas"
no_polls: "No hay ninguna votación próximamente."
create: "Crear votación"
name: "Nombre"
dates: "Fechas"
@@ -834,8 +836,8 @@ es:
title: "Resultados por urna"
booths:
index:
title: "Lista de urnas"
no_booths: "No hay urnas."
title: "Listado de urnas activas"
no_booths: "No hay urnas activas para ninguna votación próxima."
add_booth: "Añadir urna"
name: "Nombre"
location: "Ubicación"
@@ -963,6 +965,7 @@ es:
description: Descripción
image: Imagen
show_image: Mostrar imagen
moderated_content: "Revisa el contenido moderado por los moderadores, y confirma si la moderación se ha realizado correctamente."
spending_proposals:
index:
geozone_filter_all: Todos los ámbitos de actuación
@@ -1125,6 +1128,7 @@ es:
add_tag: Añade un nuevo tema de propuesta
title: Temas de propuesta
topic: Tema
help: "Cuando un usuario crea una propuesta se le sugieren como etiquetas por defecto los siguientes temas."
name:
placeholder: Escribe el nombre del tema
users:
@@ -1147,11 +1151,11 @@ es:
title: Verificaciones incompletas
site_customization:
content_blocks:
form:
content_blocks_information: Información sobre los bloques de texto
content_block_about: Puedes crear bloques de HTML que se incrustarán en la cabecera o el pie de tu CONSUL.
content_block_top_links_html: "Los <strong>bloques de la cabecera (top_links)</strong> son bloques de enlaces que deben crearse con este formato:"
content_block_footer_html: "Los <strong>bloques del pie (footer)</strong> pueden tener cualquier formato y se pueden utilizar para guardar huellas Javascript, contenido CSS o contenido HTML personalizado."
information: Información sobre los bloques de texto
about: Puedes crear bloques de HTML que se incrustarán en la cabecera o el pie de tu CONSUL.
top_links_html: "Los <strong>bloques de la cabecera (top_links)</strong> son bloques de enlaces que deben crearse con este formato:"
footer_html: "Los <strong>bloques del pie (footer)</strong> pueden tener cualquier formato y se pueden utilizar para guardar huellas Javascript, contenido CSS o contenido HTML personalizado."
no_blocks: "No hay bloques de texto."
create:
notice: Bloque creado correctamente
error: No se ha podido crear el bloque

View File

@@ -70,7 +70,7 @@ es:
support_budget_investments: Apoyar proyectos de gasto
users: Usuarios
edit_user_accounts: Editar cuenta de usuario
user_invites: Invitaciones para usuarios
user_invites: Enviar invitaciones
permissions:
create_proposals: Crear nuevas propuestas
debates: Participar en debates
@@ -141,7 +141,7 @@ es:
label: Emails
info: "Introduce los emails separados por comas (',')"
submit: Enviar invitaciones
title: Invitaciones para usuarios
title: Enviar invitaciones
create:
success_html: Se han enviado <strong>%{count} invitaciones</strong>.
title: Invitaciones para usuarios
title: Enviar invitaciones

View File

@@ -114,7 +114,7 @@ feature 'Admin banners magement' do
visit admin_root_path
within('#side_menu') do
click_link "Banners"
click_link "Site content"
click_link "Manage banners"
end

View File

@@ -1056,7 +1056,7 @@ feature 'Admin budget investments' do
visit admin_budget_budget_investments_path(budget)
expect(page).not_to have_css("#budget_investment_visible_to_valuators")
expect(page).to have_css("#budget_investment_visible_to_valuators")
within('#filter-subnav') { click_link 'Under valuation' }
@@ -1127,4 +1127,94 @@ feature 'Admin budget investments' do
end
end
context "Mark as visible to valuators" do
let(:valuator) { create(:valuator) }
let(:admin) { create(:administrator) }
let(:group) { create(:budget_group, budget: budget) }
let(:heading) { create(:budget_heading, group: group) }
let(:investment1) { create(:budget_investment, heading: heading) }
let(:investment2) { create(:budget_investment, heading: heading) }
scenario "Mark as visible to valuator", :js do
investment1.valuators << valuator
investment2.valuators << valuator
investment1.update(administrator: admin)
investment2.update(administrator: admin)
visit admin_budget_budget_investments_path(budget)
within("#budget_investment_#{investment1.id}") do
check "budget_investment_visible_to_valuators"
end
visit admin_budget_budget_investments_path(budget)
within('#filter-subnav') { click_link 'Under valuation' }
within("#budget_investment_#{investment1.id}") do
expect(find("#budget_investment_visible_to_valuators")).to be_checked
end
end
scenario "Unmark as visible to valuator", :js do
budget.update(phase: 'valuating')
valuator = create(:valuator)
admin = create(:administrator)
group = create(:budget_group, budget: budget)
heading = create(:budget_heading, group: group)
investment1 = create(:budget_investment, heading: heading, visible_to_valuators: true)
investment2 = create(:budget_investment, heading: heading, visible_to_valuators: true)
investment1.valuators << valuator
investment2.valuators << valuator
investment1.update(administrator: admin)
investment2.update(administrator: admin)
visit admin_budget_budget_investments_path(budget)
within('#filter-subnav') { click_link 'Under valuation' }
within("#budget_investment_#{investment1.id}") do
uncheck "budget_investment_visible_to_valuators"
end
visit admin_budget_budget_investments_path(budget)
within("#budget_investment_#{investment1.id}") do
expect(find("#budget_investment_visible_to_valuators")).not_to be_checked
end
end
scenario "Showing the valuating checkbox" do
investment1 = create(:budget_investment, budget: budget, visible_to_valuators: true)
investment2 = create(:budget_investment, budget: budget, visible_to_valuators: false)
investment1.valuators << create(:valuator)
investment2.valuators << create(:valuator)
investment2.valuators << create(:valuator)
investment1.update(administrator: create(:administrator))
investment2.update(administrator: create(:administrator))
visit admin_budget_budget_investments_path(budget)
expect(page).to have_css("#budget_investment_visible_to_valuators")
within('#filter-subnav') { click_link 'Under valuation' }
within("#budget_investment_#{investment1.id}") do
valuating_checkbox = find('#budget_investment_visible_to_valuators')
expect(valuating_checkbox).to be_checked
end
within("#budget_investment_#{investment2.id}") do
valuating_checkbox = find('#budget_investment_visible_to_valuators')
expect(valuating_checkbox).not_to be_checked
end
end
end
end

View File

@@ -81,7 +81,7 @@ feature 'Admin comments' do
comment = create(:comment, :hidden, body: 'SPAM')
visit admin_comments_path
click_link 'Confirm'
click_link 'Confirm moderation'
expect(page).not_to have_content(comment.body)
click_link('Confirmed')

View File

@@ -33,7 +33,7 @@ feature 'Admin debates' do
debate = create(:debate, :hidden)
visit admin_debates_path
click_link 'Confirm'
click_link 'Confirm moderation'
expect(page).not_to have_content(debate.title)
click_link('Confirmed')

View File

@@ -38,7 +38,7 @@ feature 'Admin hidden users' do
user = create(:user, :hidden)
visit admin_hidden_users_path
click_link 'Confirm'
click_link 'Confirm moderation'
expect(page).not_to have_content(user.username)
click_link('Confirmed')

View File

@@ -26,7 +26,7 @@ feature 'Admin legislation draft versions' do
visit admin_legislation_processes_path(filter: 'all')
click_link 'An example legislation process'
click_link 'Text'
click_link 'Drafting'
click_link 'Version 1'
expect(page).to have_content(draft_version.title)
@@ -49,7 +49,7 @@ feature 'Admin legislation draft versions' do
expect(page).to have_content 'An example legislation process'
click_link 'An example legislation process'
click_link 'Text'
click_link 'Drafting'
click_link 'Create version'
@@ -82,7 +82,7 @@ feature 'Admin legislation draft versions' do
expect(page).to have_content 'An example legislation process'
click_link 'An example legislation process'
click_link 'Text'
click_link 'Drafting'
click_link 'Version 1'

View File

@@ -14,7 +14,7 @@ feature 'Admin booths' do
click_link "Booths location"
end
expect(page).to have_content "There are no booths"
expect(page).to have_content "There are no active booths for any upcoming poll."
end
scenario 'Index' do

View File

@@ -45,7 +45,7 @@ feature 'Admin proposals' do
proposal = create(:proposal, :hidden)
visit admin_proposals_path
click_link 'Confirm'
click_link 'Confirm moderation'
expect(page).not_to have_content(proposal.title)
click_link('Confirmed')

View File

@@ -22,7 +22,7 @@ feature 'Budgets' do
expect(page).to have_content(budget.name)
expect(page).to have_content(budget.description)
expect(page).to have_content('Actual phase')
expect(page).to have_content('Informing')
expect(page).to have_content('Information')
expect(page).to have_link('Help with participatory budgets')
expect(page).to have_link('See all phases')
end

View File

@@ -336,7 +336,7 @@ feature 'Emails' do
visit new_management_user_invite_path
fill_in "emails", with: " john@example.com, ana@example.com,isable@example.com "
click_button "Send invites"
click_button "Send invitations"
expect(page).to have_content "3 invitations have been sent."

View File

@@ -10,7 +10,7 @@ feature 'User invites' do
visit new_management_user_invite_path
fill_in "emails", with: "john@example.com, ana@example.com, isable@example.com"
click_button "Send invites"
click_button "Send invitations"
expect(page).to have_content "3 invitations have been sent."
end