Added the deletion of old revisions of the wiki pages.
This commit is contained in:
46
src/IDF/templates/idf/wiki/delete.html
Normal file
46
src/IDF/templates/idf/wiki/delete.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block extraheader}{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/if}{/block}
|
||||
{block docclass}yui-t3{assign $inView=true}{/block}
|
||||
{block body}
|
||||
|
||||
{assign $submitter = $oldrev.get_submitter()}{aurl 'url', 'IDF_Views_Wiki::view', array($project.shortname, $page.title)}
|
||||
<div class="old-rev">
|
||||
<p>{blocktrans}You are looking at an old revision (<em>{$oldrev.summary}</em>) of the page
|
||||
<a href="{$url}">{$page.title}</a>. This revision was created
|
||||
by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
<p>{blocktrans}If you delete this old revision, it will be removed from the database and <strong>you will not be able to recover it</strong>.{/blocktrans}</p>
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Delete Revision'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::view', array($project.shortname, $page.title)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{markdown $oldrev.content, $request}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
{assign $submitter = $page.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$page.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $page.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 $tags.count()}
|
||||
<p>
|
||||
<strong>{trans 'Labels:'}</strong><br />
|
||||
{foreach $tags as $tag}
|
||||
<span class="label"><strong>{$tag.class}:</strong>{$tag.name}</span><br />
|
||||
{/foreach}
|
||||
</p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::view', array($project.shortname, $page.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
@@ -18,6 +18,9 @@ by {$submitter}.{/blocktrans}</p>
|
||||
{markdown $rev.content, $request}
|
||||
{else}
|
||||
{markdown $oldrev.content, $request}
|
||||
{if $isOwner or $isAdmin}{aurl 'url', 'IDF_Views_Wiki::deleteRev', array($project.shortname, $oldrev.id)}
|
||||
<p class="delp"><a href="{$url}" title="{trans 'Delete this revision'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}">{trans 'Delete this revision'}</a></p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
Reference in New Issue
Block a user