2012-09-20 19:38:42 +00:00
<! DOCTYPE html >
< html lang = " <?php echo Yii::app()->language; ?> " >
< head >
< meta charset = " utf-8 " />
2012-09-21 11:37:01 +00:00
2012-09-20 19:38:42 +00:00
< meta name = " viewport " content = " width=device-width, initial-scale=1.0 " />
< title >< ? php echo CHtml :: encode ( $this -> pageTitle ); ?> </title>
2012-09-25 16:29:12 +00:00
<!-- Chosen CSS -->
< link rel = " stylesheet " href = " <?php echo Yii::app()->theme->baseUrl; ?>/lib/chosen/chosen.css " />
2012-09-29 18:15:28 +00:00
2012-09-21 11:37:01 +00:00
<!-- Bootstrap CSS -->
2012-09-20 19:38:42 +00:00
< 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 " />
2012-09-21 11:37:01 +00:00
<!-- Notificaciones -->
2012-09-20 19:38:42 +00:00
< link rel = " stylesheet " href = " <?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.css " />
2012-09-21 11:37:01 +00:00
<!-- Estilos -->
2012-09-20 19:38:42 +00:00
< link rel = " stylesheet " href = " <?php echo Yii::app()->theme->baseUrl; ?>/css/profind.css " />
2012-09-21 11:37:01 +00:00
< link rel = " stylesheet " href = " <?php echo Yii::app()->theme->baseUrl; ?>/css/media.css " />
2012-09-20 19:38:42 +00:00
< link rel = " stylesheet " href = " <?php echo Yii::app()->theme->baseUrl; ?>/css/azul.css " />
2012-09-29 18:15:28 +00:00
2012-09-20 19:38:42 +00:00
<!-- Favicon -->
< link rel = " shortcut icon " href = " favicon.ico " />
</ head >
2012-09-21 11:37:01 +00:00
< body class = " sidebar_hidden profind-fixed " >
2012-09-20 19:38:42 +00:00
< div id = " maincontainer " class = " clearfix " >
2012-09-21 11:37:01 +00:00
<!-- cabecera -->
2012-09-20 19:38:42 +00:00
< header >
< div class = " navbar navbar-fixed-top " >
< div class = " navbar-inner " >
< div class = " container-fluid " >
2012-09-23 12:10:45 +00:00
< 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>
2012-09-20 19:38:42 +00:00
< ul class = " nav user_menu pull-right " >
< li class = " dropdown " >
2012-09-26 11:07:00 +00:00
< a href = " # " class = " dropdown-toggle " data - toggle = " dropdown " >< ? php echo CHtml :: encode ( Yii :: app () -> user -> name ); ?> <b class="caret"></b></a>
2012-09-20 19:38:42 +00:00
< ul class = " dropdown-menu " >
2012-09-24 23:14:37 +00:00
< 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 >
2012-09-20 19:38:42 +00:00
< 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
2012-09-29 18:15:28 +00:00
$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' ),
);
2012-09-20 19:38:42 +00:00
$this -> widget ( 'zii.widgets.CMenu' , array (
'activeCssClass' => 'active' ,
'encodeLabel' => false ,
'htmlOptions' => array (
'class' => 'nav' ,
),
2012-09-29 18:15:28 +00:00
'items' => $itemsMenu ,
2012-09-20 19:38:42 +00:00
));
?>
</ div >
</ nav >
</ div >
</ div >
</ div >
</ header >
2012-09-21 11:37:01 +00:00
<!-- contenido -->
2012-09-20 19:38:42 +00:00
< div id = " contentwrapper " >
< div class = " main_content " >
< ? php echo $content ; ?>
</ div >
</ div >
2012-09-21 11:37:01 +00:00
<!-- Bootstrap JS -->
2012-09-20 19:38:42 +00:00
< script src = " <?php echo Yii::app()->theme->baseUrl; ?>/bootstrap/js/bootstrap.min.js " ></ script >
2012-09-21 11:37:01 +00:00
<!-- Arreglo orientación en iOS -->
2012-09-20 19:38:42 +00:00
< script src = " <?php echo Yii::app()->theme->baseUrl; ?>/js/ios-orientationchange-fix.js " ></ script >
2012-09-21 11:37:01 +00:00
<!-- Mensajes -->
< script src = " <?php echo Yii::app()->theme->baseUrl; ?>/lib/sticky/sticky.min.js " ></ script >
2012-09-20 19:38:42 +00:00
</ div >
</ body >
</ html >
2012-09-21 11:37:01 +00:00
< ? php Yii :: app () -> clientScript -> registerCoreScript ( 'jquery' ); ?>
2012-09-20 19:38:42 +00:00
< ? 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 );
}
?>