Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
bouton admin
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTheGeek committed Dec 11, 2023
1 parent b5f7119 commit 0fbc827
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<nav class="navbar navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="/">Accueil</a>
<a id="adminBtn" class="navbar-brand ml-auto" href="/admin" aria-hidden="true">Espace admin</a>
<a id="connexionBtn" class="navbar-brand ml-auto">Connexion</a>
</div>
</nav>
Expand Down Expand Up @@ -137,6 +138,11 @@ <h5 class="modal-title" id="alertModalLabel"></h5>
admin
*/
$('#id').text('ID: ' + user.id);
if (user.role === 'admin') {
$('#adminBtn').show();
} else {
$('#adminBtn').hide();
}
updateConnectionStatus(true);
},
error: function (error) {
Expand Down

0 comments on commit 0fbc827

Please sign in to comment.