<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Administration</title>		
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        #{get 'moreStyles' /}
        <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/main.css'}" />
        <link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}" />
        <script src="@{'/public/javascripts/jquery-1.3.2.min.js'}"></script>
        <script src="@{'/public/javascripts/jquery.tools.min.js'}"></script>
    </head>
    <body id="admin">
        
        <div id="header">
            <div id="logo">
                yabe. <span>administration</span>
            </div>
            <ul id="tools">
                <li>
                    <a href="@{Authentication.logout()}">Log out</a>
                </li>
            </ul>
        </div>
        
        <div id="main">
            
            <ul id="adminMenu">
                <li class="${request.controller == 'Admin' ? 'selected' : ''}">
                    <a href="@{Admin.index()}">My posts</a>
                </li>
                #{if user.isAdmin}
                    <li class="${request.controller == 'admin.Posts' ? 'selected' : ''}">
                        <a href="@{admin.Posts.list()}">Posts</a>
                    </li>
                    <li class="${request.controller == 'admin.Tags' ? 'selected' : ''}">
                        <a href="@{admin.Tags.list()}">Tags</a>
                    </li>
                    <li class="${request.controller == 'admin.Comments' ? 'selected' : ''}">
                        <a href="@{admin.Comments.list()}">Comments</a>
                    </li>
                    <li class="${request.controller == 'admin.Users' ? 'selected' : ''}">
                        <a href="@{admin.Users.list()}">Users</a>
                    </li>
                #{/if}
            </ul>
            
            #{doLayout /} 
        </div>
        
        <p id="footer">
            Yabe is a (not so) powserful blog engine built with the 
            <a href="http://www.playframework.org">play framework</a>
            as a tutorial application.
        </p>
        
    </body>
</html>