% if @short_url %>
<% end %>
<%= @title.present? ? "#{@title} | " : "" %><%= Rails.application.name %>
<%= stylesheet_link_tag "application", :media => "all" %> <% if @user %> <%= javascript_include_tag "application" %> <% end %> <%= csrf_meta_tags %> <% if @rss_link %>
<% end %>
;" href="/" title="<%= Rails.application.name %> (<%= @traffic.to_i %>)">
<% links = { "/" => "Home", "/recent" => "Recent", "/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 %>
>Filters
<% if @user %> <% 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 %>