<div class="xleprogress">
<{include file="db:`$dirname`_inc_menu.html"}>

<h1><{$smarty.const._MD_XLEPROGRESS_LANG_HISTORY_LIST}></h1>

<{if $item}>
<table width="100%" cellspacing="1" class="outer">
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_TITLE}></td>
    <td class="odd"><!-- a href="<{$originalUrl}>" --><{$item->getShow('title')}><!-- /a --></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_DIRNAME}></td>
    <td class="even"><{$item->mType->getShow('dirname')}></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_DATANAME}></td>
    <td class="odd"><{$item->mType->getShow('dataname')}></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_TARGET_ID}></td>
    <td class="even"><{$item->getShow('target_id')}></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_USER}></td>
    <td class="odd">
    <{if $item->getShow('uid')!=0}>
      <{$item->getShow('uid')|xoops_user:"user_name"}>
    <{else}>
      guest
    <{/if}>
    </td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_STEP}></td>
    <td class="even"><{$item->getShow('step')}></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_STATUS}></td>
    <td class="odd"><{$item->getShowStatus()}></td>
  </tr>
  <tr>
    <td class="head"><{$smarty.const._MD_XLEPROGRESS_LANG_POSTTIME}></td>
    <td class="even"><{$item->get('posttime')|xoops_formattimestamp:l}></td>
  </tr>
</table>
<br>
<{/if}>
<{if count($objects) > 0}>
  <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>
  <table class="outer" summary="">
    <thead>
      <tr>
        <th>
          <{$smarty.const._MD_XLEPROGRESS_LANG_USER}><br />
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_UID}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_UID}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
        </th>
        <th>
          <{$smarty.const._MD_XLEPROGRESS_LANG_STEP}><br />
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_STEP}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_STEP}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
        </th>
        <th>
          <{$smarty.const._MD_XLEPROGRESS_LANG_RESULT}><br />
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_RESULT}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_RESULT}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
        </th>
        <th>
          <{$smarty.const._MD_XLEPROGRESS_LANG_COMMENT}><br />
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_COMMENT}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_COMMENT}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
        </th>
        <th>
          <{$smarty.const._MD_XLEPROGRESS_LANG_POSTTIME}><br />
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_POSTTIME}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
          <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.XLEPROGRESS_HISTORY_SORT_KEY_POSTTIME}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
        </th>
        <th><{$smarty.const._MD_XLEPROGRESS_LANG_CONTROL}></th>
      </tr>
    </thead>
    <tbody>
      <{foreach item=obj from=$objects}>
        <tr class="<{cycle values='odd,even'}>">
          <td>
          	<{if $obj->getShow('uid')!=0}>
              <{$obj->getShow('uid')|xoops_user:"user_name"}>
            <{else}>
              guest
            <{/if}>
          </td>
          <td><{$obj->getShow('step')}></td>
          <td><{$obj->getShowResult()}></td>
          <td><{$obj->getShow('comment')}></td>
          <td><{$obj->get('posttime')|xoops_formattimestamp:l}></td>
          <td>
            <a href="./index.php?action=HistoryView&amp;progress_id=<{$obj->getShow('progress_id')}>"><{$smarty.const._VIEW}></a>
            <{if $obj->get('result')==$status_progress}>
            <a href="./index.php?action=HistoryEdit&amp;progress_id=<{$obj->getShow('progress_id')}>"><{$smarty.const._EDIT}></a>
            <{/if}>
            <a href="./index.php?action=HistoryDelete&amp;progress_id=<{$obj->getShow('progress_id')}>"><{$smarty.const._DELETE}></a>
          </td>
        </tr>
      <{/foreach}>
    </tbody>
  </table>
  <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>
<{/if}>
</div>
