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 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
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 @@ def drafts
redirect_to logged_in? ? user_path(current_user) : new_user_session_path
return
end

@page_subtitle = t(".page_title", username: @user.login)

if params[:pseud_id]
@pseud = @user.pseuds.find_by(name: params[:pseud_id])
Expand Down
3 changes: 3 additions & 0 deletions config/locales/controllers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ 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.
works:
drafts:
page_title: "%{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 @@ -69,6 +69,7 @@ Feature: Work Drafts
Then I should see "Drafts (1)"
When I follow "Drafts (1)"
Then I should see "draft to post"
And the page title should include "drafter - Drafts"
And I should see "Post Draft" within "#main .own.work.blurb .actions"
And I should see "Delete Draft" within "#main .own.work.blurb .actions"
When I follow "Post Draft"
Expand Down
Loading