8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Improve right sidebar design

This commit is contained in:
lhark 2016-11-18 07:13:39 +01:00
parent b27bc5d048
commit c541bfcfd9

View file

@ -82,25 +82,67 @@
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>
<div class="col-sm-2 sidenav"> <div class="col-sm-2 sidenav">
<div class="well"> <div class="panel panel-default">
{% if request_user.is_authenticated %} {% if request_user.is_authenticated %}
<li>{{ request_user.name }} {{ request_user.surname }}</li> <div class="panel-heading">
<li>Pseudo : {{ request_user.pseudo }}</li> <h4>{{ request_user.name }} {{ request_user.surname }}</h4>
<li>Chambre : {{ request_user.room }}</li> </div>
<li>Connexion : {% if request_user.has_access == True %}<font color="green">Active</font>{% else %}<font color="red">Désactivée</font>{% endif %}</li> <table class="table">
<li>Fin d'adhésion : {% if request_user.end_adhesion != None %}<font color="green">{{ request_user.end_adhesion }}</font>{% else %}<font color="red">Non adhérent</font>{% endif %}</li> <tr>
<p><a class="btn btn-success btn-sm" role="button"href="{% url "users:mon-profil" %}">Voir mon profil</a></p> <th scope="row">Pseudo</th>
<td class="text-right">{{ request_user.pseudo }}</td>
</tr>
<tr>
<th scope="row">Chambre</th>
<td class="text-right">{{ request_user.room }}</td>
</tr>
<tr>
<th scope="row">Connexion</th>
<td class="text-right">
{% if request_user.has_access %}
<font color="green">Active</font>
{% else %}
<font color="red">Désactivée</font>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Adhésion</th>
<td class="text-right">
{% if request_user.end_adhesion != None %}
<font color="green">{{ request_user.end_adhesion }}</font>
{% else %}
<font color="red">Non adhérent</font>
{% endif %}
</td>
</tr>
</table>
<div class="list-group">
<a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}">
<i class="glyphicon glyphicon-user"></i>
Voir mon profil
</a>
</div>
{% else %} {% else %}
<p>Vous n'êtes pas authentifié</p> <p>Vous n'êtes pas authentifié</p>
{% endif %} {% endif %}
</div> </div>
{% if request_user.is_authenticated %} {% if request_user.is_authenticated %}
<div class="well"> <div class="panel panel-default">
{{ interfaces|length }} machines actives <div class="panel-heading">
<h4>{{ interfaces|length }} machines actives</h4>
</div>
<ul class="list-group">
{% for interface in interfaces|slice:":5" %} {% for interface in interfaces|slice:":5" %}
<li>{{interface.dns}}</li> <div class="list-group-item">{{interface.dns}}</div>
{% endfor %} {% endfor %}
<p><a class="btn btn-warning btn-sm" role="button" href="{% url "users:mon-profil" %}">Voir mes machines</a></p> {% if interfaces|length > 5 %}
<a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}">
<i class="glyphicon glyphicon-plus"></i>
Voir mes machines
</a>
{% endif %}
</ul>
</div> </div>
{% endif %} {% endif %}
</div> </div>