[% 
    title = 'Event List' ;

    crumb2_name = 'Event' ;
    crumb2_href = '/cgi-bin/pages.cgi?act=event-admin' ;
    crumb1_name = 'List' ;
%]

<form method="post" action="[% cgipath %]/pages.cgi" id="EDIT">
<input type="hidden" name='act' value='event-admin' />
<input type="hidden" name='doaction' value='' />
<input type="hidden" name="recordid" value='' />
<input type="hidden" name='eventid' value='' />

<p>
    <a href="[% cgipath %]/pages.cgi?act=venue-admin">Venue Admin</a> |
    <a href="[% cgipath %]/pages.cgi?act=spon-admin">Sponsor Admin</a>
</p>

<p>Search: [% ddtypes %] [% ddpublish %] <input type="submit" value='GO' />
| <a href="[% cgipath %]/pages.cgi?act=event-admin">view all</a>
| <a href="[% cgipath %]/pages.cgi?act=event-add">create an event</a></p>

<table class="blocker" summary="Event List">
<tr><th>Date</th>
    <th>Type</th>
    <th>Title</th>
    <th>Status</th>
    <th>Select</th>
</tr>
[% FOREACH item = data %]
<tr><td>[% item.createdate %]</td>
    <td>[% item.eventtype %]</td>
    <td>[% IF item.publish == 4 %]<a href="[% cgipath %]/pages.cgi?act=event-view&amp;eventid=[% item.eventid %]">[% item.title %]</a>
        [% ELSE %]<a href="[% cgipath %]/pages.cgi?act=event-edit&amp;eventid=[% item.eventid %]">[% item.title %]</a>[% END %]</td>
    <td>[% item.publishstate %]</td>
    <td><input type="checkbox" name="LISTED" value="[% item.eventid %]" /></td>
</tr>
[% END %]
[% IF norecs %]
<tr><td colspan="6" align="center">No events currently listed</td></tr>
[% END %]
</table>

<p>
<input type="button" value='Promote' onClick="doSubmit('Promote',0)" />
<input type="button" value='Copy'    onClick="doSubmit('Copy',0)"    />
<input type="button" value='Delete'  onClick="doSubmit('Delete',0)"  /></p>
</form>
