aboutsummaryrefslogtreecommitdiff
path: root/app/views/application/_user_info.html.erb
blob: a1a42d21a64efa3bcbb2acf22f1b8e660cac787e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<section id="user_info" class="<%= current_user.present? ? 'authenticated' : 'anonymous' %>">
    <nav>
        <% if current_user.present? %>
        <a href="/my/dashboard"><%= image_tag current_user.avatar_url, alt: current_user.username %></a>
        <ul>
            <%= tag.li link_to("Ajouter un point", new_agent_resource_url(agent_id: current_agent)) %>
            <%= tag.li link_to("Terminer la session", logout_url) %>
        </ul>
        <% else %>
        <%= link_to image_tag('login.png', alt: 'Se connecter'), '/authenticate' %>
        <% end %>
    </nav>
</section>

<% content_for :debug do %>
<%= @current_user.avatar_url %>
<% end %>