forgot to add evertything

This commit is contained in:
koksnuss 2020-04-22 18:33:36 +02:00
parent accad708cc
commit d7a9022b22
4 changed files with 21 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<table>
<thead>
<tr>
<td colspan="4"><a href="{% url 'coinc:country' country.name_iso %}">{{ country.name }}</a><td>
<td colspan="4"><a name="{{ country.name_iso }}"></a><a href="{% url 'coinc:country' country.name_iso %}">{{ country.name }}</a><td>
<td colspan="2">x €</td>
<td colspan="9"></td>
</tr>

View File

@ -22,10 +22,16 @@
<head>
<meta charset="utf-8">
<title>Münzsammlung</title> {% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'coinc/bootstrap.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'coinc/styles.css' %}">
</head>
<body>{% if countrys %} {% for country in countrys %}
{% show_country country %} {% endfor %} {% else %}
<body>
{% if countrys %}
{% navigation countrys %}
{% for country in countrys %}
{% show_country country %}
{% endfor %}
{% else %}
<p>Trage zuerst Länder im Adminbereich ein.</p>{% endif %}
</body>
</html>

View File

@ -0,0 +1,7 @@
<ul class="nav nav-pills">
{% for country in countrys %}
<li class="nav-item">
<a class="nav-link" href="#{{ country.name_iso }}">{{ country.name }}</a>
</li>
{% endfor %}
</ul>

View File

@ -41,6 +41,11 @@ def country(request, country):
return HttpResponse(f"Land: {country}")
@register.inclusion_tag('coinc/navigation.html')
def navigation(countrys):
return {'countrys': countrys}
@register.inclusion_tag('coinc/country.html')
def show_country(country):
year_now = datetime.now().year