Permalink
Browse files

Handling missing authors and abstract.

  • Loading branch information...
tjdett committed Apr 17, 2012
1 parent 4921a38 commit 70b5d632695a4bdbca042732ddf5b58c80830fbf
Showing with 10 additions and 4 deletions.
  1. +10 −4 tardis/tardis_portal/templates/tardis_portal/ajax/experiment_description.html
@@ -9,16 +9,22 @@
<dt>Author{{ authors|pluralize }}</dt>
{% for author in authors %}
<dd property="dc:creator">{{ author.author }}</dd>
+ {% empty %}
+ <dd><em>None listed</em></dd>
{% endfor %}
</dl>
{% endblock authors %}
{% block abstract %}
<dl>
<dt>Abstract</dt>
- <dd property="dc:abstract">
- {{ experiment.description|safe }}
- </dd>
+ {% if experiment.description %}
+ <dd property="dc:abstract">
+ {{ experiment.description|safe }}
+ </dd>
+ {% else %}
+ <dd><em>None provided</em></dd>
+ {% endif %}
</dl>
{% endblock abstract %}
@@ -38,7 +44,7 @@
{% block institution %}
<dl>
<dt>Institution</dt>
- <dd>{{experiment.institution_name}}</dd>
+ <dd>{{experiment.institution_name|default:""}}</dd>
</dl>
{% endblock institution %}

0 comments on commit 70b5d63

Please sign in to comment.