git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@38 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
149 lines
7.8 KiB
PHP
149 lines
7.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="<?php echo Yii::app()->language; ?>">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
|
|
|
|
<!-- Chosen CSS -->
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/lib/chosen/chosen.css" />
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/css/bootstrap.min.css" />
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/css/bootstrap-responsive.min.css" />
|
|
|
|
<!-- Notificaciones -->
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.css" />
|
|
|
|
<!-- Estilos -->
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/profind.css" />
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/media.css" />
|
|
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/azul.css" />
|
|
|
|
|
|
<!-- Favicon -->
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
</head>
|
|
<body class="sidebar_hidden profind-fixed">
|
|
<div id="maincontainer" class="clearfix">
|
|
<!-- cabecera -->
|
|
<header>
|
|
<div class="navbar navbar-fixed-top">
|
|
<div class="navbar-inner">
|
|
<div class="container-fluid">
|
|
<a class="brand" href="<?php echo Yii::app()->params['frontpage']; ?>"><i class="icon-home icon-white"></i> <?php echo CHtml::encode(Yii::app()->name); ?></a>
|
|
<ul class="nav user_menu pull-right">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo CHtml::encode(Yii::app()->user->name); ?> <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><?php echo CHtml::link(Yii::t('profind', 'Cambiar la password'), $this->createUrl('seguridadUsuario/cambiarPassword', array('id' => Yii::app()->user->id))); ?></li>
|
|
<li class="divider"></li>
|
|
<li><?php echo CHtml::link(Yii::t('profind', 'Salir'), $this->createUrl('site/logout')); ?></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<a data-target=".nav-collapse" data-toggle="collapse" class="btn_menu">
|
|
<span class="icon-align-justify icon-white"></span>
|
|
</a>
|
|
<nav>
|
|
<div class="nav-collapse">
|
|
<?php
|
|
$itemsMenu = array();
|
|
|
|
// Perfil
|
|
$itemsMenu[] = array(
|
|
'label' => CHtml::tag('i', array('class' => 'icon-file icon-white'), '') . ' ' . Yii::t('profind', 'Perfil del agente'),
|
|
'url' => array('/usuario/modificar', 'id' => Yii::app()->user->id),
|
|
'linkOptions' => array(),
|
|
);
|
|
|
|
// Empresa
|
|
if (Yii::app()->user->esCoordinador)
|
|
$itemsMenu[] = array(
|
|
'label' => CHtml::tag('i', array('class' => 'icon-briefcase icon-white'), '') . ' ' . Yii::t('profind', 'Empresa'),
|
|
'url' => array('/empresa/modificar', 'id' => Yii::app()->user->id_empresa),
|
|
'linkOptions' => array(),
|
|
);
|
|
|
|
// Producto
|
|
if (Yii::app()->user->esCoordinador)
|
|
$itemsMenu[] = array(
|
|
'label' => CHtml::tag('i', array('class' => 'icon-tag icon-white'), '') . ' ' . Yii::t('profind', 'Producto'),
|
|
'url' => array('/subscripcion/modificar', 'id' => Yii::app()->user->subscripcion->id),
|
|
'linkOptions' => array(),
|
|
);
|
|
|
|
// Equipo
|
|
if ((Yii::app()->user->esCoordinador) && (Yii::app()->user->tieneEquipo))
|
|
$itemsMenu[] = array(
|
|
'label' => CHtml::tag('i', array('class' => 'icon-user icon-white'), '') . ' ' . Yii::t('profind', 'Equipo'),
|
|
'url' => array('/equipo/index'),
|
|
'linkOptions' => array('class' => 'icon_block contacto'),
|
|
);
|
|
|
|
|
|
|
|
$this->widget('zii.widgets.CMenu', array(
|
|
'activeCssClass' => 'active',
|
|
'encodeLabel' => false,
|
|
'htmlOptions' => array(
|
|
'class' => 'nav',
|
|
),
|
|
'items' => $itemsMenu,
|
|
));
|
|
?>
|
|
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- contenido -->
|
|
<div id="contentwrapper">
|
|
<div class="main_content">
|
|
<?php echo $content; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bootstrap JS -->
|
|
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/js/bootstrap.min.js"></script>
|
|
<!-- Arreglo orientación en iOS -->
|
|
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/ios-orientationchange-fix.js"></script>
|
|
<!-- Mensajes -->
|
|
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.min.js"></script>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
|
|
|
|
<?php
|
|
$flashMessages = Yii::app()->user->getFlashes(false);
|
|
if (!empty($flashMessages)) {
|
|
$profind_notificaciones = <<<JS
|
|
$(document).ready(function() {
|
|
profind_notificaciones.sticky();
|
|
});
|
|
profind_notificaciones = {
|
|
sticky: function() {
|
|
JS;
|
|
if (Yii::app()->user->hasFlash('success')):
|
|
$profind_notificaciones .= '$.sticky("' . Yii::app()->user->getFlash('success') . '", {autoclose : 5000, position: "top-center", type: "st-success" });';
|
|
endif;
|
|
if (Yii::app()->user->hasFlash('error')):
|
|
$profind_notificaciones .= '$.sticky("' . Yii::app()->user->getFlash('error') . '", {autoclose : 5000, position: "top-center", type: "st-error" });';
|
|
endif;
|
|
if (Yii::app()->user->hasFlash('notice')):
|
|
$profind_notificaciones .= '$.sticky("' . Yii::app()->user->getFlash('notice') . '", {autoclose : 5000, position: "top-center", type: "st-info" });';
|
|
endif;
|
|
|
|
$profind_notificaciones .= '}';
|
|
$profind_notificaciones .= '}';
|
|
|
|
Yii::app()->clientScript->registerScript('profind_notificaciones', $profind_notificaciones, CClientScript::POS_END);
|
|
}
|
|
?>
|