Skip to content

Commit

Permalink
added history in template
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Moorman committed Feb 26, 2016
1 parent be42734 commit 2ba2bb7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
17 changes: 16 additions & 1 deletion technology_radar/templates/technology_radar/blip.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{% load i18n %}

<h1>{{ radar.name }}</h1>
<h2>{{ blip.name }}</h2>
<h2>{{ blip.name }} ({{ blip.status }}){% if blip.is_new %} <span class="badge">{% trans "new" %}</span>{% endif %}</h2>
<p>{{ blip.body }}</p>
{% if not blip.is_new %}
<h3>{% trans "History" %}</h3>
<ul>
{% for blip in blip.history.all.reverse %}
<li>
<h4>{{ blip.status }}</h4>
<h5>{{ blip.modified }}</h5>
<p>{{ blip.body }}</p>
</li>
{% endfor %}
</ul>
{% endif %}
<p>
<a href="{% url 'radar-detail' blip.radar.slug %}">{% trans "Back to radar" %}</a>
</p>
16 changes: 8 additions & 8 deletions technology_radar/templates/technology_radar/radar.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ <h1>{{ radar.name }}</h1>
<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 }}{% if blip.is_new %} <span class="badge">{% trans "new" %}</span>{% endif %}</a>
</li>
{% endfor %}
</ul>
<ul>
{% for blip in area_blips %}
<li>
<a href="{% url 'blip-detail' radar.slug blip.area.slug blip.slug %}">{{ blip.name }} ({{ blip.status }}){% if blip.is_new %} <span class="badge">{% trans "new" %}</span>{% endif %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>{% trans "No blips are available." %}</p>
<p>{% trans "No blips are available." %}</p>
{% endif %}
{% endfor %}
<p>
Expand Down

0 comments on commit 2ba2bb7

Please sign in to comment.