Compare commits

..

No commits in common. "fc82ffc481e77308eac148d7588c35a70944b377" and "9a7c06b81d949e76891621bf94cb2e72a5d1fc11" have entirely different histories.

5 changed files with 79 additions and 102 deletions

View File

@ -11,7 +11,6 @@ common:
search: Search
reset: Reset
show: Show
no_result: No results
close: Close
confirmation: Confirmation
are_you_sure: Are you sure?

View File

@ -11,7 +11,6 @@ common:
search: Filtrer
reset: Réini.
show: Voir
no_result: Aucun résultat
close: Fermer
confirmation: Confirmation
are_you_sure: Êtes-vous sûr ?

View File

@ -25,7 +25,7 @@ use crate::{
#[derive(Template, WebTemplate)]
#[template(path = "users/index.html")]
struct UsersIndexTemplate {
users_with_books_number: Vec<UserWithBookNumber>,
user_with_books_number: Vec<UserWithBookNumber>,
query: IndexQuery,
}
@ -84,7 +84,7 @@ pub async fn index(
}
Ok(UsersIndexTemplate {
users_with_books_number: result,
user_with_books_number: result,
query,
})
}

View File

@ -90,15 +90,6 @@
{% endcall %}
{% 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">
<thead>
<tr>
@ -156,7 +147,5 @@
</nav>
</div>
{% endif %}
{% endif %}
{% endcall %}
{% endblock %}

View File

@ -34,15 +34,6 @@
{% endcall %}
{% 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">
<thead>
<tr>
@ -54,7 +45,7 @@
</tr>
</thead>
<tbody>
{% for user_information in users_with_books_number %}
{% for user_information in user_with_books_number %}
<tr class="align-middle">
<th scope="row">{{ user_information.user.id }}</th>
<td>{{ user_information.user.name }}</td>
@ -67,6 +58,5 @@
{% endfor %}
</tbody>
</table>
{% endif %}
{% endcall %}
{% endblock %}