First major stab at the integration of Courtland's CSS into
[selectricity-live] / app / views / layouts / main.rhtml
1 <html>
2   <head>
3     <title><%= @page_title || "Selectricity" %></title>
4     <%= stylesheet_link_tag "main", :media => "all" %>
5     <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
6   </head>
7
8   <body>
9     <div id="top">
10     <% if @page_title %>
11       <h3><%= @page_title %></h3>  
12     <% else %>
13       <span id="headertext"><%= link_to('<h3>Selectricity<br />
14       <font size="-1">Voting Machinery for the Masses</font></h3>', :controller => 
15       'site', :action => 'index')%></span>
16    <% end %>
17
18      <div id="links">
19      <% if session[:user] %>
20        Welcome <strong><%= User.find(session[:user]).login.capitalize %></strong>
21        <%= link_to("Profile", :controller => "account",
22            :action => "summary", :id => session[:user][:id] )%>
23        <%= link_to("Logout", :controller => "account",
24                              :action => "logout") %>  |
25      <% else %>
26        <%= link_to("Login", :controller => "account", :action => "login")
27        %>/<%= link_to("Sign up", :controller => "account", :action => "signup")%>
28      <% end %> |
29        
30      <%= link_to("Help/About", :controller => "site", :action => "about") %>
31   </div>
32 </div>
33       
34       <% if flash[:notice]%>
35         <div id="notice"><%= flash[:notice] %></div>
36       <% end%>
37
38       <div id="main">
39         <%= @content_for_layout %>
40       </div>
41
42   <%= render_partial 'layouts/footer' %>
43   </body>
44 </html>

Benjamin Mako Hill || Want to submit a patch?