Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/resource/show.tpl
{* Smarty template *}

{message assign='b' key='common.bytes'}
{message assign='kb' key='common.kbytes'}
{message assign='mb' key='common.mbytes'}

{message key='common.button.create' assign='createText'}
{message key='common.button.edit' assign='updateText'}
{message key='common.button.delete' assign='deleteText'}

{buildUrl action='callCreateResource' assign='createUri' returnUrl=$localRequestUri}

<table border="0" cellpadding="0" cellspacing="0" class="grid" id="resourceList">
    {foreach name="mainLoop" from=$data item=resource}
        {cycle name="resources" values="oddRow,evenRow" assign=parity}
        {resourceIcon fileName=$resource->file_name assign='resourceIcon'}
      	<tr class="{$parity}">
            <td class="gridIcon">{if $resourceIcon}<img src="images/{$resourceIcon}" class="resourceIcon">{/if}</td>
          	<td>
                {buildUrl action='callUpdateResource' assign='updateUri' returnUrl=$localRequestUri id=$resource->id}
                {buildUrl action='deleteResource' assign='deleteUri' returnUrl=$localRequestUri id=$resource->id}
                {contextMenu link_1=$createUri text_1=$createText permId_1='createResource'
                        link_2=$updateUri text_2=$updateText permId_2='updateResource'
                        link_3=$deleteUri text_3=$deleteText confirm_3=true permId_3='deleteResource'
                        editModeOnly=true}
                    <a href="{buildUrl fileName=$resource->file_name friendly='resource'}"{if !$resource->download} target="_blank"{/if}>{$resource->title|escape}</a>
                {/contextMenu}
                {ifEditMode}
                    {include file='context_menu.tpl'}
                {/ifEditMode}
            </td>
    	  	<td>{smartFileSize size=$resource->size|escape b=$b kb=$kb mb=$mb}</td>
   		</tr>
    {foreachelse}
        <tr>
            <td class="tfoot" colspan="{$totalCells}" align="center">
                {contextMenu link_1=$createUri text_1=$createText permId_1='createResource'
                        editModeOnly=true}
                    <em>{message key='resource.message.nothing'}</em>
                {/contextMenu}
                {ifEditMode}
                    {include file='context_menu.tpl'}
                {/ifEditMode}
            </td>
        </tr>
    {/foreach}
</table>


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