[cpif] r71 - trunk/frontend-web
svn at argo.es
svn at argo.es
Tue May 22 02:35:11 CEST 2007
Author: alvaro
Date: Tue May 22 02:35:10 2007
New Revision: 71
Log:
Fixed: Añadido el enlace de leidos/no leidos
Fixed: Añadida le fecha (ver el FIXME en skins.py)
Modified:
trunk/frontend-web/skins.py
trunk/frontend-web/url_.py
Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py (original)
+++ trunk/frontend-web/skins.py Tue May 22 02:35:10 2007
@@ -12,6 +12,7 @@
'thread_entry': 'body/thread_entry.html',
'error': 'body/default.html',
'body': 'body/body.html',
+ 'thread_unread': 'body/thread_unread.html',
'thread': 'body/thread.html',
'group_date': 'body/thread_group.html',
'footer': 'footer/default.html'
@@ -92,20 +93,25 @@
self.set_text(aux)
- def threads(self,t):
+ def threads(self,t,notread,threads):
"""Format the thread list"""
- # FIXME: falta pasarle la fecha, se le puede pasar el array entero de todos los posts
- # y hacer la búsqueda aquí, pero es algo sucio
+ # FIXME: No me gusta pasarle el array entero de hilos para hacer la buscqueda de da fecha
if self.__url=="listado hilos":
- for thread,title,read in t:
+ for thread,title,not_read in t:
if self.__t_count % 2:
format = "even"
self.__t_count = 0
else:
format = "odd"
self.__t_count = 1
- file = "%s/%s" % (self.available_skins[self.skin], self.skin_files['thread'])
- aux = self.__load_file(file) % {"title":title,"thread":thread,"t_date":"FIXME","format": format}
+ import time
+ ts_created=time.ctime(threads[thread]["TS"])
+ if not_read:
+ file = "%s/%s" % (self.available_skins[self.skin], self.skin_files['thread_unread'])
+ aux = self.__load_file(file) % {"title":title,"thread":thread,"t_date":ts_created,"format": format,"notread":notread[thread]}
+ else:
+ file = "%s/%s" % (self.available_skins[self.skin], self.skin_files['thread'])
+ aux = self.__load_file(file) % {"title":title,"thread":thread,"t_date":ts_created,"format": format}
self.set_text(aux)
def group_date(self,date):
Modified: trunk/frontend-web/url_.py
==============================================================================
--- trunk/frontend-web/url_.py (original)
+++ trunk/frontend-web/url_.py Tue May 22 02:35:10 2007
@@ -57,7 +57,7 @@
h=database.listado_hilos_personal(conn,usuario,ts,ts2)
num_hilos+=len(h)
- pagina.threads(h)
+ pagina.threads(h,punto_no_leido,hilos)
ts=ts2
fecha-=delta_dia
More information about the cpif
mailing list