]> git.llucax.com Git - software/sercom.git/commitdiff
navigation bar temporal para poder cambiar entre controller comodamente
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Mon, 26 Feb 2007 17:00:52 +0000 (17:00 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Mon, 26 Feb 2007 17:00:52 +0000 (17:00 +0000)
sercom/controllers.py
sercom/menu.py [new file with mode: 0644]
sercom/static/css/style.css
sercom/templates/master.kid

index 233d7965ac2ad472099fe30b382e8b912995ea5d..4edbe606e9ef541245839fa87468007672220e37 100644 (file)
@@ -1,6 +1,6 @@
 # vim: set et sw=4 sts=4 encoding=utf-8 :
 
 # 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
 from turbogears import widgets as W, validators as V
 from turbogears import identity, redirect
 from cherrypy import request, response
diff --git a/sercom/menu.py b/sercom/menu.py
new file mode 100644 (file)
index 0000000..c85b817
--- /dev/null
@@ -0,0 +1,11 @@
+
+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')})
index 7ef12395ef929139596565f1fd821879100fcfb1..0b2027b0c62e83703d163628b4872e18e416078d 100644 (file)
@@ -181,3 +181,8 @@ table.list td {
        background: #fec;
 }
 
        background: #fec;
 }
 
+#navbar {
+       position:float;
+       float:right;
+}
+
index f0509464a98b58829e08d3c63ee8e025b27161fa..452e9d9da71b399bc86e1ca11743070a46c6376b 100644 (file)
@@ -1,5 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <?python import sitetemplate ?>
 <!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()">
 <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>
     <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 -->
     <div py:replace="[item.text]+item[:]"/>
 
        <!-- End of main_content -->