bntzio
4/3/2015 - 5:38 PM

/layours/application.html.erb

/layours/application.html.erb

<!DOCTYPE html>
<html>
<head>
  <title>BookmarkThis!</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="container">
    <ul class="nav nav-pills">
      <li><%= link_to "Home", welcome_index_path %></li>
      <li><%= link_to "About", welcome_about_path %></li>

      <div class="pull-right user-info">
        <% if current_user %>
          Hello <%= current_user.name %>! <%= link_to "Sign Out", destroy_user_session_path, method: :delete %>
        <% else %>
          <%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %> or
          <%= link_to "Register", new_user_registration_path %>
        <% end %>
      </div>

    </ul>

    <% if flash[:notice] %>
        <div class="alert alert-success">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          <%= flash[:notice] %>
        </div>
      <% elsif flash[:error] %>
        <div class="alert alert-danger">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          <%= flash[:error] %>
        </div>
      <% elsif flash[:alert] %>
        <div class="alert alert-warning">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          <%= flash[:alert] %>
        </div>
      <% end %>

    <%= yield %>
    
  </div>

</body>
</html>