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

Benjamin Mako Hill || Want to submit a patch?