-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rob Moorman
committed
Feb 26, 2016
1 parent
0caa832
commit f3a3f04
Showing
5 changed files
with
51 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
{% load i18n %} | ||
{% load i18n technology_radar_tags %} | ||
|
||
<h1>{{ radar.name }}</h1> | ||
{% if radar.blips %} | ||
<ul> | ||
{% for blip in radar.blips.all %} | ||
<li> | ||
<a href="{% url 'blip-detail' radar.slug blip.area.slug blip.slug %}">{{ blip.name }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>{% trans "No radar blips are available." %}</p> | ||
{% endif %} | ||
{% for area in areas %} | ||
<h2>{{ area.name }}</h2> | ||
{% get_radar_blips_by_area radar area as area_blips %} | ||
{% if area_blips %} | ||
<ul> | ||
{% for blip in area_blips %} | ||
<li> | ||
<a href="{% url 'blip-detail' radar.slug blip.area.slug blip.slug %}">{{ blip.name }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>{% trans "No blips are available." %}</p> | ||
{% endif %} | ||
{% endfor %} | ||
<p> | ||
<a href="{% url 'radar-detail-download' radar.slug %}">{% trans "Download" %}</a> | ||
</p> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django import template | ||
|
||
|
||
register = template.Library() | ||
|
||
|
||
@register.assignment_tag | ||
def get_radar_blips_by_area(radar, area): | ||
return radar.get_blips_by_area(area) | ||
|
||
|
||
@register.assignment_tag | ||
def get_radar_blips_by_status(radar, status): | ||
return radar.get_blips_by_status(status) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters