{literal}
<script type="text/javascript">
//<![CDATA[
function selectAll() {
    checkboxes = document.getElementsByTagName("input");
    for (i=0; i<checkboxes.length ; i++) {
        if (checkboxes[i].type == "checkbox") {                                                 
            checkboxes[i].checked=!checkboxes[i].checked;
        }
    }  
}
//]]>
</script>
{/literal}

{$period_message}

{if $itemcount > 0}
<div class="pageoptions">
<p class="pageoptions">{$add_link}</p>
</div>
{/if}

{$startform}

{if $itemcount > 0}
<table cellspacing="0" class="pagetable">
    <thead>
    <tr>
        <th>{$action_text}</th>
        <th>{$title_text}</th>
        <th>{$start_date_text}</th>
        <th>{$end_date_text}</th>
        <th>{$is_final_text}</th>  
        <th>{$status_text}</th>        
        <th class="pageicon">&nbsp;</th>
        <th class="pageicon">&nbsp;</th>
        <th><a href="javascript:selectAll();">{$select_text}</a></th>
    </tr>
    </thead>
    <tbody>
    {foreach from=$items item=entry}
    {capture assign="cycle"}{cycle values="row1,row2"}{/capture}
    <tr class="{$cycle}" onmouseover="this.className='{$cycle}hover';" onmouseout="this.className='{$cycle}';">
        <td>{$entry->coupon_action_title}{*({$entry->coupon_action_id})*}</td>   
        <td><a href="{$entry->editurl}">{$entry->coupon_period_title}</a> {*({$entry->coupon_period_id})*}</td>     
        <td>{$entry->start_date}</td>       
        <td>{$entry->end_date}</td>
        <td>{$entry->is_final}</td>
        <td>{$entry->approve_link}</td>
        <td>{$entry->edit_link}</td>
        <td>{$entry->delete_link}</td>
        <td>{$entry->select}</td>
   </tr>
   {/foreach}
   </tbody>
</table>
{/if}

<div style="width: 97%;">
    <div class="pageoptions" style="float: left;">
<p class="pageoptions">{$add_link}</p>
    </div>
{if $itemcount > 0}
    <div class="pageoption" style="float: right;">
{$submit_massdelete}   
    </div>
{/if}
<div class="clearb"></div>
</div>
{$endform}
