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);
|
||||
$revision = $resource->get_current_revision();
|
||||
$false = Pluf_DB_BooleanToDb(false, $resource->getDbConnection());
|
||||
$revs = $resource->get_revisions_list(array('order' => 'creation_dtime DESC',
|
||||
'filter' => 'is_head='.$false));
|
||||
@ -461,7 +460,6 @@ class IDF_Views_Wiki
|
||||
'page_title' => $title,
|
||||
'resource' => $resource,
|
||||
'oldrev' => $oldrev,
|
||||
'rev' => $revision,
|
||||
'revs' => $revs,
|
||||
),
|
||||
$request);
|
||||
|
@ -21,16 +21,16 @@
|
||||
|
||||
<p class="desc">{$resource.summary}</p>
|
||||
|
||||
{assign $preview = $rev.renderRaw()}
|
||||
{assign $preview = $oldrev.renderRaw()}
|
||||
{if $preview == ''}
|
||||
{assign $preview = __('Unable to render preview for this MIME type.')}
|
||||
{/if}
|
||||
<p class="preview">{$preview|unsafe}</p>
|
||||
|
||||
<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><a href="{$rev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
<li><a href="{$oldrev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
</ul>
|
||||
{/block}
|
||||
|
||||
@ -38,8 +38,8 @@
|
||||
{block context}
|
||||
{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>
|
||||
{if $rev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $rev.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}
|
||||
{if $oldrev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $oldrev.get_submitter()}
|
||||
<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}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
|
Loading…
Reference in New Issue
Block a user