Correctly display the delete page link only to users with correct rights.

This commit is contained in:
Loic d'Anterroches 2010-02-20 13:03:06 +01:00
parent a5a5c7b2b6
commit 9653f1a341

View File

@ -57,9 +57,9 @@
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>{* float left is a fix for Firefox < 3.5 *} <td>{* float left is a fix for Firefox < 3.5 *}
<span style="float: left;"><input type="submit" value="{trans 'Preview'}" name="preview" /> &nbsp; <input type="submit" value="{trans 'Update Page'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::view', array($project.shortname, $page.title)}">{trans 'Cancel'}</a></span> <span style="float: left;"><input type="submit" value="{trans 'Preview'}" name="preview" /> &nbsp; <input type="submit" value="{trans 'Update Page'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::view', array($project.shortname, $page.title)}">{trans 'Cancel'}</a></span>{if $isOwner or $isAdmin or $isMember}
{aurl 'url', 'IDF_Views_Wiki::delete', array($project.shortname, $page.id)} {aurl 'url', 'IDF_Views_Wiki::delete', array($project.shortname, $page.id)}
<span class="dellink"><a href="{$url}" title="{trans 'Delete this page'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}" title="{trans 'Delete this page'}">{trans 'Delete this page'}</a></span> <span class="dellink"><a href="{$url}" title="{trans 'Delete this page'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}" title="{trans 'Delete this page'}">{trans 'Delete this page'}</a></span>{/if}
</td> </td>
</tr> </tr>
</table> </table>