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" %} {% extends "main/list.html" %}
{% load static %}
{% load main_extras %}
{% load i18n %} {% load i18n %}
{% block title %} {% block name %}
{% translate "Statements" %} {% translate "Statements" %}
{% if account %} {{ account }}{% endif %}
{% if category %} {{ category }}{% endif %}
Nummi
{% endblock %} {% endblock %}
{% block link %} {% block h2 %}
{{ block.super }} {% translate "Statements" %}
<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 %} {% endblock %}
{% block body %} {% block table %}
<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" %}
{% include "statement/statement_table.html" %} {% include "statement/statement_table.html" %}
{% include "main/pagination.html" %}
{% else %}
<p>{% translate "No statements to show" %}</p>
{% endif %}
{% endblock %} {% endblock %}

View file

@ -1,51 +1,11 @@
{% extends "main/base.html" %} {% extends "main/list.html" %}
{% load static %}
{% load main_extras %}
{% load i18n %} {% load i18n %}
{% block title %} {% block name %}
{% translate "Transactions" %} {% translate "Transactions" %}
{% if account %} {{ account }}{% endif %}
{% if category %} {{ category }}{% endif %}
{% if search %}
{% translate "Search" %}
{% endif %}
Nummi
{% endblock %} {% 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" %} {% translate "Transactions" %}
{% endblock %} {% endblock %}
</h2> {% block table %}
{% 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" %}
{% include "transaction/transaction_table.html" %} {% include "transaction/transaction_table.html" %}
{% include "main/pagination.html" %}
{% else %}
<p>{% translate "No transactions to show" %}</p>
{% endif %}
{% endblock %} {% endblock %}