This commit is contained in:
albert
2010-11-19 16:24:17 -05:00
parent a156cc8c62
commit c6304c6e08
41 changed files with 346 additions and 53 deletions

View File

@@ -0,0 +1,15 @@
<div class="login-header">
<% if CurrentUser.is_anonymous? %>
<% form_tag(sessions_path) do %>
<span class="notice">You are not logged in.</span>
<%= label_tag :name %>
<%= text_field_tag :name %>
<%= label_tag :password %>
<%= password_field_tag :password %>
<% end %>
<% else %>
<%#= nav_link_to("My Account", user_path(CurrentUser.user)) %>
<% end %>
</div>

View File

@@ -0,0 +1,15 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", users_path %></li>
<li><%= link_to "Register", new_user_path %></li>
<% if @user && !@user.new_record? %>
<li>|</li>
<li><%= link_to "Edit", edit_user_path(@user) %></li>
<li><%= link_to "Profile", user_path(@user) %></li>
<% end %>
<% unless CurrentUser.user.is_anonymous? %>
<li>|</li>
<li><%= link_to "Logout", session_path(0), :method => :delete %></li>
<% end %>
</menu>
<% end %>