Display only the options of your role

This commit is contained in:
Las Zenow 2013-07-19 00:37:07 +02:00
parent 272719a67a
commit 68e6dc7d70
3 changed files with 15 additions and 11 deletions

View file

@ -1,6 +1,6 @@
{{template "header.html" .S}}
{{$user := .S.User}}
{{$isAdmin := .S.IsAdmin}}
{{with .Book}}
<script>
function delBook(){
@ -43,7 +43,7 @@ function delBook(){
</dl>
</div>
<div class="span3">
{{if $user}}
{{if $isAdmin}}
<div class="row">
<div class="btn-group pull-right">
<a href="/edit/{{.Id}}" class="btn btn-primary"><i class="icon-pencil"></i> Edit</a>