$def with (groups, pages, form, selected, message, error)

$:render.header(_("Config"), 'config')

$:render.admin_toolbar('config')
<!--left block-->
<div  class="panel" id="config_chooser">
$for group in groups:
    <h3>$id_to_label(group)</h3>
    <ul>
    $for page in pages:
        $if pages[page].group == group:
            $if page == selected:
                <li class="selected"><a href="$base/config/$page" >$pages[page].title</a></li>
            $else:
                <li><a href="$base/config/$page">$pages[page].title</a></li>
    </ul>
</div>
<!--form block-->
<div class="panel" id="config_panel">
<h2>$id_to_label(form.group) / $form.title</h2>
<div class="info">$form.info</div>
<form method="POST">
$:form.pre_html()
<table id="config_table">
$:form.as_table()
<tr>
    <td></td>
    <td><input type="submit" name="submit" id="submit" value='$_("Save")'></td>
</tr>

</table>

$if message:
    <div id="message">$message</div>
$if error:
    <div class="error">$error</div>


</form>

$:form.post_html()


</div>
$:render.footer()
