mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 04:07:07 +09:00
83 lines
3.2 KiB
Twig
83 lines
3.2 KiB
Twig
{% extends request.ajax ? "layout_blank.html.twig" : "layout_default.html.twig" %}
|
|
|
|
{% import "macro_functions.html.twig" as mf %}
|
|
|
|
{% block meta_title %}{{ 'Payment history'|trans }}{% endblock %}
|
|
{% block breadcrumb %} <li class="active">{{ 'Payment history'|trans }}</li>{% endblock %}
|
|
|
|
{% set profile = client.client_get %}
|
|
|
|
{% block body_class %}client-balance{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<article class="span12 data-block">
|
|
<div class="data-container">
|
|
|
|
<header>
|
|
<h1>{{ 'Payment history'|trans }}</h1>
|
|
<p>{{ 'Here you can track what you have been charged for and add more funds to your account'|trans }}</p>
|
|
</header>
|
|
|
|
<section>
|
|
<table class="table table-striped table-bordered table-condensed table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'Description'|trans }}</th>
|
|
<th>{{ 'Date'|trans }}</th>
|
|
<th>{{ 'Amount'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% set transactions = client.client_balance_get_list({ "per_page": 10, "page": request.page }) %}
|
|
{% for i, tx in transactions.list %}
|
|
<tr class="{{ cycle(['odd', 'even'], i) }}">
|
|
<td>{{ tx.description }}</td>
|
|
<td>{{ tx.created_at|bb_date }}</td>
|
|
<td>{{ tx.amount|money(tx.currency) }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="3">{{ 'The list is empty'|trans }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2">{{ 'Total:'|trans }}</td>
|
|
<td><strong>{{ profile.balance | money(profile.currency) }}</strong></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
{% include "partial_pagination.html.twig" with { 'list': transactions } %}
|
|
|
|
<div class="row-fluid">
|
|
<div class="span3">
|
|
<form action="" method="post" class="form-inline api-form" data-api-url="{{ 'api/client/invoice/funds_invoice'|link }}" data-api-jsonp="onAfterInvoiceCreated">
|
|
<input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
|
|
<fieldset>
|
|
<div class="control-group">
|
|
<div class="form-controls">
|
|
<div class="input-append">
|
|
<input id="appendedPrependedInput" class="span4" type="text" name="amount" placeholder="0" required="required"><button class="btn" type="submit">{{ 'Add funds!'|trans }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
<script>
|
|
function onAfterInvoiceCreated(hash) {
|
|
var link = '{{ "invoice"|link }}/' + hash;
|
|
|
|
bb.redirect(link);
|
|
}
|
|
</script>
|
|
{% endblock %}
|