Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09429080b1 | |||
| fc82ffc481 | |||
| 9317484deb | |||
| 9a7c06b81d |
@@ -1 +1,3 @@
|
|||||||
/target
|
/target
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -11,6 +11,7 @@ common:
|
|||||||
search: Search
|
search: Search
|
||||||
reset: Reset
|
reset: Reset
|
||||||
show: Show
|
show: Show
|
||||||
|
no_result: No results
|
||||||
close: Close
|
close: Close
|
||||||
confirmation: Confirmation
|
confirmation: Confirmation
|
||||||
are_you_sure: Are you sure?
|
are_you_sure: Are you sure?
|
||||||
|
|||||||
+16
-6
@@ -11,6 +11,7 @@ common:
|
|||||||
search: Filtrer
|
search: Filtrer
|
||||||
reset: Réini.
|
reset: Réini.
|
||||||
show: Voir
|
show: Voir
|
||||||
|
no_result: Aucun résultat
|
||||||
close: Fermer
|
close: Fermer
|
||||||
confirmation: Confirmation
|
confirmation: Confirmation
|
||||||
are_you_sure: Êtes-vous sûr ?
|
are_you_sure: Êtes-vous sûr ?
|
||||||
@@ -27,14 +28,17 @@ user:
|
|||||||
owner_books: Livres possédés
|
owner_books: Livres possédés
|
||||||
borrowed_books: Livres empruntés
|
borrowed_books: Livres empruntés
|
||||||
index:
|
index:
|
||||||
title: Tous les utilisateurs
|
title_tag: Liste des utilisateur.ice.s | BookForge
|
||||||
button: Ajouter un utilisateur
|
title: Tous les utilisateur.ice.s
|
||||||
|
button: Ajouter un.e utilisateur.ice
|
||||||
edit:
|
edit:
|
||||||
|
title_tag: Modifier l'utilisateur.ice | BookForge
|
||||||
title: Modifier
|
title: Modifier
|
||||||
button: Modifier l'utilisateur
|
button: Modifier l'utilisateur.ice
|
||||||
new:
|
new:
|
||||||
title: Nouvel utilisateur
|
title_tag: Nouvel utilisateur.ice | BookForge
|
||||||
button: Créer l'utilisateur
|
title: Nouvel utilisateur.ice
|
||||||
|
button: Créer l'utilisateur.ice
|
||||||
book:
|
book:
|
||||||
attributes:
|
attributes:
|
||||||
title: Titre
|
title: Titre
|
||||||
@@ -44,24 +48,30 @@ book:
|
|||||||
current_holder: Détenteur.ice actuel.le
|
current_holder: Détenteur.ice actuel.le
|
||||||
comment: Commentaire
|
comment: Commentaire
|
||||||
index:
|
index:
|
||||||
|
title_tag: Liste des livres | BookForge
|
||||||
title: Tous les livres
|
title: Tous les livres
|
||||||
new:
|
new:
|
||||||
|
title_tag: Nouveau livre | BookForge
|
||||||
title: Nouveau livre
|
title: Nouveau livre
|
||||||
button: Créer le livre
|
button: Créer le livre
|
||||||
button_short: Ajouter un livre
|
button_short: Ajouter un livre
|
||||||
edit:
|
edit:
|
||||||
|
title_tag: Modifier le livre | BookForge
|
||||||
title: Modifier le livre
|
title: Modifier le livre
|
||||||
button: Modifier le livre
|
button: Modifier le livre
|
||||||
show:
|
show:
|
||||||
|
title_tag: Details | BookForge
|
||||||
book_details: Détails du livre
|
book_details: Détails du livre
|
||||||
user_details: Détails de l'utilisateur
|
user_details: Détails de l'utilisateur.ice
|
||||||
more_informations: Plus d'informations
|
more_informations: Plus d'informations
|
||||||
footer:
|
footer:
|
||||||
message: Fait avec amour & Nique les fachos !
|
message: Fait avec amour & Nique les fachos !
|
||||||
error:
|
error:
|
||||||
error_404:
|
error_404:
|
||||||
|
title_tag: Erreur 404 | BookForge
|
||||||
title: Oups ! Cette page n'existe pas
|
title: Oups ! Cette page n'existe pas
|
||||||
subtitle: 404 NOT FOUND
|
subtitle: 404 NOT FOUND
|
||||||
button: Retour à l'accueil
|
button: Retour à l'accueil
|
||||||
generic:
|
generic:
|
||||||
|
title_tag: Erreur | BookForge
|
||||||
title: Oups ! Une erreur s'est produite
|
title: Oups ! Une erreur s'est produite
|
||||||
|
|||||||
+2
-2
@@ -25,7 +25,7 @@ use crate::{
|
|||||||
#[derive(Template, WebTemplate)]
|
#[derive(Template, WebTemplate)]
|
||||||
#[template(path = "users/index.html")]
|
#[template(path = "users/index.html")]
|
||||||
struct UsersIndexTemplate {
|
struct UsersIndexTemplate {
|
||||||
user_with_books_number: Vec<UserWithBookNumber>,
|
users_with_books_number: Vec<UserWithBookNumber>,
|
||||||
query: IndexQuery,
|
query: IndexQuery,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ pub async fn index(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Ok(UsersIndexTemplate {
|
Ok(UsersIndexTemplate {
|
||||||
user_with_books_number: result,
|
users_with_books_number: result,
|
||||||
query,
|
query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("error.error_404.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="mt-4 text-center">
|
<div class="mt-4 text-center">
|
||||||
<h1>{{ t!("error.error_404.title") }}</h1>
|
<h1>{{ t!("error.error_404.title") }}</h1>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="/assets/css/bootstrap.css">
|
<link rel="stylesheet" href="/assets/css/bootstrap.css">
|
||||||
<link rel="stylesheet" href="/assets/css/main.css">
|
<link rel="stylesheet" href="/assets/css/main.css">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon.png">
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/css/fork-awesome.min.css">
|
<link rel="stylesheet" href="/assets/css/fork-awesome.min.css">
|
||||||
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
{% import "components/typography.html" as typography %}
|
{% import "components/typography.html" as typography %}
|
||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("book.edit.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ typography::heading(t!("book.edit.title")) }}
|
{{ typography::heading(t!("book.edit.title")) }}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
{% import "components/inputs.html" as form_helpers %}
|
{% import "components/inputs.html" as form_helpers %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("book.new.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ typography::heading(t!("book.new.title")) }}
|
{{ typography::heading(t!("book.new.title")) }}
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,16 @@
|
|||||||
{% import "components/fields.html" as fields %}
|
{% import "components/fields.html" as fields %}
|
||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("book.show.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ typography::book_heading(book.title, book, show = false) }}
|
{{ typography::book_heading(book.title, book, show = false) }}
|
||||||
|
|
||||||
{% call cards::card() %}
|
{% call cards::card() %}
|
||||||
<div class="mt-4">
|
<div class="">
|
||||||
<h5 class="mt-4 fw-bold">{{ t!("book.show.book_details") }}</h5>
|
<h5 class="fw-bold text-decoration-underline">{{ t!("book.show.book_details") }}</h5>
|
||||||
{{ fields::field(t!("book.attributes.title"), book.title) }}
|
{{ fields::field(t!("book.attributes.title"), book.title) }}
|
||||||
{{ fields::field(t!("book.attributes.authors"), book.authors) }}
|
{{ fields::field(t!("book.attributes.authors"), book.authors) }}
|
||||||
|
|
||||||
@@ -20,7 +24,7 @@
|
|||||||
{{ fields::field(t!("book.attributes.description"), "-") }}
|
{{ fields::field(t!("book.attributes.description"), "-") }}
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
|
|
||||||
<h5 class="mt-50px fw-bold">{{ t!("book.show.user_details") }}</h5>
|
<h5 class="mt-50px fw-bold text-decoration-underline">{{ t!("book.show.user_details") }}</h5>
|
||||||
{{ fields::field(t!("book.attributes.owner"), owner.name) }}
|
{{ fields::field(t!("book.attributes.owner"), owner.name) }}
|
||||||
|
|
||||||
{% match current_holder %}
|
{% match current_holder %}
|
||||||
@@ -31,7 +35,7 @@
|
|||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
|
|
||||||
|
|
||||||
<h5 class="mt-50px fw-bold">{{ t!("book.show.more_informations") }}</h5>
|
<h5 class="mt-50px fw-bold text-decoration-underline">{{ t!("book.show.more_informations") }}</h5>
|
||||||
{% match book.comment %}
|
{% match book.comment %}
|
||||||
{% when Some with (comment) %}
|
{% when Some with (comment) %}
|
||||||
{{ fields::field(t!("book.attributes.comment"), comment) }}
|
{{ fields::field(t!("book.attributes.comment"), comment) }}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("error.generic.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="mt-4 text-center">
|
<div class="mt-4 text-center">
|
||||||
<h1>{{ t!("error.generic.title") }}</h1>
|
<h1>{{ t!("error.generic.title") }}</h1>
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
{% import "components/dropdown.html" as dropdown %}
|
{% import "components/dropdown.html" as dropdown %}
|
||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("book.index.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% call typography::heading(t!("book.index.title")) %}
|
{% call typography::heading(t!("book.index.title")) %}
|
||||||
<a href="/books/download_csv?{{ base_query }}" class="btn btn-info">
|
<a href="/books/download_csv?{{ base_query }}" class="btn btn-info">
|
||||||
@@ -90,6 +94,15 @@
|
|||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{% call cards::card() %}
|
{% call cards::card() %}
|
||||||
|
{% if books_with_user.is_empty() %}
|
||||||
|
<div class="d-flex flex-column align-items-center justify-content-center">
|
||||||
|
<h2>{{ t!("common.no_result") }}</h2>
|
||||||
|
|
||||||
|
<a class="btn btn-success text-white text-nowrap mt-3" href="/books/new">
|
||||||
|
{{ t!("book.new.button_short") }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -147,5 +160,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "components/typography.html" as typography %}
|
{% import "components/typography.html" as typography %}
|
||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
o{% import "components/inputs.html" as form_helpers %}
|
{% import "components/inputs.html" as form_helpers %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("book.edit.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ typography::heading(t!("user.edit.title")) }}
|
{{ typography::heading(t!("user.edit.title")) }}
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
{% import "components/inputs.html" as form_helpers %}
|
{% import "components/inputs.html" as form_helpers %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("user.index.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% call typography::heading(t!("user.index.title")) %}
|
{% call typography::heading(t!("user.index.title")) %}
|
||||||
<a class="btn-success btn" href="/users/new">{{ t!("user.index.button") }}</a>
|
<a class="btn-success btn" href="/users/new">{{ t!("user.index.button") }}</a>
|
||||||
@@ -34,6 +38,15 @@
|
|||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{% call cards::card() %}
|
{% call cards::card() %}
|
||||||
|
{% if users_with_books_number.is_empty() %}
|
||||||
|
<div class="d-flex flex-column align-items-center justify-content-center">
|
||||||
|
<h2>{{ t!("common.no_result") }}</h2>
|
||||||
|
|
||||||
|
<a class="btn btn-success text-white text-nowrap mt-3" href="//new">
|
||||||
|
{{ t!("user.index.button") }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -45,7 +58,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for user_information in user_with_books_number %}
|
{% for user_information in users_with_books_number %}
|
||||||
<tr class="align-middle">
|
<tr class="align-middle">
|
||||||
<th scope="row">{{ user_information.user.id }}</th>
|
<th scope="row">{{ user_information.user.id }}</th>
|
||||||
<td>{{ user_information.user.name }}</td>
|
<td>{{ user_information.user.name }}</td>
|
||||||
@@ -58,5 +71,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% endif %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "components/typography.html" as typography %}
|
{% import "components/typography.html" as typography %}
|
||||||
{% import "components/cards.html" as cards %}
|
{% import "components/cards.html" as cards %}
|
||||||
o{% import "components/inputs.html" as form_helpers %}
|
{% import "components/inputs.html" as form_helpers %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ t!("user.new.title_tag") }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ typography::heading(t!("user.new.title")) }}
|
{{ typography::heading(t!("user.new.title")) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user