Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mapit/templates/mapit/area.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
<header class="area_info">
<h2>{{ area.name }} <em class="area_id">ID {{ area.id }}</em></h2>
<ul>
<li>{%trans "Type" %}: <a href="{% url "mapit_index" %}areas/{{ area.type.code }}.html">{{ area.type.description }}</a> <small>({{ area.type.code }})</small></li>
<li>{%trans "Exists in generations" %}: {{ area.generation_low.id }}&ndash;{{ area.generation_high.id }}</li>
<li>{% trans "Type" %}: <a href="{% url "mapit_index" %}areas/{{ area.type.code }}.html">{{ area.type.description }}</a> <small>({{ area.type.code }})</small></li>
<li>{% if area.generation_high_id < active_generation_id %}
<em>{% trans "Historic boundary" %}.</em>
{% endif %}
{% trans "Exists in generations" %}: {{ area.generation_low.id }}&ndash;{{ area.generation_high.id }}.</li>
<li>{% trans "Country" %}: {{ area.list_countries|join:", "|default:"-" }}</li>
{% if area.parent_area %}
{% with area.parent_area.id|slugify as area_id %}
Expand Down
3 changes: 3 additions & 0 deletions mapit/views/areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ def area(request, area_id, format=''):
if hasattr(countries, 'restrict_geo_html'):
geotype = countries.restrict_geo_html(area)

active_generation = Generation.objects.current()

if format == 'html':
return render(request, 'mapit/area.html', {
'active_generation': active_generation,
'area': area,
'codes': codes,
'alternative_names': alternative_names,
Expand Down