Permalink
Browse files

separate layouts, organized setup steps

  • Loading branch information...
1 parent 945c3bf commit c9327899284aea1630ca483877d7ab1cac9756e8 @brianshaler brianshaler committed May 27, 2012
Showing with 2 additions and 71 deletions.
  1. +2 −0 views/admin/login.ejs
  2. +0 −5 views/admin/setup/connect.ejs
  3. +0 −54 views/admin/setup/twitter_app.ejs
  4. +0 −12 views/layout.ejs
View
@@ -1,9 +1,11 @@
<%
if (!user_name) { user_name = ""; }
+if (!hasOwnProperty("redirect_url")) { redirect_url = ""; }
%>
<h1>Login</h1>
<p>
<form method="post" action="/admin/login">
+ <input type="hidden" name="redirect_url" value="<%= redirect_url %>" />
<table>
<tr>
<td>
@@ -1,5 +0,0 @@
-<p>We'll now authenticate your user account to the app...</p>
-<p><a href="/twitter/oauth">Click here to authenticate</a></p>
-<% if (is_setup) { %>
-<p><strong>Your account has been connected!</strong> <a href="/admin/setup/<%= current_step+1 %>">Next Step</a></p>
-<% } %>
@@ -1,54 +0,0 @@
-<%
-if (!settings) { settings = {}; }
-if (!settings.consumer_key) { settings.consumer_key = ""; }
-if (!settings.consumer_secret) { settings.consumer_secret = ""; }
-if (!settings.callback_url) { settings.callback_url = ""; }
-%>
-<h1>Twitter Configuration</h1>
-<p>
- Copy the details from your Twitter App, which you can find or create at <a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a>
-</p>
-<p>
- <form method="post" action="/admin/setup/1">
- <table>
- <tr>
- <td>
- <strong>Consumer Key:</strong>
- </td>
- <td>
- <input name="settings[twitter][consumer_key]" value="<%= settings.consumer_key %>" />
- </td>
- </tr>
- <tr>
- <td>
- <strong>Consumer Secret:</strong>
- </td>
- <td>
- <input name="settings[twitter][consumer_secret]" value="<%= settings.consumer_secret %>" />
- </td>
- </tr>
- <tr>
- <td>
- <strong>Callback URL:</strong>
- </td>
- <td>
- <input name="settings[twitter][callback_url]" value="<%= settings.callback_url %>" />
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td>
- <input type="submit" value="Save &amp; Next" />
- </td>
- </tr>
- </table>
- </form>
-</p>
-<p>
- You may consider using these keys, but if you do, your app MUST be accessible at the same callback URL.
-<pre>
-consumer_key: LgLCjba8GAl4fwPVJFhdA
-consumer_secret: ir1L5t0htKDN83ZZlX8pgdO15SbEH6rb0P797bvoAw
-callback_url: http://local.saturn.io:3000/twitter/auth
-</pre>
-</p>
View
@@ -19,18 +19,6 @@
</header>
<div class="container_12">
- <div class="grid_3">
- <ul class="nav nav-list">
- <li class="nav-header">Friends</li>
- <li><a href="/dashboard">Recent Posts</a></li>
- <li><a href="/dashboard/top">Top Posts</a></li>
- <li class="nav-header">Topics</li>
- <li><a href="/topic/trending">Trending</a></li>
- <li><a href="/topic/popular">Popular</a></li>
- <li class="nav-header">Settings</li>
- <li><a href="/admin">Admin</a></li>
- </ul>
- </div>
<div class="grid_9">
<%- flash_message() %>
<%- body %>

0 comments on commit c932789

Please sign in to comment.