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

AO3-6768 update browser page title in drafts page #4915

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
redirect_to logged_in? ? user_path(current_user) : new_user_session_path
return
end

@page_subtitle = t('users.page_subtitle.drafts_page', username: @user.login)

Check warning on line 163 in app/controllers/works_controller.rb

View workflow job for this annotation

GitHub Actions / Rubocop

[rubocop] reported by reviewdog 🐶 Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. Raw Output: app/controllers/works_controller.rb:163:24: C: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
mystyrust marked this conversation as resolved.
Show resolved Hide resolved

if params[:pseud_id]
@pseud = @user.pseuds.find_by(name: params[:pseud_id])
Expand Down
2 changes: 2 additions & 0 deletions config/locales/controllers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ en:
ban_notice_html: Your account has been banned. You are not permitted to add or edit archive content. Please %{contact_abuse_link} for more information.
contact_abuse: contact Abuse
suspension_notice_html: Your account has been suspended until %{suspended_until}. You may not add or edit content until your suspension has been resolved. Please %{contact_abuse_link} for more information.
page_subtitle:
drafts_page: "%{username} - Drafts"
1 change: 1 addition & 0 deletions features/works/work_drafts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Feature: Work Drafts
And the draft "draft to post"
When I am on drafter's works page
Then I should see "Drafts (1)"
And the page title should include "drafter - Drafts"
mystyrust marked this conversation as resolved.
Show resolved Hide resolved
When I follow "Drafts (1)"
Then I should see "draft to post"
And I should see "Post Draft" within "#main .own.work.blurb .actions"
Expand Down
Loading