views
This commit is contained in:
15
app/views/users/_login_header.html.erb
Normal file
15
app/views/users/_login_header.html.erb
Normal 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>
|
||||
15
app/views/users/_secondary_links.html.erb
Normal file
15
app/views/users/_secondary_links.html.erb
Normal 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 %>
|
||||
Reference in New Issue
Block a user