<?php
/**
 * Copyright © 2012 Alcatel-Lucent.
 *
 * See the NOTICE file distributed with this work for additional information regarding copyright ownership. Licensed to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License.
 */
?>
<? echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link href="/css/bootstrap-responsive.css" rel="stylesheet">
    <link href="/css/apigrove.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>API Grove</title>
</head>
<body>

<div class="navbar navbar-inverse navbar-static-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="nav-logo" href="/"></a>

            <div class="nav-collapse">
                <ul class="nav">
                    <? if(Zend_Auth::getInstance()->getIdentity() !== null): ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">API <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url(array('controller'=>'api'),'default', true) ?>">List APIs</a></li>
                            <li><a href="/api/create">Create New</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Auth <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url(array('controller'=>'auth'),'default', true) ?>">List Auths</a></li>
                            <li><a href="/auth/create">Create New</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Policy <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url(array('controller'=>'policy'),'default', true) ?>">List Policies</a></li>
                            <li><a href="/policy/create">Create New</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Certificates <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url(array('controller'=>'certificate'),'default', true) ?>">List Certificates</a></li>
                            <li><a href="/certificate/crl/create">Add CRL</a></li>
                            <li><a href="/certificate/key/create">Add Key</a></li>
                            <li><a href="/certificate/ca/create">Add Trusted CA</a></li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Logs<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="/logging">View Logs</a></li>
                            <li><a href="/logging/config">Configure</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sys Config<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="/user">User Settings</a></li>
                            <li><a href="/config">Preferences</a></li>
                        </ul>
                    </li>
                    <li><a href="<?php echo $this->url(array('controller'=>'auth'),'logout', true) ?>" id="logout">Logout</a></li>
                    <? endif; ?>
                </ul>

            </div>

            <!--/.nav-collapse -->
        </div>
    </div>
</div>

<?php echo $this->layout()->content ?>
<script src="/js/jquery-1.8.0.js"></script>
<script src="/js/apigrove.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.smart_autocomplete.js"></script>
</body>
</html>
