comparison src/ltpdarepo/templates/obj.html @ 161:6b04cb2e92c9

Show null fields as empty string in object view.
author Daniele Nicolodi <daniele@grinta.net>
date Fri, 04 Nov 2011 11:11:44 +0100
parents 018599af92f5
children b666c4b27e33
comparison
equal deleted inserted replaced
160:d1f0cfc4da0f 161:6b04cb2e92c9
2 {% block title %}{{ obj.name }}{% endblock %} 2 {% block title %}{{ obj.name }}{% endblock %}
3 {% block body %} 3 {% block body %}
4 <h2>Database &laquo;{{ database.id }}&raquo; object &laquo;{{ obj.name }}&raquo;</h2> 4 <h2>Database &laquo;{{ database.id }}&raquo; object &laquo;{{ obj.name }}&raquo;</h2>
5 <table class="obj"> 5 <table class="obj">
6 {% for field in fields %} 6 {% for field in fields %}
7 <tr><th id="{{ field }}">{{ field }}:</th><td>{{ obj[field] }}</td></tr> 7 <tr><th id="{{ field }}">{{ field }}:</th><td>{{ obj[field] is not none and obj[field] or '' }}</td></tr>
8 {% endfor %} 8 {% endfor %}
9 <tr><th>xml:</th><td><a href="{{ url_for('browse.download', frmt='xml', database=database.id, objid=obj.id) }}">download</a></td></tr> 9 <tr><th>xml:</th><td><a href="{{ url_for('browse.download', frmt='xml', database=database.id, objid=obj.id) }}">download</a></td></tr>
10 <tr><th>binary:</th><td><a href="{{ url_for('browse.download', frmt='mat', database=database.id, objid=obj.id) }}">download</a></td></tr> 10 <tr><th>binary:</th><td><a href="{{ url_for('browse.download', frmt='mat', database=database.id, objid=obj.id) }}">download</a></td></tr>
11 </table> 11 </table>
12 {% endblock %} 12 {% endblock %}