<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta charset="utf-8" />
    <?=$this->headTitle()?>
	<!--[if lt IE 9]>
	<meta http-equiv="PRAGMA" content="NO-CACHE" />
    <script src="<?=$this->link('/lib/js/html5shiv/html5shiv.min.js')?>"></script>
	<![endif]-->
    <?=$this->headMeta()?>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <?=$this->headMeta()?>
    <?=$this->googleAnalytics()?>
    <?=$this->evajs()?>

    <?=$this->headMeta()?>
    <?=$this->headStyle()?>

    <?$this->cssAssets(array(
        '/lib/css/fontawesome/css/font-awesome.css',
    ));?>
    <link href="<?=$this->link('/src/admin/css/admin.css')?>" media="all" rel="stylesheet" type="text/css" />
    <?$this->jsAssets(array(
        '/lib/js/labjs/labjs.js',
        '/lib/js/jquery/jquery.js',
        '/module/core/js/core.js',
        '/module/core/js/ui.js',
    ));?>
    <?=$this->headLink()?>
    <?=$this->headScript()?>
    <script src="<?=$this->link('/src/admin/js/init.js')?>"></script>
</head>

<body class="">

    <div class="container">

        <div class="row">

            <div class="span2">

                <div class="main-left-col">

                    <h1>Eva Engine</h1>

                    <ul class="side-nav">
                        <li data-highlight-url="/admin/core/dashboard/">
                        <a href="<?=$this->uri('/admin/core/dashboard/')?>"><i class="icon-home"></i> <?=$this->_('Dashboard')?></a>
                        </li>
                        <?if($this->hasmodule('Blog')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#website-dropdown" href="#"><i class="icon-sitemap"></i> <?=$this->_('Blog')?> <b class="caret"></b></a>
                        <ul id="website-dropdown" class="collapse">
                            <li data-highlight-url="/admin/blog/(\d+|(remove.*))*$"><a href="<?=$this->uri('/admin/blog/')?>"><?=$this->_('Posts')?></a></li>
                            <li data-highlight-url="/admin/blog/create$"><a href="<?=$this->uri('/admin/blog/create')?>"><?=$this->_('Add New Post')?></a></li>
                            <li data-highlight-url="/admin/blog/category/(\d+|create|remove)*$"><a href="<?=$this->uri('/admin/blog/category/')?>"><?=$this->_('Page Categories')?></a></li>
                            <li data-highlight-url="/admin/blog/comment/.*$"><a href="<?=$this->uri('/admin/blog/comment/')?>"><?=$this->_('Comments')?></a></li>
                            <!--
                            <li data-highlight-url="/admin/blog/tag/(\d+)*$"><a href="<?=$this->uri('/admin/blog/tag/')?>"><?=$this->_('Page Tags')?></a></li>
                            -->
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('File')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#file-dropdown" href="#"><i class="icon-file"></i> <?=$this->_('File')?> <b class="caret"></b></a>
                        <ul id="file-dropdown" class="collapse">
                            <li data-highlight-url="/admin/file/(\d+)*$"><a href="<?=$this->uri('/admin/file/')?>"><?=$this->_('File Management')?></a></li>
                            <li data-highlight-url="/admin/file/upload"><a href="<?=$this->uri('/admin/file/upload')?>"><?=$this->_('File Upload')?></a></li>
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('Activity')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#activity-dropdown" href="#"><i class="icon-twitter"></i> <?=$this->_('Activity')?> <b class="caret"></b></a>
                        <ul id="activity-dropdown" class="collapse">
                            <li data-highlight-url="/admin/activity/(\d+)*$"><a href="<?=$this->uri('/admin/activity/')?>"><?=$this->_('Activity Management')?></a></li>
                            <li data-highlight-url="/admin/activity/create"><a href="<?=$this->uri('/admin/activity/create')?>"><?=$this->_('Create Activity')?></a></li>
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('Event')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#event-dropdown" href="#"><i class="icon-calendar"></i> <?=$this->_('Event')?> <b class="caret"></b></a>
                        <ul id="event-dropdown" class="collapse">
                            <li data-highlight-url="/admin/event/(\d+)*$"><a href="<?=$this->uri('/admin/event/')?>"><?=$this->_('Event Management')?></a></li>
                            <li data-highlight-url="/admin/event/create"><a href="<?=$this->uri('/admin/event/create')?>"><?=$this->_('Create Event')?></a></li>
                            <li data-highlight-url="/admin/event/category/(\d+|create|remove)*$"><a href="<?=$this->uri('/admin/event/category/')?>"><?=$this->_('Event Categories')?></a></li>
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('Group')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#group-dropdown" href="#"><i class="icon-group"></i> <?=$this->_('Group')?> <b class="caret"></b></a>
                        <ul id="group-dropdown" class="collapse">
                            <li data-highlight-url="/admin/group/(\d+)*$"><a href="<?=$this->uri('/admin/group/')?>"><?=$this->_('Group Management')?></a></li>
                            <li data-highlight-url="/admin/group/create"><a href="<?=$this->uri('/admin/group/create')?>"><?=$this->_('Create Group')?></a></li>
                            <li data-highlight-url="/admin/group/category/(\d+|create|remove)*$"><a href="<?=$this->uri('/admin/group/category/')?>"><?=$this->_('Group Categories')?></a></li>
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('Album')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#album-dropdown" href="#"><i class="icon-camera-retro"></i> <?=$this->_('Album')?> <b class="caret"></b></a>
                        <ul id="album-dropdown" class="collapse">
                           <li data-highlight-url="/admin/album/(\d+|upload)?$"><a href="<?=$this->uri('/admin/album/')?>"><?=$this->_('Album Management')?></a></li>
                            <li data-highlight-url="/admin/album/create"><a href="<?=$this->uri('/admin/album/create')?>"><?=$this->_('Create Album')?></a></li>
                            <li data-highlight-url="/admin/album/category/(\d+|create|remove)*$"><a href="<?=$this->uri('/admin/album/category/')?>"><?=$this->_('Album Categories')?></a></li>
                        </ul>
                        </li>
                        <?endif?>
                        <?if($this->hasmodule('User')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#user-dropdown" href="#"><i class="icon-user"></i> <?=$this->_('User')?> <b class="caret"></b></a>
                        <ul id="user-dropdown" class="collapse">
                            <li data-highlight-url="/admin/user/(\d+)*$"><a href="<?=$this->uri('/admin/user/')?>"><?=$this->_('User Management')?></a></li>
                            <li data-highlight-url="/admin/user/create"><a href="<?=$this->uri('/admin/user/create')?>"><?=$this->_('Create User')?></a></li>
                            <li data-highlight-url="/admin/user/(field.*)$"><a href="<?=$this->uri('/admin/user/field')?>"><?=$this->_('User Fields')?></a></li>
                            <li data-highlight-url="/admin/user/(role.*)$"><a href="<?=$this->uri('/admin/user/role')?>"><?=$this->_('Role & Permissions')?></a></li>
                        </ul>
                        </li>
                        <?endif?>

                        <?if($this->hasmodule('Notification')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#notification-dropdown" href="#"><i class="icon-camera-retro"></i> <?=$this->_('Notification')?> <b class="caret"></b></a>
                        <ul id="notification-dropdown" class="collapse">
                           <li data-highlight-url="/admin/notification/(\d+)*?$"><a href="<?=$this->uri('/admin/notification/')?>"><?=$this->_('Notification Management')?></a></li>
                            <li data-highlight-url="/admin/notification/create"><a href="<?=$this->uri('/admin/notification/create')?>"><?=$this->_('Create Notification')?></a></li>
                        </ul>
                        </li>
                        <?endif?>

                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#newsletter-dropdown" href="#"><i class="icon-envelope"></i> <?=$this->_('Newsletter')?> <b class="caret"></b></a>
                        <ul id="newsletter-dropdown" class="collapse">
                            <li data-highlight-url="/admin/core/newsletter/"><a href="<?=$this->uri('/admin/core/newsletter/')?>"><?=$this->_('Subscription List')?></a></li>
                            <li data-highlight-url="/admin/core/newsletter/send/"><a href="<?=$this->uri('/admin/core/newsletter/send/')?>"><?=$this->_('Send Newsletter')?></a></li>
                        </ul>
                        </li>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#setting-dropdown" href="#"><i class="icon-cogs"></i> <?=$this->_('Setting')?> <b class="caret"></b></a>
                        <ul id="setting-dropdown" class="collapse">
                            <li data-highlight-url="/admin/core/queue.*$"><a href="<?=$this->uri('/admin/core/queue/')?>"><i class="icon-retweet"></i> Queue</a></li>
                            <?if($this->hasmodule('Crontab')):?>
                            <li data-highlight-url="/admin/crontab/"><a href="<?=$this->uri('/admin/crontab/')?>"><i class="icon-tasks"></i> <?=$this->_('Crontabs')?></a></li>
                            <?endif?>
                            <li data-highlight-url="/admin/core/cache"><a href="<?=$this->uri('/admin/core/cache')?>"><?=$this->_('Cache Cleaner')?></a></li>
                            <!--<li data-highlight-url="/admin/core/setting"><a href="<?=$this->uri('/admin/core/setting')?>"><?=$this->_('Global Setting')?></a></li>-->
                            <li data-highlight-url="/admin/core/setting/components"><a href="<?=$this->uri('/admin/core/setting/components')?>"><?=$this->_('Page Components')?></a></li>

                        </ul>
                        </li>

                        <?if($this->hasmodule('Scaffold')):?>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="collapse" data-target="#scaffold-dropdown" href="#"><i class="icon-gift"></i> Scaffold <b class="caret"></b></a>
                        <ul id="scaffold-dropdown" class="collapse">
                            <li data-highlight-url="/scaffold/(\w+)*((/\w+)*)$"><a href="<?=$this->uri('/scaffold/')?>">Start Db Scaffold</a></li>
                            <li data-highlight-url="/scaffold/form/html/(\w+)*$"><a href="<?=$this->uri('/scaffold/form/html/')?>">Form Html Generator</a></li>
                            <li data-highlight-url="/scaffold/csv/(\w+)*$"><a href="<?=$this->uri('/scaffold/csv')?>">Csv Merge</a></li>
                            <li data-highlight-url="/scaffold/testdata/posts/(\w+)*$"><a href="<?=$this->uri('/scaffold/testdata/posts/')?>">Test Posts Generator</a></li>
                        </ul>
                        </li>
                        <?endif?>
                    </ul>
                </div> <!-- end main-left-col -->

            </div> <!-- end span2 -->

            <div class="span10">

                <div class="secondary-masthead">

                    <ul class="nav nav-pills pull-right">
                        <li>
                        <a href="<?=$this->uri('/')?>"><i class="icon-home"></i> <?=$this->_('View Website')?></a>
                        </li>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-globe"></i> <?=$this->_('Languages')?> <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="divider"></li>
                            <li><a href="<?=$this->uri('/admin/core/language/switch/en')?>">English</a></li>
                            <li><a href="<?=$this->uri('/admin/core/language/switch/zh')?>">中文</a></li>
                        </ul>
                        </li>
                        <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user"></i> Admin <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li class="divider"></li>
                            <li><a href="<?=$this->uri('/admin/core/logout/')?>"><?=$this->_('Logout')?></a></li>
                        </ul>
                        </li>
                    </ul>

                    <ul class="breadcrumb">
                        <li>
                        <a href="<?=$this->uri('/admin/core/dashboard/')?>"><?=$this->_('Admin Panel')?></a> <span class="divider">/</span>
                        </li>
                        <li class="active"><?=$this->textDelay('breadcrumbText')?></li>
                    </ul>

                </div>

                <div class="main-area dashboard">

                    <div class="row">
                        <div class="span10">
                        <?=$this->content?>
                        </div>
                    </div>

                    <div class="row">

                        <div class="span10 footer">

                            <p>&copy; <a href="https://github.com/AlloVince/eva-engine">EvaEngine</a> 2012</p>

                        </div>

                    </div>

                </div>

            </div> <!-- end span10 -->

        </div> <!-- end row -->

    </div> <!-- end container -->



    <script>
        eva.init(eva_config);
    </script>

</body>
</html>
