Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

secure tag

  • Loading branch information...
commit bef89ae7d0a16a142804e07dda87ba4206c356bf 1 parent c384fa1
@loicdescotte authored
Showing with 12 additions and 7 deletions.
  1. +12 −7 app/views/main.html
View
19 app/views/main.html
@@ -26,14 +26,19 @@
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src=@{'/public/javascripts/modernizr-1.6.min.js'}></script>
- <header>
+ <header>
<h1><a href="/">${play.configuration.getProperty('application.name')}</a> <span><a href="./">#{get 'title' /}</a></span></h1>
- #{if session.get("username").equals("admin")}
- <a class="vm-admin" href="@{Secure.logout()}">Logout</a>
- #{/if}
- #{else}
- <a class="vm-admin" href="/admin/login">Log as admin</a>
- #{/else}
+ <div align="right">
+ #{if session.get("username") == null}
+ <a class="vm-admin" href="/admin/login">Log as admin</a>
+ #{/if}
+ #{else}
+ #{secure.check 'admin'}
+ <a class="vm-admin" href="@{Secure.logout()}">Logout</a>
+ </div>
+ #{/secure.check}
+ #{/else}
+ </div>
</header>
<div id="content">
Please sign in to comment.
Something went wrong with that request. Please try again.