diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index c88deba56..ce92b0da5 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -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? diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index d1663652c..499f9a54c 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,18 +1,124 @@
- <% if feature?(:legislation) %> -
  • "> - <%= link_to admin_legislation_processes_path do %> - - <%= t("admin.menu.legislation") %> - <% end %> -
  • - <% end %> - -
  • - - - <%= t("admin.menu.title_banners") %> - - +
  • > + <%= link_to admin_stats_path do %> + <%= t("admin.menu.stats") %> + <% end %>
  • - - <%= t("admin.menu.title_site_customization") %> + + <%= t("admin.menu.title_settings") %> -
  • diff --git a/app/views/admin/budget_investments/_investments.html.erb b/app/views/admin/budget_investments/_investments.html.erb index cf1713381..17b0315b1 100644 --- a/app/views/admin/budget_investments/_investments.html.erb +++ b/app/views/admin/budget_investments/_investments.html.erb @@ -36,21 +36,18 @@ <%= t("admin.budget_investments.index.table_id") %> - <%= t("admin.budget_investments.index.table_title") %> + <%= t("admin.budget_investments.index.table_title") %> <%= t("admin.budget_investments.index.table_supports") %> <%= t("admin.budget_investments.index.table_admin") %> - <%= t("admin.budget_investments.index.table_valuator") %> - <%= t("admin.budget_investments.index.table_valuation_group") %> + + <%= t("admin.budget_investments.index.table_valuation_group") %> + <%= t("admin.budget_investments.index.table_valuator") %> + <%= t("admin.budget_investments.index.table_geozone") %> <%= t("admin.budget_investments.index.table_feasibility") %> <%= t("admin.budget_investments.index.table_valuation_finished") %> - - <% if params[:filter] == "under_valuation" %> - <%= t("admin.budget_investments.index.table_evaluation") %> - <% else %> - <%= t("admin.budget_investments.index.table_selection") %> - <% end %> - + <%= t("admin.budget_investments.index.table_evaluation") %> + <%= t("admin.budget_investments.index.table_selection") %> <% if params[:filter] == "selected" %> <%= t("admin.budget_investments.index.table_incompatible") %> <% end %> @@ -75,20 +72,19 @@ <% if investment.administrator.present? %> - + "> <%= investment.administrator.name %> <% else %> <%= t("admin.budget_investments.index.no_admin_assigned") %> <% end %> - - <% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %> - <%= investment.assigned_valuators || no_valuators_assigned %> - <% no_valuation_groups = t("admin.budget_investments.index.no_valuation_groups") %> <%= investment.assigned_valuation_groups || no_valuation_groups %> +
    + <% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %> + <%= investment.assigned_valuators || no_valuators_assigned %> <%= investment.heading.name %> @@ -100,15 +96,15 @@ <%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %> - - <% if params[:filter] == "under_valuation" %> + <%= 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 %> + + <% 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 %> <% if params[:filter] == "selected" %> diff --git a/app/views/admin/budgets/_groups.html.erb b/app/views/admin/budgets/_groups.html.erb index 52d09338e..dbee9576c 100644 --- a/app/views/admin/budgets/_groups.html.erb +++ b/app/views/admin/budgets/_groups.html.erb @@ -1,16 +1,18 @@

    <%= t('admin.budgets.show.groups', count: groups.count) %>

    +<%= link_to t("admin.budgets.form.add_group"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#new-group-form" } %> + <% if groups.blank? %> -
    +
    <%= t("admin.budgets.form.no_groups") %> - <%= link_to t("admin.budgets.form.add_group"), "#", - class: "js-toggle-link", - data: { "toggle-selector" => "#new-group-form" } %>
    -<% 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| %>
    diff --git a/app/views/admin/budgets/_heading.html.erb b/app/views/admin/budgets/_heading.html.erb index da3139a1b..6cef11c9e 100644 --- a/app/views/admin/budgets/_heading.html.erb +++ b/app/views/admin/budgets/_heading.html.erb @@ -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), diff --git a/app/views/admin/budgets/index.html.erb b/app/views/admin/budgets/index.html.erb index 6d9c4aee7..d585a9891 100644 --- a/app/views/admin/budgets/index.html.erb +++ b/app/views/admin/budgets/index.html.erb @@ -27,8 +27,10 @@ <%= t("budgets.phase.#{budget.phase}") %> - - <%= link_to t("admin.budgets.index.budget_investments"), admin_budget_budget_investments_path(budget_id: budget.id) %> + + <%= link_to t("admin.budgets.index.budget_investments"), + admin_budget_budget_investments_path(budget_id: budget.id), + class: "button hollow medium" %> <%= link_to t("admin.budgets.index.edit_groups"), admin_budget_path(budget) %> diff --git a/app/views/admin/comments/index.html.erb b/app/views/admin/comments/index.html.erb index 4a2c39cce..3af3b7d6e 100644 --- a/app/views/admin/comments/index.html.erb +++ b/app/views/admin/comments/index.html.erb @@ -1,4 +1,5 @@

    <%= t("admin.comments.index.title") %>

    +

    <%= t("admin.shared.moderated_content") %>

    <%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %> @@ -7,7 +8,7 @@ - + diff --git a/app/views/admin/debates/index.html.erb b/app/views/admin/debates/index.html.erb index 7715e1032..c0150dd84 100644 --- a/app/views/admin/debates/index.html.erb +++ b/app/views/admin/debates/index.html.erb @@ -1,4 +1,5 @@

    <%= t("admin.debates.index.title") %>

    +

    <%= t("admin.shared.moderated_content") %>

    <%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %> @@ -9,7 +10,7 @@ - + <% @debates.each do |debate| %> diff --git a/app/views/admin/hidden_users/index.html.erb b/app/views/admin/hidden_users/index.html.erb index 6bcea253c..87d04d579 100644 --- a/app/views/admin/hidden_users/index.html.erb +++ b/app/views/admin/hidden_users/index.html.erb @@ -1,4 +1,5 @@

    <%= t("admin.hidden_users.index.title") %>

    +

    <%= t("admin.shared.moderated_content") %>

    <%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %> @@ -7,7 +8,7 @@
    <%= t("admin.shared.description") %><%= t("admin.shared.description") %> <%= t("admin.shared.actions") %>
    <%= t("admin.shared.title") %> <%= t("admin.shared.description") %><%= t("admin.shared.actions") %><%= t("admin.shared.actions") %>
    - + diff --git a/app/views/admin/legislation/processes/_form.html.erb b/app/views/admin/legislation/processes/_form.html.erb index ba055d9f3..5a0aa668d 100644 --- a/app/views/admin/legislation/processes/_form.html.erb +++ b/app/views/admin/legislation/processes/_form.html.erb @@ -81,39 +81,6 @@ -
    -
    - -
    -
    - <%= t('admin.legislation.processes.form.start') %> -
    -
    - <%= f.text_field :allegations_start_date, - label: false, - value: format_date_for_calendar_form(@process.allegations_start_date), - class: "js-calendar-full", - id: "allegations_start_date" %> -
    -
    - <%= t('admin.legislation.processes.form.end') %> -
    -
    - <%= f.text_field :allegations_end_date, - label: false, - value: format_date_for_calendar_form(@process.allegations_end_date), - class: "js-calendar-full", - id: "allegations_end_date" %> -
    -
    - <%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %> -
    - -
    -
    -
    -
    -
    @@ -147,6 +114,39 @@
    +
    +
    + +
    +
    + <%= t('admin.legislation.processes.form.start') %> +
    +
    + <%= f.text_field :allegations_start_date, + label: false, + value: format_date_for_calendar_form(@process.allegations_start_date), + class: "js-calendar-full", + id: "allegations_start_date" %> +
    +
    + <%= t('admin.legislation.processes.form.end') %> +
    +
    + <%= f.text_field :allegations_end_date, + label: false, + value: format_date_for_calendar_form(@process.allegations_end_date), + class: "js-calendar-full", + id: "allegations_end_date" %> +
    +
    + <%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %> +
    + +
    +
    +
    +
    +
    <%= f.label :draft_publication_date %> diff --git a/app/views/admin/legislation/processes/index.html.erb b/app/views/admin/legislation/processes/index.html.erb index ed96ac2c0..165865326 100644 --- a/app/views/admin/legislation/processes/index.html.erb +++ b/app/views/admin/legislation/processes/index.html.erb @@ -2,32 +2,28 @@ Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %> <% end %> -
    -
    -
    -

    <%= t("admin.legislation.processes.index.title") %>

    -
    -
    - <%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path, class: "button" %> -
    -
    +

    <%= t("admin.legislation.processes.index.title") %>

    - <%= 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? %> -

    <%= page_entries_info @processes %>

    +<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %> -
    <%= t("admin.hidden_users.index.user") %><%= t("admin.hidden_users.index.user") %> <%= t("admin.shared.actions") %>
    - - - - - - - - - - +<% if @processes.any? %> +

    <%= page_entries_info @processes %>

    + +
    <%= t("admin.legislation.processes.process.title") %><%= t("admin.legislation.processes.process.status") %><%= t("admin.legislation.processes.process.creation_date") %><%= t("admin.legislation.processes.process.comments") %>
    + + + + + + + + + + + <% @processes.each do |process| %> <% end %> - -
    <%= t("admin.legislation.processes.process.title") %><%= t("admin.legislation.processes.process.status") %><%= t("admin.legislation.processes.process.creation_date") %><%= t("admin.legislation.processes.process.comments") %><%= t("admin.actions.actions") %>
    @@ -43,14 +39,12 @@
    + + - <%= paginate @processes %> - <% else %> -
    - <%= page_entries_info @processes %> -
    - <% end %> - -
    + <%= paginate @processes %> +<% else %> +
    + <%= page_entries_info @processes %> +
    +<% end %> diff --git a/app/views/admin/legislation/questions/_form.html.erb b/app/views/admin/legislation/questions/_form.html.erb index 1843f6c3a..c0b321eed 100644 --- a/app/views/admin/legislation/questions/_form.html.erb +++ b/app/views/admin/legislation/questions/_form.html.erb @@ -1,40 +1,41 @@ <%= form_for [:admin, @process, @question], url: url, html: {data: {watch_changes: true}} do |f| %> <% if @question.errors.any? %> -
    - +
    +
    + - - <%= @question.errors.count %> - <%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %> - + + <%= @question.errors.count %> + <%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %> + +
    <% end %> -
    - <%= f.label :title %> -
    -
    - <%= f.text_area :title, rows: 5, label: false, placeholder: t('admin.legislation.questions.form.title_placeholder') %> +
    + <%= 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") %>
    -
    - <%= f.label :question_options %> +
    + <%= f.label :question_options, t("admin.legislation.questions.form.question_options") %>
    -
    + +
    <%= f.fields_for :question_options do |ff| %> <%= render 'question_option_fields', f: ff %> <% end %>
    -
    - <%= link_to_add_association t('.add_option'), f, :question_options %> + +
    + <%= link_to_add_association t("admin.legislation.questions.form.add_option"), + f, :question_options, class: "button hollow medium" %>
    -
    -
    - <%= 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")) %>
    <% end %> diff --git a/app/views/admin/legislation/questions/_question_option_fields.html.erb b/app/views/admin/legislation/questions/_question_option_fields.html.erb index ef77872fa..6afdfecad 100644 --- a/app/views/admin/legislation/questions/_question_option_fields.html.erb +++ b/app/views/admin/legislation/questions/_question_option_fields.html.erb @@ -1,11 +1,12 @@
    -
    -
    - <%= f.text_field :value, label: false, placeholder: t('admin.legislation.questions.form.value_placeholder') %> -
    -
    - <%= link_to_remove_association " #{t('.remove_option')}".html_safe, f %> +
    +
    + <%= f.text_field :value, label: false, placeholder: t("admin.legislation.questions.form.value_placeholder") %> +
    +
    + <%= link_to_remove_association " #{t(".remove_option")}".html_safe, f %> +
    diff --git a/app/views/admin/moderators/index.html.erb b/app/views/admin/moderators/index.html.erb index be067d73d..f417e96e5 100644 --- a/app/views/admin/moderators/index.html.erb +++ b/app/views/admin/moderators/index.html.erb @@ -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" %>

    <%= t("admin.moderators.index.title") %>

    diff --git a/app/views/admin/newsletters/_form.html.erb b/app/views/admin/newsletters/_form.html.erb index bf6b71d5b..994635718 100644 --- a/app/views/admin/newsletters/_form.html.erb +++ b/app/views/admin/newsletters/_form.html.erb @@ -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 } %>
    diff --git a/app/views/admin/newsletters/show.html.erb b/app/views/admin/newsletters/show.html.erb index 1a3e3c96b..64b1d7725 100644 --- a/app/views/admin/newsletters/show.html.erb +++ b/app/views/admin/newsletters/show.html.erb @@ -7,7 +7,7 @@
    -
    +
    <%= t("admin.newsletters.show.sent_at") %>
    <% if @newsletter.draft? %> <%= t("admin.newsletters.index.draft") %> @@ -15,7 +15,7 @@ <%= l @newsletter.sent_at.to_date %> <% end %>
    -
    +
    <%= t("admin.newsletters.show.from") %>
    <%= @newsletter.from %>
    @@ -24,7 +24,7 @@ <%= @newsletter.subject %>
    -
    +
    <%= t("admin.newsletters.show.segment_recipient") %>
    <%= segment_name(@newsletter.segment_recipient) %> diff --git a/app/views/admin/proposals/index.html.erb b/app/views/admin/proposals/index.html.erb index ba161ce77..0f94e276f 100644 --- a/app/views/admin/proposals/index.html.erb +++ b/app/views/admin/proposals/index.html.erb @@ -1,4 +1,5 @@

    <%= t("admin.proposals.index.title") %>

    +

    <%= t("admin.shared.moderated_content") %>

    <%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %> @@ -9,7 +10,7 @@ <%= t("admin.shared.title") %> <%= t("admin.shared.description") %> - <%= t("admin.shared.actions") %> + <%= t("admin.shared.actions") %> <% @proposals.each do |proposal| %> diff --git a/app/views/admin/site_customization/content_blocks/_form.html.erb b/app/views/admin/site_customization/content_blocks/_form.html.erb index ae9d684d4..ca89b8781 100644 --- a/app/views/admin/site_customization/content_blocks/_form.html.erb +++ b/app/views/admin/site_customization/content_blocks/_form.html.erb @@ -34,15 +34,3 @@
    <% end %> - -

    <%= t('.content_blocks_information') %>

    - -

    <%= t('.content_block_about') %>

    - -

    <%= t('.content_block_top_links_html') %>

    - -<li><a href="http://site1.com">Site 1</a></li>
    -<li><a href="http://site2.com">Site 2</a></li>
    -<li><a href="http://site3.com">Site 3</a></li>
    - -

    <%= t('.content_block_footer_html') %>

    diff --git a/app/views/admin/site_customization/content_blocks/index.html.erb b/app/views/admin/site_customization/content_blocks/index.html.erb index 455ac634f..fc762c1fd 100644 --- a/app/views/admin/site_customization/content_blocks/index.html.erb +++ b/app/views/admin/site_customization/content_blocks/index.html.erb @@ -6,25 +6,42 @@

    <%= t("admin.site_customization.content_blocks.index.title") %>

    - - - - - - - - - - <% @content_blocks.each do |content_block| %> - - - - - - <% end %> - -
    <%= t("admin.site_customization.content_blocks.content_block.name") %><%= t("admin.site_customization.content_blocks.content_block.body") %><%= t("admin.actions.actions") %>
    <%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %><%= content_block.body.html_safe %> - <%= button_to t("admin.site_customization.content_blocks.index.delete"), - admin_site_customization_content_block_path(content_block), - method: :delete, class: "button hollow alert" %> -
    +

    <%= t("admin.site_customization.content_blocks.information") %>

    + +

    <%= t("admin.site_customization.content_blocks.about") %>

    +

    <%= t("admin.site_customization.content_blocks.top_links_html") %>

    + +<li><a href="http://site1.com">Site 1</a></li>
    +<li><a href="http://site2.com">Site 2</a></li>
    +<li><a href="http://site3.com">Site 3</a></li>
    + +

    <%= t("admin.site_customization.content_blocks.footer_html") %>

    + +<% if @content_blocks.any? %> + + + + + + + + + + <% @content_blocks.each do |content_block| %> + + + + + + <% end %> + +
    <%= t("admin.site_customization.content_blocks.content_block.name") %><%= t("admin.site_customization.content_blocks.content_block.body") %><%= t("admin.actions.actions") %>
    <%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %><%= content_block.body.html_safe %> + <%= button_to t("admin.site_customization.content_blocks.index.delete"), + admin_site_customization_content_block_path(content_block), + method: :delete, class: "button hollow alert" %> +
    +<% else %> +
    + <%= t("admin.site_customization.content_blocks.no_blocks") %> +
    +<% end %> diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index 55e51a8ac..57ca27ffd 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -1,4 +1,5 @@

    <%= t("admin.tags.index.add_tag") %>

    +

    <%= t("admin.tags.index.help") %>

    <%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
    diff --git a/app/views/admin/valuators/index.html.erb b/app/views/admin/valuators/index.html.erb index 03d3fb885..01e72a648 100644 --- a/app/views/admin/valuators/index.html.erb +++ b/app/views/admin/valuators/index.html.erb @@ -1,6 +1,6 @@

    <%= t("admin.valuators.index.title") %>

    -<%= 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 %> diff --git a/app/views/layouts/management.html.erb b/app/views/layouts/management.html.erb index 7b4a5f26d..ba1f9f909 100644 --- a/app/views/layouts/management.html.erb +++ b/app/views/layouts/management.html.erb @@ -18,23 +18,23 @@
    -
    +
    - - <%= link_to setting['org_name'], management_root_path, class: "logo show-for-small-only" %> - -
    -

    - <%= link_to management_root_path do %> - <%= setting['org_name'] %> -
    <%= t("management.dashboard.index.title") %> - <% end %> -

    -
    +
    +
    diff --git a/app/views/moderation/dashboard/index.html.erb b/app/views/moderation/dashboard/index.html.erb index d621f7555..489a0e320 100644 --- a/app/views/moderation/dashboard/index.html.erb +++ b/app/views/moderation/dashboard/index.html.erb @@ -1,42 +1,3 @@ <%= link_to t("admin.dashboard.index.back", org: setting['org_name']), root_path, class: "button float-right" %>

    <%= t("moderation.dashboard.index.title") %>

    - -

    Desde aquí puedes moderar el sistema, a través de las siguientes acciones:

    - -

    -
      - -
    • - Propuestas / Debates / Comentarios -
      -

      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 título, fecha, número de denuncias (cuántos usuarios diferentes han marcado la opción de denuncia) y el texto de la Propuesta/Debate/Comentario.

      - -

      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 tres botones para realizar acciones sobre ellos:

      - -
        -
      • Ocultar: hará que esos elementos dejen de mostrarse en la web.
      • -
      • Bloquear autores: 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.
      • -
      • Marcar como revisados 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.
      • -
      - -

      Para facilitar la gestión, arriba encontramos un filtro con las secciones:

      - -
        -
      • Pendientes: 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
      • -
      • Todos: mostrando todos las Propuestas/Debates/Comentarios de la web, y no sólo los marcados como inapropiados.
      • -
      • Marcados como revisados: los que algún moderador ha marcado como revisados y por lo tanto parecen correctos.
      • -
      - -

      Es recomendable revisar regularmente la sección "pendientes".

      -
      -
    • - -
    • - Bloquear usuarios -
      -

      Un buscador nos permite encontrar cualquier usuario introduciendo su nombre de usuario o correo electrónico, y bloquearlo una vez encontrado. Al bloquearlo, el usuario no podrá volver a acceder a la web, y todas sus Propuestas/Debates/Comentarios serán ocultados y dejarán de ser visibles en la web.

      -
      -
    • -
    -
    diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml index 1ca114973..9dce0c25b 100644 --- a/config/locales/en/activerecord.yml +++ b/config/locales/en/activerecord.yml @@ -201,6 +201,7 @@ en: body: Body legislation/process: title: Process Title + summary: Summary description: Description additional_info: Additional info start_date: Start date diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 9b3023f28..5e70d609f 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -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: "Header blocks (top_links) are blocks of links that must have this format:" - content_block_footer_html: "Footer blocks 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: "Header blocks (top_links) are blocks of links that must have this format:" + footer_html: "Footer blocks 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 diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index dd53a80be..f43042052 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -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 diff --git a/config/locales/en/management.yml b/config/locales/en/management.yml index 745bdc81a..359254e3c 100644 --- a/config/locales/en/management.yml +++ b/config/locales/en/management.yml @@ -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: %{count} invitations have been sent. - title: User's invites \ No newline at end of file + title: Send invitations \ No newline at end of file diff --git a/config/locales/es/activerecord.yml b/config/locales/es/activerecord.yml index 56a7ea8b7..c5d8a63bc 100644 --- a/config/locales/es/activerecord.yml +++ b/config/locales/es/activerecord.yml @@ -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 diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 991d88249..48a2ee30c 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -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 bloques de la cabecera (top_links) son bloques de enlaces que deben crearse con este formato:" - content_block_footer_html: "Los bloques del pie (footer) 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 bloques de la cabecera (top_links) son bloques de enlaces que deben crearse con este formato:" + footer_html: "Los bloques del pie (footer) 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 diff --git a/config/locales/es/management.yml b/config/locales/es/management.yml index ac1eab472..1fb5f4a37 100644 --- a/config/locales/es/management.yml +++ b/config/locales/es/management.yml @@ -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 %{count} invitaciones. - title: Invitaciones para usuarios + title: Enviar invitaciones diff --git a/spec/features/admin/banners_spec.rb b/spec/features/admin/banners_spec.rb index d03b8f0d5..d39926cce 100644 --- a/spec/features/admin/banners_spec.rb +++ b/spec/features/admin/banners_spec.rb @@ -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 diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 4a1beaacd..1cc2c36a3 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -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 diff --git a/spec/features/admin/comments_spec.rb b/spec/features/admin/comments_spec.rb index 1f87bc105..b06b575c5 100644 --- a/spec/features/admin/comments_spec.rb +++ b/spec/features/admin/comments_spec.rb @@ -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') diff --git a/spec/features/admin/debates_spec.rb b/spec/features/admin/debates_spec.rb index 45d2040c6..012a57570 100644 --- a/spec/features/admin/debates_spec.rb +++ b/spec/features/admin/debates_spec.rb @@ -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') diff --git a/spec/features/admin/hidden_users_spec.rb b/spec/features/admin/hidden_users_spec.rb index 0f41e3573..121e52b69 100644 --- a/spec/features/admin/hidden_users_spec.rb +++ b/spec/features/admin/hidden_users_spec.rb @@ -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') diff --git a/spec/features/admin/legislation/draft_versions_spec.rb b/spec/features/admin/legislation/draft_versions_spec.rb index 6f33c265f..d2fd922e4 100644 --- a/spec/features/admin/legislation/draft_versions_spec.rb +++ b/spec/features/admin/legislation/draft_versions_spec.rb @@ -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' diff --git a/spec/features/admin/poll/booths_spec.rb b/spec/features/admin/poll/booths_spec.rb index ba7ca5cfb..d8e399f09 100644 --- a/spec/features/admin/poll/booths_spec.rb +++ b/spec/features/admin/poll/booths_spec.rb @@ -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 diff --git a/spec/features/admin/proposals_spec.rb b/spec/features/admin/proposals_spec.rb index 0c65aa899..1f48fb482 100644 --- a/spec/features/admin/proposals_spec.rb +++ b/spec/features/admin/proposals_spec.rb @@ -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') diff --git a/spec/features/budgets/budgets_spec.rb b/spec/features/budgets/budgets_spec.rb index dc50f5d8b..2400a8c6a 100644 --- a/spec/features/budgets/budgets_spec.rb +++ b/spec/features/budgets/budgets_spec.rb @@ -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 diff --git a/spec/features/emails_spec.rb b/spec/features/emails_spec.rb index d9841a160..4d009bfbc 100644 --- a/spec/features/emails_spec.rb +++ b/spec/features/emails_spec.rb @@ -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." diff --git a/spec/features/user_invites_spec.rb b/spec/features/user_invites_spec.rb index 5627b0b7e..81c02f5cc 100644 --- a/spec/features/user_invites_spec.rb +++ b/spec/features/user_invites_spec.rb @@ -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