Mercurial > hg > ltpdarepo
view src/ltpdarepo/templates/objs.html @ 64:f3ed8e9abf4a
More HTML cleanup and CSS tweaks.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Sat, 13 Aug 2011 23:56:30 +0200 |
parents | 018599af92f5 |
children | 8cf9fc08d43d |
line wrap: on
line source
{% import "pagination.html" as pagination %} {% extends "layout.html" %} {% block title %}{{ database.id }}{% endblock %} {% block body %} <h2>Database «{{ database.id }}»</h2> <p class="discrete">{{ database.description|default(' '|safe, true) }}</p> <p class="discrete">{{ batch.count }} objects</p> {% block above %}{% endblock %} {% if objs %} {{ pagination.render(batch) }} <table class="listing"> <thead> <tr> {% for field in fields %} <th> <a href="{{ url_for_other_order(field) }}"> {% if field == request.args.get('o', 'id') %} <b>{{ field }}</b> {% else %} {{ field }} {% endif %} </a> </th> {% endfor %} </tr> </thead> <tbody> {% for obj in objs %} <tr class="data {{ loop.cycle('odd', 'even') }}" id="{{ loop.index }}"> {% for field in fields %} {% if field == 'name' %} <td class="{{ field }}"><a href="{{ url_for('browse.obj', database=database.id, objid=obj.id) }}">{{ obj[field] }}</a></td> {% else %} <td class="{{ field }}">{{ obj[field]|string|truncate(60, False, '…') }}</td> {% endif %} {% endfor %} </tr> {% endfor %} </tbody> </table> {{ pagination.render(batch) }} {% endif %} {% block below %}{% endblock %} {% endblock %}