Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/page/list.tpl
{* Smarty template *}
{assign var="buttonsNumber" value="0"}
{if $allowedViewPage}
    {math assign="buttonsNumber" equation="a + 1" a=$buttonsNumber}
{/if}
{if $allowedUpdatePage}
    {math assign="buttonsNumber" equation="a + 1" a=$buttonsNumber}
{/if}
{if $allowedDeletePage}
    {math assign="buttonsNumber" equation="a + 1" a=$buttonsNumber}
{/if}
{assign var="columnsNumber" value=5}
{math assign="totalCells" equation="x+y+1" x=$columnsNumber y=$buttonsNumber}
<table border="0" cellpadding="0" cellspacing="0" class="grid" id="pageList">
    <tr class="filter">
    <form action="{buildUrl}" method="GET">
        {initFilters}
        <td></td>
        <td>
            {textFilter colon='title'}
        </td>
        <td>
            {textFilter colon='identifier'}
        </td>
        <td>
            {filterValue colon='language' assign='languageFilter' escape=false}
            <select name="{filterName colon='language'}" class="form_filter">
                {html_options options=$languagesForSelect selected=$languageFilter}
            </select>
        </td>
        <td>
            {filterValue colon='layout' assign='layoutFilter' escape=false}
            <select name="{filterName colon='layout'}" class="form_filter">
                {html_options options=$layouts selected=$layoutFilter}
            </select>
        </td>
        <td>
            {*{filterValue colon='page_active' assign='page_activeFilter' escape=false}
            <select name="{filterName colon='page_active'}" class="form_filter_short">
                {html_options options=$allYesNoList selected=$page_activeFilter}
            </select>*}
        </td>
        <td align="center" colspan="{$buttonsNumber}"><input type="submit" value="{message key='common.button.filter'}" class="form_filter_button noTopBottomMargin"></td>
    </form>
    </tr>
    
    <tr> 
        <th class="selectAllButtonCell"><input type="button" value="{message key='common.button.selectAll'}" onClick="checkAll(document.forms['massDeleteForm']);" class="form_button noTopBottomMargin"></th>
        <th><a href="{sortLink colon='title'}">{message key='page.form.title'}</a></th>
        <th><a href="{sortLink colon='identifier'}">{message key='page.form.identifier'}</a></th>
        <th><a href="{sortLink colon='language'}">{message key='page.form.language'}</a></th>
        <th><a href="{sortLink colon='layout'}">{message key='page.form.layout'}</a></th>
        <th>{*<a href="{sortLink colon='page_active'}">*}{message key='page.form.active'}{*</a>*}</th>
        <th colspan="{$buttonsNumber}"></th>
    </tr>
    {if !$dataIsEmpty}
    <form name="massDeleteForm" action="index.php" method="GET" onSubmit="return validateMassDelete(document.forms['massDeleteForm'], '{message escapeSingleQuotes=true key='page.error.nothingSelected'}') && confirmMassDelete('{message escapeSingleQuotes=true key='page.form.confirmMassDelete'}');">
    <input type="hidden" name="action" value="massDeletePages">
    {foreach name="mainLoop" from=$data item=page}
    {cycle name="pages" values="oddRow,evenRow" assign=parity}
    <tr class="{$parity}" onMouseOver="onMouseOverRow(this)" onMouseOut="onMouseOutRow(this)">
        <td align="center" valign="center"><input type="checkbox" name="checked[{$page->id}]"></td>
        <td>{$page->title|escape}</td>
        <td>{$page->identifier|escape}</td>
        {assign var=lang value=$page->language}
        <td>{message key="language.$lang"}</td>
        <td>{$page->getLayoutTitle()}</td>
        <td>{$page->isActiveYesno()|escape}</td>
        {if $allowedViewPage}
        <td class="gridIcon">
            <a href="{buildUrl action='viewPage' id=$page->id}" title="{message key='page.form.view'}">
                <img src="images/view.gif" border="0" alt="{message key='page.form.view'}">
            </a>
        </td>
        {/if}
        {if $allowedUpdatePage}
        <td class="gridIcon">
            <a href="{buildUrl action='callUpdatePage' id=$page->id}" title="{message key='page.form.update'}">
                <img src="images/edit.gif" border="0" alt="{message key='page.form.update'}">
            </a>
        </td>
        {/if}
        {if $allowedDeletePage}
        <td class="gridIcon">
            {if $page->fixed != 1}
            <a href="{buildUrl action=deletePage id=$page->id}" title="{message key='page.form.delete'}" onClick="return confirm('{message escapeSingleQuotes=true key='page.form.confirmDelete'}');">
                <img src="images/delete.gif" border="0" alt="{message key='page.form.delete'}">
            </a>
            {else}
                <img src="images/deleteDisabled.gif" border="0" alt="{message key='page.form.delete'}">
            {/if}
        </td>
        {/if}
    </tr>
    {/foreach}
    {else}
        <tr>
            <td class="tfoot" colspan="{$totalCells}" align="center">
                <em>{message key='page.message.nothing'}</em>
            </td>
        </tr>
    {/if}
    </form>
</table>

{include file="after_grid.tpl"}
Return current item: Blandware AtLeap Lite - CMS on PHP