149 lines
5.7 KiB
HTML
149 lines
5.7 KiB
HTML
{% load staticfiles %}
|
|
<html>
|
|
<head>
|
|
<title>PFM</title>
|
|
<meta charset="utf-8">
|
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
|
|
<link rel="stylesheet" href="{% static 'css/pfm.css' %}">
|
|
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
|
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
<!--script src="https://code.jquery.com/jquery-1.12.4.js"></script-->
|
|
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
|
|
<!--script type="text/javascript" src="/js/materialize.min.js"></script-->
|
|
<script type="text/javascript" src="{% static 'js/scripts.js' %}"></script>
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css" media="screen,projection"/>
|
|
<style>select{
|
|
position: relative;
|
|
cursor: pointer;
|
|
background-color: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #9e9e9e;
|
|
outline: none;
|
|
height: 3rem;
|
|
line-height: 3rem;
|
|
width: 100%;
|
|
font-size: 1rem;
|
|
margin: 0 0 20px 0;
|
|
padding: 0;
|
|
display: block;
|
|
}
|
|
#dropdown-content {display: none; position: absolute; top: 64px; right: 0; background-color:#fff;min-width:100px;max-height:650px;overflow-y:auto;}
|
|
#dropdown-content>li {
|
|
border:1px solid #eeeeec;
|
|
display: block;
|
|
padding: 10px 30px;
|
|
}
|
|
#underlayer {position: fixed; width: 100%; height: 100%; background: #000; opacity: 0.7; top: 0; display: none; z-index: 3}
|
|
#sideMenu {position: fixed; display: none; z-index: 4}
|
|
//#sidemenu>li>a {padding: 10px 30px;}
|
|
#sidemenu>li>a {font-size: 20px; display: inline-block; height: 50px; padding: 10px 50px}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Dropdown Structure -->
|
|
<ul id="dropdown-content">
|
|
<li><a class="blue-text" href="/admin">Admin</a></li>
|
|
<li><a class="blue-text" href="/logout">Exit</a></li>
|
|
</ul>
|
|
|
|
<!-- Navigation -->
|
|
<!-- for large -->
|
|
<nav>
|
|
<div class="nav-wrapper blue darken-3">
|
|
<a class="brand-logo" href="/pfm">Django Finance Manager</a>
|
|
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
|
<li> <a href="{% url 'get_csv' %}">extract-to-csv</a></li>
|
|
<li> <a href="{% url 'upload_tr' %}">upload</a></li>
|
|
<li> <a href="{% url 'acc_list' %}">accounts</a></li>
|
|
<li> <a href="{% url 'cat_list' %}">categories</a></li>
|
|
<li> <a href="{% url 'reports' %}">reports</a></li>
|
|
<li> <a href="{% url 'tr_list' %}"> transactions </a></li>
|
|
<li> <a href="{% url 'test' %}"> test page </a></li>
|
|
<li> <a href="#!" class="dropdown-button" data-activates="dropdown1" onclick="showMenu()">
|
|
{% if user.is_authenticated %} {{ user.username }} {% endif %}
|
|
<i class="material-icons right">arrow_drop_down</i></a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
<div class="row">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- for small and medium -->
|
|
<div class="center">
|
|
<a href="#" class="button-collapse hide-on-large-only btn blue" onclick = "showSideMenu()"><i class="material-icons">menu</i></a>
|
|
</div>
|
|
<div id="underlayer" onclick = "showSideMenu()"></div>
|
|
|
|
<ul id="sideMenu">
|
|
<li> <a class="btn red darken-1" href="{% url 'get_csv' %}">extract-to-csv</a></li>
|
|
<li> <a class="btn green darken-1" href="{% url 'upload_tr' %}">upload</a></li>
|
|
<li> <a class="btn deep-purple darken-1" href="{% url 'acc_list' %}">accounts</a></li>
|
|
<li> <a class="btn cyan darken-1" href="{% url 'cat_list' %}">categories</a></li>
|
|
<li> <a class="btn pink darken-1" href="{% url 'reports' %}">reports</a></li>
|
|
<li> <a class="btn lime darken-1" href="{% url 'tr_list'%}"> transactions </a></li>
|
|
<li> <a class="btn blue darken-1" href="{% url 'test' %}"> test page </a></li>
|
|
|
|
</ul>
|
|
<div class="container">
|
|
<div class = "row">
|
|
{% block content %}
|
|
|
|
<!-- Journal -->
|
|
|
|
<div class="col s12 m6" style="padding: 10px;">
|
|
<p class="z-depth-1">
|
|
<table class="striped bordered">
|
|
<p class="flow-text" style="padding: 10px;">Журнал операций</p>
|
|
<tr>
|
|
<th width=30%>Дата</th>
|
|
<th width=30%>Сумма</th>
|
|
<th width=30%>Категория</th> </tr>
|
|
{% for transaction in transactions %}
|
|
<tr><td align=center>{{ transaction.tr_date|date:"d/m/y"}}</td>
|
|
<td align=right>{{ transaction.tr_amount}}</td>
|
|
<td>{{ transaction.tr_cat}} </td>
|
|
{% endfor %}
|
|
</table>
|
|
<a href="{% url 'tr_list'%}"><span style="display: inline-block; width: 100%; text-align: center; padding: 20px; ">Show all </span> </a>
|
|
</p>
|
|
</div>
|
|
<!-- End Journal -->
|
|
|
|
<!-- 2nd block -->
|
|
<div class="col s12 m6" style="padding: 10px;">
|
|
<p class="z-depth-1">
|
|
<table class="striped">
|
|
<p class="flow-text" style="padding: 10px;">My accounts </p>
|
|
<tr><th>Name</th><th>Balance</th></tr>
|
|
{% for account in accounts %}
|
|
<tr> <td>{{ account.acc_name }}</td><td> {{ account.rest }} {{account.acc_currency}}</td><!--td> {{ account.inc }} / {{ account.exp }} </td--></tr>
|
|
{% endfor %}
|
|
</table>
|
|
</p>
|
|
|
|
<p class="z-depth-1">
|
|
<table class="striped">
|
|
<p class="flow-text" style="padding:10px;">Сумма операций за {{date_today|date:"F"}}<p/>
|
|
<tr> <th>Категория</th><th>Сумма</th></tr>
|
|
{% for category in categories %}
|
|
{% if category.sum_cat %}
|
|
<tr> <td>{{ category.cat_name}}</td>
|
|
<td>{{ category.sum_cat}}</td>
|
|
<!--td>{{ category.avg }} </td--> </tr>
|
|
{% endif %}{% endfor %}
|
|
<tr><td>Total :</td> <td>{{ sum_total }}</td></tr>
|
|
</table> </p>
|
|
</div>
|
|
<!-- End 2nd Block -->
|
|
|
|
{% endblock%}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|