-
Notifications
You must be signed in to change notification settings - Fork 796
AO3-7397 AO3-6765 Configurable page for skin previews #5744
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
base: master
Are you sure you want to change the base?
Changes from all commits
1bcc21f
c92baf3
2278c5b
12f800d
f0f19d7
e58a4e9
40a8901
b304d60
1a37970
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,13 +134,13 @@ def preview | |
| redirect_to user_skins_path(current_user) and return | ||
| end | ||
|
|
||
| flash[:notice] = [] | ||
| flash[:notice] << ts("You are previewing the skin %{title}. This is a randomly chosen page.", title: @skin.title) | ||
| flash[:notice] << ts("Go back or click any link to remove the skin.") | ||
| flash[:notice] << ts("Tip: You can preview any archive page you want by tacking on '?site_skin=[skin_id]' like you can see in the url above.") | ||
| flash[:notice] << "<a href='#{skin_path(@skin)}' class='action' role='button'>".html_safe + ts("Return To Skin To Use") + "</a>".html_safe | ||
| tag = FilterCount.where("public_works_count BETWEEN 10 AND 20").random_order.first.filter | ||
| redirect_to tag_works_path(tag, site_skin: @skin.id) | ||
| flash[:notice] = [ | ||
| t(".skin_title", title: @skin.title), | ||
| t(".remove_skin"), | ||
| t(".tip", site_skin_id: @skin.id), | ||
| helpers.link_to(t(".return_to_skin"), skin_path(@skin), class: "action") | ||
| ].join('<br />') | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I can tell, a |
||
| redirect_to "#{ArchiveConfig.SKIN_PREVIEW_URL}?site_skin=#{@skin.id}" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This provides no guarantees that the url is correct (formatting or exists) - e.g. if you configure "/idonotexist" then you would get an error only when you tried to preview a skin.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fine, but thanks for noting it! |
||
| end | ||
|
|
||
| def set | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in flash message:
Details
Flash before:

Flash using

<br />rather than<ul>:Flash using

<br />rather than<ul>and wrapping it in<p>:AO3-6765 says:
AFAIK I could just do
view_context.content_tag(:p, <rest of the line>)and it would work (see screenshots above), but it's a little unclear for me what the desired look of this flash is, given that there are quite a few changes here now. I decided to leave it is as now since it's no longer part of a list.