Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCAG add pagination to title #1242

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class PostsController < Decidim::Blogs::ApplicationController

helper_method :posts, :post, :post_presenter, :paginate_posts, :posts_most_commented, :tabs, :panels

def index; end
def index
@posts = paginate_posts
end

def show
raise ActionController::RoutingError, "Not Found" unless post
Expand Down
5 changes: 4 additions & 1 deletion decidim-blogs/app/views/decidim/blogs/posts/index.html.erb
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: component_name,
title: t("decidim.components.pagination.page_title",
component_name: component_name,
current_page: @posts.current_page,
total_pages: @posts.total_pages ),
url: posts_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-blogs/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ en:
comments_blocked: Comments blocked
endorsements_blocked: Endorsements blocked
endorsements_enabled: Endorsements enabled
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
events:
blogs:
post_created:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ class BudgetsController < Decidim::Budgets::ApplicationController

include Decidim::Budgets::Orderable
include Decidim::TranslatableAttributes
include Decidim::Paginable

def index
redirect_to budget_projects_path(current_workflow.single) if current_workflow.single?
@projects = paginate(Decidim::Budgets::Project.joins(:budget).where(decidim_budgets_budgets: { component: current_component }))
end

def show
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: component_name,
title: t("decidim.components.pagination.page_title",
component_name: translated_attribute(current_component.name),
current_page: @projects.current_page,
total_pages: @projects.total_pages ),
url: budgets_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-budgets/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ en:
disabled: Voting disabled
enabled: Voting enabled
finished: Voting finished
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
download_your_data:
help:
orders:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class DebatesController < Decidim::Debates::ApplicationController
helper_method :debates, :debate, :form_presenter, :paginated_debates, :close_debate_form, :tab_panel_items
before_action :authenticate_user!, only: [:new, :create]

def index
@debates = paginated_debates
end

def new
enforce_permission_to :create, :debate

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<% add_decidim_meta_tags(
description: translated_attribute(current_participatory_space.short_description),
title: component_name,
title: t("decidim.components.pagination.page_title",
component_name: component_name,
current_page: @debates.current_page,
total_pages: @debates.total_pages ),
url: debates_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-debates/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ en:
creation_enabled: Participants can create debates
endorsements_blocked: Endorsements blocked
endorsements_enabled: Endorsements enabled
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
debates:
actions:
close: Close
Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<% add_decidim_meta_tags(
description: translated_attribute(current_participatory_space.short_description),
title: component_name,
title: t("decidim.proposals.pagination.page_title",
component_name: component_name,
current_page: @proposals.current_page,
total_pages: @proposals.total_pages ),
url: proposals_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-proposals/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,8 @@ en:
title: Status
new:
limit_reached: You cannot create new proposals since you have exceeded the limit.
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
participatory_text_proposal:
alternative_title: There are no participatory texts at the moment
buttons:
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: component_name,
title: t("decidim.components.pagination.page_title",
component_name: component_name,
current_page: @sortitions.current_page,
total_pages: @sortitions.total_pages ),
url: sortitions_url,
resource: current_component) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-sortitions/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ en:
other: Sortitions
decidim:
components:
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
sortitions:
actions:
comment: Comment
Expand Down
Loading