% if @short_url %>
<% end %>
<%= @title.present? ? "#{@title} | Lobsters" : "Lobsters" %>
<%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> <% if @rss_link %> <%= raw(@rss_link) %> <% end %> <% if @user %> <% end %>
;" href="/" title="Lobsters (<%= @traffic.to_i %>)">
<% links = { "/" => "Home", "/newest" => "Newest", "/comments" => "Comments" } %> <% if @user %> <% links.merge!({ "/threads" => "Your Threads", "/stories/new" => "Submit Story" }) %> <% end %> <% links.merge!({ "/search" => "Search" }) %> <% if @cur_url.present? && !links.keys.include?(@cur_url) && @heading.present? %>
<%= @heading %>
<% end %>
<% links.each do |u,v| %>
><%= v %>
<% end %>
">
<% if @user %>
Filters
<% if (count = @user.unread_message_count) > 0 %>
<%= count %> New Message<%= count == 1 ? "" : "s" %>
<% else %>
Messages
<% end %>
<%= @user.username %> (<%= @user.karma %>)
<%= link_to "Logout", { :controller => "login", :action => "logout" }, :data => { :confirm => "Are you sure you want to logout?" }, :method => "post" %> <% else %>
Login
<% end %>
<% if flash[:error] %>
<%= flash[:error] %>
<% elsif flash[:success] %>
<%= flash[:success] %>
<% end %> <%= yield %>