<?php defined('MW_PATH') || exit('No direct script access allowed');

/**
 * This file is part of the MailWizz EMA application.
 * 
 * @package MailWizz EMA
 * @author Serban George Cristian <cristian.serban@mailwizz.com> 
 * @link http://www.mailwizz.com/
 * @copyright 2013-2014 MailWizz EMA (http://www.mailwizz.com)
 * @license http://www.mailwizz.com/license/
 * @since 1.0
 */
 
?>

<!DOCTYPE html>
<html>
    <head>
        <meta charset="<?php echo Yii::app()->charset;?>">
        <title><?php echo CHtml::encode($pageMetaTitle);?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="<?php echo CHtml::encode($pageMetaDescription);?>">
    </head>

  <body>
    
    <nav class="navbar header-nav-bar" role="navigation">
      <div class="navbar-header">
        <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".header-main-navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="<?php echo $this->createUrl('dashboard/index');?>" class="navbar-brand"><?php echo CHtml::encode(Yii::app()->options->get('system.common.site_name'));?> <small><?php echo CHtml::encode(Yii::app()->options->get('system.common.site_tagline'));?></small></a>
        </div>
        
        <div class="collapse navbar-collapse header-main-navbar-collapse">
          <ul class="nav navbar-nav pull-right">
            <li class="dropdown">
                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="glyphicon glyphicon-user"></i> <?php echo ($fullName = Yii::app()->user->getModel()->getFullName()) ? CHtml::encode($fullName) : Yii::t('app', 'Welcome');?>
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="<?php echo $this->createUrl('account/index');?>"><?php echo Yii::t('app', 'My Account');?></a></li>
                    <li class="divider"></li>
                    <li><a href="<?php echo $this->createUrl('account/logout');?>"><?php echo Yii::t('app', 'Logout');?></a></li>
                </ul>
            </li>
          </ul>
        </div>

    </nav>
    
    <div class="row-fluid wrapper">
        <div class="top"><!-- --></div>
        <div class="main">
            <div class="hide-under-top">
                <div class="col-lg-2">
                    <div class="panel panel-default sidebar">
                        <?php $this->widget('backend.components.web.widgets.LeftSideNavigationWidget');?>
                    </div>
                </div>
                
                <div class="col-lg-10">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <?php
                            $this->widget('zii.widgets.CBreadcrumbs', array(
                                'tagName'               => 'ul',
                                'separator'             => '',
                                'htmlOptions'           => array('class' => 'breadcrumb'),
                                'activeLinkTemplate'    => '<li><a href="{url}">{label}</a>  <span class="divider"></span></li>',
                                'inactiveLinkTemplate'  => '<li class="active">{label} </li>',
                                'homeLink'              => CHtml::tag('li', array(), CHtml::link(Yii::t('app', 'Dashboard'), $this->createUrl('dashboard/index')) . '<span class="divider"></span>' ),
                                'links'                 => $hooks->applyFilters('layout_page_breadcrumbs', $pageBreadcrumbs),
                            ));
                            ?>
                            <div class="page-content">
                                <div id="notify-container">
                                    <?php echo Yii::app()->notify->show();?>
                                </div>
                                <?php echo $content;?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clearfix"><!-- --></div>
        </div>
    </div>
    

  </body>
</html>