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-10-01 16:45:41 +00:00
< div class = " brand " >
< ? php echo CHtml :: image ( Yii :: app () -> baseUrl . '/images/logo_profind.png' , Yii :: app () -> name ); ?>
</ div >
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>
2012-09-20 19:38:42 +00:00
</ ul >
</ li >
2012-10-01 16:45:41 +00:00
< li >
< ? php echo CHtml :: link ( Yii :: t ( 'profind' , 'Salir' ), $this -> createUrl ( 'site/logout' )); ?>
</ li >
2012-09-20 19:38:42 +00:00
</ 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 ();
2012-10-01 16:45:41 +00:00
// Agente
2012-09-29 18:15:28 +00:00
$itemsMenu [] = array (
2012-10-01 16:45:41 +00:00
'label' => CHtml :: tag ( 'i' , array ( 'class' => 'icon-user icon-white' ), '' ) . ' ' . Yii :: t ( 'profind' , 'Agente' ),
2012-09-29 18:15:28 +00:00
'url' => array ( '/usuario/modificar' , 'id' => Yii :: app () -> user -> id ),
2012-10-01 16:45:41 +00:00
'active' => true ,
2012-09-29 18:15:28 +00:00
'linkOptions' => array (),
);
2012-10-01 16:45:41 +00:00
// Tablero
$itemsMenu [] = array (
'label' => CHtml :: tag ( 'i' , array ( 'class' => 'icon-th icon-white' ), '' ) . ' ' . Yii :: t ( 'profind' , 'Tablero' ),
'url' => '' ,
'linkOptions' => array (),
);
2012-09-29 18:15:28 +00:00
2012-10-01 16:45:41 +00:00
// Publicaciones
$itemsMenu [] = array (
'label' => CHtml :: tag ( 'i' , array ( 'class' => 'icon-tags icon-white' ), '' ) . ' ' . Yii :: t ( 'profind' , 'Publicaciones' ),
'url' => '' ,
'linkOptions' => array (),
);
2012-09-29 18:15:28 +00:00
2012-10-01 16:45:41 +00:00
// Inscripciones
$itemsMenu [] = array (
'label' => CHtml :: tag ( 'i' , array ( 'class' => 'icon-bookmark icon-white' ), '' ) . ' ' . Yii :: t ( 'profind' , 'Inscripciones' ),
'url' => '' ,
'linkOptions' => array (),
);
2012-09-29 18:15:28 +00:00
2012-10-01 16:45:41 +00:00
// BD Candidatos
$itemsMenu [] = array (
'label' => CHtml :: tag ( 'i' , array ( 'class' => 'icon-hdd icon-white' ), '' ) . ' ' . Yii :: t ( 'profind' , 'BD Candidatos' ),
'url' => '' ,
'linkOptions' => array (),
);
2012-09-29 18:15:28 +00:00
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
));
2012-10-01 16:45:41 +00:00
?>
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 " >
2012-10-01 16:45:41 +00:00
< nav >
< ? php
$itemsSubmenu = array ();
// Perfil
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Perfil' ),
'url' => array ( '/usuario/modificar' , 'id' => Yii :: app () -> user -> id ),
'linkOptions' => array (),
);
// Empresa
if ( Yii :: app () -> user -> esCoordinador )
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Empresa' ),
'url' => array ( '/empresa/modificar' , 'id' => Yii :: app () -> user -> id_empresa ),
'linkOptions' => array (),
);
// Producto
if ( Yii :: app () -> user -> esCoordinador )
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Productos' ),
'url' => array ( '/subscripcion/modificar' , 'id' => Yii :: app () -> user -> subscripcion -> id ),
'linkOptions' => array (),
);
// Equipo
if (( Yii :: app () -> user -> esCoordinador ) && ( Yii :: app () -> user -> tieneEquipo ))
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Equipo' ),
'url' => array ( '/equipo/index' ),
'linkOptions' => array ( 'class' => 'icon_block contacto' ),
);
// Networks
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Networks' ),
'url' => array ( '/network/index' ),
'linkOptions' => array (),
);
// Portales
$itemsSubmenu [] = array (
'label' => Yii :: t ( 'profind' , 'Portales' ),
'url' => array ( '/portal/index' ),
'linkOptions' => array (),
);
$this -> widget ( 'zii.widgets.CMenu' , array (
'activeCssClass' => 'active' ,
'encodeLabel' => false ,
'htmlOptions' => array (
'class' => 'nav nav-pills' ,
),
'items' => $itemsSubmenu ,
));
?>
</ nav >
2012-09-20 19:38:42 +00:00
< ? 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 );
}
?>