Browse Source

top links

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
cf9b024303
  1. 21
      app/views/fragments/_top.html.erb

21
app/views/fragments/_top.html.erb

@ -1,7 +1,26 @@
<div id="header"> <div id="header">
<h1><a href="/">Simple DNS</a></h1> <h1><a href="/">Simple DNS</a></h1>
<div id="main-navigation">
<ul class="wat-cf">
<% if user_signed_in? %>
<li><%= link_to('Dashboard', dashboard_path, :data => {:pjax => '#main'}) %></li>
<li><%= link_to 'Domains', domains_path, :data => {:pjax => '#main'} %></li>
<% else %>
<li><%= link_to('Home', root_path, :data => {:pjax => '#main'}) %></li>
<li><%= link_to('About', root_path, :data => {:pjax => '#main'}) %></li>
<% end %>
</ul>
</div>
<div id="user-navigation"> <div id="user-navigation">
<%= render :partial => 'fragments/user_navigation' %> <ul class="wat-cf">
<% if user_signed_in? %>
<li><%= link_to(current_user.email, edit_user_registration_path, :data => {:pjax => '#main'}) %></li>
<li><%= link_to('Sign out', destroy_user_session_path, :method => :delete) %></li>
<% else %>
<li><%= link_to('Sign up', new_user_registration_path, :data => {:pjax => '#main'}) %></li>
<li><%= link_to('Sign in', new_user_session_path, :data => {:pjax => '#main'}) %></li>
<% end %>
</ul>
</div> </div>
<div id="main-navigation"> <div id="main-navigation">
<ul class="wat-cf"></ul> <ul class="wat-cf"></ul>

Loading…
Cancel
Save