diff options
author | hellekin <hellekin@cepheide.org> | 2020-10-06 04:26:25 +0200 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-10-06 04:26:25 +0200 |
commit | 56a16be5fb51d8f6a8b04e9e7094aa7c57fb8547 (patch) | |
tree | 83280700beda03eaa0786cdd8c94c93a1533f18b /app/views/application | |
parent | 09ac92747bfbda80a54e44b22576d29d9dfc63c3 (diff) | |
download | incommon-map-56a16be5fb51d8f6a8b04e9e7094aa7c57fb8547.tar.gz |
First pass at something visible
This is a first version of the application, to go beyond simple authentication.
Diffstat (limited to 'app/views/application')
-rw-r--r-- | app/views/application/_user_info.html.erb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/views/application/_user_info.html.erb b/app/views/application/_user_info.html.erb new file mode 100644 index 0000000..4549684 --- /dev/null +++ b/app/views/application/_user_info.html.erb @@ -0,0 +1,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(new_agent_switch_url, method: :get, remote: true, title: "Changer d'Agent") do + "Agent: %s" % current_agent + end, id: 'current_agent_name') %> + <%= tag.li link_to("Ajouter un point", new_resource_url) %> + <%= tag.li link_to("Mon compte", user_url(current_user.id)) %> + <%= tag.li link_to("Terminer la session", logout_url) %> + </ul> + <% else %> + <%= link_to image_tag('login.png', alt: 'Se connecter'), '/authenticate' %> + <% end %> + </nav> +</section> |