From 82c1728499341955e6bbbbd8220581fc6e5ce3cb Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Thu, 6 Nov 2025 16:12:46 +0100 Subject: [PATCH 01/45] fix: imporve accessibility on main_links_mobile_account --- .../header/_main_links_mobile_account.html.erb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb b/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb index f72ba2726225f..29a990ce40c21 100644 --- a/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +++ b/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb @@ -10,8 +10,9 @@
-
@@ -37,3 +38,16 @@ + From b98d87f30fe42077d6da69bdcb2265d8183a66d1 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Thu, 6 Nov 2025 16:37:14 +0100 Subject: [PATCH 02/45] fix: update typo --- .../layouts/decidim/header/_main_links_mobile_account.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb b/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb index 29a990ce40c21..d2625c46365dc 100644 --- a/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +++ b/decidim-core/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb @@ -10,7 +10,7 @@
-
- <% categories = meetings.map(&:category).uniq %> + <% taxonomies = meetings.map(&:taxonomies).uniq %> <% seed = SecureRandom.hex(3).to_s %> - <% if categories.present? %> -
    - <% categories.each do |category| %> + <% if taxonomies.present? %> +
      + <% taxonomies.each do |taxonomy| %>
    • -
      - <%= category.present? ? translated_attribute(category.name) : t(".other_category") %> +
      + <%= taxonomy.first.present? ? translated_attribute(taxonomy.first.name) : t(".other_category") %>
    • <% end %>
    <% end %> - <% meetings.group_by(&:category).each do |categories_block| %> -
    - <% categories_block.last.each do |meeting| %> + <% meetings.group_by(&:taxonomies).each do |taxonomies_block| %> +
    + <% taxonomies_block.last.each do |meeting| %> <%= render partial: "program_meeting", locals: { meeting: } %> <% end %>
    diff --git a/decidim-conferences/spec/system/conference_program_spec.rb b/decidim-conferences/spec/system/conference_program_spec.rb index 6449c9c2e5b65..091136f369ee4 100644 --- a/decidim-conferences/spec/system/conference_program_spec.rb +++ b/decidim-conferences/spec/system/conference_program_spec.rb @@ -39,8 +39,10 @@ context "when there are some conference meetings" do let!(:conference_speakers) { create_list(:conference_speaker, 3, :with_meeting, conference:, meetings_component: component) } let(:meetings) { Decidim::ConferenceMeeting.where(component:) } + let(:taxonomy) { create(:taxonomy, parent: create(:taxonomy, organization:), organization:) } before do + meetings.each { |meeting| meeting.update(taxonomies: [taxonomy]) } visit decidim_conferences.conference_conference_program_path(conference, component) end @@ -79,5 +81,11 @@ end end end + + it "has the taxonomy name" do + within "[data-conference-program-day]" do + expect(page).to have_content(translated_attribute(taxonomy.name)) + end + end end end From 9a9ea17647db7e677b50e6323f1601a01ce15318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Mon, 17 Nov 2025 14:52:16 +0100 Subject: [PATCH 14/45] Make the admin tables a bit more consistent (#15271) --- .../decidim/accountability/admin/filterable.rb | 4 ---- .../accountability/admin/results/_result-tr.html.erb | 5 +---- .../admin/results/_results-thead.html.erb | 3 --- decidim-accountability/config/locales/en.yml | 1 - .../spec/shared/export_results_examples.rb | 2 +- ...min_filters_searches_and_paginates_results_spec.rb | 8 +------- .../spec/system/admin/admin_orders_results_spec.rb | 11 ----------- .../managed_users/impersonation_logs/index.html.erb | 6 +++--- .../decidim/admin/moderations/_moderation-tr.html.erb | 8 ++------ .../admin/moderations/_moderations-thead.html.erb | 1 - .../decidim/admin/moderations/reports/index.html.erb | 2 +- .../views/decidim/admin/newsletters/index.html.erb | 4 ++-- .../decidim/admin/test/manage_moderations_examples.rb | 6 +++--- .../concerns/decidim/budgets/admin/filterable.rb | 4 ---- .../budgets/admin/projects/_project-tr.html.erb | 3 --- .../budgets/admin/projects/_projects-thead.html.erb | 1 - decidim-budgets/config/locales/en.yml | 1 - .../spec/shared/export_projects_examples.rb | 2 +- ...in_filters_searches_and_paginates_projects_spec.rb | 8 +------- .../spec/system/admin_orders_projects_spec.rb | 11 ----------- .../admin/documents/_document-tr.html.erb | 4 +++- .../admin/conference_invites/index.html.erb | 2 +- .../decidim/debates/admin/debates/_debate-tr.html.erb | 4 ++-- .../elections/admin/elections/_election-tr.html.erb | 4 ++-- .../concerns/decidim/initiatives/admin/filterable.rb | 2 +- .../initiatives/admin/initiatives/index.html.erb | 2 -- decidim-initiatives/config/locales/en.yml | 3 +-- .../system/admin/admin_manages_initiatives_spec.rb | 6 ------ .../concerns/decidim/meetings/admin/filterable.rb | 4 ---- .../decidim/meetings/admin/invites/index.html.erb | 2 +- .../meetings/admin/meetings/_meeting-tr.html.erb | 7 ++----- .../meetings/admin/meetings/_meetings-thead.html.erb | 3 --- decidim-meetings/config/locales/en.yml | 1 - .../spec/shared/export_meetings_examples.rb | 2 +- .../spec/system/admin/filter_meetings_spec.rb | 8 +------- .../admin/participatory_process_steps/index.html.erb | 4 ++-- .../spec/shared/manage_process_steps_examples.rb | 4 ++-- .../concerns/decidim/proposals/admin/filterable.rb | 4 ---- decidim-proposals/config/locales/en.yml | 2 -- .../spec/shared/export_proposals_examples.rb | 2 +- .../spec/system/admin/filter_proposals_spec.rb | 8 +------- .../decidim/sortitions/admin/sortitions/show.html.erb | 2 +- .../admin/block_user_templates/index.html.erb | 2 +- .../admin/proposal_answer_templates/index.html.erb | 2 +- .../admin/questionnaire_templates/index.html.erb | 2 +- 45 files changed, 41 insertions(+), 136 deletions(-) diff --git a/decidim-accountability/app/controllers/concerns/decidim/accountability/admin/filterable.rb b/decidim-accountability/app/controllers/concerns/decidim/accountability/admin/filterable.rb index 7c47e726ab808..d81e1646cb74e 100644 --- a/decidim-accountability/app/controllers/concerns/decidim/accountability/admin/filterable.rb +++ b/decidim-accountability/app/controllers/concerns/decidim/accountability/admin/filterable.rb @@ -23,10 +23,6 @@ def base_query collection.includes(:taxonomies).joins(:taxonomies) end - def search_field_predicate - :id_string_or_title_cont - end - def filters [ :taxonomies_part_of_contains, diff --git a/decidim-accountability/app/views/decidim/accountability/admin/results/_result-tr.html.erb b/decidim-accountability/app/views/decidim/accountability/admin/results/_result-tr.html.erb index cdc78857a54f5..5f0cc05983a4f 100644 --- a/decidim-accountability/app/views/decidim/accountability/admin/results/_result-tr.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/admin/results/_result-tr.html.erb @@ -2,9 +2,6 @@ <%= check_box_tag "result_ids_s[]", result.id, false, data: { result_id: result.id, result_checkbox: true } %>
    - "> - <%= result.id %>
    - "> <% if result.parent_id.nil? %> <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %>
    @@ -21,7 +18,7 @@ <% end %> "> - <%= result.progress&.to_i %> + <%= result.progress.nil? ? 0 : result.progress&.to_i %>% "> <%= l result.created_at, format: :decidim_short %> diff --git a/decidim-accountability/app/views/decidim/accountability/admin/results/_results-thead.html.erb b/decidim-accountability/app/views/decidim/accountability/admin/results/_results-thead.html.erb index 783cd2bf6e5b9..1be892827d343 100644 --- a/decidim-accountability/app/views/decidim/accountability/admin/results/_results-thead.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/admin/results/_results-thead.html.erb @@ -3,9 +3,6 @@ <%= check_box_tag "results_bulk", "all", false, data: { "select-all" => true } %> - - <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %> - <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %> diff --git a/decidim-accountability/config/locales/en.yml b/decidim-accountability/config/locales/en.yml index 6e794e4e3465c..7747dad28c196 100644 --- a/decidim-accountability/config/locales/en.yml +++ b/decidim-accountability/config/locales/en.yml @@ -256,7 +256,6 @@ en: fields: created_at: Created end_date: End date - id: ID progress: Progress start_date: Start date status: Status diff --git a/decidim-accountability/spec/shared/export_results_examples.rb b/decidim-accountability/spec/shared/export_results_examples.rb index 53e2dee8caaed..8868b7ee5a400 100644 --- a/decidim-accountability/spec/shared/export_results_examples.rb +++ b/decidim-accountability/spec/shared/export_results_examples.rb @@ -11,7 +11,7 @@ context "with query" do before do - fill_in "q[id_string_or_title_cont]", with: translated(results.last.title) + fill_in "q[title_cont]", with: translated(results.last.title) find("button[aria-label='Search']").click end diff --git a/decidim-accountability/spec/system/admin/admin_filters_searches_and_paginates_results_spec.rb b/decidim-accountability/spec/system/admin/admin_filters_searches_and_paginates_results_spec.rb index e08f3ca91dbb5..f3fb086244670 100644 --- a/decidim-accountability/spec/system/admin/admin_filters_searches_and_paginates_results_spec.rb +++ b/decidim-accountability/spec/system/admin/admin_filters_searches_and_paginates_results_spec.rb @@ -49,7 +49,7 @@ end end - context "when searching by ID or title" do + context "when searching by title" do let!(:result1) do create(:result, component: current_component, title: Decidim::Faker::Localized.localized { generate(:title) }) @@ -61,12 +61,6 @@ let!(:result1_title) { translated(result1.title) } let!(:result2_title) { translated(result2.title) } - it "can be searched by ID" do - search_by_text(result1.id) - - expect(page).to have_content(result1_title) - end - it "can be searched by title" do search_by_text(result2_title) diff --git a/decidim-accountability/spec/system/admin/admin_orders_results_spec.rb b/decidim-accountability/spec/system/admin/admin_orders_results_spec.rb index a7d5d98951445..dd566f9ea1e52 100644 --- a/decidim-accountability/spec/system/admin/admin_orders_results_spec.rb +++ b/decidim-accountability/spec/system/admin/admin_orders_results_spec.rb @@ -23,17 +23,6 @@ include_context "when managing a component as an admin" - it "orders results by ID" do - ordered_results = results.sort_by(&:id).reverse - - click_on "ID" - rows = page.all("tbody tr") - - rows.each_with_index do |row, i| - expect(row).to have_text(translated(ordered_results[i].title)) - end - end - it "orders results by title" do ordered_results = results.sort_by { |result| translated(result.title) } diff --git a/decidim-admin/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb b/decidim-admin/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb index 479439f17157d..c1dfb56faae16 100644 --- a/decidim-admin/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb @@ -23,9 +23,9 @@ <%= impersonation_log.admin.name %> <%= impersonation_log.user.name %> <%= impersonation_log.reason %> - <%= impersonation_log.started_at ? l(impersonation_log.started_at, format: :long) : nil %> - <%= impersonation_log.ended_at ? l(impersonation_log.ended_at, format: :long) : nil %> - <%= impersonation_log.expired_at ? l(impersonation_log.expired_at, format: :long) : nil %> + <%= impersonation_log.started_at ? l(impersonation_log.started_at, format: :decidim_short) : nil %> + <%= impersonation_log.ended_at ? l(impersonation_log.ended_at, format: :decidim_short) : nil %> + <%= impersonation_log.expired_at ? l(impersonation_log.expired_at, format: :decidim_short) : nil %> <% end %> diff --git a/decidim-admin/app/views/decidim/admin/moderations/_moderation-tr.html.erb b/decidim-admin/app/views/decidim/admin/moderations/_moderation-tr.html.erb index 8bfef9a49e5d6..8de7fb11b7196 100644 --- a/decidim-admin/app/views/decidim/admin/moderations/_moderation-tr.html.erb +++ b/decidim-admin/app/views/decidim/admin/moderations/_moderation-tr.html.erb @@ -3,10 +3,6 @@ <%= check_box_tag "moderation_ids_s[]", moderation.id, false, class: "js-check-all-moderations js-moderation-list-check js-moderation-id-#{moderation.id}" %> - "> - <%= moderation.reportable.id %> - - "> <%= moderation.reportable.class.model_name.human %> @@ -33,7 +29,7 @@ "> - <%= l moderation.created_at, format: :long %> + <%= l moderation.created_at, format: :decidim_short %> "> @@ -42,7 +38,7 @@ <% if params[:hidden] %> "> - <%= l(moderation.hidden_at, format: :long) if moderation.hidden_at.present? %> + <%= l(moderation.hidden_at, format: :decidim_short) if moderation.hidden_at.present? %> <% end %> diff --git a/decidim-admin/app/views/decidim/admin/moderations/_moderations-thead.html.erb b/decidim-admin/app/views/decidim/admin/moderations/_moderations-thead.html.erb index 568aeac88e717..907b9163e1a52 100644 --- a/decidim-admin/app/views/decidim/admin/moderations/_moderations-thead.html.erb +++ b/decidim-admin/app/views/decidim/admin/moderations/_moderations-thead.html.erb @@ -1,7 +1,6 @@ <%= check_box_tag "moderations_bulk", "all", false, class: "js-check-all" %> - <%= t("models.moderation.fields.reportable_id", scope: "decidim.moderations") %> <%= t("models.moderation.fields.reportable_type", scope: "decidim.moderations") %> <% if !respond_to?(:current_participatory_space) %> <%= t("models.moderation.fields.participatory_space", scope: "decidim.moderations") %> diff --git a/decidim-admin/app/views/decidim/admin/moderations/reports/index.html.erb b/decidim-admin/app/views/decidim/admin/moderations/reports/index.html.erb index cf0f7b3d28cdf..8c6651b0f2f8d 100644 --- a/decidim-admin/app/views/decidim/admin/moderations/reports/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/moderations/reports/index.html.erb @@ -57,7 +57,7 @@
    <%= moderation.reportable.class.name.demodulize %>
    <%= t("models.moderation.fields.created_at", scope: "decidim.moderations") %>
    -
    <%= l(moderation.created_at, format: :long) %>
    +
    <%= l(moderation.created_at, format: :decidim_short) %>
    <%= t(".participatory_space") %>
    <%= translated_attribute moderation.participatory_space.title %>
    diff --git a/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb b/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb index 68fad7f13a538..43076fccff295 100644 --- a/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb @@ -36,11 +36,11 @@ "> - <%= l(newsletter.created_at, format: :long) if newsletter.created_at %> + <%= l(newsletter.created_at, format: :decidim_short) if newsletter.created_at %> "> - <%= l(newsletter.sent_at, format: :long) if newsletter.sent_at %> + <%= l(newsletter.sent_at, format: :decidim_short) if newsletter.sent_at %> "> diff --git a/decidim-admin/lib/decidim/admin/test/manage_moderations_examples.rb b/decidim-admin/lib/decidim/admin/test/manage_moderations_examples.rb index 7cd65a339c946..df037d030b7a0 100644 --- a/decidim-admin/lib/decidim/admin/test/manage_moderations_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/manage_moderations_examples.rb @@ -27,7 +27,7 @@ click_on link_text end all("tbody tr").each_with_index do |row, _index| - expect(row.find("td:nth-child(2)")).to have_content(reportables.first.id) + expect(row.find("td:nth-child(2)")).to have_content(reportables.first.class.model_name.human) end end end @@ -107,8 +107,8 @@ click_on "Reports count" all("tbody tr").each_with_index do |row, index| - reportable_id = moderations_ordered_by_report_count_asc[index].reportable.id - expect(row.find("td:nth-child(2)")).to have_content(reportable_id) + reportable_type = moderations_ordered_by_report_count_asc[index].reportable.class.model_name.human + expect(row.find("td:nth-child(2)")).to have_content(reportable_type) end end end diff --git a/decidim-budgets/app/controllers/concerns/decidim/budgets/admin/filterable.rb b/decidim-budgets/app/controllers/concerns/decidim/budgets/admin/filterable.rb index 3d191ae76fcee..fcb87792be20f 100644 --- a/decidim-budgets/app/controllers/concerns/decidim/budgets/admin/filterable.rb +++ b/decidim-budgets/app/controllers/concerns/decidim/budgets/admin/filterable.rb @@ -23,10 +23,6 @@ def base_query collection.includes(:taxonomies).joins(:taxonomies) end - def search_field_predicate - :id_string_or_title_cont - end - def filters [ :taxonomies_part_of_contains, diff --git a/decidim-budgets/app/views/decidim/budgets/admin/projects/_project-tr.html.erb b/decidim-budgets/app/views/decidim/budgets/admin/projects/_project-tr.html.erb index eef9246f9f198..17faa519d2eed 100644 --- a/decidim-budgets/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/admin/projects/_project-tr.html.erb @@ -2,9 +2,6 @@ <%= check_box_tag "project_ids_s[]", project.id, false, class: "js-check-all-resources js-project-list-check js-resource-id-#{project.id}" %>
    - "> - <%= project.id %>
    - "> <% if allowed_to? :update, :project, project: project %> <%= link_to translated_attribute(project.title), resource_locator([budget, project]).edit %>
    diff --git a/decidim-budgets/app/views/decidim/budgets/admin/projects/_projects-thead.html.erb b/decidim-budgets/app/views/decidim/budgets/admin/projects/_projects-thead.html.erb index fe3bf57a8fcf5..8461708195b5c 100644 --- a/decidim-budgets/app/views/decidim/budgets/admin/projects/_projects-thead.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/admin/projects/_projects-thead.html.erb @@ -1,7 +1,6 @@ <%= check_box_tag "projects_bulk", "all", false, class: "js-check-all" %> - <%= sort_link(query, :id, t("models.project.fields.id", scope: "decidim.budgets"), default_order: :desc) %> <%= sort_link(query, :title, t("models.project.fields.title", scope: "decidim.budgets")) %> <%= sort_link(query, :taxonomies_name, t("models.project.fields.taxonomies", scope: "decidim.budgets") ) %> <%= sort_link(query, :confirmed_orders_count, t("index.confirmed_orders_count")) %> diff --git a/decidim-budgets/config/locales/en.yml b/decidim-budgets/config/locales/en.yml index b3b16a2bd28d4..16e4075e8ac5a 100644 --- a/decidim-budgets/config/locales/en.yml +++ b/decidim-budgets/config/locales/en.yml @@ -214,7 +214,6 @@ en: total_budget: Total budget project: fields: - id: ID map: Map taxonomies: Taxonomies title: Title diff --git a/decidim-budgets/spec/shared/export_projects_examples.rb b/decidim-budgets/spec/shared/export_projects_examples.rb index db560c0120651..b90beff12d645 100644 --- a/decidim-budgets/spec/shared/export_projects_examples.rb +++ b/decidim-budgets/spec/shared/export_projects_examples.rb @@ -9,7 +9,7 @@ context "with query" do before do - fill_in "q[id_string_or_title_cont]", with: translated(projects.last.title) + fill_in "q[title_cont]", with: translated(projects.last.title) find("button[aria-label='Search']").click end diff --git a/decidim-budgets/spec/system/admin_filters_searches_and_paginates_projects_spec.rb b/decidim-budgets/spec/system/admin_filters_searches_and_paginates_projects_spec.rb index e231bcb189ee2..41c530fd8ff73 100644 --- a/decidim-budgets/spec/system/admin_filters_searches_and_paginates_projects_spec.rb +++ b/decidim-budgets/spec/system/admin_filters_searches_and_paginates_projects_spec.rb @@ -48,7 +48,7 @@ end end - context "when searching by ID or title" do + context "when searching by title" do let!(:project1) { create(:project, budget:) } let!(:project2) { create(:project, budget:) } let!(:project1_title) { translated(project1.title) } @@ -56,12 +56,6 @@ before { visit current_path } - it "can be searched by ID" do - search_by_text(project1.id) - - expect(page).to have_content(project1_title) - end - it "can be searched by title" do search_by_text(project2_title) diff --git a/decidim-budgets/spec/system/admin_orders_projects_spec.rb b/decidim-budgets/spec/system/admin_orders_projects_spec.rb index 1a6452e65ad5f..8a00466ceee77 100644 --- a/decidim-budgets/spec/system/admin_orders_projects_spec.rb +++ b/decidim-budgets/spec/system/admin_orders_projects_spec.rb @@ -35,17 +35,6 @@ end end - it "orders projects by ID" do - ordered_projects = projects.sort_by(&:id).reverse - - click_on "ID" - rows = page.all("tbody tr") - - rows.each_with_index do |row, i| - expect(row).to have_text(translated(ordered_projects[i].title)) - end - end - it "orders projects by title" do ordered_projects = projects.sort_by { |project| translated(project.title) } diff --git a/decidim-collaborative_texts/app/views/decidim/collaborative_texts/admin/documents/_document-tr.html.erb b/decidim-collaborative_texts/app/views/decidim/collaborative_texts/admin/documents/_document-tr.html.erb index 553697d150d7c..6f25fdeb117aa 100644 --- a/decidim-collaborative_texts/app/views/decidim/collaborative_texts/admin/documents/_document-tr.html.erb +++ b/decidim-collaborative_texts/app/views/decidim/collaborative_texts/admin/documents/_document-tr.html.erb @@ -7,7 +7,9 @@ <% end %> "> - <%= t("booleans.#{document.accepting_suggestions}") %> + !text-sm"> + <%= humanize_boolean document.accepting_suggestions %> + "> <% if document.published? %> diff --git a/decidim-conferences/app/views/decidim/conferences/admin/conference_invites/index.html.erb b/decidim-conferences/app/views/decidim/conferences/admin/conference_invites/index.html.erb index 7edaa9bf90d90..1570a5a9721bf 100644 --- a/decidim-conferences/app/views/decidim/conferences/admin/conference_invites/index.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/admin/conference_invites/index.html.erb @@ -33,7 +33,7 @@ <% if invite.sent_at %> - <%= l invite.sent_at, format: :long %> + <%= l invite.sent_at, format: :decidim_short %> <% end %> diff --git a/decidim-debates/app/views/decidim/debates/admin/debates/_debate-tr.html.erb b/decidim-debates/app/views/decidim/debates/admin/debates/_debate-tr.html.erb index 8ebde884813d5..06006e18d194d 100644 --- a/decidim-debates/app/views/decidim/debates/admin/debates/_debate-tr.html.erb +++ b/decidim-debates/app/views/decidim/debates/admin/debates/_debate-tr.html.erb @@ -8,12 +8,12 @@ "> <% if debate.start_time %> - <%= l debate.start_time, format: :long %> + <%= l debate.start_time, format: :decidim_short %> <% end %> "> <% if debate.end_time %> - <%= l debate.end_time, format: :long %> + <%= l debate.end_time, format: :decidim_short %> <% end %> "> diff --git a/decidim-elections/app/views/decidim/elections/admin/elections/_election-tr.html.erb b/decidim-elections/app/views/decidim/elections/admin/elections/_election-tr.html.erb index 33e27c637243f..b424a89655a2f 100644 --- a/decidim-elections/app/views/decidim/elections/admin/elections/_election-tr.html.erb +++ b/decidim-elections/app/views/decidim/elections/admin/elections/_election-tr.html.erb @@ -8,14 +8,14 @@ "> <% if election.start_at %> - <%= l election.start_at, format: :long %> + <%= l election.start_at, format: :decidim_short %> <% else %> <%= t("decidim.elections.admin.elections.form.manual_start") %> <% end %> "> <% if election.end_at %> - <%= l election.end_at, format: :long %> + <%= l election.end_at, format: :decidim_short %> <% end %> "> diff --git a/decidim-initiatives/app/controllers/concerns/decidim/initiatives/admin/filterable.rb b/decidim-initiatives/app/controllers/concerns/decidim/initiatives/admin/filterable.rb index afe754f4f9f99..a79d068133eee 100644 --- a/decidim-initiatives/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +++ b/decidim-initiatives/app/controllers/concerns/decidim/initiatives/admin/filterable.rb @@ -18,7 +18,7 @@ def base_query end def search_field_predicate - :title_or_description_or_id_string_or_author_name_or_author_nickname_cont + :title_or_description_or_author_name_or_author_nickname_cont end def filters diff --git a/decidim-initiatives/app/views/decidim/initiatives/admin/initiatives/index.html.erb b/decidim-initiatives/app/views/decidim/initiatives/admin/initiatives/index.html.erb index 19a54708fd59a..83c31bc92a853 100644 --- a/decidim-initiatives/app/views/decidim/initiatives/admin/initiatives/index.html.erb +++ b/decidim-initiatives/app/views/decidim/initiatives/admin/initiatives/index.html.erb @@ -19,7 +19,6 @@ - @@ -31,7 +30,6 @@ <% @initiatives.each do |initiative| %> - - - diff --git a/decidim-meetings/config/locales/en.yml b/decidim-meetings/config/locales/en.yml index 951b3cc2ae536..caf2044628203 100644 --- a/decidim-meetings/config/locales/en.yml +++ b/decidim-meetings/config/locales/en.yml @@ -678,7 +678,6 @@ en: fields: closed: Closed end_time: End date - id: ID map: Map official_meeting: Official meeting published: Published diff --git a/decidim-meetings/spec/shared/export_meetings_examples.rb b/decidim-meetings/spec/shared/export_meetings_examples.rb index 53a909dceae1b..5464c858c0079 100644 --- a/decidim-meetings/spec/shared/export_meetings_examples.rb +++ b/decidim-meetings/spec/shared/export_meetings_examples.rb @@ -9,7 +9,7 @@ context "with query" do before do - fill_in "q[id_string_or_title_cont]", with: translated(meetings.last.title) + fill_in "q[title_cont]", with: translated(meetings.last.title) find("button[aria-label='Search']").click end diff --git a/decidim-meetings/spec/system/admin/filter_meetings_spec.rb b/decidim-meetings/spec/system/admin/filter_meetings_spec.rb index 23fe788e57505..70abcb86e05a1 100644 --- a/decidim-meetings/spec/system/admin/filter_meetings_spec.rb +++ b/decidim-meetings/spec/system/admin/filter_meetings_spec.rb @@ -102,7 +102,7 @@ def meeting_without_type(type) end end - context "when searching by ID or title" do + context "when searching by title" do let!(:meeting1) { create(:meeting, component:) } let!(:meeting2) { create(:meeting, component:) } let!(:meeting1_title) { translated(meeting1.title) } @@ -110,12 +110,6 @@ def meeting_without_type(type) before { visit_component_admin } - it "can be searched by ID" do - search_by_text(meeting1.id) - - expect(page).to have_content(meeting1_title) - end - it "can be searched by title" do search_by_text(meeting2_title) diff --git a/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb b/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb index a334c7dbafbf0..5f71fdcf7ac99 100644 --- a/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb +++ b/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb @@ -33,12 +33,12 @@ - + diff --git a/decidim-templates/app/views/decidim/templates/admin/block_user_templates/index.html.erb b/decidim-templates/app/views/decidim/templates/admin/block_user_templates/index.html.erb index f716a9e5f066b..bbb803e7c7c7e 100644 --- a/decidim-templates/app/views/decidim/templates/admin/block_user_templates/index.html.erb +++ b/decidim-templates/app/views/decidim/templates/admin/block_user_templates/index.html.erb @@ -25,7 +25,7 @@ <%= link_to translated_attribute(template.name), edit_block_user_template_path(template) %>
    <%= t("models.initiatives.fields.id", scope: "decidim.admin") %> <%= t("models.initiatives.fields.title", scope: "decidim.admin") %> <%= t("models.initiatives.fields.state", scope: "decidim.admin") %> <%= sort_link(query, :supports_count, t("models.initiatives.fields.supports_count", scope: "decidim.admin"), default_order: :desc) %>
    "><%= initiative.id %> "> <% if allowed_to? :edit, :initiative, initiative: initiative %> <%= link_to translated_attribute(initiative.title), diff --git a/decidim-initiatives/config/locales/en.yml b/decidim-initiatives/config/locales/en.yml index 92827bf22f216..7ee41dde574f0 100644 --- a/decidim-initiatives/config/locales/en.yml +++ b/decidim-initiatives/config/locales/en.yml @@ -97,7 +97,7 @@ en: type_id_eq: label: Type search_placeholder: - title_or_description_or_id_string_or_author_name_or_author_nickname_cont: Search %{collection} by title, description, ID or author name + title_or_description_or_author_name_or_author_nickname_cont: Search %{collection} by title, description, or author name initiatives_settings: update: error: There was a problem updating the initiatives settings. @@ -119,7 +119,6 @@ en: initiatives: fields: created_at: Created at - id: ID published_at: Published at state: Status supports_count: Signatures diff --git a/decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb b/decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb index 28bc1d65f0a08..84c0eb88ab9f7 100644 --- a/decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb +++ b/decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb @@ -113,12 +113,6 @@ def initiative_without_area(area) expect(page).to have_content(translated(open_initiative.title)) end - it "can be searched by id" do - search_by_text(open_initiative.id) - - expect(page).to have_content(translated(open_initiative.title)) - end - it "can be searched by author name" do search_by_text(open_initiative.author.name) diff --git a/decidim-meetings/app/controllers/concerns/decidim/meetings/admin/filterable.rb b/decidim-meetings/app/controllers/concerns/decidim/meetings/admin/filterable.rb index 3ee6589bdf8c5..b65690789a4f8 100644 --- a/decidim-meetings/app/controllers/concerns/decidim/meetings/admin/filterable.rb +++ b/decidim-meetings/app/controllers/concerns/decidim/meetings/admin/filterable.rb @@ -45,10 +45,6 @@ def filters_with_values } end - def search_field_predicate - :id_string_or_title_cont - end - def meeting_types Meeting::TYPE_OF_MEETING end diff --git a/decidim-meetings/app/views/decidim/meetings/admin/invites/index.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/invites/index.html.erb index 4bb2461857ba8..f1867fe1ba9a0 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/invites/index.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/invites/index.html.erb @@ -48,7 +48,7 @@ <% if invite.sent_at %> - <%= l invite.sent_at, format: :long %> + <%= l invite.sent_at, format: :decidim_short %> <% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meeting-tr.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meeting-tr.html.erb index 560f69ff903c0..7d1a58b7100b2 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meeting-tr.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meeting-tr.html.erb @@ -1,9 +1,6 @@ <% is_linked = meeting.decidim_component_id != current_component.id %>
    "> - <%= meeting.id %>
    -
    "> <% if allowed_to? :update, :meeting, meeting: meeting %> <%= link_to present(meeting).title(html_escape: true), edit_meeting_path(meeting) %> @@ -13,12 +10,12 @@ "> <% if meeting.start_time %> - <%= l meeting.start_time, format: :long %> + <%= l meeting.start_time, format: :decidim_short %> <% end %> "> <% if meeting.end_time %> - <%= l meeting.end_time, format: :long %> + <%= l meeting.end_time, format: :decidim_short %> <% end %> "> diff --git a/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meetings-thead.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meetings-thead.html.erb index eb7eb20d0a364..b0ea27d239202 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meetings-thead.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/meetings/_meetings-thead.html.erb @@ -1,8 +1,5 @@
    - <%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %> - <%= sort_link(query, :translated_title, t("models.meeting.fields.title", scope: "decidim.meetings"), default_order: :desc ) %> "> <% if step.start_date %> - <%= l step.start_date, format: :long %> + <%= l step.start_date, format: :decidim_short %> <% end %> "> <% if step.end_date %> - <%= l step.end_date, format: :long %> + <%= l step.end_date, format: :decidim_short %> <% end %> "> diff --git a/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb b/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb index e83b34bf6f7ec..cc4c68fad8128 100644 --- a/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb @@ -53,8 +53,8 @@ within "#steps table" do expect(page).to have_content(translated(attributes[:title])) - expect(page).to have_content("#{Time.new.utc.day},") - expect(page).to have_content("#{(Time.new.utc + 2.days).day},") + expect(page).to have_content(Time.new.utc.day) + expect(page).to have_content((Time.new.utc + 2.days).day) end visit decidim_admin.root_path expect(page).to have_content("created the #{translated(attributes[:title])} phase in") diff --git a/decidim-proposals/app/controllers/concerns/decidim/proposals/admin/filterable.rb b/decidim-proposals/app/controllers/concerns/decidim/proposals/admin/filterable.rb index 0c9a4349a098b..21bad67ffba8c 100644 --- a/decidim-proposals/app/controllers/concerns/decidim/proposals/admin/filterable.rb +++ b/decidim-proposals/app/controllers/concerns/decidim/proposals/admin/filterable.rb @@ -32,10 +32,6 @@ def accessible_proposals_collection collection.with_evaluation_assigned_to(current_user, current_participatory_space) end - def search_field_predicate - :id_string_or_title_cont - end - def filter_config @filter_config ||= Decidim::AdminFilter.new(:proposals).build_for(self) end diff --git a/decidim-proposals/config/locales/en.yml b/decidim-proposals/config/locales/en.yml index 126b43b360eff..0b7db59b1814c 100644 --- a/decidim-proposals/config/locales/en.yml +++ b/decidim-proposals/config/locales/en.yml @@ -146,8 +146,6 @@ en: values: state_not_published: Not answered state_published: Answered - search_placeholder: - id_string_or_title_cont: Search %{collection} by ID or title tooltips: cannot_edit_proposal_info: Cannot edit this proposal as it is created by a participant or it has received any vote deleted_proposal_states_info: Cannot delete this proposal state because there are proposals assigned to it diff --git a/decidim-proposals/spec/shared/export_proposals_examples.rb b/decidim-proposals/spec/shared/export_proposals_examples.rb index 426a2ddac5921..f7a9f36da71b9 100644 --- a/decidim-proposals/spec/shared/export_proposals_examples.rb +++ b/decidim-proposals/spec/shared/export_proposals_examples.rb @@ -10,7 +10,7 @@ context "with query" do before do - fill_in "q[id_string_or_title_cont]", with: translated(proposals.last.title) + fill_in "q[title_cont]", with: translated(proposals.last.title) find("button[aria-label='Search']").click end diff --git a/decidim-proposals/spec/system/admin/filter_proposals_spec.rb b/decidim-proposals/spec/system/admin/filter_proposals_spec.rb index 2f8769208f937..2003cd3c4b8ed 100644 --- a/decidim-proposals/spec/system/admin/filter_proposals_spec.rb +++ b/decidim-proposals/spec/system/admin/filter_proposals_spec.rb @@ -212,7 +212,7 @@ def proposal_without_state(token) end end - context "when searching by ID or title" do + context "when searching by title" do let!(:proposal1) { create(:proposal, component:) } let!(:proposal2) { create(:proposal, component:) } let!(:proposal1_title) { ActionView::Base.full_sanitizer.sanitize(translated(proposal1.title)) } @@ -220,12 +220,6 @@ def proposal_without_state(token) before { visit_component_admin } - it "can be searched by ID" do - search_by_text(proposal1.id) - - expect(page).to have_content(proposal1_title) - end - it "can be searched by title" do search_by_text(proposal2_title) diff --git a/decidim-sortitions/app/views/decidim/sortitions/admin/sortitions/show.html.erb b/decidim-sortitions/app/views/decidim/sortitions/admin/sortitions/show.html.erb index 18add8ae23136..a1d2dff243d39 100644 --- a/decidim-sortitions/app/views/decidim/sortitions/admin/sortitions/show.html.erb +++ b/decidim-sortitions/app/views/decidim/sortitions/admin/sortitions/show.html.erb @@ -20,7 +20,7 @@
    <%= l sortition.request_timestamp, format: :long %><%= l sortition.request_timestamp, format: :decidim_short %> <%= sortition.dice %> <%= sortition.target_items %> <%= sortition_taxonomies sortition %> "> - <%= l template.created_at, format: :long %> + <%= l template.created_at, format: :decidim_short %> " class="table-list__actions"> "> - <%= l template.created_at, format: :long %> + <%= l template.created_at, format: :decidim_short %> " class="table-list__actions"> "> - <%= l template.created_at, format: :long %> + <%= l template.created_at, format: :decidim_short %> " class="table-list__actions">