Commit 718f9ebb authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

update userInfo page

parent 13e71118
...@@ -9,21 +9,28 @@ ...@@ -9,21 +9,28 @@
{% block content %} {% block content %}
<script type="text/javascript"> <script type="text/javascript">
var username = "{{ data.username | escapejs }}" var username = "{{ data.user.username | escapejs }}"
console.log(username) console.log(username)
</script> </script>
<div style="text-align: left; background-color: cornsilk; padding:5px; border:1px transparent solid;border-radius:5px;"> <div style="text-align: left; background-color: cornsilk; padding:5px; border:1px transparent solid;border-radius:5px;">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col"> <div class="col-8">
<button type="button" class="btn btn-outline-secondary" onclick="window.location=`{% url 'users' %}`;">Retour</button> <div class="row">
<h1>Traces de {{ data.username }}</h1> <div class="col-4 d-flex align-items-center justify-content-center">
<p>Dernière trace enregistrée : {{ data.lastTrace | date:'d/m/Y e H:i:s' }}</p> <img class="rounded-circle account-img" src="{{ data.user.profile.image.url }}">
<p>Nombre de traces pour cet utilisateur : {{ data.nbTraces }}</p> </div>
<div class="col-8">
<button type="button" class="btn btn-outline-secondary" onclick="window.location=`{% url 'users' %}`;">Retour</button>
<h1>Traces de {{ data.user.username }}</h1>
<p>Dernière trace enregistrée : {{ data.lastTrace | date:'d/m/Y e H:i:s' }}</p>
<p>Nombre de traces pour cet utilisateur : {{ data.nbTraces }}</p>
</div>
</div>
</div> </div>
<div class="col"> <div class="col-4">
<div class="card border-primary m-auto" style="max-width: 20rem;"> <div class="card border-primary m-auto my-3" style="max-width: 20rem;">
<div class="card-header">Téléchargement</div> <div class="card-header">Téléchargement</div>
<div class="card-body"> <div class="card-body">
<p class="card-text">Date de début : <input type="text" id="datepicker1"></p> <p class="card-text">Date de début : <input type="text" id="datepicker1"></p>
......
...@@ -291,7 +291,7 @@ def userInfo(request, username): ...@@ -291,7 +291,7 @@ def userInfo(request, username):
lastTrace = traces[nbTraces-1].date if nbTraces > 0 else 0 lastTrace = traces[nbTraces-1].date if nbTraces > 0 else 0
dataUser = { dataUser = {
'username': user.username, 'user': user,
'traces': traces, 'traces': traces,
'nbTraces': nbTraces, 'nbTraces': nbTraces,
'lastTrace': lastTrace 'lastTrace': lastTrace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment