Render information about the old revision to-be-deleted, not about
the current one.
This commit is contained in:
parent
4dd8994270
commit
a83634c166
@ -452,7 +452,6 @@ class IDF_Views_Wiki
|
|||||||
}
|
}
|
||||||
|
|
||||||
$title = sprintf(__('Delete Old Revision of %s'), $resource->title);
|
$title = sprintf(__('Delete Old Revision of %s'), $resource->title);
|
||||||
$revision = $resource->get_current_revision();
|
|
||||||
$false = Pluf_DB_BooleanToDb(false, $resource->getDbConnection());
|
$false = Pluf_DB_BooleanToDb(false, $resource->getDbConnection());
|
||||||
$revs = $resource->get_revisions_list(array('order' => 'creation_dtime DESC',
|
$revs = $resource->get_revisions_list(array('order' => 'creation_dtime DESC',
|
||||||
'filter' => 'is_head='.$false));
|
'filter' => 'is_head='.$false));
|
||||||
@ -461,7 +460,6 @@ class IDF_Views_Wiki
|
|||||||
'page_title' => $title,
|
'page_title' => $title,
|
||||||
'resource' => $resource,
|
'resource' => $resource,
|
||||||
'oldrev' => $oldrev,
|
'oldrev' => $oldrev,
|
||||||
'rev' => $revision,
|
|
||||||
'revs' => $revs,
|
'revs' => $revs,
|
||||||
),
|
),
|
||||||
$request);
|
$request);
|
||||||
|
@ -21,16 +21,16 @@
|
|||||||
|
|
||||||
<p class="desc">{$resource.summary}</p>
|
<p class="desc">{$resource.summary}</p>
|
||||||
|
|
||||||
{assign $preview = $rev.renderRaw()}
|
{assign $preview = $oldrev.renderRaw()}
|
||||||
{if $preview == ''}
|
{if $preview == ''}
|
||||||
{assign $preview = __('Unable to render preview for this MIME type.')}
|
{assign $preview = __('Unable to render preview for this MIME type.')}
|
||||||
{/if}
|
{/if}
|
||||||
<p class="preview">{$preview|unsafe}</p>
|
<p class="preview">{$preview|unsafe}</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>{trans 'File size'}: {$rev.filesize|size}</li>
|
<li>{trans 'File size'}: {$oldrev.filesize|size}</li>
|
||||||
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
||||||
<li><a href="{$rev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
<li><a href="{$oldrev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@ -38,8 +38,8 @@
|
|||||||
{block context}
|
{block context}
|
||||||
{assign $submitter = $resource.get_submitter()}
|
{assign $submitter = $resource.get_submitter()}
|
||||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$resource.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$resource.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||||
{if $rev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $rev.get_submitter()}
|
{if $oldrev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $oldrev.get_submitter()}
|
||||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$oldrev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||||
{if $revs.count() > 0}
|
{if $revs.count() > 0}
|
||||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||||
<ul>{foreach $revs as $old}
|
<ul>{foreach $revs as $old}
|
||||||
|
Loading…
Reference in New Issue
Block a user