added meta user info

This commit is contained in:
clemkeirua 2020-10-06 15:02:44 +02:00
parent 4ebb0a962e
commit e9c33ecbd0
4 changed files with 38 additions and 0 deletions

View file

@ -42,6 +42,7 @@ as well as a link to its edit page.
</header>
<section class="main-content__body">
<%= render partial: 'manager/application/user_meta', locals: {user: page.resource&.user} %>
<dl>
<% page.attributes.each do |attribute| %>
<dt class="attribute-label" id="<%= attribute.name %>">

View file

@ -0,0 +1,35 @@
<dl>
<dt class="attribute-label" id="meta-usager">
Usager
</dt>
<dd class="attribute-data attribute-data--meta-usager">
<%= link_to('Voir son compte utilisateur', manager_user_path(user)) %>
</dd>
</dl>
<dl>
<dt class="attribute-label" id="meta-usager">
Instructeur
</dt>
<dd class="attribute-data attribute-data--meta-usager">
<% if user.instructeur.present? %>
<%= link_to('Voir son compte instructeur', manager_instructeur_path(user.instructeur)) %>
<% else %>
Pas instructeur !
<% end %>
</dd>
</dl>
<dl>
<dt class="attribute-label" id="meta-usager">
Administrateur
</dt>
<dd class="attribute-data attribute-data--meta-usager">
<% if user.administrateur.present? %>
<%= link_to('Voir son compte administrateur', manager_administrateur_path(user.administrateur)) %>
<% else %>
Pas administrateur !
<% end %>
</dd>
</dl>
<hr />

View file

@ -41,6 +41,7 @@ as well as a link to its edit page.
</header>
<section class="main-content__body">
<%= render partial: 'manager/application/user_meta', locals: {user: page.resource&.user} %>
<dl>
<% page.attributes.each do |attribute| %>
<dt class="attribute-label" id="<%= attribute.name %>">

View file

@ -38,6 +38,7 @@ as well as a link to its edit page.
</header>
<section class="main-content__body">
<%= render partial: 'manager/application/user_meta', locals: {user: user} %>
<dl>
<% page.attributes.each do |attribute| %>
<dt class="attribute-label" id="<%= attribute.name %>">