Skip to content

Commit

Permalink
add pagination in title for component: meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbaraOliveira13 committed Jan 17, 2025
1 parent 9b482b2 commit 21ed815
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def create
end

def index
@meetings = paginate(search.result)
return unless search.result.blank? && params.dig("filter", "date") != %w(past)

@past_meetings ||= search_with(filter_params.merge(with_any_date: %w(past)))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<% add_decidim_meta_tags(
description: translated_attribute(current_component.participatory_space.try(:description)),
title: translated_attribute(current_component.name),
title: t("decidim.components.pagination.page_title",
component_name: translated_attribute(current_component.name),
current_page: @meetings.current_page,
total_pages: @meetings.total_pages ),
url: meetings_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-meetings/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ en:
comments_blocked: Comments blocked
creation_enabled_for_participants: Meeting creation by participants enabled
creation_enabled_for_user_groups: Meeting creation by user groups enabled
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
download_your_data:
help:
registrations:
Expand Down

0 comments on commit 21ed815

Please sign in to comment.