metadata_history.smarty
2.62 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
39
40
41
42
43
44
45
<h2><img src="{if $config->get("ui/morphEnabled") == '1'}{$rootUrl}/skins/kts_{$config->get("ui/morphTo")}/title_bullet.png{else}{$rootUrl}/resources/graphics/title_bullet.png{/if}"/>{i18n}Document Version History{/i18n}:<br />{$document->getName()}</h2>
<p class="descriptiveText">{i18n}This page lists versions of document metadata and allows you to compare a metadata version with the current metadata content.{/i18n}</p>
<table class="document_history" summary="{i18n arg_appname="$appname"}Document History for #appname# New UI Presentation{/i18n}" cellspacing="0">
<thead>
<tr>
<th class="username">{i18n}User{/i18n}</th>
<th class="date">{i18n}Metadata Version{/i18n}</th>
<th class="date">{i18n}Content Version{/i18n}</th>
<th class="compare">{i18n}Compare with Current{/i18n}</th>
<th class="compare">{i18n}Compare with Other Version{/i18n}</th>
<th class="versiondate">{i18n}Date Created{/i18n}</th>
</tr>
</thead>
<tbody>
{foreach item=oVersion from=$versions}
<tr class="{cycle values=even,odd}">
<td class="username">{$context->getUserForId($oVersion->getVersionCreatorId())}</td>
<td class="date">{$oVersion->getMetadataVersion()}</td>
{capture assign=version}{$oVersion->getMajorVersionNumber()}.{$oVersion->getMinorVersionNumber()}{/capture}
{capture assign=versionid}{$oVersion->getContentVersionId()}{/capture}
<td class="date"><a href="{$downloadaction->getURL()}&version={$versionid}">{$version}</a></td>
<td class="compare">
{if ($document->getMetadataVersion() == $oVersion->getMetadataVersion())}
<strong>{i18n}current version{/i18n}</strong>
{else}
<a href="{addQS}action=viewComparison&fDocumentId={$document->getId()}&fBaseVersion={$oVersion->getMetadataVersionId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}{/addQS}">{i18n}compare with current{/i18n}</a></td>
{/if}
</td>
<td>
{if (count($versions) == 1)}
—
{else}
<a href="{addQS}action=startComparison&fDocumentId={$document->getId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}{/addQS}">{i18n}compare with other version{/i18n}</a>
{/if}
</td>
<td class="versiondate">{$oVersion->getVersionCreated()}</td>
</tr>
{/foreach}
</tbody>
</table>