mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
[FastAPI] Modularize homepage and add side panel
This puts one more toward completion of the homepage overall; we'll need to still implement the authenticated user dashboard after this. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
9e73936c4e
commit
d9cdd5faef
10 changed files with 500 additions and 102 deletions
27
templates/partials/widgets/statistics.html
Normal file
27
templates/partials/widgets/statistics.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<div id="my-stats" class="widget box">
|
||||
<h3>{{ "My Statistics" | tr }}</h3>
|
||||
|
||||
{% set bases = request.user.maintained_bases %}
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/packages/?SeB=m&K={{ request.user.Username }}">
|
||||
{{ "Packages" | tr }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ bases.count() }}</td>
|
||||
</tr>
|
||||
{% set out_of_date_packages = bases | out_of_date %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/packages/?SeB=m&outdated=on&K={{ request.user.Username }}">
|
||||
{{ "Out of Date" | tr }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ out_of_date_packages.count() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue