forgot to add evertything
This commit is contained in:
parent
accad708cc
commit
d7a9022b22
@ -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>
|
||||
|
@ -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>
|
||||
|
7
coinmanager/coinc/templates/coinc/navigation.html
Normal file
7
coinmanager/coinc/templates/coinc/navigation.html
Normal 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>
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user