checkoutlisting.smarty
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<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> </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}