[% 
    title = 'Link Admin' ;

    crumb2_name = 'Links' ;
    crumb2_href = '/cgi-bin/pages.cgi?act=link-admin' ;
    crumb1_name = 'Admin' ;
%]

<h2>[% title %]</h2>

<div class="boxer">
[% IF thanks_message %]<p>[% thanks_message %]</p>[% END %]
<p>Click on a link title to edit it's content.
<p> <a href="[% cgipath %]/pages.cgi?act=link-cadd">create a new category</a>
|   <a href="[% cgipath %]/pages.cgi?act=link-cadmin">edit categories</a>
|   <a href="[% cgipath %]/pages.cgi?act=link-add">create a new link</a></p>
</div>

<form name="datalist" method="post" action="[% cgipath %]/pages.cgi">
<input type="hidden" name='act' value='link-admin' />

<div class="boxer">
<table class="blocker">
<tr>
    <th>Category</th>
    <th>Title</th>
    <th>Link</th>
    <th>Select</th>
</tr>
[% FOREACH record = data %]
<tr>
    <td>[% record.category %]</td>
    <td nowrap><a href="[% cgipath %]/pages.cgi?act=link-edit&amp;linkid=[% record.linkid %]" title="edit link">[% IF record.title %][% record.title %][% ELSE %]No Title[% END %]</a></td>
    <td>[% record.href %]</td>
    <td><input type="checkbox" name="LISTED" value="[% record.linkid %]" /></td>
</tr>
[% END %]
</table>
</div>

<p class="alignright"><input type="submit" name='doaction' value='Delete' /></p>
</form>
