Skip to content
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
4 changes: 2 additions & 2 deletions app/controllers/skins_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ def preview

def set
if @skin.cached?
flash[:notice] = ts("The skin %{title} has been set. This will last for your current session.", title: @skin.title)
flash[:notice] = t(".success_html", skin_title: @skin.title, skin_page_link: helpers.link_to(t(".skin_page", skin_title: @skin.title), skin_path(@skin)))
session[:site_skin] = @skin.id
else
flash[:error] = ts("Sorry, but only certain skins can be used this way (for performance reasons). Please drop a support request if you'd like %{title} to be added!", title: @skin.title)
flash[:error] = t(".failure", skin_title: @skin.title)
end
redirect_back_or_to @skin
end
Expand Down
4 changes: 4 additions & 0 deletions config/locales/controllers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ en:
index:
public_site_page_title: Public Site Skins
public_work_page_title: Public Work Skins
set:
failure: Sorry, but only certain skins can be used this way (for performance reasons). Please drop a support request if you'd like %{skin_title} to be added!
skin_page: "%{skin_title} skin page"
success_html: You're now using the %{skin_title} skin. This will last for 2 weeks even if you close your browser. If you'd like to keep it longer, go to the %{skin_page_link} and select the "Use" button at the bottom of the page.
stats:
index:
page_title: "%{username} - Stats"
Expand Down
2 changes: 1 addition & 1 deletion features/other_b/skin_public.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Public skins
And the skin "public skin" is in the chooser
When I am logged in as "skinner"
And I press "public skin"
Then I should see "The skin public skin has been set. This will last for your current session."
Then I should see "You're now using the public skin skin. This will last for 2 weeks"
And the page should have the cached skin "public skin"
When I press "Default"
Then I should see "You are now using the default site skin again!"
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/skins_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@
shared_examples "user can set it" do
it "redirects with success notice" do
post :set, params: { id: skin.id }
it_redirects_to_with_notice(skin_path(skin), "The skin Cached Public Skin has been set. This will last for your current session.")
it_redirects_to_with_notice(skin_path(skin), "You're now using the #{skin.title} skin. This will last for 2 weeks even if you close your browser. If you'd like to keep it longer, go to the <a href=\"#{skin_path(skin)}\">#{skin.title} skin page</a> and select the \"Use\" button at the bottom of the page.")
end
end

Expand Down
Loading