diff --git a/www/css/custom.css b/www/css/custom.css index 2a55727..3ed3931 100644 --- a/www/css/custom.css +++ b/www/css/custom.css @@ -75,3 +75,4 @@ span.timestamp { .resumen_table .subtotal td { font-weight: bold; } .resumen_table tr td.line { border-bottom: 1px solid #ccc; } + diff --git a/www/css/plugins/jquery.ui.css b/www/css/plugins/jquery-ui.css similarity index 100% rename from www/css/plugins/jquery.ui.css rename to www/css/plugins/jquery-ui.css diff --git a/www/css/style.css b/www/css/style.css index 831711b..315d3b8 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -6,12 +6,10 @@ @import url('plugins/colorbox.css'); @import url('plugins/colorpicker.css'); -@import url('plugins/jquery.ui.css'); @import url('plugins/jquery.jgrowl.css'); @import url('plugins/jquery.alerts.css'); @import url('plugins/fullcalendar.css'); -@import url('tabs.css'); @import url('custom.css'); html, body, div, span, applet, object, iframe, @@ -194,6 +192,19 @@ h2.prize { font-size: 20px; color: #000; font-family: Arial, Helvetica, sans-ser .tabmenu ul li.current .subnav li a:hover { background: #c8d9ed; } .tabmenu ul li.current .subnav li a span { text-shadow: 1px 1px #f7f7f7; } + +.tabs { border: 1px solid #ccc; background: #fcfcfc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.tabs { -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.tabs-nav { list-style: none; background: #eee url(../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.tabs-nav { position: relative; height: 41px; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.tabs-nav li { display: inline-block; float: left; } +.tabs-nav li:first-child a { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.tabs-nav li a { display: block; padding: 10px 20px; background: #eee; color: #333; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } +.tabs-nav li a:hover { text-decoration: none; background: #e7e7e7; } +.tabs-nav li.current a { background: #fcfcfc; color: #069; border-bottom: 1px solid #fcfcfc; } +.tabs-hide { display: none; } +.tabs-panel { padding: 15px; } + /***SIDEBAR (all page)***/ .sidebar { padding: 20px 0 20px 0; width: 50px; display: block; float: left; } diff --git a/www/css/tabs.css b/www/css/tabs.css deleted file mode 100644 index 45b6825..0000000 --- a/www/css/tabs.css +++ /dev/null @@ -1,11 +0,0 @@ -.tabs { border: 1px solid #ccc; background: #fcfcfc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } -.tabs { -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } -.tabs-nav { list-style: none; background: #eee url(../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } -.tabs-nav { position: relative; height: 41px; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } -.tabs-nav li { display: inline-block; float: left; } -.tabs-nav li:first-child a { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } -.tabs-nav li a { display: block; padding: 10px 20px; background: #eee; color: #333; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } -.tabs-nav li a:hover { text-decoration: none; background: #e7e7e7; } -.tabs-nav li.current a { background: #fcfcfc; color: #069; border-bottom: 1px solid #fcfcfc; } -.tabs-hide { display: none; } -.tabs-panel { padding: 15px; } \ No newline at end of file diff --git a/www/protected/config/main.php b/www/protected/config/main.php index ca7d04e..bfb69ae 100644 --- a/www/protected/config/main.php +++ b/www/protected/config/main.php @@ -34,7 +34,7 @@ $config = array( // application components 'components'=>array( - 'user'=>array( + 'user'=>array( // enable cookie-based authentication 'allowAutoLogin'=>true, ), @@ -57,6 +57,71 @@ $config = array( 'CLinkPager'=>array( 'cssFile'=>(strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css/pager.css', ), + + 'CJuiAccordion' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiAutoComplete' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiButton' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiDatePicker' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiDialog' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiDraggable' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiDroppable' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiInputWidget' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiProgressBar' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiResizable' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiSelectable' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiSlider' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiSliderInput' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiSortable' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiTabs' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), + 'CJuiWidget' => array ( + 'themeUrl' => (strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css', + 'theme' => 'plugins', + ), ), ), ), diff --git a/www/protected/migrations/m120504_095056_tbl_candidatos_documentos.php b/www/protected/migrations/m120504_095056_tbl_candidatos_documentos.php index cb80af8..acdbd9c 100644 --- a/www/protected/migrations/m120504_095056_tbl_candidatos_documentos.php +++ b/www/protected/migrations/m120504_095056_tbl_candidatos_documentos.php @@ -18,7 +18,6 @@ class m120504_095056_tbl_candidatos_documentos extends CDbMigration { $this->dropForeignKey('fk_candidatos_documentos_1', 'tbl_candidatos_documentos'); $this->dropTable('tbl_candidatos_documentos'); - return false; } /* diff --git a/www/protected/migrations/m120713_172000_tbl_candidatos_estados.php b/www/protected/migrations/m120725_101018_tbl_estados_candidatos.php similarity index 50% rename from www/protected/migrations/m120713_172000_tbl_candidatos_estados.php rename to www/protected/migrations/m120725_101018_tbl_estados_candidatos.php index 6a6ca6e..0a6341b 100644 --- a/www/protected/migrations/m120713_172000_tbl_candidatos_estados.php +++ b/www/protected/migrations/m120725_101018_tbl_estados_candidatos.php @@ -1,23 +1,33 @@ createTable('tbl_candidatos_estados', array( + $this->createTable('tbl_estados_candidatos', array( 'id' => 'pk', 'descripcion' => 'string NOT NULL', )); - $this->addColumn('tbl_candidatos', 'id_estado', 'integer'); $this->dropColumn('tbl_candidatos', 'estado'); + $this->addColumn('tbl_candidatos', 'id_estado', 'integer'); } public function down() - { - $this->dropTable('tbl_candidatos_estados'); + { + $this->dropTable('tbl_estados_candidatos'); $this->dropColumn('tbl_candidatos', 'id_estado'); - $this->addColumn('tbal_candidatos', 'estado', 'string'); - return false; + $this->addColumn('tbl_candidatos', 'estado', 'string'); } + + /* + // Use safeUp/safeDown to do migration with transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ } \ No newline at end of file diff --git a/www/protected/models/Candidato.php b/www/protected/models/Candidato.php index 02cd82f..9a9d7a8 100644 --- a/www/protected/models/Candidato.php +++ b/www/protected/models/Candidato.php @@ -6,6 +6,7 @@ * The followings are the available columns in table 'tbl_candidatos': * @property integer $id * @property integer $id_estado + * @property string $estado * @property string $dni * @property string $nombre * @property string $apellidos @@ -81,7 +82,7 @@ class Candidato extends CActiveRecord } public function getEstado() { - $_estado = CandidatoEstado::model()->findByPk($this->id_estado); + $_estado = EstadoCandidato::model()->findByPk($this->id_estado); if ($_estado != null) return $_estado->descripcion; } @@ -112,7 +113,7 @@ class Candidato extends CActiveRecord public function getCssClassEstado() { return "estado" . array_search($this->id_estado, $this->opcionesEstado); } - + /** * Devuelve la lista de estados permitidos para un candidato. * @return array lista de estados permitidos @@ -185,7 +186,7 @@ class Candidato extends CActiveRecord // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, id_estado, dni, nombre, apellidos, email, telefono_fijo, + array('id, id_estado, estado, dni, nombre, apellidos, email, telefono_fijo, telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento, localidad, fecha_alta, usuario_alta, fecha_modificacion, usuario_modificacion, carnet_conducir, vehiculo_propio, @@ -223,7 +224,8 @@ class Candidato extends CActiveRecord { return array( 'id' => 'ID', - 'id_estado' => 'Estado', + 'id_estado' => 'ID estado', + 'estado' => 'Estado', 'nombreApellidos' => 'Candidato', 'foto' => 'Foto', 'dni' => 'DNI/Pasaporte', @@ -270,6 +272,7 @@ class Candidato extends CActiveRecord $criteria->compare('t.id',$this->id); $criteria->compare('id_estado',$this->id_estado); + $criteria->compare('estado',$this->estado); $criteria->compare('dni',$this->dni,true); $criteria->compare('nombre',$this->nombre,true); $criteria->compare('apellidos',$this->apellidos,true); diff --git a/www/protected/models/CandidatoEstado.php b/www/protected/models/EstadoCandidato.php similarity index 87% rename from www/protected/models/CandidatoEstado.php rename to www/protected/models/EstadoCandidato.php index cb17569..41fc8cb 100644 --- a/www/protected/models/CandidatoEstado.php +++ b/www/protected/models/EstadoCandidato.php @@ -1,18 +1,18 @@ array( + 'id'=>'510', + 'descripcion'=>'Estado 510', + ), + ); +?> diff --git a/www/protected/views/layouts/default.php b/www/protected/views/layouts/default.php index b88e309..6a28f76 100644 --- a/www/protected/views/layouts/default.php +++ b/www/protected/views/layouts/default.php @@ -1,11 +1,23 @@ +baseUrl; + $cs = Yii::app()->clientScript; + + $cs->coreScriptPosition=CClientScript::POS_HEAD; + $cs->scriptMap = array(); + + $cs->registerCoreScript('jquery'); + $cs->registerCoreScript('jquery.ui'); + $cs->registerScriptFile($baseUrl.'/js/custom/general.js'); + + $cs->registerCssFile($baseUrl.'/css/style.css'); +?> +
- - @@ -17,10 +29,6 @@ - - - -