# vim: set et sw=4 sts=4 encoding=utf-8 :
-from turbogears import controllers, expose, view
+from turbogears import controllers, expose, view, url
from turbogears import widgets as W, validators as V
from turbogears import identity, redirect
from cherrypy import request, response
--- /dev/null
+
+from turbogears import url
+
+menu = []
+menu.append({'name': 'Alumnos', 'url':url('/alumno')})
+menu.append({'name': 'Docentes', 'url':url('/docente')})
+menu.append({'name': 'Grupos', 'url':url('/grupo')})
+menu.append({'name': 'Enunciados', 'url':url('/enunciado')})
+menu.append({'name': 'Ejercicios', 'url':url('/ejercicio')})
+menu.append({'name': 'Casos de Prueba', 'url':url('/caso_de_prueba')})
+menu.append({'name': 'Cursos', 'url':url('/curso')})
background: #fec;
}
+#navbar {
+ position:float;
+ float:right;
+}
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?python import sitetemplate ?>
+<?python from sercom.menu import menu ?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
</div>
<div py:if="tg_flash" class="flash" py:content="tg_flash"></div>
+ <div id="navbar">
+ Ir a :
+ <select OnChange="window.location=this.options[this.selectedIndex].value;">
+ <option value="${tg.url('/')}">Inicio</option>
+ <option py:for="i in menu" value="${tg.url(i['url'])}">
+ ${i['name']}
+ </option>
+ </select>
+ </div>
<div py:replace="[item.text]+item[:]"/>
<!-- End of main_content -->