diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 5564a5c62..53439b281 100644 Binary files a/app/assets/fonts/icons.eot and b/app/assets/fonts/icons.eot differ diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg index 0d94e5751..a0c854397 100644 --- a/app/assets/fonts/icons.svg +++ b/app/assets/fonts/icons.svg @@ -65,4 +65,9 @@ + + + + + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index 6af0797fb..3bd8e9dec 100644 Binary files a/app/assets/fonts/icons.ttf and b/app/assets/fonts/icons.ttf differ diff --git a/app/assets/fonts/icons.woff b/app/assets/fonts/icons.woff index 7f8f3c95e..0ac7f8f19 100644 Binary files a/app/assets/fonts/icons.woff and b/app/assets/fonts/icons.woff differ diff --git a/app/assets/images/help/help_icon_budgets.png b/app/assets/images/help/help_icon_budgets.png index fc5e3022f..f986a939c 100644 Binary files a/app/assets/images/help/help_icon_budgets.png and b/app/assets/images/help/help_icon_budgets.png differ diff --git a/app/assets/images/help/help_icon_polls.png b/app/assets/images/help/help_icon_polls.png index b7f7cf479..f13363934 100644 Binary files a/app/assets/images/help/help_icon_polls.png and b/app/assets/images/help/help_icon_polls.png differ diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index 96eb10a0d..b9f2735b4 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -268,3 +268,23 @@ .icon-search-minus::before { content: '\35'; } + +.icon-calculator::before { + content: '\36'; +} + +.icon-map-marker::before { + content: '\37'; +} + +.icon-user-plus::before { + content: '\38'; +} + +.icon-file-text-o::before { + content: '\39'; +} + +.icon-file-text::before { + content: '\21'; +} diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 9f8c8c13e..fe1c5f450 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -55,8 +55,4 @@ module WelcomeHelper end end - def highlight_background - (feature?("user.recommendations") && current_user) ? "highlight" : "" - end - end diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 21dc7cffb..f2af2c116 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -136,7 +136,7 @@ <% if feature?(:legislation) %>
  • "> <%= link_to admin_legislation_processes_path do %> - + <%= t("admin.menu.legislation") %> <% end %>
  • @@ -156,7 +156,7 @@
  • - + <%= t("admin.menu.title_site_customization") %>
      "> <%= link_to admin_geozones_path do %> + <%= t('admin.menu.geozones') %> <% end %> @@ -185,6 +186,7 @@ <% if feature?(:signature_sheets) %>
    • "> <%= link_to admin_signature_sheets_path do %> + <%= t("admin.menu.signature_sheets") %> <% end %>
    • diff --git a/app/views/admin/comments/index.html.erb b/app/views/admin/comments/index.html.erb index 75493857c..e07487bcf 100644 --- a/app/views/admin/comments/index.html.erb +++ b/app/views/admin/comments/index.html.erb @@ -2,34 +2,46 @@ <%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %> -

      <%= page_entries_info @comments %>

      +<% if @comments.any? %> +

      <%= page_entries_info @comments %>

      - - <% @comments.each do |comment| %> - - - + + <% end %> + +
      - <%= text_with_links comment.body %>
      - <% if comment.commentable.hidden? %> - (<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>) - <% else %> - <%= link_to comment.commentable.title, comment.commentable %> - <% end %> -
      - <%= link_to t("admin.actions.restore"), - restore_admin_comment_path(comment, request.query_parameters), - method: :put, - data: { confirm: t("admin.actions.confirm") }, - class: "button hollow on-hover-block" %> - <% unless comment.confirmed_hide? %> - <%= link_to t("admin.actions.confirm_hide"), - confirm_hide_admin_comment_path(comment, request.query_parameters), + + + + + + + <% @comments.each do |comment| %> + + + - - <% end %> -
      <%= t("admin.shared.description") %><%= t("admin.shared.actions") %>
      + <%= text_with_links comment.body %>
      + <% if comment.commentable.hidden? %> + (<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>) + <% else %> + <%= link_to comment.commentable.title, comment.commentable %> + <% end %> +
      + <%= link_to t("admin.actions.restore"), + restore_admin_comment_path(comment, request.query_parameters), method: :put, - class: "button hollow warning on-hover-block" %> - <% end %> -
      + data: { confirm: t("admin.actions.confirm") }, + class: "button hollow warning" %> + <% unless comment.confirmed_hide? %> + <%= link_to t("admin.actions.confirm_hide"), + confirm_hide_admin_comment_path(comment, request.query_parameters), + method: :put, + class: "button" %> + <% end %> +
      -<%= paginate @comments %> + <%= paginate @comments %> +<% else %> +
      + <%= t("admin.comments.index.no_hidden_comments") %> +
      +<% end %> diff --git a/app/views/admin/debates/index.html.erb b/app/views/admin/debates/index.html.erb index 987aa6e72..7715e1032 100644 --- a/app/views/admin/debates/index.html.erb +++ b/app/views/admin/debates/index.html.erb @@ -2,33 +2,47 @@ <%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %> -

      <%= page_entries_info @debates %>

      +<% if @debates.any? %> +

      <%= page_entries_info @debates %>

      - - <% @debates.each do |debate| %> - - - + + <% end %> + +
      - <%= debate.title %> -
      -
      - <%= debate.description %> -
      -
      - <%= link_to t("admin.actions.restore"), - restore_admin_debate_path(debate, request.query_parameters), - method: :put, - data: { confirm: t("admin.actions.confirm") }, - class: "button hollow on-hover" %> - <% unless debate.confirmed_hide? %> - <%= link_to t("admin.actions.confirm_hide"), - confirm_hide_admin_debate_path(debate, request.query_parameters), + + + + + + + + <% @debates.each do |debate| %> + + + + - - <% end %> -
      <%= t("admin.shared.title") %><%= t("admin.shared.description") %><%= t("admin.shared.actions") %>
      + <%= debate.title %> + +
      + <%= debate.description %> +
      +
      + <%= link_to t("admin.actions.restore"), + restore_admin_debate_path(debate, request.query_parameters), method: :put, - class: "button hollow warning on-hover" %> - <% end %> -
      + data: { confirm: t("admin.actions.confirm") }, + class: "button hollow warning" %> + <% unless debate.confirmed_hide? %> + <%= link_to t("admin.actions.confirm_hide"), + confirm_hide_admin_debate_path(debate, request.query_parameters), + method: :put, + class: "button" %> + <% end %> +
      -<%= paginate @debates %> + <%= paginate @debates %> +<% else %> +
      + <%= t("admin.debates.index.no_hidden_debates") %> +
      +<% end %> diff --git a/app/views/admin/hidden_users/index.html.erb b/app/views/admin/hidden_users/index.html.erb index 21bf016e4..6bcea253c 100644 --- a/app/views/admin/hidden_users/index.html.erb +++ b/app/views/admin/hidden_users/index.html.erb @@ -2,32 +2,42 @@ <%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %> -

      <%= page_entries_info @users %>

      +<% if @users.any? %> +

      <%= page_entries_info @users %>

      - -<% @users.each do |user| %> - - +
      -

      <%= link_to user.name, admin_hidden_user_path(user) %>

      -
      + + + + + + <% @users.each do |user| %> + + - - + + + <% end %> + +
      <%= t("admin.hidden_users.index.user") %><%= t("admin.shared.actions") %>
      +

      <%= link_to user.name, admin_hidden_user_path(user) %>

      +
      - <%= link_to t("admin.actions.restore"), - restore_admin_hidden_user_path(user, request.query_parameters), - method: :put, - data: { confirm: t("admin.actions.confirm") }, - class: "button hollow on-hover" %> - <% unless user.confirmed_hide? %> - <%= link_to t("admin.actions.confirm_hide"), - confirm_hide_admin_hidden_user_path(user, request.query_parameters), - method: :put, - class: "button hollow warning on-hover" %> - <% end %> -
      + <%= link_to t("admin.actions.restore"), + restore_admin_hidden_user_path(user, request.query_parameters), + method: :put, + data: { confirm: t("admin.actions.confirm") }, + class: "button hollow warning" %> + <% unless user.confirmed_hide? %> + <%= link_to t("admin.actions.confirm_hide"), + confirm_hide_admin_hidden_user_path(user, request.query_parameters), + method: :put, + class: "button" %> + <% end %> +
      + + <%= paginate @users %> +<% else %> +
      + <%= t("admin.hidden_users.index.no_hidden_users") %> +
      <% end %> - - -<%= paginate @users %> - - diff --git a/app/views/admin/legislation/processes/_subnav.html.erb b/app/views/admin/legislation/processes/_subnav.html.erb index 97640c4f4..f8e9bba56 100644 --- a/app/views/admin/legislation/processes/_subnav.html.erb +++ b/app/views/admin/legislation/processes/_subnav.html.erb @@ -1,11 +1,31 @@ diff --git a/app/views/admin/proposals/index.html.erb b/app/views/admin/proposals/index.html.erb index d929843b1..ba161ce77 100644 --- a/app/views/admin/proposals/index.html.erb +++ b/app/views/admin/proposals/index.html.erb @@ -2,41 +2,55 @@ <%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %> -

      <%= page_entries_info @proposals %>

      +<% if @proposals.any? %> +

      <%= page_entries_info @proposals %>

      - - <% @proposals.each do |proposal| %> - - - + + <% end %> + +
      - <%= proposal.title %> -
      -
      -

      <%= proposal.summary %>

      - <%= proposal.description %> - <% if proposal.external_url.present? %> -

      <%= text_with_links proposal.external_url %>

      - <% end %> - <% if proposal.video_url.present? %> -

      <%= text_with_links proposal.video_url %>

      - <% end %> -

      <%= proposal.question %>

      -
      -
      - <%= link_to t("admin.actions.restore"), - restore_admin_proposal_path(proposal, request.query_parameters), - method: :put, - data: { confirm: t("admin.actions.confirm") }, - class: "button hollow on-hover-block" %> - <% unless proposal.confirmed_hide? %> - <%= link_to t("admin.actions.confirm_hide"), - confirm_hide_admin_proposal_path(proposal, request.query_parameters), + + + + + + + + <% @proposals.each do |proposal| %> + + + + - - <% end %> -
      <%= t("admin.shared.title") %><%= t("admin.shared.description") %><%= t("admin.shared.actions") %>
      + <%= proposal.title %> + +
      +

      <%= proposal.summary %>

      + <%= proposal.description %> + <% if proposal.external_url.present? %> +

      <%= text_with_links proposal.external_url %>

      + <% end %> + <% if proposal.video_url.present? %> +

      <%= text_with_links proposal.video_url %>

      + <% end %> +

      <%= proposal.question %>

      +
      +
      + <%= link_to t("admin.actions.restore"), + restore_admin_proposal_path(proposal, request.query_parameters), method: :put, - class: "button hollow warning on-hover-block" %> - <% end %> -
      + data: { confirm: t("admin.actions.confirm") }, + class: "button hollow warning" %> + <% unless proposal.confirmed_hide? %> + <%= link_to t("admin.actions.confirm_hide"), + confirm_hide_admin_proposal_path(proposal, request.query_parameters), + method: :put, + class: "button" %> + <% end %> +
      -<%= paginate @proposals %> + <%= paginate @proposals %> +<% else %> +
      + <%= t("admin.proposals.index.no_hidden_proposals") %> +
      +<% end %> diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index f22321f38..55e51a8ac 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -1,39 +1,40 @@

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

      <%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %> - -
      -
      - <%= f.label :name, t("admin.tags.name.placeholder") %> - <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %> -
      - +
      + <%= f.label :name, t("admin.tags.name.placeholder") %> + <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
      <%= f.submit(t("admin.tags.create"), class: "button success") %> - <% end %> -

      <%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %>

      +
      +

      <%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %>

      + + + + + <% @tags.each do |tag| %> - + <% end %> +
      <%= t("admin.tags.index.topic") %><%= t("admin.actions.actions") %>
      + <%= form_for(tag, url: admin_tag_path(tag), as: :tag, - html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %> + html: { id: "edit_tag_#{tag.id}"}) do |f| %> - - <%= tag.name %> - - - <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %> + <%= tag.name %> <% end %> + <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert" %> +
      <%= paginate @tags %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 0ea0f748d..e27f4436e 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -22,12 +22,12 @@ <%= render "recommended", recommended_debates: @recommended_debates, recommended_proposals: @recommended_proposals %> +
      <% end %> <% cache [locale_and_user_status, @featured_debates, @featured_proposals, 'featured'] do %>
      - -
      +

      <%= t("welcome.debates.title") %>

      @@ -47,6 +47,5 @@
      -
      <% end %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index dfe92305d..87bbb6685 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -213,6 +213,7 @@ en: hidden_debate: Hidden debate hidden_proposal: Hidden proposal title: Hidden comments + no_hidden_comments: There is no hidden comments. dashboard: index: back: Go back to %{org} @@ -226,6 +227,7 @@ en: with_confirmed_hide: Confirmed without_confirmed_hide: Pending title: Hidden debates + no_hidden_debates: There is no hidden debates. hidden_users: index: filter: Filter @@ -234,6 +236,8 @@ en: with_confirmed_hide: Confirmed without_confirmed_hide: Pending title: Hidden users + user: User + no_hidden_users: There is no hidden users. show: email: 'Email:' hidden_at: 'Hidden at:' @@ -715,6 +719,7 @@ en: with_confirmed_hide: Confirmed without_confirmed_hide: Pending title: Hidden proposals + no_hidden_proposals: There is no hidden proposals. settings: flash: updated: Value updated @@ -757,6 +762,9 @@ en: placeholder: Search user by name or email search_results: "Search results" no_search_results: "No results found." + actions: Actions + title: Title + description: Description spending_proposals: index: geozone_filter_all: All zones @@ -901,11 +909,12 @@ en: total: Total proposals_with_notifications: Proposals with notifications tags: - create: Create Topic - destroy: Destroy Topic + create: Create topic + destroy: Destroy topic index: add_tag: Add a new proposal topic title: Proposal topics + topic: Topic name: placeholder: Type the name of the topic users: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 289546bab..d1a24b314 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -213,6 +213,7 @@ es: hidden_debate: Debate oculto hidden_proposal: Propuesta oculta title: Comentarios ocultos + no_hidden_comments: No hay comentarios ocultos. dashboard: index: back: Volver a %{org} @@ -226,6 +227,7 @@ es: with_confirmed_hide: Confirmados without_confirmed_hide: Pendientes title: Debates ocultos + no_hidden_debates: No hay debates ocultos. hidden_users: index: filter: Filtro @@ -234,6 +236,8 @@ es: with_confirmed_hide: Confirmados without_confirmed_hide: Pendientes title: Usuarios bloqueados + user: Usuario + no_hidden_users: No hay uusarios bloqueados. show: email: 'Email:' hidden_at: 'Bloqueado:' @@ -717,6 +721,7 @@ es: with_confirmed_hide: Confirmadas without_confirmed_hide: Pendientes title: Propuestas ocultas + no_hidden_proposals: No hay propuestas ocultas. settings: flash: updated: Valor actualizado @@ -759,6 +764,9 @@ es: placeholder: Buscar usuario por nombre o email search_results: "Resultados de la búsqueda" no_search_results: "No se han encontrado resultados." + actions: Acciones + title: "Título" + description: "Descripción" spending_proposals: index: geozone_filter_all: Todos los ámbitos de actuación @@ -903,11 +911,12 @@ es: total: Total proposals_with_notifications: Propuestas con notificaciones tags: - create: Crear Tema - destroy: Eliminar Tema + create: Crear tema + destroy: Eliminar tema index: add_tag: Añade un nuevo tema de propuesta title: Temas de propuesta + topic: Tema name: placeholder: Escribe el nombre del tema users: diff --git a/spec/features/admin/tags_spec.rb b/spec/features/admin/tags_spec.rb index dd9c38c6b..8ff205852 100644 --- a/spec/features/admin/tags_spec.rb +++ b/spec/features/admin/tags_spec.rb @@ -23,7 +23,7 @@ feature 'Admin tags' do within("form.new_tag") do fill_in "tag_name", with: 'important issues' - click_button 'Create Topic' + click_button 'Create topic' end visit admin_tags_path @@ -39,8 +39,8 @@ feature 'Admin tags' do expect(page).to have_content @tag1.name expect(page).to have_content tag2.name - within("#edit_tag_#{tag2.id}") do - click_link 'Destroy Topic' + within("#tag_#{tag2.id}") do + click_link 'Destroy topic' end visit admin_tags_path @@ -58,8 +58,8 @@ feature 'Admin tags' do expect(page).to have_content @tag1.name expect(page).to have_content tag2.name - within("#edit_tag_#{tag2.id}") do - click_link 'Destroy Topic' + within("#tag_#{tag2.id}") do + click_link 'Destroy topic' end visit admin_tags_path @@ -81,7 +81,7 @@ feature 'Admin tags' do within("form.new_tag") do fill_in "tag_name", with: "wow_category" - click_button 'Create Topic' + click_button 'Create topic' end expect(ActsAsTaggableOn::Tag.category.where(name: "wow_category")).to exist