57 lines
1.8 KiB
Plaintext
Executable File
57 lines
1.8 KiB
Plaintext
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
|
|
<%= stylesheet_link_tag :application %>
|
|
<%= csrf_meta_tag %>
|
|
<%= javascript_include_tag :application %>
|
|
<%= yield(:head) %>
|
|
</head>
|
|
<body>
|
|
<div id="header">
|
|
<div id="logo">
|
|
<%= image_tag "rails.png" %>
|
|
<h1><%= t :name %></h1>
|
|
<%= t :description %>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<div id="menu_wrapper">
|
|
<ul>
|
|
<li><%= link_to "Forum Index", root_path %></li>
|
|
<% if user_signed_in? %>
|
|
<li><%= link_to "User Control Panel", edit_user_registration_path %></li>
|
|
<% if current_user.admin? %>
|
|
<li><%= link_to "User Administration", users_path %></li>
|
|
<% end %>
|
|
<li><%= link_to "Logout", destroy_user_session_path, :method => :delete %></li>
|
|
<% else %>
|
|
<li><%= link_to "Login", new_user_session_path %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<div id="bottom">
|
|
<% if user_signed_in? %>
|
|
Welcome <strong><%= current_user.username %></strong>, your last login was <%= time_ago_in_words(current_user.last_sign_in_at) %> ago
|
|
<% else %>
|
|
You are not logged in. Please <%= link_to "login", new_user_session_path %> or <%= link_to "register", new_user_registration_path %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<% flash.each do |name, msg| %>
|
|
<%= content_tag :div, msg, :id => "flash_#{name}" %>
|
|
<% end %>
|
|
<%= yield %>
|
|
</div>
|
|
|
|
<div id="info_box">
|
|
<p>
|
|
Total number of registered users: <strong><%= User.count %></strong><br />
|
|
Newest registered user: <%= link_to User.last.username unless User.last.nil? %>
|
|
</p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|