Added the visualisation of the old revisions of a page.
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
{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}
|
||||
|
||||
{if $oldrev}
|
||||
{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 of the page
|
||||
<a href="{$url}">{$page.title}</a>. This revision was created
|
||||
by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{if !$oldrev}
|
||||
{markdown $rev.content, $request}
|
||||
{else}
|
||||
{markdown $oldrev.content, $request}
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
@@ -19,4 +33,10 @@
|
||||
<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}
|
||||
|
Reference in New Issue
Block a user