added meta user info
This commit is contained in:
parent
4ebb0a962e
commit
e9c33ecbd0
4 changed files with 38 additions and 0 deletions
|
@ -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 %>">
|
||||
|
|
35
app/views/manager/application/_user_meta.html.erb
Normal file
35
app/views/manager/application/_user_meta.html.erb
Normal 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 />
|
|
@ -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 %>">
|
||||
|
|
|
@ -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 %>">
|
||||
|
|
Loading…
Reference in a new issue