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

svn at argo.es svn at argo.es
Mon Jul 30 19:40:58 CEST 2007


Author: alvaro
Date: Mon Jul 30 19:40:57 2007
New Revision: 312

Log:
Correccion de errores.


Added:
   trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html
      - copied, changed from r309, /trunk/frontend-web/skins/default/body_threadlist_thread.html
Modified:
   trunk/frontend-web/skins.py
   trunk/frontend-web/url_.py
   trunk/frontend-web/url_indice.py

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Mon Jul 30 19:40:57 2007
@@ -29,6 +29,7 @@
     'metatag':        'body_metatags_metatag.html',
     'metatag_unread': 'body_metatags_metatag_unread.html',
     'thread_unread':  'body_threadlist_thread_unread.html',
+    'thread_anonymous':       'body_threadlist_thread_anonymous.html',
     'thread':         'body_threadlist_thread.html',
     'group_date':     'body_threadlist_group.html',
     'link_logout':    'link_logout.html',
@@ -205,25 +206,36 @@
       for thread, title, ts, nr, nr_point, n_msgs, mon in threads:
         format = self._style.pop(0)
         self._style.append(format)
-        if nr:
-          page = ((nr[0] - 1) / thread_len)  * thread_len + 1
-          aux = available_skins[self._skin]['thread_unread'] % {"title":title,
-              "link": "/hilo/%d" %(thread),
-              "link_notread": "/hilo/%d/%d#m%d" %(thread,page,nr_point),
-              "t_date": hourdate(ts,self._tz),
-              "format": format,
-              "not_read":nr_point,
-              "t_replies":n_msgs,
-              "mon": available_skins[self._skin]['thread_unmon'] if self._dict["monitor"] else available_skins[self._skin]['thread_mon'] % { "thread_num": thread }
-              }
+        if self._dict["user"]:
+          mon =  available_skins[self._skin]['thread_unmon'] % { "thread_num": thread } if mon else available_skins[self._skin]['thread_mon'] % { "thread_num": thread }
+          if nr:
+            page = ((nr[0] - 1) / thread_len)  * thread_len + 1
+            aux = available_skins[self._skin]['thread_unread'] % {"title":title,
+                "link": "/hilo/%d" %(thread),
+                "link_notread": "/hilo/%d/%d#m%d" %(thread,page,nr_point),
+                "t_date": hourdate(ts,self._tz),
+                "format": format,
+                "not_read": nr_point,
+                "t_replies": n_msgs,
+                "mon":mon
+                }
+          else:
+            aux = available_skins[self._skin]['thread'] % {"title":title,
+                "link": "/hilo/%d" %thread,
+                "t_date":hourdate(ts,self._tz),
+                "format": format,
+                "t_replies": n_msgs,
+                "mon":mon
+                }
         else:
-          aux = available_skins[self._skin]['thread'] % {"title":title,
+          aux = available_skins[self._skin]['thread_anonymous'] % {"title":title,
               "link": "/hilo/%d" %thread,
               "t_date":hourdate(ts,self._tz),
               "format": format,
-              "t_replies":n_msgs,
-              "mon": available_skins[self._skin]['thread_unmon'] if self._dict["monitor"] else available_skins[self._skin]['thread_mon'] % { "thread_num": thread }
+              "t_replies": n_msgs,
               }
+
+
         self.set_text(aux)
 
   def _header(self):

Copied: trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html (from r309, /trunk/frontend-web/skins/default/body_threadlist_thread.html)
==============================================================================
--- /trunk/frontend-web/skins/default/body_threadlist_thread.html	(original)
+++ trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html	Mon Jul 30 19:40:57 2007
@@ -1,3 +1,3 @@
 <div class="alt %(format)s">
-  <a href="%(link)s">%(title)s</a> (%(t_date)s) - Respuestas: %(t_replies)s - %(mon)s
+  <a href="%(link)s">%(title)s</a> (%(t_date)s) - Respuestas: %(t_replies)s
 </div>

Modified: trunk/frontend-web/url_.py
==============================================================================
--- trunk/frontend-web/url_.py	(original)
+++ trunk/frontend-web/url_.py	Mon Jul 30 19:40:57 2007
@@ -19,7 +19,7 @@
 
   d = {
       "page_title": "cpif - listado de subforos",
-      "metatags":database.get_metatags(conn,usuario)
+      "metatags":database.get_metatags(conn,usuario),
       }
 
   pagina.load_dict(d)

Modified: trunk/frontend-web/url_indice.py
==============================================================================
--- trunk/frontend-web/url_indice.py	(original)
+++ trunk/frontend-web/url_indice.py	Mon Jul 30 19:40:57 2007
@@ -56,6 +56,7 @@
       "calendar": calendario.vista_mensual(conn,fecha_elegida,usuario,metatag),
       "metatag": metatag,
       "monitor": database.monitored_metatag(conn,usuario,metatag),
+      "user": usuario
       }
 
   root=conn.get_root()



More information about the cpif mailing list