<!DOCTYPE html>
<html>
<head>
  <title>Dabell</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

  <nav class='global_nav'>
    <ul>
      <li>
        <%= link_to edit_user_registration_path do %>
          <i class='fa fa-pencil-square-o'></i> Edit profile
        <% end %>
      </li>
      <li>
        <%= link_to destroy_user_session_path, method: 'delete' do %>
          <i class='fa fa-sign-out'></i> Logout
        <% end %>
      </li>
    </ul>
  </nav>

  <% if flash[:error] %>
    <%= content_tag(:div, 'This is error', class: "flash_error") do %>
      <i class='fa fa-exclamation-circle'></i> <%= flash[:error] %>
    <% end %>
  <% end %>

  <% if flash[:alert] %>
    <%= content_tag(:div, 'This is error', class: "flash_alert") do %>
      <i class='fa fa-bell'></i>  <%= flash[:alert] %>
    <% end %>
  <% end %>

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Dabell</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

  <nav class='global_nav'>
    <ul>
      <% if user_signed_in?  %>
        <li>
          <%= link_to edit_user_registration_path do %>
            <i class='fa fa-pencil-square-o'></i> Edit profile
          <% end %>
        </li>
        <li>
          <%= link_to destroy_user_session_path, method: 'delete' do %>
            <i class='fa fa-sign-out'></i> Logout
          <% end %>
        </li>
      <% end %>
    </ul>
  </nav>

  <% if flash[:error] %>
    <%= content_tag(:div, 'This is error', class: "flash_error") do %>
      <i class='fa fa-exclamation-circle'></i> <%= flash[:error] %>
    <% end %>
  <% end %>

  <% if flash[:alert] %>
    <%= content_tag(:div, 'This is error', class: "flash_alert") do %>
      <i class='fa fa-bell'></i>  <%= flash[:alert] %>
    <% end %>
  <% end %>

<%= yield %>

</body>
</html>

Hide global navigation items when not uesr signed in
Hide global navigation items when not uesr signed in
