2016-07-29 05:17:34 +00:00
|
|
|
{% extends "nosystemd/base.html" %}
|
|
|
|
{% load staticfiles bootstrap3 i18n %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-07-31 23:58:43 +00:00
|
|
|
<header>
|
|
|
|
<div class="header-content donations-container">
|
|
|
|
<div class="header-content-inner">
|
|
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<div style="margin-top:10%">
|
|
|
|
|
|
|
|
{% if messages %}
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
{% for message in messages %}
|
|
|
|
<li>{{ message }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if donator_status %}
|
2016-08-05 04:14:07 +00:00
|
|
|
{% if donator_status.status == 'active'%}
|
|
|
|
<form action="{% url 'nosystemd:change_donator_status' donator_status.id %}" method="post" class="form" novalidate>
|
|
|
|
{% csrf_token %}
|
|
|
|
<div>
|
|
|
|
<h3>Your monthly donation status is {{donator_status.status}}
|
|
|
|
<button type="submit" class="btn btn-link">
|
|
|
|
{% trans "Cancel Donation"%}
|
|
|
|
</button>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<button type="submit" class="btn btn-link">
|
|
|
|
<a href="{% url 'nosystemd:make_donation' %}">{% trans "Donate"%}</a>
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
|
2016-07-31 23:58:43 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2016-07-29 05:17:34 +00:00
|
|
|
|
|
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<table class="table borderless table-hover">
|
2016-07-31 23:58:43 +00:00
|
|
|
<h3><i class="fa fa-heart-o" aria-hidden="true"></i> {% trans "Donations Made"%}</h3>
|
2016-07-29 05:17:34 +00:00
|
|
|
<br/>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
|
|
|
<th>{% trans "Donation"%}</th>
|
|
|
|
<th>{% trans "Date" %}</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for donation in donations %}
|
|
|
|
<tr>
|
|
|
|
<td scope="row">{{ donation.id }}</td>
|
|
|
|
<td>{{ donation.donation }} USD</td>
|
|
|
|
<td>{{ donation.created_at|date:"M Y" }}</td>
|
|
|
|
<td>
|
|
|
|
<button type="button" class="btn btn-default"><a
|
|
|
|
href="{% url 'nosystemd:donations' donation.id %}">{% trans "View Detail"%}</a>
|
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{% if is_paginated %}
|
|
|
|
<div class="pagination">
|
2016-07-31 23:58:43 +00:00
|
|
|
<span class="page-links">
|
|
|
|
{% if page_obj.has_previous %}
|
2016-07-29 05:17:34 +00:00
|
|
|
<a href="{{ request.path }}?page={{ page_obj.previous_page_number }}">{% trans "previous"%}</a>
|
|
|
|
{% endif %}
|
|
|
|
<span class="page-current">
|
2016-07-31 23:58:43 +00:00
|
|
|
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
|
|
|
|
</span>
|
2016-07-29 05:17:34 +00:00
|
|
|
{% if page_obj.has_next %}
|
|
|
|
<a href="{{ request.path }}?page={{ page_obj.next_page_number }}">{% trans "next"%}</a>
|
|
|
|
{% endif %}
|
2016-07-31 23:58:43 +00:00
|
|
|
</span>
|
2016-07-29 05:17:34 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-31 23:58:43 +00:00
|
|
|
</header>
|
2016-07-29 05:17:34 +00:00
|
|
|
|
|
|
|
{% endblock %}
|