aboutsummaryrefslogtreecommitdiff
path: root/app/views/application/_user_info.html.erb
blob: 048e6fb4f4cf740414ee163337fea78f1dcbe422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<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>