Merge jdong
[selectricity-live] / app / views / layouts / main.rhtml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3   <head>
4     <title><%= @page_title || "Selectricity" %></title>
5     <%= stylesheet_link_tag "common", :media => "all" %>
6     <%= stylesheet_link_tag "main", :media => "all" %>
7     <%= stylesheet_link_tag *(@stylesheets) %>
8     <%= stylesheet_link_tag "ie6hacks", :media => "all" if request.user_agent =~ /MSIE 6/ %>
9     <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
10   </head>
11
12   <body>
13   <div id="page-wrapper">
14
15     <div id="left-side">
16       <%= link_to "<h1>Selectricity</h1>",
17                   :controller => 'site', :action => 'index' %>
18
19       <div id="left-side-content">
20         <% if flash[:notice]%>
21         <div id="notice"><%= flash[:notice] %></div>
22         <% end%>
23
24         <%= @sidebar_content %>
25       </div>
26
27     </div>
28
29     <div id="right-side">
30       <div id="top-bar">
31             <div id="bar-left">
32         <% if session[:user] %>
33           <%= link_to User.find(session[:user]).login.capitalize,
34                       :controller => "account",
35                       :action => "summary", :id => session[:user][:id] %>
36           <%= link_to "logout", :controller => "account",
37                       :action => "logout" %> 
38         <% else %>
39           <%= link_to("login", :controller => "account", :action => "login")
40           %>/<%= link_to("sign up", :controller => "account", :action => "signup")%>
41         <% end %> 
42         </div>
43
44         <div id="bar-right">
45           <%= link_to("help/about", :controller => "site", :action => "about") %>
46         </div>
47       </div> <!-- end of top-bar -->
48       
49       <div id="main-box">
50         <%= @content_for_layout %>
51       </div>
52
53     </div> <!-- end of right-side -->
54     <div class="clear-div"></div>
55     <%= render_partial 'layouts/footer' %>
56     </div>
57   </body>
58 </html>

Benjamin Mako Hill || Want to submit a patch?