checkoutlisting.smarty 1.4 KB
<h2>{i18n}Checked Out Documents{/i18n}</h2>
<p class="descriptiveText">{i18n}If a checked-out document has been
lost, or the user who checked a document out has not checked it back in,
it may be necessary to override the "checked-out" status of a document.
Use the <strong>force checkin</strong> action in the listing below to
override the checked-out status.{/i18n}</p>
<!-- FIXME set classes here for listing. -->
{if (count($documents) !== 0)}
<table class="listing" cellspacing="5px">
    <thead>
        <tr>
            <th>{i18n}Document{/i18n}</th>
            <th>{i18n}Checked out by{/i18n}</th>
            <th>{i18n}Location{/i18n}</th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
      
      {foreach item=oDocument from=$documents}
        <tr class="{cycle values=even,odd}">
            <td>{$oDocument->getName()}</td>
            <td>{assign var=iUserId
value=$oDocument->getCheckedOutUserId()}{php}$oUser =
User::get($this->_tpl_vars['iUserId']);  if ($oUser) { print
$oUser->getName(); }{/php}</td>
            <td class="descriptiveText">{$oDocument->getDisplayPath()}</td>
            <td><a href="?action=confirm&fDocumentId={$oDocument->getId()}">{i18n}force checkin{/i18n}</a></td>
        </tr>
      {/foreach}
    </tbody>
    <!-- FIXME do we want batching? -->
</table>
{else}
   <div class="ktInfo">
     <p>{i18n}No documents are currently checked out.{/i18n}</p>
   </div>
{/if}