Skip to content
Browse files

allow the ability to pass in a url to go back to. If it exists, and l…

…ink will show up for a user to tap on to bring them back to Play.
  • Loading branch information...
1 parent 954b545 commit 2b7fdd7673bfdbfd809907e9a29616d7044d91aa @maddox maddox committed Apr 18, 2012
Showing with 18 additions and 1 deletion.
  1. +2 −0 app/app.rb
  2. +6 −1 app/frontend/styles/base.css.scss
  3. +6 −0 app/templates/token.mustache
  4. +4 −0 app/views/token.rb
View
2 app/app.rb
@@ -103,6 +103,8 @@ def current_user
end
get "/token" do
+ @back_to = params[:back_to]
+
content_type :html
mustache :token, :layout => false
end
View
7 app/frontend/styles/base.css.scss
@@ -97,7 +97,7 @@ a:hover {
#token{
background-color: #ffffff;
- padding: 10px 40px 10px 40px;
+ padding: 10px 40px 40px 40px;
}
#token h2{
@@ -115,6 +115,11 @@ a:hover {
color: $purple;
}
+#token a{
+ display: block;
+ text-align: center;
+}
+
/* NOW PLAYING */
View
6 app/templates/token.mustache
@@ -27,6 +27,12 @@
Use this token to access Play from any of the numerous Play clients available.
<p id="user-token">{{token}}</p>
+
+ {{#back_to}}
+ <a href="{{back_to}}">Back to Play &rarr;</a>
+ {{/back_to}}
+
+
</section>
View
4 app/views/token.rb
@@ -6,6 +6,10 @@ def token
@current_user.token
end
+ def back_to
+ @back_to
+ end
+
end
end
end

0 comments on commit 2b7fdd7

Please sign in to comment.
Something went wrong with that request. Please try again.