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

Use a detailed list rather than a table on profile

This commit is contained in:
Alexandre Iooss 2018-12-30 12:06:20 +01:00
parent a798b81fed
commit 573e6c2ad2
2 changed files with 170 additions and 136 deletions

View file

@ -79,19 +79,6 @@ a > i.fa {
vertical-align: middle; vertical-align: middle;
} }
/* Pull sidebars to the bottom */
@media (min-width: 767px) {
.row {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.row > [class*='col-'] {
flex-direction: column;
}
}
/* On small screens, set height to 'auto' for sidenav and grid */ /* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.sidenav { .sidenav {
@ -145,3 +132,8 @@ th.long_text{
.dashboard{ .dashboard{
text-align: center; text-align: center;
} }
/* Detailed information on profile page */
dl.profile-info > div {
padding: 8px;
}

View file

@ -117,7 +117,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-group" id="accordion"> <div class="panel-group" id="accordion">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" data-target="#collapse1"> <div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse"
data-target="#collapse1">
<h3 class="panel-title pull-left"> <h3 class="panel-title pull-left">
<i class="fa fa-user"></i>{% trans " Detailed information" %} <i class="fa fa-user"></i>{% trans " Detailed information" %}
</h3> </h3>
@ -148,116 +149,157 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</ul> </ul>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <dl class="dl-horizontal row profile-info">
<table class="table table-striped"> <div class="col-md-6">
<tr>
{% if users.is_class_club %} {% if users.is_class_club %}
<th>{% trans "Mailing" %}</th> <dt>{% trans "Mailing" %}</dt>
{% if users.club.mailing %} {% if users.club.mailing %}
<td>{{ users.pseudo }}(-admin)</td> <dd>{{ users.pseudo }}(-admin)</dd>
{% else %} {% else %}
<td>{% trans "Mailing disabled" %}</td> <dd>{% trans "Mailing disabled" %}</dd>
{% endif %} {% endif %}
{% else %} {% else %}
<th>{% trans "Firt name" %}</th> <dt>{% trans "Firt name" %}</dt>
<td>{{ users.name }}</td> <dd>{{ users.name }}</dd>
{% endif %} {% endif %}
<th>{% trans "Surname" %}</th> </div>
<td>{{ users.surname }}</td>
</tr>
<tr>
<th>{% trans "Username" %}</th>
<td>{{ users.pseudo }}</td>
<th>{% trans "Email address" %}</th>
<td><a href="mailto:{{ users.email }}">{{users.email}}</a></td>
</tr>
<tr>
<th>{% trans "Room" %}</th>
<td>{{ users.room }} {% can_view_all Port %}{% if users.room.port_set.all %} / {{ users.room.port_set.all|join:", " }} {% endif %}{% acl_end %}</td>
<th>{% trans "Telephone number" %}</th>
<td>{{ users.telephone }}</td>
</tr>
<tr>
<th>{% trans "School" %}</th>
<td>{{ users.school }}</td>
<th>{% trans "Comment" %}</th>
<td>{{ users.comment }}</td>
</tr>
<tr>
<th>{% trans "Registration date" %}</th>
<td>{{ users.registered }}</td>
<th>{% trans "Last login" %}</th>
<td>{{ users.last_login }}</td>
</tr>
<tr>
<th>{% trans "End of membership" %}</th>
{% if users.end_adhesion != None %}
<td><i class="text-success">{{ users.end_adhesion }}</i></td>
{% else %}
<td><i class="text-danger">{% trans "Not a member" %}</i></td>
{% endif %}
<th>{% trans "Whitelist" %}</th>
{% if users.end_whitelist != None %}
<td><i class="text-success">{{ users.end_whitelist }}</i></td>
{% else %}
<td><i class="text-warning">{% trans "None" %}</i></td>
{% endif %}
<tr>
<th>{% trans "Ban" %}</th>
{% if users.end_ban != None %}
<td><i class="text-danger">{{ users.end_ban }}</i></td>
{% else %}
<td><i class="text-success">{% trans "Not banned" %}</i></td>
{% endif %}
<th>{% trans "State" %}</th>
{% if users.state == 0 %}
<td><i class="text-success">{% trans "Active" %}</i></td>
{% elif users.state == 1 %}
<td><i class="text-warning">{% trans "Disabled" %}</i></td>
{% elif users.state == 2 %}
<td><i class="text-danger">{% trans "Archived" %}</i></td>
{% elif users.state == 3 %}
<td><i class="text-danger">{% trans "Not yet Member" %}</i></td>
<div class="col-md-6">
<dt>{% trans "Surname" %}</dt>
<dd>{{ users.surname }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Username" %}</dt>
<dd>{{ users.pseudo }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Email address" %}</dt>
<dd><a href="mailto:{{ users.email }}">{{ users.email }}</a></dd>
</div>
<div class="col-md-6">
<dt>{% trans "Room" %}</dt>
<dd>
{{ users.room }} {% can_view_all Port %}{% if users.room.port_set.all %} /
{{ users.room.port_set.all|join:", " }} {% endif %}{% acl_end %}
</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Telephone number" %}</dt>
<dd>{{ users.telephone }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "School" %}</dt>
<dd>{{ users.school }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Comment" %}</dt>
<dd>{{ users.comment }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Registration date" %}</dt>
<dd>{{ users.registered }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "Last login" %}</dt>
<dd>{{ users.last_login }}</dd>
</div>
<div class="col-md-6">
<dt>{% trans "End of membership" %}</dt>
{% if users.end_adhesion != None %}
<dd><i class="text-success">{{ users.end_adhesion }}</i></dd>
{% else %}
<dd><i class="text-danger">{% trans "Not a member" %}</i></dd>
{% endif %} {% endif %}
</tr> </div>
<tr>
<th>{% trans "Internet access" %}</th> <div class="col-md-6">
<dt>{% trans "Whitelist" %}</dt>
{% if users.end_whitelist != None %}
<dd><i class="text-success">{{ users.end_whitelist }}</i></dd>
{% else %}
<dd><i class="text-warning">{% trans "None" %}</i></dd>
{% endif %}
</div>
<div class="col-md-6">
<dt>{% trans "Ban" %}</dt>
{% if users.end_ban != None %}
<dd><i class="text-danger">{{ users.end_ban }}</i></dd>
{% else %}
<dd><i class="text-success">{% trans "Not banned" %}</i></dd>
{% endif %}
</div>
<div class="col-md-6">
<dt>{% trans "State" %}</dt>
{% if users.state == 0 %}
<dd><i class="text-success">{% trans "Active" %}</i></dd>
{% elif users.state == 1 %}
<dd><i class="text-warning">{% trans "Disabled" %}</i></dd>
{% elif users.state == 2 %}
<dd><i class="text-danger">{% trans "Archived" %}</i></dd>
{% elif users.state == 3 %}
<dd><i class="text-danger">{% trans "Not yet Member" %}</i></dd>
{% endif %}
</div>
<div class="col-md-6">
<dt>{% trans "Internet access" %}</dt>
{% if users.has_access == True %} {% if users.has_access == True %}
<td><i class="text-success">{% blocktrans with end_access=users.end_access %}Active (until {{ end_access }}){% endblocktrans %}</i></td> <dd><i class="text-success">
{% blocktrans with end_access=users.end_access %}Active
(until {{ end_access }}){% endblocktrans %}</i></dd>
{% else %} {% else %}
<td><i class="text-danger">{% trans "Disabled" %}</i></td> <dd><i class="text-danger">{% trans "Disabled" %}</i></dd>
{% endif %} {% endif %}
<th>{% trans "Groups of rights" %}</th> </div>
<div class="col-md-6">
<dt>{% trans "Groups of rights" %}</dt>
{% if users.groups.all %} {% if users.groups.all %}
<td>{{ users.groups.all|join:", "}}</td> <dd>{{ users.groups.all|join:", " }}</dd>
{% else %} {% else %}
<td>{% trans "None" %}</td> <dd>{% trans "None" %}</dd>
{% endif %} {% endif %}
</tr> </div>
<tr>
<th>{% trans "Balance" %}</th> <div class="col-md-6">
<td>{{ users.solde }} € <dt>{% trans "Balance" %}</dt>
<dd>
{{ users.solde }} €
{% if user_solde %} {% if user_solde %}
<a class="btn btn-primary btn-sm" style='float:right' role="button" href="{% url 'cotisations:credit-solde' users.pk%}"> <a class="btn btn-primary btn-sm" style='float:right' role="button"
href="{% url 'cotisations:credit-solde' users.pk %}">
<i class="fa fa-eur"></i> <i class="fa fa-eur"></i>
{% trans "Refill" %} {% trans "Refill" %}
</a> </a>
{% endif %} {% endif %}
</td> </dd>
{% if users.adherent.gpg_fingerprint %}
<th>{% trans "GPG fingerprint" %}</th>
<td>{{ users.adherent.gpg_fingerprint }}</td>
{% endif %}
</tr>
<tr>
{% if users.shell %}
<th>{% trans "Shell" %}</th>
<td>{{ users.shell }}</td>
{% endif %}
</tr>
</table>
</div> </div>
<div class="col-md-6 col-xs-12">
{% if users.adherent.gpg_fingerprint %}
<dt>{% trans "GPG fingerprint" %}</dt>
<dd>{{ users.adherent.gpg_fingerprint }}</dd>
{% endif %}
</div>
<div class="col-md-6 col-xs-12">
{% if users.shell %}
<dt>{% trans "Shell" %}</dt>
<dd>{{ users.shell }}</dd>
{% endif %}
</div>
</dl>
</div> </div>
</div> </div>
</div> </div>