[cpif] r100 - in trunk/frontend-web: . skins/default

svn at argo.es svn at argo.es
Thu May 24 18:43:34 CEST 2007


Author: alvaro
Date: Thu May 24 18:43:33 2007
New Revision: 100

Log:
Corregido el bug del 404 (ahora carga la pagina "error").
Aniadido el campo thread_author para tener mas control sobre
como se formatean los hilos.


Modified:
   trunk/frontend-web/skins.py
   trunk/frontend-web/skins/default/body_show_thread.html
   trunk/frontend-web/url_INVALIDA.py
   trunk/frontend-web/url_hilo.py

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Thu May 24 18:43:33 2007
@@ -90,14 +90,6 @@
     self._text = []
 
   def load_url(self,url):
-    if not url[0] or (url[0] == 'indice' and len(url) == 2):
-      self._url="listado hilos"
-    elif url[0] == "hilo":
-      self._url="hilo"
-    elif url[0] == "nuevo_usuario":
-      self._url="nuevo usuario"
-    else:
-      print "Error" # FIXME
     self._url="/%s" % url[0]
 
   def load_dict(self,dict):

Modified: trunk/frontend-web/skins/default/body_show_thread.html
==============================================================================
--- trunk/frontend-web/skins/default/body_show_thread.html	(original)
+++ trunk/frontend-web/skins/default/body_show_thread.html	Thu May 24 18:43:33 2007
@@ -3,7 +3,8 @@
       .odd  {background-color: eef}
     </style>
 
-    <h2>%(thread_title)s</h2>
+    <h2>Titulo: %(thread_title)s</h2>
+    <h3>Iniciado por %(thread_author)s</h3>
     %(body)s
     <hr>
     <p><form action="/nuevo_post_POST/%(msg_num)s" method="post" enctype="multipart/form-data">

Modified: trunk/frontend-web/url_INVALIDA.py
==============================================================================
--- trunk/frontend-web/url_INVALIDA.py	(original)
+++ trunk/frontend-web/url_INVALIDA.py	Thu May 24 18:43:33 2007
@@ -5,7 +5,7 @@
 def gestiona_url(handler,path,usuario) :
   import skins
   pagina = skins.Skin()
-  pagina.load_url("404")
+  pagina.load_url(['error'])
   pagina.load_dict({"page_title": "cpif - ERROR"})
   pagina.set_text("<h2>ERROR<H2>\r\nLa pagina que buscas no existe, pich&oacute;n</h2>")
 

Modified: trunk/frontend-web/url_hilo.py
==============================================================================
--- trunk/frontend-web/url_hilo.py	(original)
+++ trunk/frontend-web/url_hilo.py	Thu May 24 18:43:33 2007
@@ -30,7 +30,8 @@
   pagina.load_dict({"page_title":"cpif - Hilo %s" % hilo_num})
 
   pagina.load_dict({
-      "thread_title": "Hilo: %s (%s)" %(meta["titulo"],meta["creador"]),
+      "thread_title": meta["titulo"],
+      "thread_author": meta["creador"],
       "msg_num": hilo_num
       })
   pagina.thread_entries(mensajes)



More information about the cpif mailing list