Update djlint settings
This commit is contained in:
parent
898c92df23
commit
f98990d0a8
33 changed files with 851 additions and 831 deletions
nummi
account/templates/account
category/templates/category
history/templates/history
main/templates/main
search/templates/search
statement/templates/statement
transaction/templates/transaction
|
@ -3,23 +3,23 @@
|
|||
{% load i18n %}
|
||||
{% block title %}{{ object }} – {{ block.super }}{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{{ object.icon|remix }}{{ object }}</h2>
|
||||
<p>
|
||||
<a href="{% url "edit_account" object.pk %}">{{ "edit"|remix }}{% translate "Edit account" %}</a>
|
||||
</p>
|
||||
<h2>{{ object.icon|remix }}{{ object }}</h2>
|
||||
<p>
|
||||
<a href="{% url "edit_account" object.pk %}">{{ "edit"|remix }}{% translate "Edit account" %}</a>
|
||||
</p>
|
||||
<section>
|
||||
<h3>{% translate "Statements" %}</h3>
|
||||
{% include "statement/statement_table.html" %}
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "Statements" %}</h3>
|
||||
{% include "statement/statement_table.html" %}
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block title_new %}
|
||||
{% translate "Create account" %}
|
||||
{% translate "Create account" %}
|
||||
{% endblock %}
|
||||
{% block h2_new %}
|
||||
{% translate "New account" %}
|
||||
{% translate "New account" %}
|
||||
{% endblock %}
|
||||
{% block h2 %}{{ form.instance.icon|remix }}{{ form.instance }}{% endblock %}
|
||||
|
|
|
@ -2,23 +2,23 @@
|
|||
{% load main_extras i18n %}
|
||||
{% block title %}{{ object }} – {{ block.super }}{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{{ object.icon|remix }}{{ object }}</h2>
|
||||
<p>
|
||||
<a href="{% url "edit_category" object.pk %}">{{ "edit"|remix }}{% translate "Edit category" %}</a>
|
||||
</p>
|
||||
<h2>{{ object.icon|remix }}{{ object }}</h2>
|
||||
<p>
|
||||
<a href="{% url "edit_category" object.pk %}">{{ "edit"|remix }}{% translate "Edit category" %}</a>
|
||||
</p>
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block title_new %}
|
||||
{% translate "Create category" %}
|
||||
{% translate "Create category" %}
|
||||
{% endblock %}
|
||||
{% block h2_new %}
|
||||
{% translate "New category" %}
|
||||
{% translate "New category" %}
|
||||
{% endblock %}
|
||||
{% block h2 %}{{ form.instance.icon|remix }}{{ form.instance }}{% endblock %}
|
||||
|
|
|
@ -1,110 +1,110 @@
|
|||
{% load main_extras statement_extras %}
|
||||
{% load i18n %}
|
||||
<div class="plot">
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col span="2" class="bar">
|
||||
<col class="value">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "Category" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Income" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% spaceless %}
|
||||
{% for cat in categories %}
|
||||
<tr>
|
||||
<th scope="row" class="l wi">
|
||||
{% if cat.category %}
|
||||
{% if month %}
|
||||
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% elif year %}
|
||||
<a href="{% url "category_transaction_year" cat.category year.year %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% else %}
|
||||
{{ cat.category__icon|remix }}{{ cat.category__name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<td class="value">{{ cat.sum_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
{% if cat.sum_m %}
|
||||
<div style="width: {% widthratio cat.sum_m max -100 %}%"></div>
|
||||
{% endif %}
|
||||
{% if cat.sum < 0 %}
|
||||
<div class="tot" style="width:{% widthratio cat.sum max -100 %}%">
|
||||
<span>{{ cat.sum|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="bar p">
|
||||
{% if cat.sum_p %}
|
||||
<div style="width: {% widthratio cat.sum_p max 100 %}%"></div>
|
||||
{% endif %}
|
||||
{% if cat.sum > 0 %}
|
||||
<div class="tot" style="width:{% widthratio cat.sum max 100 %}%">
|
||||
<span>{{ cat.sum|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="value">{{ cat.sum_p|pmvalue }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td class="empty" colspan="5">{% translate "No transaction" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% if categories %}
|
||||
<tr>
|
||||
<th scope="row" class="l">{% translate "Total" %}</th>
|
||||
<td class="value">{{ total_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
<div style="width: {% widthratio total_m max -100 %}%"></div>
|
||||
{% if total < 0 %}
|
||||
<div class="tot" style="width:{% widthratio total max -100 %}%">
|
||||
<span>{{ total|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="bar p">
|
||||
<div style="width: {% widthratio total_p max 100 %}%"></div>
|
||||
{% if total > 0 %}
|
||||
<div class="tot" style="width:{% widthratio total max 100 %}%">
|
||||
<span>{{ total|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="value">{{ total_p|pmvalue }}</td>
|
||||
</tr>
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col span="2" class="bar">
|
||||
<col class="value">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "Category" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Income" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% spaceless %}
|
||||
{% for cat in categories %}
|
||||
<tr>
|
||||
<th scope="row" class="l wi">
|
||||
{% if cat.category %}
|
||||
{% if month %}
|
||||
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% elif year %}
|
||||
<a href="{% url "category_transaction_year" cat.category year.year %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% else %}
|
||||
{{ cat.category__icon|remix }}{{ cat.category__name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<td class="value">{{ cat.sum_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
{% if cat.sum_m %}
|
||||
<div style="width: {% widthratio cat.sum_m max -100 %}%"></div>
|
||||
{% endif %}
|
||||
{% if cat.sum < 0 %}
|
||||
<div class="tot" style="width:{% widthratio cat.sum max -100 %}%">
|
||||
<span>{{ cat.sum|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="bar p">
|
||||
{% if cat.sum_p %}
|
||||
<div style="width: {% widthratio cat.sum_p max 100 %}%"></div>
|
||||
{% endif %}
|
||||
{% if cat.sum > 0 %}
|
||||
<div class="tot" style="width:{% widthratio cat.sum max 100 %}%">
|
||||
<span>{{ cat.sum|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="value">{{ cat.sum_p|pmvalue }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td class="empty" colspan="5">{% translate "No transaction" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% if categories %}
|
||||
<tr>
|
||||
<th scope="row" class="l">{% translate "Total" %}</th>
|
||||
<td class="value">{{ total_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
<div style="width: {% widthratio total_m max -100 %}%"></div>
|
||||
{% if total < 0 %}
|
||||
<div class="tot" style="width:{% widthratio total max -100 %}%">
|
||||
<span>{{ total|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if statement and statement.diff != statement.sum %}
|
||||
<tr>
|
||||
<th scope="row" class="l">{% translate "Expected total" %}</th>
|
||||
<td class="c">{{ total|check:statement.diff }}</td>
|
||||
<td class="bar m">
|
||||
{% if statement.diff < 0 %}
|
||||
<div class="tot" style="width:{% widthratio statement.diff max -100 %}%">
|
||||
<span>{{ statement.diff|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="bar p">
|
||||
{% if statement.diff >= 0 %}
|
||||
<div class="tot" style="width:{% widthratio statement.diff max 100 %}%">
|
||||
<span>{{ statement.diff|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</td>
|
||||
<td class="bar p">
|
||||
<div style="width: {% widthratio total_p max 100 %}%"></div>
|
||||
{% if total > 0 %}
|
||||
<div class="tot" style="width:{% widthratio total max 100 %}%">
|
||||
<span>{{ total|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
<td class="value">{{ total_p|pmvalue }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if statement and statement.diff != statement.sum %}
|
||||
<tr>
|
||||
<th scope="row" class="l">{% translate "Expected total" %}</th>
|
||||
<td class="c">{{ total|check:statement.diff }}</td>
|
||||
<td class="bar m">
|
||||
{% if statement.diff < 0 %}
|
||||
<div class="tot" style="width:{% widthratio statement.diff max -100 %}%">
|
||||
<span>{{ statement.diff|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="bar p">
|
||||
{% if statement.diff >= 0 %}
|
||||
<div class="tot" style="width:{% widthratio statement.diff max 100 %}%">
|
||||
<span>{{ statement.diff|pmvalue }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -3,86 +3,86 @@
|
|||
{% load transaction_extras %}
|
||||
{% load i18n %}
|
||||
<div class="calendar">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% if not year %}
|
||||
<th scope="col">{% translate "Year" %}</th>
|
||||
{% endif %}
|
||||
{% calendar_head %}
|
||||
<th scope="col">{% translate "Total" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% regroup history.data by month.year as years_list %}
|
||||
{% for y, y_data in years_list reversed %}
|
||||
<tr>
|
||||
{% if not year %}
|
||||
<th class="date" scope="row">{% year_url y %}</th>
|
||||
{% endif %}
|
||||
{% for m in y_data %}
|
||||
{% if forloop.parentloop.last and forloop.first %}
|
||||
{% empty_calendar_cells_start m.month.month %}
|
||||
{% endif %}
|
||||
{% if m %}
|
||||
<td class="month {% if m.sum > 0 %}p{% else %}m{% endif %}"
|
||||
style="--opacity: {% calendar_opacity m.sum history.max.sum %}"
|
||||
title="{{ m.sum|pmrvalue }}">{% up_down_icon m.sum %}</td>
|
||||
{% else %}
|
||||
<td class="month"></td>
|
||||
{% endif %}
|
||||
{% if forloop.parentloop.first and forloop.last %}
|
||||
{% empty_calendar_cells_end m.month.month %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<td class="total">{{ y_data|sum_year|pmrvalue }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% if not year %}
|
||||
<th scope="col">{% translate "Year" %}</th>
|
||||
{% endif %}
|
||||
{% calendar_head %}
|
||||
<th scope="col">{% translate "Total" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% regroup history.data by month.year as years_list %}
|
||||
{% for y, y_data in years_list reversed %}
|
||||
<tr>
|
||||
{% if not year %}
|
||||
<th class="date" scope="row">{% year_url y %}</th>
|
||||
{% endif %}
|
||||
{% for m in y_data %}
|
||||
{% if forloop.parentloop.last and forloop.first %}
|
||||
{% empty_calendar_cells_start m.month.month %}
|
||||
{% endif %}
|
||||
{% if m %}
|
||||
<td class="month {% if m.sum > 0 %}p{% else %}m{% endif %}"
|
||||
style="--opacity: {% calendar_opacity m.sum history.max.sum %}"
|
||||
title="{{ m.sum|pmrvalue }}">{% up_down_icon m.sum %}</td>
|
||||
{% else %}
|
||||
<td class="month"></td>
|
||||
{% endif %}
|
||||
{% if forloop.parentloop.first and forloop.last %}
|
||||
{% empty_calendar_cells_end m.month.month %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<td class="total">{{ y_data|sum_year|pmrvalue }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="history plot">
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="icon">
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col span="2" class="bar">
|
||||
<col class="value">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{ "expand-up-down"|remix }}</th>
|
||||
<th scope="col">{% translate "Month" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Income" %}</th>
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="icon">
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col span="2" class="bar">
|
||||
<col class="value">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{ "expand-up-down"|remix }}</th>
|
||||
<th scope="col">{% translate "Month" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Income" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for date in history.data reversed %}
|
||||
{% ifchanged %}
|
||||
{% if date.sum_m or date.sum_p %}
|
||||
<tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}>
|
||||
<td class="icon">{% up_down_icon date.sum %}</td>
|
||||
<th class="date" scope="row">
|
||||
{% if year %}
|
||||
{% month_url date.month fmt="F" %}
|
||||
{% else %}
|
||||
{% month_url date.month %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<td class="value">{{ date.sum_m|pmrvalue }}</td>
|
||||
<td class="bar m">{% plot_bar date.sum date.sum_m history.max.pm %}</td>
|
||||
<td class="bar p">{% plot_bar date.sum date.sum_p history.max.pm %}</td>
|
||||
<td class="value">{{ date.sum_p|pmrvalue }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for date in history.data reversed %}
|
||||
{% ifchanged %}
|
||||
{% if date.sum_m or date.sum_p %}
|
||||
<tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}>
|
||||
<td class="icon">{% up_down_icon date.sum %}</td>
|
||||
<th class="date" scope="row">
|
||||
{% if year %}
|
||||
{% month_url date.month fmt="F" %}
|
||||
{% else %}
|
||||
{% month_url date.month %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<td class="value">{{ date.sum_m|pmrvalue }}</td>
|
||||
<td class="bar m">{% plot_bar date.sum date.sum_m history.max.pm %}</td>
|
||||
<td class="bar p">{% plot_bar date.sum date.sum_p history.max.pm %}</td>
|
||||
<td class="value">{{ date.sum_p|pmrvalue }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="empty">
|
||||
<td colspan="6" class="empty"></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endifchanged %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<tr class="empty">
|
||||
<td colspan="6" class="empty"></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endifchanged %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -3,92 +3,94 @@
|
|||
{% load main_extras %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>
|
||||
{% block title %}Nummi{% endblock %}
|
||||
</title>
|
||||
{% block link %}
|
||||
<link rel="icon" href="{% static "main/svg/logo.svg" %}" type="image/svg+xml">
|
||||
{% css "main/css/main.css" %}
|
||||
{% js "main/js/base.js" %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block nav %}
|
||||
{% spaceless %}
|
||||
<nav>
|
||||
<h1>
|
||||
<img src="{% static "main/svg/logo.svg" %}" alt="">
|
||||
Nummi
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="skip-link" href="#main">{% translate "Skip to main content" %}</a>
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url "index" %}"
|
||||
class="home{% if request.resolver_match.url_name == "index" %} cur{% endif %}"
|
||||
accesskey="h">
|
||||
<span>{% translate "Home" %}</span>
|
||||
{{ "home"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "statements" %}"
|
||||
class="{% if request.resolver_match.url_name == "statements" %}cur{% endif %}">
|
||||
<span>{% translate "Statements" %}</span>
|
||||
{{ "file"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "transactions" %}"
|
||||
class="{% if request.resolver_match.url_name == "transactions" %}cur{% endif %}">
|
||||
<span>{% translate "Transactions" %}</span>
|
||||
{{ "receipt"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "search" %}"
|
||||
class="{% if request.resolver_match.url_name == "search" %}cur{% endif %}"
|
||||
accesskey="r">
|
||||
<span>{% translate "Search" %}</span>
|
||||
{{ "search"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{% blocktranslate %}Logged in as <strong>{{ user }}</strong>{% endblocktranslate %}
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "logout" %}" accesskey="l">
|
||||
<span>{% translate "Log out" %}</span>
|
||||
{{ "close-circle"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a {% if request.resolver_match.url_name == "login" %}class="cur"{% endif %}
|
||||
href="{% url "login" %}">
|
||||
<span>{% translate "Log in" %}</span>
|
||||
{{ "user"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
<main id="main">
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li class="msg-level-{{ message.level }}">{{ message.level|messageicon }}{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>
|
||||
{% block title %}Nummi{% endblock %}
|
||||
</title>
|
||||
{% block link %}
|
||||
<link rel="icon" href="{% static "main/svg/logo.svg" %}" type="image/svg+xml">
|
||||
{% css "main/css/main.css" %}
|
||||
{% js "main/js/base.js" %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block nav %}
|
||||
{% spaceless %}
|
||||
<nav>
|
||||
<h1>
|
||||
<img src="{% static "main/svg/logo.svg" %}" alt="">
|
||||
Nummi
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="skip-link" href="#main">{% translate "Skip to main content" %}</a>
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url "index" %}"
|
||||
class="home{% if request.resolver_match.url_name == "index" %} cur{% endif %}"
|
||||
accesskey="h">
|
||||
<span>{% translate "Home" %}</span>
|
||||
{{ "home"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "statements" %}"
|
||||
class="{% if request.resolver_match.url_name == "statements" %}cur{% endif %}">
|
||||
<span>{% translate "Statements" %}</span>
|
||||
{{ "file"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "transactions" %}"
|
||||
class="{% if request.resolver_match.url_name == "transactions" %}cur{% endif %}">
|
||||
<span>{% translate "Transactions" %}</span>
|
||||
{{ "receipt"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "search" %}"
|
||||
class="{% if request.resolver_match.url_name == "search" %}cur{% endif %}"
|
||||
accesskey="r">
|
||||
<span>{% translate "Search" %}</span>
|
||||
{{ "search"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{% blocktranslate %}Logged in as <strong>{{ user }}</strong>{% endblocktranslate %}
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "logout" %}" accesskey="l">
|
||||
<span>{% translate "Log out" %}</span>
|
||||
{{ "close-circle"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a {% if request.resolver_match.url_name == "login" %}class="cur"{% endif %}
|
||||
href="{% url "login" %}">
|
||||
<span>{% translate "Log in" %}</span>
|
||||
{{ "user"|remix }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
<main id="main">
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li class="msg-level-{{ message.level }}">
|
||||
{{ message.level|messageicon }}{{ message }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,23 +3,23 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% spaceless %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
{% blocktranslate %}Are you sure you want do delete <strong>{{ object }}</strong> ?{% endblocktranslate %}
|
||||
</p>
|
||||
{% block additionalinfo %}{% endblock %}
|
||||
{{ form }}
|
||||
<div class="buttons">
|
||||
<a href="{{ object.get_absolute_url }}">{% translate "Cancel" %}</a>
|
||||
<input class="del" type="submit" value="{% translate "Confirm" %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endspaceless %}
|
||||
{% spaceless %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
{% blocktranslate %}Are you sure you want do delete <strong>{{ object }}</strong> ?{% endblocktranslate %}
|
||||
</p>
|
||||
{% block additionalinfo %}{% endblock %}
|
||||
{{ form }}
|
||||
<div class="buttons">
|
||||
<a href="{{ object.get_absolute_url }}">{% translate "Cancel" %}</a>
|
||||
<input class="del" type="submit" value="{% translate "Confirm" %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,36 +3,38 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block title %}
|
||||
{% if form.instance|adding %}
|
||||
{% block title_new %}{% endblock %}
|
||||
{% else %}
|
||||
{{ form.instance }}
|
||||
{% endif %}
|
||||
– Nummi
|
||||
{% if form.instance|adding %}
|
||||
{% block title_new %}{% endblock %}
|
||||
{% else %}
|
||||
{{ form.instance }}
|
||||
{% endif %}
|
||||
– Nummi
|
||||
{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% with instance=form.instance %}
|
||||
{% if instance|adding %}
|
||||
<h2 class="new">
|
||||
{% block h2_new %}{% endblock %}
|
||||
</h2>
|
||||
{% else %}
|
||||
<h2>
|
||||
{% block h2 %}{{ instance }}{% endblock %}
|
||||
</h2>
|
||||
{% endif %}
|
||||
{% block pre %}{% endblock %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% if instance|adding %}<input hidden name="next" value="{{ request.path }}">{% endif %}
|
||||
{{ form }}
|
||||
</form>
|
||||
{% block tables %}{% endblock %}
|
||||
{% endwith %}
|
||||
{% with instance=form.instance %}
|
||||
{% if instance|adding %}
|
||||
<h2 class="new">
|
||||
{% block h2_new %}{% endblock %}
|
||||
</h2>
|
||||
{% else %}
|
||||
<h2>
|
||||
{% block h2 %}{{ instance }}{% endblock %}
|
||||
</h2>
|
||||
{% endif %}
|
||||
{% block pre %}{% endblock %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% if instance|adding %}
|
||||
<input hidden name="next" value="{{ request.path }}">
|
||||
{% endif %}
|
||||
{{ form }}
|
||||
</form>
|
||||
{% block tables %}{% endblock %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
{% load i18n %}
|
||||
{% load main_extras %}
|
||||
<table class="file-input">
|
||||
{% if widget.is_initial %}
|
||||
{% if widget.is_initial %}
|
||||
<tr>
|
||||
<th>{{ widget.initial_text }}</th>
|
||||
<td>
|
||||
<a href="{{ widget.value.url }}">{% translate "File" %} [{{ widget.value|extension }}]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% if not widget.required %}
|
||||
<tr>
|
||||
<th>
|
||||
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
name="{{ widget.checkbox_name }}"
|
||||
id="{{ widget.checkbox_id }}"
|
||||
{% if widget.attrs.disabled %}disabled{% endif %}>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{{ widget.input_text }}</th>
|
||||
<td>
|
||||
{% else %}
|
||||
<tr>
|
||||
<th>{{ widget.initial_text }}</th>
|
||||
<td>
|
||||
<a href="{{ widget.value.url }}">{% translate "File" %} [{{ widget.value|extension }}]</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% if not widget.required %}
|
||||
<tr>
|
||||
<th>
|
||||
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
name="{{ widget.checkbox_name }}"
|
||||
id="{{ widget.checkbox_id }}"
|
||||
{% if widget.attrs.disabled %}disabled{% endif %}>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{{ widget.input_text }}</th>
|
||||
<td>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{% endif %}
|
||||
<input type="{{ widget.type }}"
|
||||
name="{{ widget.name }}"
|
||||
{% include "django/forms/widgets/attrs.html" %}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<td colspan="2">
|
||||
{% endif %}
|
||||
<input type="{{ widget.type }}"
|
||||
name="{{ widget.name }}"
|
||||
{% include "django/forms/widgets/attrs.html" %}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
{% load i18n %}
|
||||
{% load main_extras %}
|
||||
{% block fields %}
|
||||
{% if form.non_field_errors %}
|
||||
<ul class='errorlist'>
|
||||
{% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<table>
|
||||
<tbody>
|
||||
{% for field in form %}
|
||||
{% if field.errors %}
|
||||
<tr>
|
||||
<td colspan="2">{{ field.errors }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th class="l">
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
</th>
|
||||
<td>{{ field }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="buttons">
|
||||
<td colspan="2">
|
||||
{% block buttons %}
|
||||
{% if not form.instance|adding %}
|
||||
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
|
||||
{% endif %}
|
||||
<input type="reset" value="{% translate "Reset" %}">
|
||||
{% if form.instance|adding %}
|
||||
<input type="submit" value="{% translate "Create" %}">
|
||||
{% else %}
|
||||
<input type="submit" value="{% translate "Save" %}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% if form.non_field_errors %}
|
||||
<ul class='errorlist'>
|
||||
{% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<table>
|
||||
<tbody>
|
||||
{% for field in form %}
|
||||
{% if field.errors %}
|
||||
<tr>
|
||||
<td colspan="2">{{ field.errors }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th class="l">
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
</th>
|
||||
<td>{{ field }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="buttons">
|
||||
<td colspan="2">
|
||||
{% block buttons %}
|
||||
{% if not form.instance|adding %}
|
||||
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
|
||||
{% endif %}
|
||||
<input type="reset" value="{% translate "Reset" %}">
|
||||
{% if form.instance|adding %}
|
||||
<input type="submit" value="{% translate "Create" %}">
|
||||
{% else %}
|
||||
<input type="submit" value="{% translate "Save" %}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "main/form/form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% block buttons %}
|
||||
<input hidden value="{{ next }}" name="next">
|
||||
<input type="reset">
|
||||
<input type="submit" value="{% translate "Log in" %}">
|
||||
<input hidden value="{{ next }}" name="next">
|
||||
<input type="reset">
|
||||
<input type="submit" value="{% translate "Log in" %}">
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,61 +3,63 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% js "main/js/index.js" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% js "main/js/index.js" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="split">
|
||||
<section class="accounts">
|
||||
<h2>{% translate "Accounts" %}</h2>
|
||||
<dl>
|
||||
{% for acc in accounts %}
|
||||
<div class="account {% if acc.archived %}archived{% endif %}">
|
||||
<dt>
|
||||
<a href="{{ acc.get_absolute_url }}">{{ acc.icon|remix }}{{ acc }}</a>
|
||||
</dt>
|
||||
<dd>
|
||||
{% if acc.statement_set.first %}{{ acc.statement_set.first.value|value }}{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="more account">
|
||||
<dt>
|
||||
<label class="wi" for="show-archived-accounts">{{ "archive"|remix }}{% translate "Show archived" %}</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="checkbox" class="show-archived" id="show-archived-accounts" />
|
||||
</dd>
|
||||
</div>
|
||||
<div class="new account">
|
||||
<dt>
|
||||
<a href="{% url "new_account" %}">{{ "add-box"|remix }}{% translate "Create account" %}</a>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="statements">
|
||||
<h2>{% translate "Statements" %}</h2>
|
||||
{% include "statement/statement_table.html" %}
|
||||
</section>
|
||||
</div>
|
||||
<section class="categories">
|
||||
<h2>{% translate "Categories" %}</h2>
|
||||
{% spaceless %}
|
||||
<p>
|
||||
{% for cat in categories %}
|
||||
<a class="big-link" href="{{ cat.get_absolute_url }}">{{ cat.icon|remix }}{{ cat }}</a>
|
||||
{% endfor %}
|
||||
<a class="big-link add" href="{% url "new_category" %}">{{ "add"|remix }}{% translate "Create category" %}</a>
|
||||
</p>
|
||||
{% endspaceless %}
|
||||
<div class="split">
|
||||
<section class="accounts">
|
||||
<h2>{% translate "Accounts" %}</h2>
|
||||
<dl>
|
||||
{% for acc in accounts %}
|
||||
<div class="account {% if acc.archived %}archived{% endif %}">
|
||||
<dt>
|
||||
<a href="{{ acc.get_absolute_url }}">{{ acc.icon|remix }}{{ acc }}</a>
|
||||
</dt>
|
||||
<dd>
|
||||
{% if acc.statement_set.first %}{{ acc.statement_set.first.value|value }}{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="more account">
|
||||
<dt>
|
||||
<label class="wi" for="show-archived-accounts">
|
||||
{{ "archive"|remix }}{% translate "Show archived" %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="checkbox" class="show-archived" id="show-archived-accounts" />
|
||||
</dd>
|
||||
</div>
|
||||
<div class="new account">
|
||||
<dt>
|
||||
<a href="{% url "new_account" %}">{{ "add-box"|remix }}{% translate "Create account" %}</a>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h2>{% translate "History" %}</h2>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
<section class="statements">
|
||||
<h2>{% translate "Statements" %}</h2>
|
||||
{% include "statement/statement_table.html" %}
|
||||
</section>
|
||||
</div>
|
||||
<section class="categories">
|
||||
<h2>{% translate "Categories" %}</h2>
|
||||
{% spaceless %}
|
||||
<p>
|
||||
{% for cat in categories %}
|
||||
<a class="big-link" href="{{ cat.get_absolute_url }}">{{ cat.icon|remix }}{{ cat }}</a>
|
||||
{% endfor %}
|
||||
<a class="big-link add" href="{% url "new_category" %}">{{ "add"|remix }}{% translate "Create category" %}</a>
|
||||
</p>
|
||||
{% endspaceless %}
|
||||
</section>
|
||||
{% if history %}
|
||||
<section>
|
||||
<h2>{% translate "History" %}</h2>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,45 +3,45 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block title %}
|
||||
{% block name %}{% endblock %}
|
||||
{% if account %}– {{ account }}{% endif %}
|
||||
{% if category %}– {{ category }}{% endif %}
|
||||
{% if search %}
|
||||
– {% translate "Search" %}
|
||||
{% endif %}
|
||||
– Nummi
|
||||
{% block name %}{% endblock %}
|
||||
{% if account %}– {{ account }}{% endif %}
|
||||
{% if category %}– {{ category }}{% endif %}
|
||||
{% if search %}
|
||||
– {% translate "Search" %}
|
||||
{% endif %}
|
||||
– Nummi
|
||||
{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>
|
||||
{% block h2 %}{% endblock %}
|
||||
</h2>
|
||||
{% if account or category or search %}
|
||||
<div class="backlinks">
|
||||
{% block backlinks %}
|
||||
{% if account %}
|
||||
<p>
|
||||
<a class="big-link" href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
<p>
|
||||
<a class="big-link" href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if search %}
|
||||
<p>
|
||||
<a href="{% url "search" %}">{% translate "Search" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "main/pagination.html" %}
|
||||
{% block table %}{% endblock %}
|
||||
{% include "main/pagination.html" %}
|
||||
{% block body_more %}{% endblock %}
|
||||
<h2>
|
||||
{% block h2 %}{% endblock %}
|
||||
</h2>
|
||||
{% if account or category or search %}
|
||||
<div class="backlinks">
|
||||
{% block backlinks %}
|
||||
{% if account %}
|
||||
<p>
|
||||
<a class="big-link" href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
<p>
|
||||
<a class="big-link" href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if search %}
|
||||
<p>
|
||||
<a href="{% url "search" %}">{% translate "Search" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "main/pagination.html" %}
|
||||
{% block table %}{% endblock %}
|
||||
{% include "main/pagination.html" %}
|
||||
{% block body_more %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/form.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/form.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{% translate "Log in" %}</h2>
|
||||
<form action="{% url 'login' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{% include "main/form/login.html" %}
|
||||
</form>
|
||||
<h2>{% translate "Log in" %}</h2>
|
||||
<form action="{% url 'login' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{% include "main/form/login.html" %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
{% load i18n transaction_extras %}
|
||||
{% if page_obj %}
|
||||
<p class="pagination">
|
||||
{% for page in paginator.page_range %}
|
||||
<a href="?page={{ page }}"
|
||||
{% if page == page_obj.number %}class="cur"{% endif %}>{{ page }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p class="pagination">
|
||||
{% for page in paginator.page_range %}
|
||||
<a href="?page={{ page }}"
|
||||
{% if page == page_obj.number %}class="cur"{% endif %}>{{ page }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if month %}
|
||||
<p class="pagination">{% year_url month %}</p>
|
||||
<p class="pagination n3">
|
||||
{% if previous_month %}
|
||||
{% month_url previous_month fmt="F Y" %}
|
||||
{% endif %}
|
||||
{% month_url month cls="cur" fmt="F Y" %}
|
||||
{% if next_month %}
|
||||
{% month_url next_month fmt="F Y" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="pagination">{% year_url month %}</p>
|
||||
<p class="pagination n3">
|
||||
{% if previous_month %}
|
||||
{% month_url previous_month fmt="F Y" %}
|
||||
{% endif %}
|
||||
{% month_url month cls="cur" fmt="F Y" %}
|
||||
{% if next_month %}
|
||||
{% month_url next_month fmt="F Y" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if year %}
|
||||
<p class="pagination n3">
|
||||
{% if previous_year %}
|
||||
{% year_url previous_year cls="prev" %}
|
||||
{% endif %}
|
||||
{% year_url year cls="cur" %}
|
||||
{% if next_year %}
|
||||
{% year_url next_year cls="next" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="pagination n3">
|
||||
{% if previous_year %}
|
||||
{% year_url previous_year cls="prev" %}
|
||||
{% endif %}
|
||||
{% year_url year cls="cur" %}
|
||||
{% if next_year %}
|
||||
{% year_url next_year cls="next" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
{% block title %}
|
||||
{% translate "Search" %} – Nummi
|
||||
{% translate "Search" %} – Nummi
|
||||
{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{% translate "Search" %}</h2>
|
||||
{% spaceless %}
|
||||
<form id="search" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
</form>
|
||||
{% endspaceless %}
|
||||
<h2>{% translate "Search" %}</h2>
|
||||
{% spaceless %}
|
||||
<form id="search" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
</form>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "main/form/form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% block buttons %}
|
||||
<input type="reset" />
|
||||
<input type="submit" value="{% translate "Search" %}" />
|
||||
<input type="reset" />
|
||||
<input type="submit" value="{% translate "Search" %}" />
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% extends "main/confirm_delete.html" %}
|
||||
{% load i18n %}
|
||||
{% block additionalinfo %}
|
||||
<p>{% blocktranslate %}This will delete all transactions in this statement.{% endblocktranslate %}</p>
|
||||
<p>
|
||||
{% blocktranslate %}This will delete all transactions in this statement.{% endblocktranslate %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,45 +1,47 @@
|
|||
{% extends "main/base.html" %}
|
||||
{% load i18n main_extras statement_extras category %}
|
||||
{% block title %}
|
||||
{{ statement }}
|
||||
– Nummi
|
||||
{{ statement }}
|
||||
– Nummi
|
||||
{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{{ statement }}</h2>
|
||||
<p>
|
||||
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="{% url "edit_statement" statement.id %}">{{ "file-edit"|remix }}{% translate "Edit statement" %}</a>
|
||||
</p>
|
||||
<div class="statement-details">
|
||||
<span>
|
||||
<span class="date">{{ statement.start_date|date:"Y-m-d" }}</span>
|
||||
<span class="value">{{ statement.start_value|value }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<span class="value">{{ statement.sum|pmvalue }}</span>
|
||||
{{ "arrow-right"|remix }}
|
||||
{% if statement.diff != statement.sum %}<span class="value">{{ statement.diff|pmvalue }}</span>{% endif %}
|
||||
</span>
|
||||
<span>
|
||||
<span class="date">{{ statement.date|date:"Y-m-d" }}</span>
|
||||
<span class="value">{{ statement.value|value }}</span>
|
||||
</span>
|
||||
{{ statement.sum|check:statement.diff }}
|
||||
</div>
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
</section>
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions budget=False statement=object %}
|
||||
</section>
|
||||
<h2>{{ statement }}</h2>
|
||||
<p>
|
||||
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="{% url "edit_statement" statement.id %}">{{ "file-edit"|remix }}{% translate "Edit statement" %}</a>
|
||||
</p>
|
||||
<div class="statement-details">
|
||||
<span>
|
||||
<span class="date">{{ statement.start_date|date:"Y-m-d" }}</span>
|
||||
<span class="value">{{ statement.start_value|value }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<span class="value">{{ statement.sum|pmvalue }}</span>
|
||||
{{ "arrow-right"|remix }}
|
||||
{% if statement.diff != statement.sum %}
|
||||
<span class="value">{{ statement.diff|pmvalue }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span>
|
||||
<span class="date">{{ statement.date|date:"Y-m-d" }}</span>
|
||||
<span class="value">{{ statement.value|value }}</span>
|
||||
</span>
|
||||
{{ statement.sum|check:statement.diff }}
|
||||
</div>
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
</section>
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions budget=False statement=object %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{% extends "main/form/base.html" %}
|
||||
{% load i18n main_extras statement_extras category %}
|
||||
{% block title_new %}
|
||||
{% translate "Create statement" %}
|
||||
{% translate "Create statement" %}
|
||||
{% endblock %}
|
||||
{% block h2_new %}
|
||||
{% translate "New statement" %}
|
||||
{% translate "New statement" %}
|
||||
{% endblock %}
|
||||
{% block pre %}
|
||||
{% if not instance|adding %}
|
||||
<p>
|
||||
<a href="{{ instance.get_absolute_url }}">{{ "arrow-go-back"|remix }}{% translate "Back" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if not instance|adding %}
|
||||
<p>
|
||||
<a href="{{ instance.get_absolute_url }}">{{ "arrow-go-back"|remix }}{% translate "Back" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% extends "main/list.html" %}
|
||||
{% load i18n %}
|
||||
{% block name %}
|
||||
{% translate "Statements" %}
|
||||
{% translate "Statements" %}
|
||||
{% endblock %}
|
||||
{% block h2 %}
|
||||
{% translate "Statements" %}
|
||||
{% translate "Statements" %}
|
||||
{% endblock %}
|
||||
{% block table %}
|
||||
{% url "new_statement" as new_statement_url %}
|
||||
{% include "statement/statement_table.html" %}
|
||||
{% url "new_statement" as new_statement_url %}
|
||||
{% include "statement/statement_table.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
{% load i18n main_extras statement_extras %}
|
||||
<div id="statements">
|
||||
<ul class="statements">
|
||||
{% if new_statement_url %}
|
||||
<li class="new">
|
||||
<span>
|
||||
<a href="{{ new_statement_url }}">{{ "file-add"|remix }}{% translate "Create statement" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
<ul class="statements">
|
||||
{% if new_statement_url %}
|
||||
<li class="new">
|
||||
<span>
|
||||
<a href="{{ new_statement_url }}">{{ "file-add"|remix }}{% translate "Create statement" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for sta in statements %}
|
||||
<li>
|
||||
<a href="{{ sta.get_absolute_url }}" class="date"><span>{{ sta.date|date:"d" }}</span>
|
||||
<span>{{ sta.date|date:"M y" }}</span></a>
|
||||
<span class="value"><span>{{ sta.value|value }}</span>
|
||||
<span>{{ sta.diff|pmvalue }}</span></span>
|
||||
{% if not account %}
|
||||
<span class="account">
|
||||
<a href="{{ sta.account.get_absolute_url }}">{{ sta.account.icon|remix }}{{ sta.account }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% for sta in statements %}
|
||||
<li>
|
||||
<a href="{{ sta.get_absolute_url }}" class="date"><span>{{ sta.date|date:"d" }}</span>
|
||||
<span>{{ sta.date|date:"M y" }}</span></a>
|
||||
<span class="value"><span>{{ sta.value|value }}</span>
|
||||
<span>{{ sta.diff|pmvalue }}</span></span>
|
||||
{% if not account %}
|
||||
<span class="account">
|
||||
<a href="{{ sta.account.get_absolute_url }}">{{ sta.account.icon|remix }}{{ sta.account }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="icon">{{ sta.sum|check:sta.diff }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if statements_url %}
|
||||
<li class="more">
|
||||
<span>
|
||||
<a href="{{ statements_url }}">{{ "gallery-view"|remixnl }}{% translate "View all statements" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<span class="icon">{{ sta.sum|check:sta.diff }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if statements_url %}
|
||||
<li class="more">
|
||||
<span>
|
||||
<a href="{{ statements_url }}">{{ "gallery-view"|remixnl }}{% translate "View all statements" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
{% if widget.value != None %}value="{{ widget.value|stringformat:'s' }}"{% endif %}
|
||||
{% include "django/forms/widgets/attrs.html" %}>
|
||||
<datalist id="{{ widget.name }}-list">
|
||||
{% for option in widget.options %}<option value="{{ option }}"></option>{% endfor %}
|
||||
{% for option in widget.options %}<option value="{{ option }}"></option>{% endfor %}
|
||||
</datalist>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends "main/form/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title_new %}
|
||||
{% translate "Create invoice" %}
|
||||
{% translate "Create invoice" %}
|
||||
{% endblock %}
|
||||
{% block h2_new %}
|
||||
{% translate "New invoice" %}
|
||||
{% translate "New invoice" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
<div id="invoices">
|
||||
<ul class="invoices">
|
||||
{% for invoice in transaction.invoices %}
|
||||
<li>
|
||||
<a class="title" href="{{ invoice.file.url }}">{{ "file"|remix }}{{ invoice.name }} [{{ invoice.file|extension }}]</a>
|
||||
<a href="{{ invoice.get_absolute_url }}">{{ "file-edit"|remix }}{% translate "Edit" %}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="new">
|
||||
<span>
|
||||
<a href="{% url "new_invoice" transaction.pk %}">{{ "file-add"|remix }}{% translate "New invoice" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="invoices">
|
||||
{% for invoice in transaction.invoices %}
|
||||
<li>
|
||||
<a class="title" href="{{ invoice.file.url }}">{{ "file"|remix }}{{ invoice.name }} [{{ invoice.file|extension }}]</a>
|
||||
<a href="{{ invoice.get_absolute_url }}">{{ "file-edit"|remix }}{% translate "Edit" %}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="new">
|
||||
<span>
|
||||
<a href="{% url "new_invoice" transaction.pk %}">{{ "file-add"|remix }}{% translate "New invoice" %}</a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{% extends "transaction/transaction_list.html" %}
|
||||
{% load i18n main_extras transaction_extras static category %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block name %}{{ month|date:"F Y"|capfirst }}{% endblock %}
|
||||
{% block h2 %}{{ month|date:"F Y"|capfirst }}{% endblock %}
|
||||
{% block backlinks %}
|
||||
{{ block.super }}
|
||||
{% if account or category %}
|
||||
<p class="back">
|
||||
<a href="{% url "transaction_month" month.year month.month %}">{% translate "Back" %}{{ "arrow-go-back"|remix }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
{% if account or category %}
|
||||
<p class="back">
|
||||
<a href="{% url "transaction_month" month.year month.month %}">{% translate "Back" %}{{ "arrow-go-back"|remix }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block table %}
|
||||
{% if not category %}
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions month=month %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if not category %}
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{{ block.super }}
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions month=month %}
|
||||
</section>
|
||||
{% endif %}
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{{ block.super }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
{% extends "transaction/transaction_list.html" %}
|
||||
{% load i18n main_extras static category %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block name %}{{ year|date:"Y" }}{% endblock %}
|
||||
{% block h2 %}{{ year|date:"Y" }}{% endblock %}
|
||||
{% block backlinks %}
|
||||
{{ block.super }}
|
||||
{% if account or category %}
|
||||
<p class="back">
|
||||
<a href="{% url "transaction_year" year.year %}">{% translate "Back" %}{{ "arrow-go-back"|remix }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
{% if account or category %}
|
||||
<p class="back">
|
||||
<a href="{% url "transaction_year" year.year %}">{% translate "Back" %}{{ "arrow-go-back"|remix }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block table %}
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if not category %}
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions year=year %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if history %}
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{{ block.super }}
|
||||
<h3>{% translate "History" %}</h3>
|
||||
{% include "history/plot.html" %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if not category %}
|
||||
<section>
|
||||
<h3>{% translate "Categories" %}</h3>
|
||||
{% category_plot transactions year=year %}
|
||||
</section>
|
||||
{% endif %}
|
||||
<section>
|
||||
<h3>{% translate "Transactions" %}</h3>
|
||||
{{ block.super }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,43 +2,47 @@
|
|||
{% load i18n %}
|
||||
{% load main_extras %}
|
||||
{% block title %}
|
||||
{{ transaction }}
|
||||
– Nummi
|
||||
{{ transaction }}
|
||||
– Nummi
|
||||
{% endblock %}
|
||||
{% block link %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{{ block.super }}
|
||||
{% css "main/css/form.css" %}
|
||||
{% css "main/css/table.css" %}
|
||||
{% css "main/css/plot.css" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{{ transaction }}</h2>
|
||||
<section class="transaction-details">
|
||||
<ul>
|
||||
{% if statement %}
|
||||
<li>
|
||||
{% with statement.account as account %}
|
||||
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a> –
|
||||
{% endwith %}
|
||||
<a href="{{ statement.get_absolute_url }}">{{ statement }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
<li>
|
||||
<a href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if transaction.trader %}<li class="wi">{{ "p2p"|remix }}{{ transaction.trader }}</li>{% endif %}
|
||||
<li class="date wi">{{ "calendar"|remix }}{{ transaction.date }}</li>
|
||||
<li class="value">{{ transaction.value|pmvalue }}</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="{% url "edit_transaction" transaction.id %}">{{ "edit"|remix }}{% translate "Edit transaction" %}</a>
|
||||
</p>
|
||||
{% if transaction.description %}<p class="description">{{ transaction.description|linebreaksbr }}</p>{% endif %}
|
||||
</section>
|
||||
<section>
|
||||
<h3>{% translate "Invoices" %}</h3>
|
||||
{% include "transaction/invoice_table.html" %}
|
||||
</section>
|
||||
<h2>{{ transaction }}</h2>
|
||||
<section class="transaction-details">
|
||||
<ul>
|
||||
{% if statement %}
|
||||
<li>
|
||||
{% with statement.account as account %}
|
||||
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a> –
|
||||
{% endwith %}
|
||||
<a href="{{ statement.get_absolute_url }}">{{ statement }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
<li>
|
||||
<a href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if transaction.trader %}
|
||||
<li class="wi">{{ "p2p"|remix }}{{ transaction.trader }}</li>
|
||||
{% endif %}
|
||||
<li class="date wi">{{ "calendar"|remix }}{{ transaction.date }}</li>
|
||||
<li class="value">{{ transaction.value|pmvalue }}</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="{% url "edit_transaction" transaction.id %}">{{ "edit"|remix }}{% translate "Edit transaction" %}</a>
|
||||
</p>
|
||||
{% if transaction.description %}
|
||||
<p class="description">{{ transaction.description|linebreaksbr }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
<section>
|
||||
<h3>{% translate "Invoices" %}</h3>
|
||||
{% include "transaction/invoice_table.html" %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
{% load i18n %}
|
||||
{% load main_extras %}
|
||||
{% block title_new %}
|
||||
{% translate "Create transaction" %}
|
||||
{% translate "Create transaction" %}
|
||||
{% endblock %}
|
||||
{% block h2_new %}
|
||||
{% translate "New transaction" %}
|
||||
{% translate "New transaction" %}
|
||||
{% endblock %}
|
||||
{% block pre %}
|
||||
{% if statement %}
|
||||
<p>
|
||||
<a href="{{ statement.get_absolute_url }}">{{ statement }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if not instance|adding %}
|
||||
<p>
|
||||
<a href="{{ instance.get_absolute_url }}">{{ "arrow-go-back"|remix }}{% translate "Back" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if statement %}
|
||||
<p>
|
||||
<a href="{{ statement.get_absolute_url }}">{{ statement }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if not instance|adding %}
|
||||
<p>
|
||||
<a href="{{ instance.get_absolute_url }}">{{ "arrow-go-back"|remix }}{% translate "Back" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% extends "main/list.html" %}
|
||||
{% load i18n %}
|
||||
{% block name %}
|
||||
{% translate "Transactions" %}
|
||||
{% translate "Transactions" %}
|
||||
{% endblock %}
|
||||
{% block h2 %}
|
||||
{% translate "Transactions" %}
|
||||
{% translate "Transactions" %}
|
||||
{% endblock %}
|
||||
{% block table %}
|
||||
{% url "new_transaction" as new_transaction_url %}
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
{% url "new_transaction" as new_transaction_url %}
|
||||
{% include "transaction/transaction_table.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,93 +1,95 @@
|
|||
{% load main_extras transaction_extras %}
|
||||
{% load i18n %}
|
||||
<div id="transactions" class="table">
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="icon">
|
||||
<col class="date">
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col class="value">
|
||||
<col class="desc">
|
||||
{% if not category %}<col class="desc">{% endif %}
|
||||
{% if not account %}<col class="desc">{% endif %}
|
||||
</colgroup>
|
||||
<thead>
|
||||
{% if new_transaction_url %}
|
||||
<tr class="new">
|
||||
<td colspan="{% tr_colspan %}">
|
||||
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{{ "attachment"|remix }}</th>
|
||||
<th>{% translate "Date" %}</th>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Expenses" %}</th>
|
||||
<th>{% translate "Income" %}</th>
|
||||
<th>{% translate "Trader" %}</th>
|
||||
{% if not category %}
|
||||
<th>{% translate "Category" %}</th>
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<th>{% translate "Account" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for trans in transactions %}
|
||||
<tr>
|
||||
<td class="c">
|
||||
{% for invoice in trans.invoices %}<a class="i" href="{{ invoice.file.url }}">{{ "attachment"|remix }}</a>{% endfor %}
|
||||
</td>
|
||||
<td class="date">
|
||||
<time datetime="{{ trans.date|date:"Y-m-d" }}">
|
||||
{% if month %}
|
||||
{{ trans.date|date:"l d"|capfirst }}
|
||||
{% elif year %}
|
||||
{{ trans.date|date:"d F" }}
|
||||
{% else %}
|
||||
{{ trans.date|date:"Y-m-d" }}
|
||||
{% endif %}
|
||||
</time>
|
||||
</td>
|
||||
<th scope="row" class="l">
|
||||
<a href="{{ trans.get_absolute_url }}">{{ trans.name }}</a>
|
||||
</th>
|
||||
{% if trans.value >= 0 %}<td></td>{% endif %}
|
||||
<td class="value">{{ trans.value|pmvalue }}</td>
|
||||
{% if trans.value < 0 %}<td></td>{% endif %}
|
||||
<td>{{ trans.trader|default_if_none:"" }}</td>
|
||||
{% if not category %}
|
||||
{% if trans.category %}
|
||||
<td>
|
||||
<a href="{{ trans.category.get_absolute_url }}">{{ trans.category.icon|remix }}{{ trans.category }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<td>
|
||||
<a href="{{ trans.account.get_absolute_url }}">{{ trans.account.icon|remix }}{{ trans.account }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td class="empty" colspan="{% tr_colspan %}">{% translate "No transaction" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if transactions_url %}
|
||||
<tfoot>
|
||||
<tr class="more">
|
||||
<td colspan="{% tr_colspan %}">
|
||||
<a href="{{ transactions_url }}">{% translate "View all transactions" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="icon">
|
||||
<col class="date">
|
||||
<col class="desc">
|
||||
<col class="value">
|
||||
<col class="value">
|
||||
<col class="desc">
|
||||
{% if not category %}<col class="desc">{% endif %}
|
||||
{% if not account %}<col class="desc">{% endif %}
|
||||
</colgroup>
|
||||
<thead>
|
||||
{% if new_transaction_url %}
|
||||
<tr class="new">
|
||||
<td colspan="{% tr_colspan %}">
|
||||
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{{ "attachment"|remix }}</th>
|
||||
<th>{% translate "Date" %}</th>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Expenses" %}</th>
|
||||
<th>{% translate "Income" %}</th>
|
||||
<th>{% translate "Trader" %}</th>
|
||||
{% if not category %}
|
||||
<th>{% translate "Category" %}</th>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% if not account %}
|
||||
<th>{% translate "Account" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for trans in transactions %}
|
||||
<tr>
|
||||
<td class="c">
|
||||
{% for invoice in trans.invoices %}
|
||||
<a class="i" href="{{ invoice.file.url }}">{{ "attachment"|remix }}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="date">
|
||||
<time datetime="{{ trans.date|date:"Y-m-d" }}">
|
||||
{% if month %}
|
||||
{{ trans.date|date:"l d"|capfirst }}
|
||||
{% elif year %}
|
||||
{{ trans.date|date:"d F" }}
|
||||
{% else %}
|
||||
{{ trans.date|date:"Y-m-d" }}
|
||||
{% endif %}
|
||||
</time>
|
||||
</td>
|
||||
<th scope="row" class="l">
|
||||
<a href="{{ trans.get_absolute_url }}">{{ trans.name }}</a>
|
||||
</th>
|
||||
{% if trans.value >= 0 %}<td></td>{% endif %}
|
||||
<td class="value">{{ trans.value|pmvalue }}</td>
|
||||
{% if trans.value < 0 %}<td></td>{% endif %}
|
||||
<td>{{ trans.trader|default_if_none:"" }}</td>
|
||||
{% if not category %}
|
||||
{% if trans.category %}
|
||||
<td>
|
||||
<a href="{{ trans.category.get_absolute_url }}">{{ trans.category.icon|remix }}{{ trans.category }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<td>
|
||||
<a href="{{ trans.account.get_absolute_url }}">{{ trans.account.icon|remix }}{{ trans.account }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td class="empty" colspan="{% tr_colspan %}">{% translate "No transaction" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if transactions_url %}
|
||||
<tfoot>
|
||||
<tr class="more">
|
||||
<td colspan="{% tr_colspan %}">
|
||||
<a href="{{ transactions_url }}">{% translate "View all transactions" %}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
|
|
4
pyproject.toml
Normal file
4
pyproject.toml
Normal file
|
@ -0,0 +1,4 @@
|
|||
[tool.djlint]
|
||||
indent=2
|
||||
max_blank_lines=1
|
||||
max_line_length=89
|
Loading…
Add table
Add a link
Reference in a new issue