ajout d'une route /manager/users/:id/emails

This commit is contained in:
clemkeirua 2020-10-06 16:52:10 +02:00
parent e9c33ecbd0
commit 27b8797296
4 changed files with 27 additions and 0 deletions

View file

@ -46,5 +46,10 @@ module Manager
redirect_to manager_users_path
end
def emails
@user = User.find(params[:id])
end
end
end

View file

@ -1,3 +1,11 @@
<dl>
<dt class="attribute-label" id="meta-usager">
Emails
</dt>
<dd class="attribute-data attribute-data--meta-usager">
<%= link_to('Voir les derniers emails', emails_manager_user_path(user)) %>
</dd>
</dl>
<dl>
<dt class="attribute-label" id="meta-usager">
Usager

View file

@ -0,0 +1,13 @@
<% content_for(:title) { "Emails vers #{@user.email}" } %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
</header>
<section class="main-content__body">
<dl>
</dl>
</section>

View file

@ -31,6 +31,7 @@ Rails.application.routes.draw do
delete 'delete', on: :member
post 'resend_confirmation_instructions', on: :member
put 'enable_feature', on: :member
get 'emails', on: :member
end
resources :instructeurs, only: [:index, :show] do