<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_LEGACYRENDER_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=TplfileList"><{$smarty.const._MI_LEGACYRENDER_ADMENU_TPLFILE_MANAGE}></a>
  &raquo;&raquo; <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_FILE_LIST}>
</div>

<h3><{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_FILE_LIST}>
<{if is_object($filterForm->mTplset)}>
  - [ <{$filterForm->mTplset->get('tplset_name')}> ]
<{/if}>
<{if is_object($filterForm->mModule)}>
  - <{$filterForm->mModule->get('name')}>(<{$filterForm->mModule->get('dirname')}>)
<{/if}>
</h3>

<div style="text-align:right;">
<form action="index.php" method="GET"><{$smarty.const._AD_LEGACYRENDER_LANG_SEARCH_TEMPLATE}> : 
  <{$pageNavi->renderHidden('tpl_file')}>
  <input type="hidden" name="action" value="TplfileList" />
  <input type="text" name="tpl_file" />
  <input class="formButton" type="submit" value="<{$smarty.const._SEARCH}>" />
</form>
</div>

<div style="text-align:center;">
<form action="./index.php" method="GET">
  <input type="hidden" name="action" value="TplfileList" />
  <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}> : 
  <select name="tpl_tplset">
    <{foreach from=$tplsets item=tplset}>
      <{if is_object($filterForm->mTplset)}>
        <option value="<{$tplset->getVar('tplset_name')}>" <{if $filterForm->mTplset->get('tplset_name') == $tplset->getVar('tplset_name')}>selected<{/if}> >
        <{$tplset->getVar('tplset_name')}></option>
      <{else}>
        <option value="<{$tplset->getVar('tplset_name')}>">
        <{$tplset->getVar('tplset_name')}></option>
      <{/if}>
    <{/foreach}>
  </select>

  <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}> : 
  <select name="tpl_module">
    <{foreach from=$modules item=module}>
      <{if is_object($filterForm->mModule)}>
        <option value="<{$module->getVar('dirname')}>" <{if $filterForm->mModule->get('dirname') == $module->getVar('dirname')}>selected<{/if}> >
        <{$module->getVar('name')}>(<{$module->getVar('dirname')}>)</option>
      <{else}>
        <option value="<{$module->getVar('dirname')}>">
        <{$module->getVar('name')}>(<{$module->getVar('dirname')}>)</option>
      <{/if}>
    <{/foreach}>
  </select>
  <input class="formButton" type="submit" value="<{$smarty.const._SUBMIT}>" />
</form>
</div>

<table class="outer">
  <tr>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_ID}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_ID}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_ID}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_MODULE}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_MODULE}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_TPLSET}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_TPLSET}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_FILE}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_FILE}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTMODIFIED}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_LASTMODIFIED}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_LASTMODIFIED}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_LASTIMPORTED}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_LASTIMPORTED}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}><br />
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.TPLFILE_SORT_KEY_TPL_TYPE}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.TPLFILE_SORT_KEY_TPL_TYPE}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}></th>
  </tr>
  <{foreach item=obj from=$objects}>
    <{if $obj->getVar('tpl_type') == "block"}>
      <tr class="<{cycle values='odd,even'}>" style="color:#0000ff;" style="text-align:center;">
    <{else}>
      <tr class="<{cycle values='odd,even'}>" style="text-align:center;">
    <{/if}>
      <td><{$obj->getVar('tpl_id')}></td>
      <td><{$obj->getVar('tpl_module')}></td>
      <td><{$obj->getVar('tpl_tplset')}></td>
      <td style="text-align:left;"><b><{$obj->getVar('tpl_file')}></b><br />
        <{$obj->getVar('tpl_desc')}></td>
      <td><{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}></td>
      <td><{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}></td>
      <td><{$obj->getVar('tpl_type')}></td>
      <td>
        <{if $obj->getVar('tpl_tplset') == "default"}>
          <a href="index.php?action=TplfileView&amp;tpl_id=<{$obj->get('tpl_id')}>"><img src="<{"icons/view.gif"|theme}>" alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /></a>
        <{else}>
          <a href="index.php?action=TplfileEdit&amp;tpl_id=<{$obj->get('tpl_id')}>"><img src="<{"icons/edit.gif"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
        <{/if}>
      </td>
    </tr>
  <{/foreach}>
</table>

<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>
