1542b84acb84a7cad262b9f88008466dd95b5733
[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 \
9       request.methods.include?(:user_agent) and \
10       request.user_agent =~ /msie\s(5\.[5-9]|[6]\.[0-9]*).*(win)/i %>
11     <%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
12   </head>
13
14   <body>
15   <div id="page-wrapper">
16
17     <div id="left-side">
18       <%= link_to "<h1>Selectricity</h1>",
19                   :controller => 'site', :action => 'index' %>
20
21       <div id="left-side-content">
22         <% if flash[:notice]%>
23         <div id="notice"><%= flash[:notice] %></div>
24         <% end%>
25
26         <%= @sidebar_content %>
27       </div>
28
29     </div>
30
31     <div id="right-side">
32       <div id="top-bar">
33             <div id="bar-left">
34         <% if session[:user] %>
35           <%= link_to User.find(session[:user]).login.capitalize,
36                       :controller => "account",
37                       :action => "summary", :id => session[:user][:id] %>
38           <%= link_to "logout", :controller => "account",
39                       :action => "logout" %> 
40         <% else %>
41           <%= link_to("login", :controller => "account", :action => "login")
42           %>/<%= link_to("sign up", :controller => "account", :action => "signup")%>
43         <% end %> 
44         </div>
45
46         <div id="bar-right">
47           <%= link_to("help/about", :controller => "site", :action => "about") %>
48         </div>
49       </div> <!-- end of top-bar -->
50       
51       <div id="main-box">
52         <%= @content_for_layout %>
53       </div>
54
55     </div> <!-- end of right-side -->
56     <div class="clear-div"></div>
57     <%= render_partial 'layouts/footer' %>
58     </div>
59   </body>
60 </html>

Benjamin Mako Hill || Want to submit a patch?