kasownik/webapp/templates/admin_member.html

116 lines
5.0 KiB
HTML

{% extends "root.html" %}
{% if admin %}
{% set active_page = "admin" %}
{% else %}
{% set active_page = "profile" %}
{% endif %}
{% block title %}{% if admin %}{{member.ldap_username}}{%else%}Profile{%endif%}{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-3">
<img src="{{ member.get_contact_email() | gravatar }}" alt="gravatar" style="width: 70%; margin-top: 10px;" />
<h1>{{member.ldap_username}}{%if cn %}<br /><small>{{cn}}</small>{% endif%}</h1>
<h5>{{member.get_contact_email()}}</h5>
<p>
{% if status.judgement %}
<span class="label label-success">Active</span><br/><br/>
{% else %}
<span class="label label-danger">Inactive</span><br/><br/>
{% endif %}
</p>
{% if admin %}
<h4>Payment Policy</h4>
{% include "button_payment_policy.html" %}
<h4>Membership Type</h4>
{% include "button_membership_type.html" %}
{% else %}
<h4>Payment Policy</h4>
<h5>{{status.payment_policy}}</h5>
<h4>Membership Type</h4>
<h5>{{status.type}}</h5>
{% endif %}
</div>
<div class="col-md-9">
<h3>Judgement Engineā„¢</h3>
<p>
{%if status.last_paid[0] == None %}
Has <b>never paid</b>,
{% if member.payment_policy == "Normal" %}
and has no special priviledge, so is <b>INACTIVE</b>.
{% elif member.payment_policy == "Disabled" %}
and is disabled, so is <b>INACTIVE</b>.
{% else %}
but has special privileges ({{member.payment_policy}}), so is <b>ACTIVE</b>.
{% endif %}
{%else%}
Has paid at least once,
{% if status.left %}
but has since left the hackerspace, so is <b>INACTIVE</b>.
{% else %}
{% if member.payment_policy == "Potato" %}
and is a potato, so is <b>ACTIVE</b>.
{% elif member.payment_policy == "Disabled" %}
but has been manually disabled, so is <b>INACTIVE</b>.
{% else %}
and needs to pay <b>{{status.months_due}} month(s)</b> worth of fees
{% if member.payment_policy == "Normal" %}
{% if status.judgement %}
(which is within tolerance), so is <b>ACTIVE</b>.
{% else %}
(which is <b>overdue</b>), so is <b>INACTIVE</b>.
{% endif %}
{% else %}
. {{member.ldap_username}} Is in Extended Grace Period, so is <b>ACTIVE</b>.
{% endif %}
{% endif %}
{% endif %}
{%endif%}
</p>
<h3>Transfers</h3>
<table class="table table-striped">
<tr>
<th>UID</th>
<th>Amount</th>
<th>Title</th>
<th>Date</th>
<th>Covers</th>
</tr>
{% set rowspan_left = -1 %}
{% for mt in member.transfers %}
{% if mt.transfer.uid != "NOTAMEMBER" %}
{% set rowspan = member.mt_covers(mt) %}
{% if rowspan %}
{% set rowspan_left=rowspan %}
{% elif rowspan_left>0 %}
{% set rowspan_left=rowspan_left-1 %}
{% endif %}
<tr>
{% if rowspan %}
<td style="vertical-align:middle;" rowspan={{rowspan}}>{{ mt.transfer.get_short_uid() }}</td>
<td style="vertical-align:middle;" rowspan={{rowspan}}>{{ mt.transfer.amount /100 }}PLN</td>
<td style="vertical-align:middle;" rowspan={{rowspan}}>{{ mt.transfer.title }}</td>
<td style="vertical-align:middle;" rowspan={{rowspan}}>{{ mt.transfer.date }}</td>
{% elif rowspan_left <= 0 %}
<td>{{ mt.transfer.get_short_uid() }}</td>
<td>{{ mt.transfer.amount /100 }}PLN</td>
<td>{{ mt.transfer.title }}</td>
<td>{{ mt.transfer.date }}</td>
{% endif %}
<td>{{ mt.year }}/{{ "%02i" | format(mt.month) }}</td>
</tr>
{% else %}
<tr>
<td colspan="5" class="notamember warning">
Not a member from this point...
</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
</div>
</div>
{% endblock %}