metadata_history.smarty
5.16 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<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()|sanitize}</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>
{if $showdelete}
<th class="deleteversion">{i18n}Delete Version{/i18n}</th>
{/if}
</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">
{if ($oVersion->getMetadataStatusID() != VERSION_DELETED)}
<a href="{$downloadaction->getURL()}&version={$versionid}">{$version}</a>
{else}
{$version}
{/if}
</td>
<td class="compare">
{if ($document->getMetadataVersion() == $oVersion->getMetadataVersion())}
<strong>{i18n}current version{/i18n}</strong>
{else}
{if ($oVersion->getMetadataStatusID() != VERSION_DELETED)}
<a href="{addQS}action=viewComparison&fDocumentId={$document->getId()}&fBaseVersion={$document->getCurrentMetadataVersionId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}{/addQS}">{i18n}Metadata{/i18n}</a>
{if ($bShowCompare)}
|
{if ($document->getMimeTypeID() != $oVersion->getMimeTypeID())}
<span class='descriptiveText'>{i18n}mime types do not match{/i18n}</span>
{else}
<a style="cursor:hand;" onclick='window.open("{$sUrl}&action=downloadComparison&fDocumentId={$document->getId()}&fBaseVersion={$document->getCurrentMetadataVersionId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}", "Document_Diffs");'>{i18n}Content{/i18n}</a>
{/if}
{/if}
{else}
—
{/if}
{/if}
</td>
<td>
{if (count($versions) == 1)}
—
{else}
{if ($oVersion->getMetadataStatusID() != VERSION_DELETED)}
<a href="{addQS}action=startComparison&fDocumentId={$document->getId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}{/addQS}">{i18n}Metadata{/i18n}</a>
{if ($bShowVersionCompare)}
|
<a href="{$sUrl}&action=showContentCompare&fDocumentId={$document->getId()}&fComparisonVersion={$oVersion->getCurrentMetadataVersionId()}">{i18n}Content{/i18n}</a>
{/if}
{else}
—
{/if}
{/if}
</td>
<td class="versiondate">{$oVersion->getVersionCreated()}</td>
{if $showdelete}
<td class="deleteversion">
{if ($document->getMetadataVersion() != $oVersion->getMetadataVersion() & $document->getStoragePath() != $oVersion->getStoragePath())}
{if ($oVersion->getMetadataStatusID() == VERSION_DELETED)}
<strong>{i18n}Version deleted{/i18n}</strong>
{else}
<a href="{addQS}action=confirmdeleteVersion&fDocumentId={$document->getId()}&version={$oVersion->getCurrentMetadataVersionId()}{/addQS}">{i18n}delete version{/i18n}</a>
{/if}
{else}
—
{/if}
</td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
{if ($showdelete && !$showall)}
<p>
<a href="{addQS}fDocumentId={$document->getId()}&show=all{/addQS}">{i18n}Show deleted versions{/i18n}</a>
</p>
{/if}