view 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
line wrap: on
line source

{% extends "layout.html" %}
{% block title %}{{ obj.name }}{% endblock %}
{% block body %}
<h2>Database &laquo;{{ database.id }}&raquo; object &laquo;{{ obj.name }}&raquo;</h2>
<table class="obj">
  {% for field in fields %}
  <tr><th id="{{ field }}">{{ field }}:</th><td>{{ obj[field] is not none and obj[field] or '' }}</td></tr>
  {% endfor %}
  <tr><th>xml:</th><td><a href="{{ url_for('browse.download', frmt='xml', database=database.id, objid=obj.id) }}">download</a></td></tr>
  <tr><th>binary:</th><td><a href="{{ url_for('browse.download', frmt='mat', database=database.id, objid=obj.id) }}">download</a></td></tr>
</table>
{% endblock %}