117 lines
4.3 KiB
HTML
117 lines
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Tip bot webadmin</title>
|
|
|
|
<link href="/css/lumen.min.css" rel="stylesheet">
|
|
|
|
<script src="/js/jquery.min.js"></script>
|
|
<script src="/js/bootstrap.min.js"></script>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-default" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand" href="#">Tip bot</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse">
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" placeholder="Search user...">
|
|
<div class="input-group-btn">
|
|
<button type="submit" class="btn btn-default">
|
|
<span class="glyphicon glyphicon glyphicon-search"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
<div class="page-header">
|
|
<h1>Overview <small>{{ coin.full_name }}</small></h1>
|
|
</div>
|
|
<div class="col-md-8 col-sm-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading"><span class="glyphicon glyphicon-th-list"></span> Balances</div>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Nick</th>
|
|
<th>Balance</th>
|
|
<th>Balance <span class="label label-default">unconfirmed</span></th>
|
|
<th>Info</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for account in accounts %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td>{{ account.nick }}</td>
|
|
<td>{{ account.balance }}{{ coin.short_name }}</td>
|
|
<td>{{ account.unconfirmed_balance }}{{ coin.short_name }}</td>
|
|
<td><a href="#" class="btn btn-default show-user" data-user="{{ account.nick }}">Show</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 col-sm-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading"><span class="glyphicon glyphicon-stats"></span> Statistics</div>
|
|
<ul class="list-group">
|
|
<li class="list-group-item">Total balance <span class="badge">{{ total }}{{ coin.short_name }}</span></li>
|
|
<li class="list-group-item">Total unconfirmed balance <span class="badge">{{ total_unconfirmed }}{{ coin.short_name }}</span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="userinfo_modal" class="modal fade">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="userinfo_title"></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<th>#</th>
|
|
<th>Address</th>
|
|
<th>Total deposited</th>
|
|
</thead>
|
|
<tbody id="userinfo_address_list">
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(".show-user").click(function() {
|
|
var user = $(this).data('user');
|
|
$('#userinfo_title').html(user);
|
|
$('#userinfo_address_list').empty();
|
|
$.getJSON('/user/' + user, function(data) {
|
|
$.each(data.addresses, function(key, val) {
|
|
$('#userinfo_address_list').append('<tr><td>' + (key + 1) + '</td><td>' + val.address + '</td><td>' + val.amount + '</td></tr>');
|
|
});
|
|
});
|
|
$('#userinfo_modal').modal('show');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|