SVN Alba r4819 - in prosistem/alba/trunk/alba: apps/principal/modules apps/principal/templates config data/sql lib/model lib/model/map lib/model/om
Author: ftoledo Date: 2007-07-16 17:00:27 -0300 (Mon, 16 Jul 2007) New Revision: 4819 Removed: prosistem/alba/trunk/alba/apps/principal/modules/menu/ prosistem/alba/trunk/alba/lib/model/Menu.php prosistem/alba/trunk/alba/lib/model/MenuPeer.php prosistem/alba/trunk/alba/lib/model/map/MenuMapBuilder.php prosistem/alba/trunk/alba/lib/model/om/BaseMenu.php prosistem/alba/trunk/alba/lib/model/om/BaseMenuPeer.php Modified: prosistem/alba/trunk/alba/apps/principal/templates/menu.php prosistem/alba/trunk/alba/config/schema.xml prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql prosistem/alba/trunk/alba/data/sql/schema.sql Log: cambiando el menu desde la base de datos a un archivo template de html Modified: prosistem/alba/trunk/alba/apps/principal/templates/menu.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/templates/menu.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/apps/principal/templates/menu.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,75 +1,151 @@ -<?php -/** - * This file is part of Alba. - * - * Alba is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Alba is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Alba; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -/** - * menu - * - * @package alba - * @author José Luis Di Biase <[email protected]> - * @author Héctor Sanchez <[email protected]> - * @author Fernando Toledo <[email protected]> - * @version SVN: $Id$ - * @filesource - * @license GPL - */ - - //Obtengo el contenido del menu - use_helper ('Debug'); - function drawMenu($id_parent) { - global $sf_user; - echo "<ul>\n"; - $c = new Criteria(); - $c->add(MenuPeer::FK_PADRE_MENU_ID,$id_parent); - if ($id_parent == 1) - $c->add(MenuPeer::ID,1,Criteria::NOT_EQUAL); // evitan menu raiz - $c->addAscendingOrderByColumn(MenuPeer::ORDEN); - $nodos = MenuPeer::doSelect($c); - - foreach($nodos as $nodo) { - if (sfContext::getInstance()->getUser()->hasCredential($nodo->getPerm()) || $nodo->getPerm() == '') { - echo "\t<li>"; - if ($nodo->getNombre() != '-') { - echo "<span></span>"; - if ($nodo->getTarget() == '') - echo link_to($nodo->getNombre(),$nodo->getLink()) . "\n"; - else - echo link_to($nodo->getNombre(),$nodo->getLink(),array('target'=> $nodo->getTarget())) . "\n"; - - if ($nodo->getLink() =='#') - drawMenu($nodo->getId()); - } - echo "</li>\n"; - } - else - debug_message("falta permiso de menu: " . $nodo->getPerm()); - } - echo "</ul>\n"; - } -?> <script> var my<?php echo sfConfig::get("app_alba_menutheme")?>Base = "<?echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot() . '/js/jsmenu/themes/' .sfConfig::get("app_alba_menutheme"). '/'?>"; </script> <script src="<?echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot() . '/js/jsmenu/themes/'.sfConfig::get("app_alba_menutheme").'/theme.js'?>"> </script> + <div id="menu" align="center"> - <? drawMenu(1); ?> + <ul> + <li><span></span><a href="#">Administración</a> + <ul> + <li><span></span><a href="#">General</a> + <ul> + <li><span></span><?php echo link_to("Definir Organización","organizacion/edit?id=1")?></li> + <li><span></span><?php echo link_to("Definir Establecimiento","establecimiento")?></li> + </ul> + </li> + <li><span></span><a href="#">Configuraciones Previas</a> + <ul> + <li><span></span><a href="#">Generales</a> + <ul> + <li><span></span><?php echo link_to("Definir Países","pais")?></li> + <li><span></span><?php echo link_to("Definir Provincias",'provincia')?></li> + <li><span></span><?php echo link_to("Definir Distritos Escolares","distritoescolar")?></li> + <li><span></span><?php echo link_to("Definir Categoría de IVA","tipoiva")?></li> + <li><span></span><?php echo link_to("Tipo Documento","tipodocumento")?></li> + </ul> + </li> + <li><span></span><a href="#">Alumnos</a> + <ul> + <li><span></span><?php echo link_to("Definir tipo de bajas","conceptobaja")?></li> + <li><span></span><?php echo link_to("Definir tipo de asistencia","tipoasistencia")?></li> + <li><span></span><?php echo link_to("Definir Escala de notas","escalanota")?></li> + <li><span></span><?php echo link_to("Tipos de entrada al legajo pedagógico","legajocategoria")?></li> + <li><span></span><?php echo link_to("Definir Categorías del Boletín de Concepto","concepto")?></li> + </ul> + </li> + <li><span></span><a href="#">Docentes</a> + <ul> + <li><span></span><?php echo link_to("Tipos de docentes",'tipodocente')?></li> + <li><span></span><?php echo link_to("Motivos de baja", "cargobaja")?></li> + </ul> + </li> + <li><span></span><a href="#">Calendarios y Horarios</a> + <ul> + <li><span></span><?php echo link_to("Definir Ciclos Lectivos","coclilectivo")?></li> + <li><span></span><?php echo link_to("Definir Períodos","ciclolectivo/agregarTurnosYPeriodos")?></li> + <li><span></span><?php echo link_to("Definir turnos","turnos")?></li> + <li><span></span><?php echo link_to("Tipos de intevalos de horario escolar","horarioescolartipo")?></li> + <li><span></span><?php echo link_to("Definir feriados del año","feriado")?></li> + <li><span></span><?php echo link_to("Calendario de vacunas","calendariovacunacion")?></li> + </ul> + </li> + <li><span></span><a href="#">Locaciones y Espacios</a> + <ul> + <li><span></span><?php echo link_to("Definir tipos de Locaciones","tipolocacion")?></li> + <li><span></span><?php echo link_to("Definir tipos de Espacios","tipoespacio")?></li> + </ul> + </li> + </ul> + </li> + <li><span></span><?php echo link_to("Preferencias Generales","preferencia")?></li> + <li><span></span><a href="#">Seguridad</a> + <ul> + <li><span></span><?php echo link_to("Usuario","usuario")?></li> + <li><span></span><?php echo link_to("Rol","rol")?></li> + <li><span></span><?php echo link_to("Permiso","permiso")?></li> + <li><span></span><?php echo link_to("Módulo","modulo")?></li> + </ul> + </li> + </ul> + </li> + <li><span></span><a href="#">Cuentas</a> + <ul> + <li><span></span><?php echo link_to("Administrar","cuenta")?></li> + <li><span></span><?php echo link_to("Responsables","responsable")?></li> + </ul> + </li> + <li><span></span><a href="#">Alumnos</a> + <ul> + <li><span></span><?php echo link_to("Ingresar Nuevo","alumno/create")?></li> + <li><span></span><?php echo link_to("Listar Todos","alumno/list")?></li> + <li><span></span><?php echo link_to("Buscar Alumno para...","legajopedagogico")?></li> + <li><span></span><?php echo link_to("Asistencia por Sección/División","asistencia")?></li> + <li><span></span><a href="#">Boletines</a> + <ul> + <li><span></span><?php echo link_to("Concepto","boletin/listConcepto")?></li> + <li><span></span><?php echo link_to("Notas","boletin/list")?></li> + </ul> + </li> + </ul> + </li> + <li><span></span><a href="#">Docentes</a> + <ul> + <li><span></span><?php echo link_to("Administrar","docente")?></li> + <li><span></span><?php echo link_to("Actividad/Materia por Docente","relActividadDocente")?></li> + </ul> + </li> + <li><span></span><a href="#">Gestión Escolar</a> + <ul> + <li><span></span><?php echo link_to("Definir Grados/Años","anio")?></li> + <li><span></span><?php echo link_to("Definir Secciones/Divisiones","division")?></li> + <li><span></span><?php echo link_to("Asignar Alumno a Sección/División","relAlumnoDivision/create")?></li> + <li><span></span><?php echo link_to("Ingresar Materias/Actividades","actividad")?></li> + <li><span></span><?php echo link_to("Actividades por Grado/Año","relAnioActividad")?></li> + </ul> + </li> + <li><span></span><a href="#">Calendarios y Horarios</a> + <ul> + <li><span></span><?php echo link_to("Ir a Ciclo Lectivo Actual","ciclolectivo/agregarTurnosYPeriodos")?></li> + <li><span></span><a href="#">Horario Escolar</a> + <ul> + <li><span></span><?php echo link_to("Definir horario clases","horarioescolar")?></li> + <li><span></span><?php echo link_to("Generar Horario por sección/división","calendario")?></li> + </ul> + </li> + <li><span></span><a href="#">Horario según...?</a> + <ul> + <li><span></span><?php echo link_to("...docentes","calendario/busquedaDocente")?></li> + <li><span></span><?php echo link_to ("...sección/división","calendario/busquedaDivision")?></li> + </ul> + </li> + </ul> + </li> + <li><span></span><a href="#">Locaciones y Espacios</a> + <ul> + <li><span></span><?php echo link_to("Listado de Locaciones","locacion")?></li> + <li><span></span><?php echo link_to("Listado de Espacios x Locación","espacios")?></li> + </ul> + </li> + <li><span></span><a href="#">Informes y Consultas</a> + <ul> + <li><span></span><?php echo link_to("Constancia Alumno Regular","informes/constanciaAlumnoRegularFormulario",'target=_blank')?></li> + <li><span></span><a href="#">Constancia Egreso 7mo</a></li> + <li><span></span><?php echo link_to("Alumnos por división","informes/alumnosPorDivisionFormulario",'target=_blank')?></li> + <li><span></span><?php echo link_to("Boletines","informes/boletinFormulario","target=_blank")?></li> + <li><span></span><?php echo link_to("Certificado de Estudios","informes/certificadoEstudiosBusquedaFormulario","target=_blank")?></li> + <li><span></span><?php echo link_to("Solicitud de Legajo","informes/solicitudLegajoBusquedaFormulario",'target?_blank')?></li> + <li><span></span><?php echo link_to("Biblioteca de contenidos","sfMediaLibrary")?></li> + </ul> + </li> + <li><span></span><a href="#">Ayuda</a> + <ul> + <li><span></span><?php echo link_to("Indice...","ayuda")?></li> + <li><span></span><?php echo link_to("Créditos","creditos")?></li> + </ul> + </li> + <li><span></span><?php echo link_to("Salir","seguridad/logout")?></li> + </ul> </div> <SCRIPT LANGUAGE="JavaScript"> @@ -77,3 +153,4 @@ cmDrawFromText ('menu', 'hbr', cm<?php echo sfConfig::get("app_alba_menutheme")?>, '<?php echo sfConfig::get("app_alba_menutheme")?>'); --> </SCRIPT> + Modified: prosistem/alba/trunk/alba/config/schema.xml =================================================================== --- prosistem/alba/trunk/alba/config/schema.xml 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/config/schema.xml 2007-07-16 20:00:27 UTC (rev 4819) @@ -702,21 +702,6 @@ <column name="descripcion" type="VARCHAR" size="255" required="false"/> </table> - <table name="menu" idMethod="native"> - <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"/> - <column name="nombre" type="VARCHAR" size="255" required="true" default=""/> - <column name="link" type="VARCHAR" size="255" required="true" default=""/> - <column name="perm" type="VARCHAR" size="255" required="true" default=""/> - <column name="target" type="VARCHAR" size="255" required="true" default=""/> - <column name="fk_padre_menu_id" type="INTEGER" required="false"/> - <column name="orden" type="INTEGER" required="false"/> - <index name="nombre_menu"> - <index-column name="nombre"/> - </index> - <foreign-key foreignTable="menu"> - <reference local="fk_padre_menu_id" foreign="id"/> - </foreign-key> - </table> <table name="tipoasistencia" idMethod="native"> <column name="id" type="INTEGER" size="11" required="true" autoIncrement="true" primaryKey="true"/> <column name="nombre" type="VARCHAR" size="10" required="true"/> Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,19 +1,5 @@ SET CHARACTER SET utf8; SET FOREIGN_KEY_CHECKS = 0; - -INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` ) -VALUES ( -'96', 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', '9', '0', '' -); -INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` ) -VALUES ( -'97', 'Definir Roles de responsables', 'rolResponsable', 'rolResponsable', '84', '0', ''); - -INSERT INTO `menu` ( `id` , `nombre` , `link` , `perm` , `fk_padre_menu_id` , `orden` , `target` ) -VALUES (98,'Períodos','ciclolectivo/agregarTurnosYPeriodos','ciclolectivo',86,0,''); - - - SET FOREIGN_KEY_CHECKS = 1; CREATE TABLE `rol_responsable` Modified: prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/data/sql/datos_desde_cero.sql 2007-07-16 20:00:27 UTC (rev 4819) @@ -133,95 +133,6 @@ VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 1, 'admin@localhost', 1, '2006-12-03 00:00:00', '2006-12-03 00:00:00', 'usuario por defecto', 'adminsitrador', 1, 0); -- --- Volcar la base de datos para la tabla 'menu' --- -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (1, '-- Menu Raiz --', '#', '', 1, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (2, 'General', '#', '', 10, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (3, 'Cuentas', '#', '', 1, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (4, 'Alumnos', '#', '', 1, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (5, 'Docentes', '#', '', 1, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (6, 'Gestión Escolar', '#', '', 1, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (7, 'Calendarios y Horarios', '#', '', 1, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (8, 'Locaciones y Espacios', '#', '', 1, 60, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (9, 'Informes y Consultas', '#', '', 1, 70, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (10, 'Administración', '#', '', 1, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (11, 'Preferencias Generales', 'preferencia', 'preferencia', 10, 100, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (12, 'Seguridad', '#', 'usuario', 10, 200, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (13, 'Usuario', 'usuario/', 'usuario', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (14, 'Rol', 'rol/', 'rol', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (15, 'Permiso', 'permiso/', 'permiso', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (16, 'Módulo', 'modulo/', 'modulo', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (18, 'Definir Organización', 'organizacion/edit?id=1', 'organizacion', 2, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (19, 'Definir Establecimiento', 'establecimiento', 'establecimiento', 2, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (20, 'Definir Distritos Escolares', 'distritoescolar', 'distrito', 83, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (21, 'Definir Provincias', 'provincia', 'provincia', 83, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (22, 'Definir Países', 'pais/', 'pais', 83, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (23, 'Definir Categoría de IVA', 'tipoiva/', 'tipoiva', 83, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (24, 'Administrar', 'cuenta/', 'cuenta', 3, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (26, 'Responsables', 'responsable/', 'responsable', 3, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (27, 'Boletines', '#', '', 4, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (29, '-', '#', '', 10, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (30, 'Salir', 'seguridad/logout', '', 1, 90, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (31, 'Definir Escala de notas', 'escalanota', 'escalanota', 84, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (32, 'Definir Categorías del Boletíacute;n de Concepto', 'concepto', 'concepto', 84, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (33, 'Buscar Alumno para...', 'legajopedagogico', 'legajopedagogico', 4, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (34, 'Tipos de entrada al legajo pedagógico', 'legajocategoria', 'legajocategoria', 84, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (35, 'Ingresar Nuevo', 'alumno/create', 'alumno', 4, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (37, 'Administrar', 'docente', '', 5, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (39, 'Tipos de docentes', 'tipodocente', 'tipodocente', 85, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (40, 'Motivos de baja', 'cargobaja', 'cargobaja', 85, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (41, 'Ingresar Materias/Actividades', 'actividad', '', 6, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (42, 'Definir Grados/Años', 'anio', '', 6, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (43, 'Actividades por Grado/Año', 'relAnioActividad', '', 6, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (44, 'Definir Secciones/Divisiones', 'division', '', 6, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (45, 'Definir feriados del año', 'feriado', 'feriado', 86, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (46, 'Definir Ciclos Lectivos', 'ciclolectivo', '', 86, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (47, 'Horario Escolar', '#', '', 7, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (48, 'Tipos de intevalos de horario escolar', 'horarioescolartipo', 'horarioescolartipo', 86, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (49, 'Calendario de vacunas', 'calendariovacunacion', 'calendariovacunacion', 86, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (50, '¿Horario según...?', '#', '', 7, 100, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (51, '...docentes', 'calendario/busquedaDocente', '', 50, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (52, '...sección/división', 'calendario/busquedaDivision', '', 50, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (53, 'Listado de Locaciones', 'locacion', '', 8, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (54, 'Definir tipos de Locaciones', 'tipolocacion', 'tipolocacion', 87, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (55, 'Listado de Espacios x Locación', 'espacios', '', 8, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (56, 'Definir tipos de Espacios', 'tipoespacio', 'tipoespacio', 87, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (57, 'Definir horario clases', 'horarioescolar', '', 47, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (58, 'Constancia Alumno Regular', 'informes/constanciaAlumnoRegularFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (60, 'Constancia Egreso 7mo', 'informes/certificadoPrimariaFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (65, 'Ayuda', '#', '', 1, 80, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (67, 'Indice...', 'ayuda/', '', 65, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (68, 'Créditos', 'default', '', 65, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (69, 'Generar Horario por sección/división', 'calendario', 'calendario', 47, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (71, 'Configuraciones Previas', '#', '', 10, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (72, 'Definir tipo de bajas', 'conceptobaja', 'conceptobaja', 84, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (73, 'Asistencia por Sección/División', 'asistencia', 'asistencia', 4, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (74, 'Definir tipo de asistencia', 'tipoasistencia', 'tipoasistencia', 84, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (75, 'Definir turnos', 'turnos', 'turnos', 86, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (78, 'Asignar Alumno a Sección/División', 'relAlumnoDivision/create', 'relAlumnoDivision', 6, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (79, 'Actividad/Materia por Docente', 'relActividadDocente', 'relActividadDocente', 5, 300, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (81, 'Concepto', 'boletin/listConcepto', 'boletinconcepto', 27, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (82, 'Notas', 'boletin/list', 'boletinnotas', 27, 1, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (83, 'Generales', '#', '', 71, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (84, 'Alumnos', '#', '', 71, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (85, 'Docentes', '#', '', 71, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (86, 'Calendarios y Horarios', '#', '', 71, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (87, 'Locaciones y Espacios', '#', '', 71, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (88, 'Listar Todos', 'alumno/list', 'alumno', 4, 2, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (89, 'Tipo Documento', 'tipodocumento', '', 83, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (90, 'Alumnos por divsión', 'informes/alumnosPorDivisionFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (91, 'Boletines', 'informes/boletinFormulario', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (92, 'Certificado de Estudios', 'informes/certificadoEstudiosBusquedaFormulario', 'informes', '9', '0', '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (93, 'Solicitud de Legajo', 'informes/solicitudLegajoBusquedaFormulario', 'informes', '9', '0', '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (94, 'Definir Períodos', 'ciclolectivo/agregarTurnosYPeriodos', 'ciclolectivo', 86, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (95, 'Ir a Ciclo Lectivo Actual', 'ciclolectivo/agregarTurnosYPeriodos', 'ciclolectivo', 7, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (96, 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', 9, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (97, 'Definir Roles de responsables', 'rolResponsable', 'rolResponsable', 84, 0, ''); - - - - --- -- Volcar la base de datos para la tabla 'modulo' -- Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-07-16 20:00:27 UTC (rev 4819) @@ -2627,90 +2627,6 @@ INSERT INTO `locacion` (`id`, `nombre`, `descripcion`, `direccion`, `ciudad`, `codigo_postal`, `telefono`, `fax`, `encargado`, `encargado_telefono`, `fk_provincia_id`, `fk_tipolocacion_id`, `principal`) VALUES (1, 'Sede Central. ', '-', 'Piedras 841', 'CABA', '1620', '4300-7070', '', 'Lic. Marcos Avellaneda', '155 654 2255', 1, 1, 0); INSERT INTO `locacion` (`id`, `nombre`, `descripcion`, `direccion`, `ciudad`, `codigo_postal`, `telefono`, `fax`, `encargado`, `encargado_telefono`, `fk_provincia_id`, `fk_tipolocacion_id`, `principal`) VALUES (2, 'Gimnasio Club social.', 'Lugar donde se realiza educación física.', 'Campichuelo 150', 'CABA', '1630', '4300-3232', '', 'Jorge López (portero)', '4300-3232', 1, 2, 0); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (1, '-- Menu Raiz --', '#', '', 1, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (2, 'General', '#', '', 10, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (3, 'Cuentas', '#', '', 1, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (4, 'Alumnos', '#', '', 1, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (5, 'Docentes', '#', '', 1, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (6, 'Gestión Escolar', '#', '', 1, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (7, 'Calendarios y Horarios', '#', '', 1, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (8, 'Locaciones y Espacios', '#', '', 1, 60, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (9, 'Informes y Consultas', '#', '', 1, 70, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (10, 'Administración', '#', '', 1, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (11, 'Preferencias Generales', 'preferencia', 'preferencia', 10, 100, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (12, 'Seguridad', '#', 'usuario', 10, 200, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (13, 'Usuario', 'usuario/', 'usuario', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (14, 'Rol', 'rol/', 'rol', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (15, 'Permiso', 'permiso/', 'permiso', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (16, 'Módulo', 'modulo/', 'modulo', 12, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (18, 'Definir Organización', 'organizacion/edit?id=1', 'organizacion', 2, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (19, 'Definir Establecimiento', 'establecimiento', 'establecimiento', 2, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (20, 'Definir Distritos Escolares', 'distritoescolar', 'distrito', 83, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (21, 'Definir Provincias', 'provincia', 'provincia', 83, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (22, 'Definir Países', 'pais/', 'pais', 83, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (23, 'Definir Categoría de IVA', 'tipoiva/', 'tipoiva', 83, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (24, 'Administrar', 'cuenta/', 'cuenta', 3, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (26, 'Responsables', 'responsable/', 'responsable', 3, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (27, 'Boletines', '#', '', 4, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (29, '-', '#', '', 10, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (30, 'Salir', 'seguridad/logout', '', 1, 90, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (31, 'Definir Escala de notas', 'escalanota', 'escalanota', 84, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (32, 'Definir Categorí�as del Boletíacute;n de Concepto', 'concepto', 'concepto', 84, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (33, 'Buscar Alumno para...', 'legajopedagogico', 'legajopedagogico', 4, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (34, 'Tipos de entrada al legajo pedagógico', 'legajocategoria', 'legajocategoria', 84, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (35, 'Ingresar Nuevo', 'alumno/create', 'alumno', 4, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (37, 'Administrar', 'docente', '', 5, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (39, 'Tipos de docentes', 'tipodocente', 'tipodocente', 85, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (40, 'Motivos de baja', 'cargobaja', 'cargobaja', 85, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (41, 'Ingresar Materias/Actividades', 'actividad', '', 6, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (42, 'Definir Grados/Años', 'anio', '', 6, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (43, 'Actividades por Grado/Año', 'relAnioActividad', '', 6, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (44, 'Definir Secciones/Divisiones', 'division', '', 6, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (45, 'Definir feriados del año', 'feriado', 'feriado', 86, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (46, 'Definir Ciclos Lectivos', 'ciclolectivo', '', 86, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (47, 'Horario Escolar', '#', '', 7, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (48, 'Tipos de intevalos de horario escolar', 'horarioescolartipo', 'horarioescolartipo', 86, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (49, 'Calendario de vacunas', 'calendariovacunacion', 'calendariovacunacion', 86, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (50, '�Horario según...?', '#', '', 7, 100, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (51, '...docentes', 'calendario/busquedaDocente', '', 50, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (52, '...sección/división', 'calendario/busquedaDivision', '', 50, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (53, 'Listado de Locaciones', 'locacion', '', 8, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (54, 'Definir tipos de Locaciones', 'tipolocacion', 'tipolocacion', 87, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (55, 'Listado de Espacios x Locación', 'espacios', '', 8, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (56, 'Definir tipos de Espacios', 'tipoespacio', 'tipoespacio', 87, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (57, 'Definir horario clases', 'horarioescolar', '', 47, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (58, 'Constancia Alumno Regular', 'informes/constanciaAlumnoRegularFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (60, 'Constancia Egreso 7mo', 'informes/certificadoPrimariaFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (65, 'Ayuda', '#', '', 1, 80, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (67, 'Indice...', 'ayuda/', '', 65, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (68, 'Créditos', 'default', '', 65, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (69, 'Generar Horario por sección/división', 'calendario', 'calendario', 47, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (71, 'Configuraciones Previas', '#', '', 10, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (72, 'Definir tipo de bajas', 'conceptobaja', 'conceptobaja', 84, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (73, 'Asistencia por Sección/División', 'asistencia', 'asistencia', 4, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (74, 'Definir tipo de asistencia', 'tipoasistencia', 'tipoasistencia', 84, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (75, 'Definir turnos', 'turnos', 'turnos', 86, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (78, 'Asignar Alumno a Sección/División', 'relAlumnoDivision/create', 'relAlumnoDivision', 6, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (79, 'Actividad/Materia por Docente', 'relActividadDocente', 'relActividadDocente', 5, 300, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (81, 'Concepto', 'boletin/listConcepto', 'boletinconcepto', 27, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (82, 'Notas', 'boletin/list', 'boletinnotas', 27, 1, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (83, 'Generales', '#', '', 71, 10, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (84, 'Alumnos', '#', '', 71, 20, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (85, 'Docentes', '#', '', 71, 30, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (86, 'Calendarios y Horarios', '#', '', 71, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (87, 'Locaciones y Espacios', '#', '', 71, 50, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (88, 'Listar Todos', 'alumno/list', 'alumno', 4, 2, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (89, 'Tipo Documento', 'tipodocumento', '', 83, 40, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (90, 'Alumnos por divsión', 'informes/alumnosPorDivisionFormulario?vista=imprimir', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (91, 'Boletines', 'informes/boletinFormulario', 'informes', 9, 0, '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (92, 'Certificado de Estudios', 'informes/certificadoEstudiosBusquedaFormulario', 'informes', '9', '0', '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (93, 'Solicitud de Legajo', 'informes/solicitudLegajoBusquedaFormulario', 'informes', '9', '0', '_blank'); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (94, 'Definir Períodos', 'ciclolectivo/agregarTurnosYPeriodos', 'ciclolectivo', 86, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (95, 'Ir a Ciclo Lectivo Actual', 'ciclolectivo/agregarTurnosYPeriodos', 'ciclolectivo', 7, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (96, 'Biblioteca de contenidos', 'sfMediaLibrary', 'informes', 9, 0, ''); -INSERT INTO `menu` (`id`, `nombre`, `link`, `perm`, `fk_padre_menu_id`, `orden`, `target`) VALUES (97, 'Definir Roles de responsables', 'rolResponsable', 'rolResponsable', 84, 0, ''); - - -- -- Volcar la base de datos para la tabla `modulo` -- Modified: prosistem/alba/trunk/alba/data/sql/schema.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/schema.sql 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/data/sql/schema.sql 2007-07-16 20:00:27 UTC (rev 4819) @@ -1328,30 +1328,6 @@ )Type=InnoDB; #----------------------------------------------------------------------------- -#-- menu -#----------------------------------------------------------------------------- - -DROP TABLE IF EXISTS `menu`; - - -CREATE TABLE `menu` -( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `nombre` VARCHAR(255) default '' NOT NULL, - `link` VARCHAR(255) default '' NOT NULL, - `perm` VARCHAR(255) default '' NOT NULL, - `target` VARCHAR(255) default '' NOT NULL, - `fk_padre_menu_id` INTEGER, - `orden` INTEGER, - PRIMARY KEY (`id`), - KEY `nombre_menu`(`nombre`), - INDEX `menu_FI_1` (`fk_padre_menu_id`), - CONSTRAINT `menu_FK_1` - FOREIGN KEY (`fk_padre_menu_id`) - REFERENCES `menu` (`id`) -)Type=InnoDB; - -#----------------------------------------------------------------------------- #-- tipoasistencia #----------------------------------------------------------------------------- Deleted: prosistem/alba/trunk/alba/lib/model/Menu.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/Menu.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/lib/model/Menu.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,22 +0,0 @@ -<?php - -require_once 'lib/model/om/BaseMenu.php'; - - -/** - * Skeleton subclass for representing a row from the 'menu' table. - * - * - * - * You should add additional methods to this class to meet the - * application requirements. This class will only be generated as - * long as it does not already exist in the output directory. - * - * @package model - */ -class Menu extends BaseMenu { - public function __toString() { - return $this->getNombre(); - } - -} // Menu Deleted: prosistem/alba/trunk/alba/lib/model/MenuPeer.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/MenuPeer.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/lib/model/MenuPeer.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,23 +0,0 @@ -<?php - - // include base peer class - require_once 'lib/model/om/BaseMenuPeer.php'; - - // include object class - include_once 'lib/model/Menu.php'; - - -/** - * Skeleton subclass for performing query and update operations on the 'menu' table. - * - * - * - * You should add additional methods to this class to meet the - * application requirements. This class will only be generated as - * long as it does not already exist in the output directory. - * - * @package model - */ -class MenuPeer extends BaseMenuPeer { - -} // MenuPeer Deleted: prosistem/alba/trunk/alba/lib/model/map/MenuMapBuilder.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/map/MenuMapBuilder.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/lib/model/map/MenuMapBuilder.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,50 +0,0 @@ -<?php - - - -class MenuMapBuilder { - - - const CLASS_NAME = 'lib.model.map.MenuMapBuilder'; - - - private $dbMap; - - - public function isBuilt() - { - return ($this->dbMap !== null); - } - - - public function getDatabaseMap() - { - return $this->dbMap; - } - - - public function doBuild() - { - $this->dbMap = Propel::getDatabaseMap('alba'); - - $tMap = $this->dbMap->addTable('menu'); - $tMap->setPhpName('Menu'); - - $tMap->setUseIdGenerator(true); - - $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null); - - $tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('LINK', 'Link', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('PERM', 'Perm', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('TARGET', 'Target', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addForeignKey('FK_PADRE_MENU_ID', 'FkPadreMenuId', 'int', CreoleTypes::INTEGER, 'menu', 'ID', false, null); - - $tMap->addColumn('ORDEN', 'Orden', 'int', CreoleTypes::INTEGER, false, null); - - } -} \ No newline at end of file Deleted: prosistem/alba/trunk/alba/lib/model/om/BaseMenu.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseMenu.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/lib/model/om/BaseMenu.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,660 +0,0 @@ -<?php - - -abstract class BaseMenu extends BaseObject implements Persistent { - - - - protected static $peer; - - - - protected $id; - - - - protected $nombre = ''; - - - - protected $link = ''; - - - - protected $perm = ''; - - - - protected $target = ''; - - - - protected $fk_padre_menu_id; - - - - protected $orden; - - - protected $aMenuRelatedByFkPadreMenuId; - - - protected $collMenusRelatedByFkPadreMenuId; - - - protected $lastMenuRelatedByFkPadreMenuIdCriteria = null; - - - protected $alreadyInSave = false; - - - protected $alreadyInValidation = false; - - - public function getId() - { - - return $this->id; - } - - - public function getNombre() - { - - return $this->nombre; - } - - - public function getLink() - { - - return $this->link; - } - - - public function getPerm() - { - - return $this->perm; - } - - - public function getTarget() - { - - return $this->target; - } - - - public function getFkPadreMenuId() - { - - return $this->fk_padre_menu_id; - } - - - public function getOrden() - { - - return $this->orden; - } - - - public function setId($v) - { - - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = MenuPeer::ID; - } - - } - - public function setNombre($v) - { - - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->nombre !== $v || $v === '') { - $this->nombre = $v; - $this->modifiedColumns[] = MenuPeer::NOMBRE; - } - - } - - public function setLink($v) - { - - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->link !== $v || $v === '') { - $this->link = $v; - $this->modifiedColumns[] = MenuPeer::LINK; - } - - } - - public function setPerm($v) - { - - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->perm !== $v || $v === '') { - $this->perm = $v; - $this->modifiedColumns[] = MenuPeer::PERM; - } - - } - - public function setTarget($v) - { - - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->target !== $v || $v === '') { - $this->target = $v; - $this->modifiedColumns[] = MenuPeer::TARGET; - } - - } - - public function setFkPadreMenuId($v) - { - - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->fk_padre_menu_id !== $v) { - $this->fk_padre_menu_id = $v; - $this->modifiedColumns[] = MenuPeer::FK_PADRE_MENU_ID; - } - - if ($this->aMenuRelatedByFkPadreMenuId !== null && $this->aMenuRelatedByFkPadreMenuId->getId() !== $v) { - $this->aMenuRelatedByFkPadreMenuId = null; - } - - } - - public function setOrden($v) - { - - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->orden !== $v) { - $this->orden = $v; - $this->modifiedColumns[] = MenuPeer::ORDEN; - } - - } - - public function hydrate(ResultSet $rs, $startcol = 1) - { - try { - - $this->id = $rs->getInt($startcol + 0); - - $this->nombre = $rs->getString($startcol + 1); - - $this->link = $rs->getString($startcol + 2); - - $this->perm = $rs->getString($startcol + 3); - - $this->target = $rs->getString($startcol + 4); - - $this->fk_padre_menu_id = $rs->getInt($startcol + 5); - - $this->orden = $rs->getInt($startcol + 6); - - $this->resetModified(); - - $this->setNew(false); - - return $startcol + 7; - } catch (Exception $e) { - throw new PropelException("Error populating Menu object", $e); - } - } - - - public function delete($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(MenuPeer::DATABASE_NAME); - } - - try { - $con->begin(); - MenuPeer::doDelete($this, $con); - $this->setDeleted(true); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - - public function save($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(MenuPeer::DATABASE_NAME); - } - - try { - $con->begin(); - $affectedRows = $this->doSave($con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - - protected function doSave($con) - { - $affectedRows = 0; if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - - - if ($this->aMenuRelatedByFkPadreMenuId !== null) { - if ($this->aMenuRelatedByFkPadreMenuId->isModified()) { - $affectedRows += $this->aMenuRelatedByFkPadreMenuId->save($con); - } - $this->setMenuRelatedByFkPadreMenuId($this->aMenuRelatedByFkPadreMenuId); - } - - - if ($this->isModified()) { - if ($this->isNew()) { - $pk = MenuPeer::doInsert($this, $con); - $affectedRows += 1; - $this->setId($pk); - $this->setNew(false); - } else { - $affectedRows += MenuPeer::doUpdate($this, $con); - } - $this->resetModified(); } - - if ($this->collMenusRelatedByFkPadreMenuId !== null) { - foreach($this->collMenusRelatedByFkPadreMenuId as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - $this->alreadyInSave = false; - } - return $affectedRows; - } - - protected $validationFailures = array(); - - - public function getValidationFailures() - { - return $this->validationFailures; - } - - - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - - if ($this->aMenuRelatedByFkPadreMenuId !== null) { - if (!$this->aMenuRelatedByFkPadreMenuId->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aMenuRelatedByFkPadreMenuId->getValidationFailures()); - } - } - - - if (($retval = MenuPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = MenuPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); - } - - - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getId(); - break; - case 1: - return $this->getNombre(); - break; - case 2: - return $this->getLink(); - break; - case 3: - return $this->getPerm(); - break; - case 4: - return $this->getTarget(); - break; - case 5: - return $this->getFkPadreMenuId(); - break; - case 6: - return $this->getOrden(); - break; - default: - return null; - break; - } } - - - public function toArray($keyType = BasePeer::TYPE_PHPNAME) - { - $keys = MenuPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getId(), - $keys[1] => $this->getNombre(), - $keys[2] => $this->getLink(), - $keys[3] => $this->getPerm(), - $keys[4] => $this->getTarget(), - $keys[5] => $this->getFkPadreMenuId(), - $keys[6] => $this->getOrden(), - ); - return $result; - } - - - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = MenuPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setId($value); - break; - case 1: - $this->setNombre($value); - break; - case 2: - $this->setLink($value); - break; - case 3: - $this->setPerm($value); - break; - case 4: - $this->setTarget($value); - break; - case 5: - $this->setFkPadreMenuId($value); - break; - case 6: - $this->setOrden($value); - break; - } } - - - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = MenuPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setNombre($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setPerm($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setTarget($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setFkPadreMenuId($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setOrden($arr[$keys[6]]); - } - - - public function buildCriteria() - { - $criteria = new Criteria(MenuPeer::DATABASE_NAME); - - if ($this->isColumnModified(MenuPeer::ID)) $criteria->add(MenuPeer::ID, $this->id); - if ($this->isColumnModified(MenuPeer::NOMBRE)) $criteria->add(MenuPeer::NOMBRE, $this->nombre); - if ($this->isColumnModified(MenuPeer::LINK)) $criteria->add(MenuPeer::LINK, $this->link); - if ($this->isColumnModified(MenuPeer::PERM)) $criteria->add(MenuPeer::PERM, $this->perm); - if ($this->isColumnModified(MenuPeer::TARGET)) $criteria->add(MenuPeer::TARGET, $this->target); - if ($this->isColumnModified(MenuPeer::FK_PADRE_MENU_ID)) $criteria->add(MenuPeer::FK_PADRE_MENU_ID, $this->fk_padre_menu_id); - if ($this->isColumnModified(MenuPeer::ORDEN)) $criteria->add(MenuPeer::ORDEN, $this->orden); - - return $criteria; - } - - - public function buildPkeyCriteria() - { - $criteria = new Criteria(MenuPeer::DATABASE_NAME); - - $criteria->add(MenuPeer::ID, $this->id); - - return $criteria; - } - - - public function getPrimaryKey() - { - return $this->getId(); - } - - - public function setPrimaryKey($key) - { - $this->setId($key); - } - - - public function copyInto($copyObj, $deepCopy = false) - { - - $copyObj->setNombre($this->nombre); - - $copyObj->setLink($this->link); - - $copyObj->setPerm($this->perm); - - $copyObj->setTarget($this->target); - - $copyObj->setFkPadreMenuId($this->fk_padre_menu_id); - - $copyObj->setOrden($this->orden); - - - if ($deepCopy) { - $copyObj->setNew(false); - - foreach($this->getMenusRelatedByFkPadreMenuId() as $relObj) { - if($this->getPrimaryKey() === $relObj->getPrimaryKey()) { - continue; - } - - $copyObj->addMenuRelatedByFkPadreMenuId($relObj->copy($deepCopy)); - } - - } - - $copyObj->setNew(true); - - $copyObj->setId(NULL); - } - - - public function copy($deepCopy = false) - { - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new MenuPeer(); - } - return self::$peer; - } - - - public function setMenuRelatedByFkPadreMenuId($v) - { - - - if ($v === null) { - $this->setFkPadreMenuId(NULL); - } else { - $this->setFkPadreMenuId($v->getId()); - } - - - $this->aMenuRelatedByFkPadreMenuId = $v; - } - - - - public function getMenuRelatedByFkPadreMenuId($con = null) - { - include_once 'lib/model/om/BaseMenuPeer.php'; - - if ($this->aMenuRelatedByFkPadreMenuId === null && ($this->fk_padre_menu_id !== null)) { - - $this->aMenuRelatedByFkPadreMenuId = MenuPeer::retrieveByPK($this->fk_padre_menu_id, $con); - - - } - return $this->aMenuRelatedByFkPadreMenuId; - } - - - public function initMenusRelatedByFkPadreMenuId() - { - if ($this->collMenusRelatedByFkPadreMenuId === null) { - $this->collMenusRelatedByFkPadreMenuId = array(); - } - } - - - public function getMenusRelatedByFkPadreMenuId($criteria = null, $con = null) - { - include_once 'lib/model/om/BaseMenuPeer.php'; - if ($criteria === null) { - $criteria = new Criteria(); - } - elseif ($criteria instanceof Criteria) - { - $criteria = clone $criteria; - } - - if ($this->collMenusRelatedByFkPadreMenuId === null) { - if ($this->isNew()) { - $this->collMenusRelatedByFkPadreMenuId = array(); - } else { - - $criteria->add(MenuPeer::FK_PADRE_MENU_ID, $this->getId()); - - MenuPeer::addSelectColumns($criteria); - $this->collMenusRelatedByFkPadreMenuId = MenuPeer::doSelect($criteria, $con); - } - } else { - if (!$this->isNew()) { - - - $criteria->add(MenuPeer::FK_PADRE_MENU_ID, $this->getId()); - - MenuPeer::addSelectColumns($criteria); - if (!isset($this->lastMenuRelatedByFkPadreMenuIdCriteria) || !$this->lastMenuRelatedByFkPadreMenuIdCriteria->equals($criteria)) { - $this->collMenusRelatedByFkPadreMenuId = MenuPeer::doSelect($criteria, $con); - } - } - } - $this->lastMenuRelatedByFkPadreMenuIdCriteria = $criteria; - return $this->collMenusRelatedByFkPadreMenuId; - } - - - public function countMenusRelatedByFkPadreMenuId($criteria = null, $distinct = false, $con = null) - { - include_once 'lib/model/om/BaseMenuPeer.php'; - if ($criteria === null) { - $criteria = new Criteria(); - } - elseif ($criteria instanceof Criteria) - { - $criteria = clone $criteria; - } - - $criteria->add(MenuPeer::FK_PADRE_MENU_ID, $this->getId()); - - return MenuPeer::doCount($criteria, $distinct, $con); - } - - - public function addMenuRelatedByFkPadreMenuId(Menu $l) - { - $this->collMenusRelatedByFkPadreMenuId[] = $l; - $l->setMenuRelatedByFkPadreMenuId($this); - } - -} \ No newline at end of file Deleted: prosistem/alba/trunk/alba/lib/model/om/BaseMenuPeer.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseMenuPeer.php 2007-07-16 18:23:01 UTC (rev 4818) +++ prosistem/alba/trunk/alba/lib/model/om/BaseMenuPeer.php 2007-07-16 20:00:27 UTC (rev 4819) @@ -1,449 +0,0 @@ -<?php - - -abstract class BaseMenuPeer { - - - const DATABASE_NAME = 'alba'; - - - const TABLE_NAME = 'menu'; - - - const CLASS_DEFAULT = 'lib.model.Menu'; - - - const NUM_COLUMNS = 7; - - - const NUM_LAZY_LOAD_COLUMNS = 0; - - - - const ID = 'menu.ID'; - - - const NOMBRE = 'menu.NOMBRE'; - - - const LINK = 'menu.LINK'; - - - const PERM = 'menu.PERM'; - - - const TARGET = 'menu.TARGET'; - - - const FK_PADRE_MENU_ID = 'menu.FK_PADRE_MENU_ID'; - - - const ORDEN = 'menu.ORDEN'; - - - private static $phpNameMap = null; - - - - private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Link', 'Perm', 'Target', 'FkPadreMenuId', 'Orden', ), - BasePeer::TYPE_COLNAME => array (MenuPeer::ID, MenuPeer::NOMBRE, MenuPeer::LINK, MenuPeer::PERM, MenuPeer::TARGET, MenuPeer::FK_PADRE_MENU_ID, MenuPeer::ORDEN, ), - BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'link', 'perm', 'target', 'fk_padre_menu_id', 'orden', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) - ); - - - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Link' => 2, 'Perm' => 3, 'Target' => 4, 'FkPadreMenuId' => 5, 'Orden' => 6, ), - BasePeer::TYPE_COLNAME => array (MenuPeer::ID => 0, MenuPeer::NOMBRE => 1, MenuPeer::LINK => 2, MenuPeer::PERM => 3, MenuPeer::TARGET => 4, MenuPeer::FK_PADRE_MENU_ID => 5, MenuPeer::ORDEN => 6, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'link' => 2, 'perm' => 3, 'target' => 4, 'fk_padre_menu_id' => 5, 'orden' => 6, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) - ); - - - public static function getMapBuilder() - { - include_once 'lib/model/map/MenuMapBuilder.php'; - return BasePeer::getMapBuilder('lib.model.map.MenuMapBuilder'); - } - - public static function getPhpNameMap() - { - if (self::$phpNameMap === null) { - $map = MenuPeer::getTableMap(); - $columns = $map->getColumns(); - $nameMap = array(); - foreach ($columns as $column) { - $nameMap[$column->getPhpName()] = $column->getColumnName(); - } - self::$phpNameMap = $nameMap; - } - return self::$phpNameMap; - } - - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - - public static function alias($alias, $column) - { - return str_replace(MenuPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - - public static function addSelectColumns(Criteria $criteria) - { - - $criteria->addSelectColumn(MenuPeer::ID); - - $criteria->addSelectColumn(MenuPeer::NOMBRE); - - $criteria->addSelectColumn(MenuPeer::LINK); - - $criteria->addSelectColumn(MenuPeer::PERM); - - $criteria->addSelectColumn(MenuPeer::TARGET); - - $criteria->addSelectColumn(MenuPeer::FK_PADRE_MENU_ID); - - $criteria->addSelectColumn(MenuPeer::ORDEN); - - } - - const COUNT = 'COUNT(menu.ID)'; - const COUNT_DISTINCT = 'COUNT(DISTINCT menu.ID)'; - - - public static function doCount(Criteria $criteria, $distinct = false, $con = null) - { - $criteria = clone $criteria; - - $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(MenuPeer::COUNT_DISTINCT); - } else { - $criteria->addSelectColumn(MenuPeer::COUNT); - } - - foreach($criteria->getGroupByColumns() as $column) - { - $criteria->addSelectColumn($column); - } - - $rs = MenuPeer::doSelectRS($criteria, $con); - if ($rs->next()) { - return $rs->getInt(1); - } else { - return 0; - } - } - - public static function doSelectOne(Criteria $criteria, $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = MenuPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - - public static function doSelect(Criteria $criteria, $con = null) - { - return MenuPeer::populateObjects(MenuPeer::doSelectRS($criteria, $con)); - } - - public static function doSelectRS(Criteria $criteria, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if (!$criteria->getSelectColumns()) { - $criteria = clone $criteria; - MenuPeer::addSelectColumns($criteria); - } - - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doSelect($criteria, $con); - } - - public static function populateObjects(ResultSet $rs) - { - $results = array(); - - $cls = MenuPeer::getOMClass(); - $cls = Propel::import($cls); - while($rs->next()) { - - $obj = new $cls(); - $obj->hydrate($rs); - $results[] = $obj; - - } - return $results; - } - - - public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null) - { - $criteria = clone $criteria; - - $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(MenuPeer::COUNT_DISTINCT); - } else { - $criteria->addSelectColumn(MenuPeer::COUNT); - } - - foreach($criteria->getGroupByColumns() as $column) - { - $criteria->addSelectColumn($column); - } - - $rs = MenuPeer::doSelectRS($criteria, $con); - if ($rs->next()) { - return $rs->getInt(1); - } else { - return 0; - } - } - - - - public static function doSelectJoinAll(Criteria $c, $con = null) - { - $c = clone $c; - - if ($c->getDbName() == Propel::getDefaultDB()) { - $c->setDbName(self::DATABASE_NAME); - } - - MenuPeer::addSelectColumns($c); - $startcol2 = (MenuPeer::NUM_COLUMNS - MenuPeer::NUM_LAZY_LOAD_COLUMNS) + 1; - - $rs = BasePeer::doSelect($c, $con); - $results = array(); - - while($rs->next()) { - - $omClass = MenuPeer::getOMClass(); - - - $cls = Propel::import($omClass); - $obj1 = new $cls(); - $obj1->hydrate($rs); - - $results[] = $obj1; - } - return $results; - } - - - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - - public static function getOMClass() - { - return MenuPeer::CLASS_DEFAULT; - } - - - public static function doInsert($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; } else { - $criteria = $values->buildCriteria(); } - - $criteria->remove(MenuPeer::ID); - - $criteria->setDbName(self::DATABASE_NAME); - - try { - $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollback(); - throw $e; - } - - return $pk; - } - - - public static function doUpdate($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; - $comparison = $criteria->getComparison(MenuPeer::ID); - $selectCriteria->add(MenuPeer::ID, $criteria->remove(MenuPeer::ID), $comparison); - - } else { $criteria = $values->buildCriteria(); $selectCriteria = $values->buildPkeyCriteria(); } - - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - $affectedRows = 0; try { - $con->begin(); - $affectedRows += BasePeer::doDeleteAll(MenuPeer::TABLE_NAME, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - - public static function doDelete($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(MenuPeer::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; } elseif ($values instanceof Menu) { - - $criteria = $values->buildPkeyCriteria(); - } else { - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(MenuPeer::ID, (array) $values, Criteria::IN); - } - - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; - try { - $con->begin(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - - public static function doValidate(Menu $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(MenuPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(MenuPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - $res = BasePeer::doValidate(MenuPeer::DATABASE_NAME, MenuPeer::TABLE_NAME, $columns); - if ($res !== true) { - $request = sfContext::getInstance()->getRequest(); - foreach ($res as $failed) { - $col = MenuPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME); - $request->setError($col, $failed->getMessage()); - } - } - - return $res; - } - - - public static function retrieveByPK($pk, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $criteria = new Criteria(MenuPeer::DATABASE_NAME); - - $criteria->add(MenuPeer::ID, $pk); - - - $v = MenuPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - - public static function retrieveByPKs($pks, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(); - $criteria->add(MenuPeer::ID, $pks, Criteria::IN); - $objs = MenuPeer::doSelect($criteria, $con); - } - return $objs; - } - -} -if (Propel::isInit()) { - try { - BaseMenuPeer::getMapBuilder(); - } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); - } -} else { - require_once 'lib/model/map/MenuMapBuilder.php'; - Propel::registerMapBuilder('lib.model.map.MenuMapBuilder'); -}
participants (1)
-
commits@pressenter.com.ar