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 20 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
27cd821
fix wcag by adding pagination in Proposals index
BarbaraOliveira13 Jan 7, 2025
e85ba2e
add trad key
BarbaraOliveira13 Jan 10, 2025
596d2ca
add pagination to title in the component: Blogs
BarbaraOliveira13 Jan 15, 2025
3c95057
add pagination to title in the component: Debates
BarbaraOliveira13 Jan 15, 2025
aa255a8
lint
BarbaraOliveira13 Jan 15, 2025
e7a8a0d
add pagination in title for component: meetings
BarbaraOliveira13 Jan 17, 2025
c4d58f6
add pagination to title in component: Sortitions
BarbaraOliveira13 Jan 17, 2025
fbec487
add pagination to title in component: Budgets
BarbaraOliveira13 Jan 17, 2025
8f3f0d7
update trad key in proposal for better uniformity
BarbaraOliveira13 Jan 20, 2025
27eea4d
run bundle exec i18n-tasks normalize --locales en
BarbaraOliveira13 Jan 20, 2025
172bfe6
fix CI in user_close_meeting_spec.rb file
BarbaraOliveira13 Jan 24, 2025
b6df6a9
update component meetings file to fix CI
BarbaraOliveira13 Jan 30, 2025
c15ce2a
lint
BarbaraOliveira13 Jan 30, 2025
d64af68
lint
BarbaraOliveira13 Jan 30, 2025
93b0dcc
Move locales changes from 'sortition' to 'core'
BarbaraOliveira13 Jan 31, 2025
e6d7b96
refacto and move budgets components changes from 'budgets files' to '…
BarbaraOliveira13 Jan 31, 2025
88972ec
clean budgets_controller
BarbaraOliveira13 Feb 7, 2025
e242eec
clean meetings_controller
BarbaraOliveira13 Feb 7, 2025
a9874f7
clean posts & fix CI
BarbaraOliveira13 Feb 7, 2025
175c86d
Back to the last changes for posts
BarbaraOliveira13 Feb 7, 2025
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<% add_decidim_meta_tags(
description: translated_attribute(budget.description),
title: t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)),
title: t("decidim.components.pagination.page_title",
component_name: "#{t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title))}",
current_page: projects.current_page,
total_pages: projects.total_pages ),
url: budget_url(budget),
resource: budget) %>

Expand Down
2 changes: 2 additions & 0 deletions decidim-core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ en:
dummy_step_attribute1: Dummy Step Attribute 1
dummy_step_attribute2: Dummy Step Attribute 2
dummy_step_translatable_text: Dummy Step Translatable Text
pagination:
page_title: "%{component_name} - Page %{current_page} of %{total_pages}"
contact: Contact
content_blocks:
announcement:
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
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
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: @proposals.current_page,
total_pages: @proposals.total_pages ),
url: proposals_url,
resource: current_component) %>

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
Loading