<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
  <meta http-equiv="Content-Language" content="en-us" />
  <title><%= ActiveRecord::Base.configurations[RAILS_ENV]['title'] -%> Pipeline</title>
<%= stylesheet_link_tag "style" %>
</head>
<body id="encode-pipeline">
<% if @autoRefresh %>
<script type="text/javascript">
var myTimeout = window.setTimeout("window.location.reload(true)",15000);
function click(e) {
  if (!e) var e = window.event;
  if (e.target) targ = e.target;
  else if (e.srcElement) targ = e.srcElement;
  if (targ.nodeType == 3) // defeat Safari bug
    targ = targ.parentNode;
  if (targ)
    if (targ.href) {
      var rightclick;
      if (e.which) rightclick = (e.which == 3);
      else if (e.button) rightclick = (e.button == 2);
      if (!rightclick)
        window.clearTimeout(myTimeout);
    }
}
if (navigator.appName=="Netscape") {
    document.addEventListener("click", click, true);
} else {
    document.onclick  = click;
}
</script>
<% end %>  
<div id="container">
  <div id="header">
    <h1><%= ActiveRecord::Base.configurations[RAILS_ENV]['title'] -%> Submission Pipeline</h1>
  </div>
  <% if flash[:error] %><div id="error"><%= flash[:error] %></div><% end %>  
  <% if flash[:warning] %><div id="warning"><%= flash[:warning] %></div><% end %>  
  <% if flash[:notice] %><div id="notice"><%= flash[:notice] %></div><% end %>  
  <div id="content">
      <%= yield -%>
  </div>
  <div id="sidebar">
    User: <b>
    <%= @current_user.login %> </b><br/>
    <%= link_to 'Log out', :controller => 'account', :action => 'logout' %> <br/>
    <%= link_to 'Change profile', :controller => 'account', :action => 'change_profile' %> <br/>
    <%= link_to 'Change password', :controller => 'account', :action => 'change_password' %> <br/>
    <%= link_to 'Change email', :controller => 'account', :action => 'change_email' %> <br/>
    <br>
    <%= link_to_unless_current 'All projects', :controller => 'pipeline', :action => 'list' %> <br/>
    <%= link_to_unless_current 'My projects', :controller => 'pipeline', :action => 'show_user' %> <br/>
  </div>
</div>
</body>
</html>
