Finally save pagerevision and resourcerevision relations when a new page
revision is created; fix a couple of bugs and streamline the view logic for viewPage and viewResource.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
|
||||
{block extraheader}
|
||||
{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/if}
|
||||
{if !$rev.is_head}<meta name="ROBOTS" content="NOINDEX" />{/if}
|
||||
<link rel="stylesheet" type="text/css" media="print" href="{media '/idf/css/print-wiki.css'}" />
|
||||
{/block}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
use it as reference only if you are sure you need these specific information.{/blocktrans}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{if $oldrev}
|
||||
{ashowuser 'submitter', $oldrev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}
|
||||
{if !$rev.is_head}
|
||||
{ashowuser 'submitter', $rev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::viewPage', 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
|
||||
@@ -28,14 +28,12 @@ by {$submitter}.{/blocktrans}</p>
|
||||
<script type="text/javascript" src="{media '/idf/js/wiki-toc.js'}"></script>
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{if !$oldrev}
|
||||
{markdown $rev.content, $request}
|
||||
{else}
|
||||
{markdown $oldrev.content, $request}
|
||||
{if $isOwner or $isAdmin}{aurl 'url', 'IDF_Views_Wiki::deletePageRev', array($project.shortname, $oldrev.id)}
|
||||
|
||||
{if !$rev.is_head and ($isOwner or $isAdmin)}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deletePageRev', array($project.shortname, $rev.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}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
|
@@ -30,7 +30,9 @@ by {$submitter}.{/blocktrans}</p>
|
||||
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
||||
<li><a href="{$rev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
</ul>
|
||||
{if ($isOwner or $isAdmin) and !$rev.is_head}{aurl 'url', 'IDF_Views_Wiki::deleteResourceRev', array($project.shortname, $rev.id)}
|
||||
|
||||
{if !$rev.is_head and ($isOwner or $isAdmin)}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deleteResourceRev', array($project.shortname, $rev.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}
|
||||
|
||||
|
Reference in New Issue
Block a user