Commit 573e6c2a authored by erdnaxe's avatar erdnaxe 🎇

Use a detailed list rather than a table on profile

parent a798b81f
......@@ -79,19 +79,6 @@ a > i.fa {
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 */
@media screen and (max-width: 767px) {
.sidenav {
......@@ -145,3 +132,8 @@ th.long_text{
.dashboard{
text-align: center;
}
/* Detailed information on profile page */
dl.profile-info > div {
padding: 8px;
}
......@@ -117,147 +117,189 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" data-target="#collapse1">
<h3 class="panel-title pull-left" >
<i class="fa fa-user"></i>{% trans " Detailed information" %}
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse"
data-target="#collapse1">
<h3 class="panel-title pull-left">
<i class="fa fa-user"></i>{% trans " Detailed information" %}
</h3>
</div>
<div class="panel-collapse collapse in" id="collapse1">
<div class="panel-body">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}">
<i class="fa fa-edit"></i>
{% trans "Edit" %}
</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}">
<i class="fa fa-lock"></i>
{% trans "Change the password" %}
</a>
{% can_change User state %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
<i class="fa fa-id-badge"></i>
{% trans "Change the state" %}
</a>
{% acl_end %}
{% can_change User groups %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
<i class="fa fa-check"></i>
{% trans "Edit the groups" %}
</a>
{% acl_end %}
{% history_button users text=True %}
<div class="panel-body">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}">
<i class="fa fa-edit"></i>
{% trans "Edit" %}
</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}">
<i class="fa fa-lock"></i>
{% trans "Change the password" %}
</a>
{% can_change User state %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
<i class="fa fa-id-badge"></i>
{% trans "Change the state" %}
</a>
{% acl_end %}
{% can_change User groups %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
<i class="fa fa-check"></i>
{% trans "Edit the groups" %}
</a>
{% acl_end %}
{% history_button users text=True %}
</ul>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<tr>
<dl class="dl-horizontal row profile-info">
<div class="col-md-6">
{% if users.is_class_club %}
<th>{% trans "Mailing" %}</th>
{% if users.club.mailing %}
<td>{{ users.pseudo }}(-admin)</td>
{% else %}
<td>{% trans "Mailing disabled" %}</td>
{% endif %}
{% else %}
<th>{% trans "Firt name" %}</th>
<td>{{ users.name }}</td>
{% endif %}
<th>{% trans "Surname" %}</th>
<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>
<dt>{% trans "Mailing" %}</dt>
{% if users.club.mailing %}
<dd>{{ users.pseudo }}(-admin)</dd>
{% else %}
<dd>{% trans "Mailing disabled" %}</dd>
{% endif %}
{% else %}
<dt>{% trans "Firt name" %}</dt>
<dd>{{ users.name }}</dd>
{% endif %}
</div>
<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 %}
<td><i class="text-success">{{ users.end_adhesion }}</i></td>
<dd><i class="text-success">{{ users.end_adhesion }}</i></dd>
{% else %}
<td><i class="text-danger">{% trans "Not a member" %}</i></td>
<dd><i class="text-danger">{% trans "Not a member" %}</i></dd>
{% endif %}
<th>{% trans "Whitelist" %}</th>
</div>
<div class="col-md-6">
<dt>{% trans "Whitelist" %}</dt>
{% if users.end_whitelist != None %}
<td><i class="text-success">{{ users.end_whitelist }}</i></td>
<dd><i class="text-success">{{ users.end_whitelist }}</i></dd>
{% else %}
<td><i class="text-warning">{% trans "None" %}</i></td>
<dd><i class="text-warning">{% trans "None" %}</i></dd>
{% endif %}
<tr>
<th>{% trans "Ban" %}</th>
</div>
<div class="col-md-6">
<dt>{% trans "Ban" %}</dt>
{% if users.end_ban != None %}
<td><i class="text-danger">{{ users.end_ban }}</i></td>
<dd><i class="text-danger">{{ users.end_ban }}</i></dd>
{% else %}
<td><i class="text-success">{% trans "Not banned" %}</i></td>
<dd><i class="text-success">{% trans "Not banned" %}</i></dd>
{% endif %}
<th>{% trans "State" %}</th>
</div>
<div class="col-md-6">
<dt>{% trans "State" %}</dt>
{% if users.state == 0 %}
<td><i class="text-success">{% trans "Active" %}</i></td>
<dd><i class="text-success">{% trans "Active" %}</i></dd>
{% elif users.state == 1 %}
<td><i class="text-warning">{% trans "Disabled" %}</i></td>
<dd><i class="text-warning">{% trans "Disabled" %}</i></dd>
{% elif users.state == 2 %}
<td><i class="text-danger">{% trans "Archived" %}</i></td>
<dd><i class="text-danger">{% trans "Archived" %}</i></dd>
{% elif users.state == 3 %}
<td><i class="text-danger">{% trans "Not yet Member" %}</i></td>
<dd><i class="text-danger">{% trans "Not yet Member" %}</i></dd>
{% endif %}
</tr>
<tr>
<th>{% trans "Internet access" %}</th>
</div>
<div class="col-md-6">
<dt>{% trans "Internet access" %}</dt>
{% 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 %}
<td><i class="text-danger">{% trans "Disabled" %}</i></td>
<dd><i class="text-danger">{% trans "Disabled" %}</i></dd>
{% endif %}
<th>{% trans "Groups of rights" %}</th>
</div>
<div class="col-md-6">
<dt>{% trans "Groups of rights" %}</dt>
{% if users.groups.all %}
<td>{{ users.groups.all|join:", "}}</td>
<dd>{{ users.groups.all|join:", " }}</dd>
{% else %}
<td>{% trans "None" %}</td>
<dd>{% trans "None" %}</dd>
{% endif %}
</div>
<div class="col-md-6">
<dt>{% trans "Balance" %}</dt>
<dd>
{{ users.solde }} €
{% if user_solde %}
<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>
{% trans "Refill" %}
</a>
{% endif %}
</dd>
</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 %}
</tr>
<tr>
<th>{% trans "Balance" %}</th>
<td>{{ users.solde }} €
{% if user_solde %}
<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>
{% trans "Refill" %}
</a>
</div>
<div class="col-md-6 col-xs-12">
{% if users.shell %}
<dt>{% trans "Shell" %}</dt>
<dd>{{ users.shell }}</dd>
{% endif %}
</td>
{% 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>
</dl>
</div>
</div>
</div>
......
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