[cpif] r339 - trunk/frontend-web

svn at argo.es svn at argo.es
Fri Sep 7 12:07:46 CEST 2007


Author: alvaro
Date: Fri Sep  7 12:07:46 2007
New Revision: 339

Log:
Suporte para RO


Modified:
   trunk/frontend-web/skins.py

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Fri Sep  7 12:07:46 2007
@@ -9,9 +9,11 @@
 skin_files = {
     'header':         'header.html',
     'body_thread':    'body_show_thread.html',
+    'body_thread_ro':    'body_show_thread_ro.html',
     'body_thread_anonymous':    'body_show_thread_anonymous.html',
     'avatar':         'avatar.html',
     'thread_entry':   'body_show_thread_entry.html',
+    'thread_entry_ro':   'body_show_thread_entry_ro.html',
     'thread_entry_anonymous':   'body_show_thread_entry_anonymous.html',
     'thread_first':   'body_show_thread_first.html',
     'thread_prev':    'body_show_thread_prev.html',
@@ -31,7 +33,7 @@
     'metatag_unread': 'body_metatags_metatag_unread.html',
     'metatag_mon':    'body_metatags_metatag_mon.html',
     'metatag_unmon':  'body_metatags_metatag_unmon.html',
-    'thread_ro':    'body_threadlist_thread_ro.html',
+    'read only':    'read_only.html',
     'thread_unread':  'body_threadlist_thread_unread.html',
     'thread_anonymous':       'body_threadlist_thread_anonymous.html',
     'thread':         'body_threadlist_thread.html',
@@ -156,6 +158,8 @@
       self._style.append(format)
       if self._user:
         aux = available_skins[self._skin]['thread_entry']
+        if self._dict["read only"]:
+          aux = available_skins[self._skin]['thread_entry_ro']
       else:
         aux = available_skins[self._skin]['thread_entry_anonymous']
       if avatar:
@@ -232,7 +236,7 @@
         if self._dict["user"]:
           mon =  available_skins[self._skin]['thread_unmon'] if mon else available_skins[self._skin]['thread_mon']
           mon = mon % { "thread_num": thread }
-          read_only = available_skins[self._skin]['thread_ro'] if ro else ""
+          read_only = available_skins[self._skin]['read only'] if ro else ""
           read_only = read_only % icons
           if nr:
             page = ((nr[0] - 1) / thread_len)  * thread_len + 1
@@ -291,6 +295,9 @@
       if self._user:
         self._dict["link_form_new_post"] = "/nuevo_post_POST/%d/%d" %(metatag,self._dict["thread_num"])
         aux = available_skins[self._skin]['body_thread']
+        if self._dict["read only"]:
+          self._dict["read only"] = available_skins[self._skin]['read only'] % icons
+          aux = available_skins[self._skin]['body_thread_ro'] 
       else:
         aux = available_skins[self._skin]['body_thread_anonymous']
     elif "login" in urls[self._url]:



More information about the cpif mailing list