Tarea #1122 -> Añadir las opciones vacías de 'Networks' y 'Portales'.
Tarea #1115 -> Poner logotipo profind en aplicación yii Tarea #1114 -> Añadir arriba en la apliación donde pone el correo el nombre y apellidos del usuario Tarea #1109 -> Cambiar menú en aplicación para que presente menú principal y submenu el actual git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@48 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
This commit is contained in:
parent
7bc0e19671
commit
80ba8ebef6
BIN
www/images/logo_profind.png
Normal file
BIN
www/images/logo_profind.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
@ -23,6 +23,11 @@ class UsuarioWeb extends CWebUser {
|
||||
return $this->loadSubscripcion(Yii::app()->user->id);
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
$usuario = $this->loadUser(Yii::app()->user->id);
|
||||
return ($usuario->nombre) ? $usuario->nombreCompleto : parent::getName();
|
||||
}
|
||||
|
||||
// Load user model.
|
||||
protected function loadUser($id = null) {
|
||||
if ($this->_model === null) {
|
||||
|
||||
28
www/protected/controllers/NetworkController.php
Normal file
28
www/protected/controllers/NetworkController.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class NetworkController extends Controller {
|
||||
|
||||
public function filters() {
|
||||
return array(
|
||||
'accessControl',
|
||||
);
|
||||
}
|
||||
|
||||
public function accessRules() {
|
||||
return array(
|
||||
array('allow', // allow admin user to perform 'admin' and 'delete' actions
|
||||
'actions' => array('index'),
|
||||
'users' => array('@'),
|
||||
),
|
||||
array('deny', // deny all users
|
||||
'users' => array('*'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function actionIndex() {
|
||||
$this->render('index');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
28
www/protected/controllers/PortalController.php
Normal file
28
www/protected/controllers/PortalController.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class PortalController extends Controller {
|
||||
|
||||
public function filters() {
|
||||
return array(
|
||||
'accessControl',
|
||||
);
|
||||
}
|
||||
|
||||
public function accessRules() {
|
||||
return array(
|
||||
array('allow', // allow admin user to perform 'admin' and 'delete' actions
|
||||
'actions' => array('index'),
|
||||
'users' => array('@'),
|
||||
),
|
||||
array('deny', // deny all users
|
||||
'users' => array('*'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function actionIndex() {
|
||||
$this->render('index');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -225,7 +225,9 @@ class Usuario extends CActiveRecord {
|
||||
}
|
||||
|
||||
public function getNombreCompleto() {
|
||||
return $this->nombre . ' ' . $this->apellidos;
|
||||
$cadena = $this->nombre;
|
||||
if ($this->apellidos) $cadena .= ' ' . $this->apellidos;
|
||||
return $cadena;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -161,10 +161,36 @@ form .row-fluid + .row-fluid {
|
||||
margin-top: 10px
|
||||
}
|
||||
.nav-pills + .nav-pills {
|
||||
margin-left: 10px;
|
||||
margin-left: 20px;
|
||||
padding-left: 10px;
|
||||
border-left: 1px solid #dcdcdc;
|
||||
}
|
||||
.nav-pills {
|
||||
margin-top: -10px;
|
||||
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
border:solid 1px #e9e9e9;
|
||||
background:#fff;
|
||||
padding:5px;
|
||||
background: #ffffff;
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f5f5f5));
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
||||
background: linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f5f5f5',GradientType=0 );
|
||||
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-ms-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
|
||||
}
|
||||
.nav-pills > li {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav-pills > li > a {
|
||||
padding: 5px 8px
|
||||
}
|
||||
|
||||
@ -32,16 +32,19 @@
|
||||
<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>
|
||||
<div class="brand">
|
||||
<?php echo CHtml::image(Yii::app()->baseUrl . '/images/logo_profind.png', Yii::app()->name); ?>
|
||||
</div>
|
||||
<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>
|
||||
<li>
|
||||
<?php echo CHtml::link(Yii::t('profind', 'Salir'), $this->createUrl('site/logout')); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<a data-target=".nav-collapse" data-toggle="collapse" class="btn_menu">
|
||||
<span class="icon-align-justify icon-white"></span>
|
||||
@ -51,38 +54,41 @@
|
||||
<?php
|
||||
$itemsMenu = array();
|
||||
|
||||
// Perfil
|
||||
// Agente
|
||||
$itemsMenu[] = array(
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-file icon-white'), '') . ' ' . Yii::t('profind', 'Perfil del agente'),
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-user icon-white'), '') . ' ' . Yii::t('profind', 'Agente'),
|
||||
'url' => array('/usuario/modificar', 'id' => Yii::app()->user->id),
|
||||
'active' => true,
|
||||
'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(),
|
||||
);
|
||||
// Tablero
|
||||
$itemsMenu[] = array(
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-th icon-white'), '') . ' ' . Yii::t('profind', 'Tablero'),
|
||||
'url' => '',
|
||||
'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'),
|
||||
);
|
||||
// Publicaciones
|
||||
$itemsMenu[] = array(
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-tags icon-white'), '') . ' ' . Yii::t('profind', 'Publicaciones'),
|
||||
'url' => '',
|
||||
'linkOptions' => array(),
|
||||
);
|
||||
|
||||
// Inscripciones
|
||||
$itemsMenu[] = array(
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-bookmark icon-white'), '') . ' ' . Yii::t('profind', 'Inscripciones'),
|
||||
'url' => '',
|
||||
'linkOptions' => array(),
|
||||
);
|
||||
|
||||
// BD Candidatos
|
||||
$itemsMenu[] = array(
|
||||
'label' => CHtml::tag('i', array('class' => 'icon-hdd icon-white'), '') . ' ' . Yii::t('profind', 'BD Candidatos'),
|
||||
'url' => '',
|
||||
'linkOptions' => array(),
|
||||
);
|
||||
|
||||
$this->widget('zii.widgets.CMenu', array(
|
||||
'activeCssClass' => 'active',
|
||||
@ -92,8 +98,7 @@
|
||||
),
|
||||
'items' => $itemsMenu,
|
||||
));
|
||||
?>
|
||||
|
||||
?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@ -104,6 +109,65 @@
|
||||
<!-- contenido -->
|
||||
<div id="contentwrapper">
|
||||
<div class="main_content">
|
||||
<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>
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
7
www/themes/profind/views/network/index.php
Normal file
7
www/themes/profind/views/network/index.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php $this->pageTitle = Yii::t('profind', 'Networks'); ?>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3 class="heading"><?php echo Yii::t('profind', 'Networks'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
7
www/themes/profind/views/portal/index.php
Normal file
7
www/themes/profind/views/portal/index.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php $this->pageTitle = Yii::t('profind', 'Portales'); ?>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3 class="heading"><?php echo Yii::t('profind', 'Portales'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user