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

Commit

Permalink
feat: admin_users improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanViknar committed Apr 22, 2024
1 parent 646030f commit 2064548
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
26 changes: 25 additions & 1 deletion public/css/admin_users.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,29 @@ div#user_details {
}

div#user_details div {
margin: auto;
margin: 1vw;
margin-left: auto;
margin-right: auto;
}

/* Aligned top bar */
div#user_list div#top_bar {
display: flex;
flex-direction: row;
justify-content: space-between;
}

/* Space between user add form elements */
div#user_details_add {
display: flex;
flex-direction: column;
gap: 0.1vw;
justify-items: center;
justify-content: center;
}

/* Picture */
div#user_details_add img {
max-width: 5vw;
margin-left: auto;
}
5 changes: 3 additions & 2 deletions public/css/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,16 @@ footer p.please_dont_see_this {

/* Default form styles */

input[type=submit]{
input[type=submit], button{
background-image: url("../img/widget.png");
background-size: 100% 100%;
font-family: 'Minecraft', sans-serif;
cursor: pointer;
color: white;
padding: 0.3vw;
}

input[type=submit]:hover{
input[type=submit]:hover, button:hover{
background-image: url("../img/widgetclicked.png");
border-color: white;
}
Expand Down
2 changes: 2 additions & 0 deletions public/js/admin_users.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function displayUserAddMenu() {

let user_id_password_reset = document.querySelector('#user_id_password_reset');
let user_id_delete = document.querySelector('#user_id_delete');
let user_details_username = document.querySelector('#user_details_username');

function displayUserEditMenu(user) {
// Display edit menu
Expand All @@ -54,4 +55,5 @@ function displayUserEditMenu(user) {
// Set fields to the appropriate values
user_id_password_reset.value = user.id
user_id_delete.value = user.id
user_details_username.textContent = user.name
}
8 changes: 6 additions & 2 deletions resources/views/admin_users.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
@endforeach
<div class=manager>
<div id="user_list">
<div class="top_bar">
<div id="top_bar">
<div class="search_container">
<img class="search_icon" src="{{ asset('img/search-icon.svg') }}" alt="search icon">
<input type="text" class="search_input" placeholder="Rechercher...">
</div>

<button onclick="displayUserAddMenu()">+</button>
<button onclick="displayUserAddMenu()">Ajouter un utilisateur</button>
</div>
<hr>
<div id="user_table">
Expand Down Expand Up @@ -48,6 +48,8 @@
<form action="/admin/user/add" method="post" autocomplete="off" >
@csrf

<img src="{{ asset('img/user_image.jpg') }}" alt="user default image"/>

<!-- Nom d'utilisateur -->
<div class="user_details_field">
<label for="name">Nom d'utilisateur :</label>
Expand Down Expand Up @@ -79,6 +81,8 @@
</div>

<div id="user_details_edit" class="hidden">
<h2 id="user_details_username"></h2>

<!-- Reset password button -->
<div class="user_details_field">
<form action="/admin/user/resetPassword" method="post">
Expand Down

0 comments on commit 2064548

Please sign in to comment.