Create base template for lists

This commit is contained in:
Edgar P. Burkhart 2023-04-22 14:06:24 +02:00
parent 2e3d76ad19
commit a3f28631df
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 54 additions and 83 deletions

View file

@ -1,3 +0,0 @@
.pagination .current {
font-feature-settings: "tnum", "ss01";
}

View file

@ -0,0 +1,42 @@
{% extends "main/base.html" %}
{% load static %}
{% load main_extras %}
{% load i18n %}
{% block title %}
{% block name %}{% endblock %}
{% if account %} {{ account }}{% endif %}
{% if category %} {{ category }}{% endif %}
{% if search %}
{% translate "Search" %}
{% endif %}
Nummi
{% endblock %}
{% block link %}
{{ block.super }}
<link rel="stylesheet"
href="{% static 'main/css/table.css' %}"
type="text/css" />
{% endblock %}
{% block body %}
<h2>
{% block h2 %}{% endblock %}
</h2>
{% if account %}
<p>
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
</p>
{% endif %}
{% if category %}
<p>
<a href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
</p>
{% endif %}
{% if search %}
<p>
<a href="{% url "search" %}">{% translate "Search" %}</a>
</p>
{% endif %}
{% include "main/pagination.html" %}
{% block table %}{% endblock %}
{% include "main/pagination.html" %}
{% endblock %}

View file

@ -1,39 +1,11 @@
{% extends "main/base.html" %}
{% load static %}
{% load main_extras %}
{% extends "main/list.html" %}
{% load i18n %}
{% block title %}
{% block name %}
{% translate "Statements" %}
{% if account %} {{ account }}{% endif %}
{% if category %} {{ category }}{% endif %}
Nummi
{% endblock %}
{% block link %}
{{ block.super }}
<link rel="stylesheet"
href="{% static 'main/css/table.css' %}"
type="text/css" />
<link rel="stylesheet"
href="{% static 'main/css/page.css' %}"
type="text/css" />
{% block h2 %}
{% translate "Statements" %}
{% endblock %}
{% block body %}
<h2>{% translate "Statements" %}</h2>
{% if account %}
<p>
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
</p>
{% endif %}
{% if category %}
<p>
<a href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
</p>
{% endif %}
{% if statements %}
{% include "main/pagination.html" %}
{% block table %}
{% include "statement/statement_table.html" %}
{% include "main/pagination.html" %}
{% else %}
<p>{% translate "No statements to show" %}</p>
{% endif %}
{% endblock %}

View file

@ -1,51 +1,11 @@
{% extends "main/base.html" %}
{% load static %}
{% load main_extras %}
{% extends "main/list.html" %}
{% load i18n %}
{% block title %}
{% block name %}
{% translate "Transactions" %}
{% if account %} {{ account }}{% endif %}
{% if category %} {{ category }}{% endif %}
{% if search %}
{% translate "Search" %}
{% endif %}
Nummi
{% endblock %}
{% block link %}
{{ block.super }}
<link rel="stylesheet"
href="{% static 'main/css/table.css' %}"
type="text/css" />
<link rel="stylesheet"
href="{% static 'main/css/page.css' %}"
type="text/css" />
{% endblock %}
{% block body %}
<h2>
{% block h2 %}
{% block h2 %}
{% translate "Transactions" %}
{% endblock %}
</h2>
{% if account %}
<p>
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
</p>
{% endif %}
{% if category %}
<p>
<a href="{{ category.get_absolute_url }}">{{ category.icon|remix }}{{ category }}</a>
</p>
{% endif %}
{% if search %}
<p>
<a href="{% url "search" %}">{% translate "Search" %}</a>
</p>
{% endif %}
{% if transactions %}
{% include "main/pagination.html" %}
{% endblock %}
{% block table %}
{% include "transaction/transaction_table.html" %}
{% include "main/pagination.html" %}
{% else %}
<p>{% translate "No transactions to show" %}</p>
{% endif %}
{% endblock %}