Files
danbooru/app/views/layouts/default.html.erb
2011-09-11 16:40:58 -04:00

74 lines
2.9 KiB
Plaintext

<!doctype html>
<html>
<head>
<title><%= yield :page_title %></title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
<%= csrf_meta_tag %>
<meta name="current-user-name" content="<%= CurrentUser.name %>">
<meta name="current-user-id" content="<%= CurrentUser.id %>">
<meta name="user-comment-threshold" content="<%= CurrentUser.comment_threshold %>">
<% unless CurrentUser.user.blacklisted_tags.blank? %>
<meta name="blacklisted-tags" content="<%= CurrentUser.user.blacklisted_tags %>">
<% end %>
<% if flash[:notice] =~ /error/ %>
<meta name="errors" content="true">
<% end %>
<meta name="max-image-width" content="500">
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
<%= stylesheet_link_tag "application", :media => "screen" %>
<%= javascript_include_tag "application" %>
<%= Danbooru.config.custom_html_header_content %>
<%= yield :html_header %>
</head>
<body>
<header id="top">
<%= render "news/listing" %>
<h1><%= link_to Danbooru.config.app_name, "/" %></h1>
<nav>
<menu class="main">
<% if CurrentUser.user.is_anonymous? %>
<%= nav_link_to("Login", new_session_path) %>
<% else %>
<%= nav_link_to("My Account", user_path(CurrentUser.user)) %>
<% end %>
<%= nav_link_to("Posts", posts_path) %>
<%= nav_link_to("Comments", comments_path(:group_by => "post")) %>
<%= nav_link_to("Notes", notes_path(:group_by => "post")) %>
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
<% if CurrentUser.is_moderator? %>
<%= nav_link_to("Aliases", tag_aliases_path) %>
<%= nav_link_to("Implications", tag_implications_path) %>
<% end %>
<%= nav_link_to("Pools", pools_path) %>
<%= nav_link_to("Wiki", wiki_pages_path(:title => "help:home")) %>
<%= nav_link_to("Forum", forum_topics_path, :class => (CurrentUser.user.has_forum_been_updated? ? "forum-updated" : nil)) %>
<% if CurrentUser.is_janitor? %>
<%= nav_link_to("Dashboard", moderator_dashboard_path) %>
<% end %>
<%= nav_link_to("&raquo;".html_safe, site_map_path) %>
</menu>
<%= yield :secondary_links %>
</nav>
</header>
<div id="page">
<%- if flash[:notice] -%>
<div class="ui-corner-all ui-state-highlight" id="notice"><span class="ui-icon ui-icon-info"></span> <%= flash[:notice] %></div>
<%- else -%>
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"><span class="ui-icon ui-icon-info"></span></div>
<%- end -%>
<%= yield :layout %>
</div>
<footer>
<%= yield :page_footer_content %>
</footer>
<%= render "static/footer" %>
</body>
</html>