proxadmin/app/templates/uinvoice/transactions.html

105 lines
2.8 KiB
HTML
Raw Permalink Normal View History

2017-06-10 23:26:10 -04:00
{% extends "base.html" %}
{% block scripts %}
{{ super() }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js" integrity="sha256-SiHXR50l06UwJvHhFY4e5vzwq75vEHH+8fFNpkXePr0=" crossorigin="anonymous"></script>
<script type="text/javascript">
Chart.defaults.global.hover.mode = 'nearest';
var ctx = document.getElementById("transchart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'line',
data: {
2017-06-13 19:24:39 -04:00
labels: {{ labelslist | safe }},
2017-06-10 23:26:10 -04:00
datasets: [{
data: {{ translist }},
fill: false,
borderColor: "rgb(75, 192, 192)",
lineTension:0.1 }]
},
options: {
hover: {
// Overrides the global setting
mode: 'index'
},
2017-06-13 19:24:39 -04:00
legend: {
display: false
},
2017-06-10 23:26:10 -04:00
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
</script>
{% endblock %}
{% block page_content %}
2017-06-25 10:11:52 -04:00
<div class="row">
{% block sidebar %}
2017-12-26 20:47:26 -05:00
<div class="col-md-12">
2017-06-25 10:11:52 -04:00
<div class="row">
2017-12-26 20:47:26 -05:00
<div class="col-md-6">
{% include "/settings/acc_avatar.html" %}
</div>
2017-12-26 20:47:26 -05:00
<div class="col-md-6">
<div class="panel panel-info">
<div class="panel-heading">Wallet Graph</div>
<div class="panel-body">
<canvas id="transchart" height="80"></canvas>
</div>
</div>
</div>
2017-06-25 10:11:52 -04:00
</div>
</div>
{% endblock %}
2017-12-26 20:47:26 -05:00
<div class="col-md-12">
2017-06-10 23:26:10 -04:00
<div class="panel panel-info">
2018-01-24 03:58:28 -05:00
<div class="panel-heading">Last 20 Transactions</div>
<div class="panel-body">
2017-06-10 23:26:10 -04:00
<div class="table-responsive">
<table class="table table-hover table-striped table-condensed cf">
2017-06-10 23:26:10 -04:00
<thead>
<tr>
<th>Date</th>
2017-06-10 23:26:10 -04:00
<th>Description</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
{% if transaction.value < 0 %}
2017-09-14 20:28:26 -04:00
<tr class="default">
2018-01-30 22:08:33 -05:00
<td data-title="Date">{{ moment(transaction.date_created).format('lll') }}</td>
<td data-title="Description">{{ transaction.description }}</td>
<td data-title="Amount">{{ transaction.value|abs }} {{ transaction.currency }}</td>
{% else %}
<tr class="default">
2018-01-30 22:08:33 -05:00
<td data-title="Date">{{ moment(transaction.date_created).format('lll') }}</td>
<td data-title="Description">{{ transaction.description }}</td>
<td data-title="Amount">{{ transaction.value|abs }} {{ transaction.currency }}</td>
2017-06-10 23:26:10 -04:00
{% endif %}
</tr>
</tbody>
{% endfor %}
</table>
</div>
2017-06-10 23:26:10 -04:00
</div>
</div>
</div>
</div>
{% endblock %}