$def with (title, model, item, form, BASE_URL='/dbadmin')
$var title = "Admin - %s" % title
$var selected: admin
$var css = ["admin.css"]
$code:
    if item:
        action = storage(link="%s/%s/edit/%s" % (BASE_URL, model, item.id) , caption=_("Edit"))
    else:
        action = storage(link="%s/%s/add" % (BASE_URL, model), caption=_("Add"))

    hierarchy = (storage(link=BASE_URL, caption='dbadmin'),
                 storage(link=BASE_URL + '/' + model, caption=model),
                 action)
$var hierarchy = hierarchy

<div id="admin">
    <form method="POST" action="">
        <fieldset>
            <legend>$model - $(item.id if item else '')</legend>
            $:form.render()
        </fieldset>
        <input type="submit"/>
    </form>
</div>
