Added the RoR Login-Engine and activated it on the site.
[selectricity-live] / app / views / layouts / vb.rhtml
1 <% %>
2 <html>
3     <head>
4         <title><%= @page_title || "VotingBooth" %></title>
5         <%= stylesheet_link_tag "vb", :media => "all" %>
6         <%= engine_stylesheet 'login_engine' %>
7  
8         <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
9     </head>
10     <body>
11         <div id="top">
12             <% if @page_title %>
13               <h3><%= @page_title %></h3>  
14             <% else %>
15               <h3>Voting Booth<br />
16               <font size="-1">Preferential Voting on the Web</font></h3>
17            <% end %>
18
19            <div id="links">
20              <% if session[:user] %>
21                Welcome <strong><%= session[:user].login.capitalize %></strong>
22              <% else %>
23                <%= link_to("Login",:controller => "account", :action => "login") %>/<%= link_to("Sign up", :controller => "account", :action => "signup")%>
24              <% end %> |
25           
26              <%= link_to("Home", :controller => "site", :action => "index")%> |
27              <%= link_to("Browse", :controller => "site", :action => "index")%> |
28
29              <% if session[:user] %>
30                <%= link_to("Logout", :controller => "account", :action => "logout") %>  |
31              <% end %>
32              
33              <%= link_to("Help/About", :controller => "site", :action => "about") %>
34            </div>
35         </div>
36         
37         <% if @flash[:notice]%>
38           <div id="notice"><%= @flash[:notice] %></div>
39         <% end%>
40
41         <div id="main">
42           <%= @content_for_layout %>
43         </div>
44
45         <hr />
46         <div id="footer">(C) 2006 |
47           <%= link_to "MIT Media Lab", "http://www.media.mit.edu" %> and
48           <a href="http://mako.cc">Benjamin Mako Hill</a>
49         </div>
50
51     </body>
52 </html>

Benjamin Mako Hill || Want to submit a patch?