[CMF-checkins] SVN: CMF/trunk/CMFDefault/skins/zpt_ - made sure
encoded strings are converted to unicode
Yvo Schubbe
y.2006_ at wcm-solutions.de
Sun Feb 5 16:27:20 EST 2006
Log message for revision 41566:
- made sure encoded strings are converted to unicode
- some related refactoring and cleanup
Changed:
UU CMF/trunk/CMFDefault/skins/zpt_content/aboveInThread.py
D CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.py
A CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py
D CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/document_view.py
A CMF/trunk/CMFDefault/skins/zpt_content/document_view_template.pt
D CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.py
UU CMF/trunk/CMFDefault/skins/zpt_content/file_edit_form.py
D CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/file_view.py
A CMF/trunk/CMFDefault/skins/zpt_content/file_view_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_form.py
UU CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_form.py
UU CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/image_edit_form.py
D CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/image_view.py
A CMF/trunk/CMFDefault/skins/zpt_content/image_view_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/link_edit_form.py
D CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/link_view.py
A CMF/trunk/CMFDefault/skins/zpt_content/link_view_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_form.py
UU CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_form.py
D CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.pt
A CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.py
D CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt
U CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_form.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/expanded_title.py
U CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents_template.pt
A CMF/trunk/CMFDefault/skins/zpt_generic/getMainGlobals.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/index_html.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/index_html_categorized.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/index_html_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/index_html_utils.html
UU CMF/trunk/CMFDefault/skins/zpt_generic/main_template.pt
D CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt
A CMF/trunk/CMFDefault/skins/zpt_generic/news_box.py
A CMF/trunk/CMFDefault/skins/zpt_generic/news_box_template.pt
D CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt
A CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.py
A CMF/trunk/CMFDefault/skins/zpt_generic/recent_news_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_form.py
UU CMF/trunk/CMFDefault/skins/zpt_generic/search.py
D CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt
A CMF/trunk/CMFDefault/skins/zpt_generic/search_form.py
A CMF/trunk/CMFDefault/skins/zpt_generic/search_form_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/search_results_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/setup_talkback_tree.py
A CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm.py
A CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm_template.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/talkback_tree.pt
UU CMF/trunk/CMFDefault/skins/zpt_generic/viewThreadsAtBottom.pt
-=-
Modified: CMF/trunk/CMFDefault/skins/zpt_content/aboveInThread.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/aboveInThread.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/aboveInThread.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,6 +1,7 @@
-## Script (Python) "aboveInThread"
##parameters=
##title=Discussion parent breadcrumbs
+##
+from Products.CMFDefault.utils import decode
breadcrumbs = ''
parents = context.parentsInThread()
@@ -12,6 +13,5 @@
breadcrumbs = breadcrumbs + p_str + ':'
breadcrumbs = breadcrumbs[:-1] + '<p>'
-
-return breadcrumbs
+return decode(breadcrumbs, script)
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/aboveInThread.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,38 +0,0 @@
-<html metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:slot fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:slot>
-</head>
-<body>
-
-<metal:slot metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</metal:slot>
-
-<metal:slot metal:fill-slot="main">
-
- <div id="DiscussionAbove">
- <span tal:replace="structure here/aboveInThread"></span>
- </div>
-
- <div tal:replace="structure here/CookedBody">Body</div>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing">Dicussions</span>
- </div>
-
-</metal:slot>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['text'] = context.CookedBody()
+
+return context.discussionitem_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,33 @@
+<html metal:use-macro="context/main_template/macros/master">
+<head>
+
+<metal:slot fill-slot="base">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="header">
+<h1 id="DesktopTitle" tal:content="options/title">Document Title</h1>
+
+<div id="DesktopDescription" tal:content="options/description">Document
+ Description goes here.</div>
+
+<metal:macro metal:use-macro="context/content_byline/macros/byline" />
+</metal:slot>
+
+<metal:slot metal:fill-slot="main">
+<div id="DiscussionAbove">
+<tal:span tal:replace="structure context/aboveInThread" />
+</div>
+
+<tal:span tal:replace="structure options/text">Cooked Body</tal:span>
+
+<div class="Discussion" tal:condition="context/viewThreadsAtBottom|nothing">
+ <tal:span tal:replace="structure context/viewThreadsAtBottom" />
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/discussionitem_view_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -32,4 +33,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.document_edit_template(**options)
+return context.document_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,36 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main">
-
-<div tal:replace="structure here/CookedBody">Cooked Body</div>
-
-<div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
-</div>
-
-</div>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/document_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['text'] = context.CookedBody()
+
+return context.document_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/document_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_content/document_view_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_view.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_view_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,29 @@
+<html metal:use-macro="context/main_template/macros/master">
+<head>
+
+<metal:slot fill-slot="base">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="header">
+<h1 id="DesktopTitle" tal:content="options/title">Document Title</h1>
+
+<div id="DesktopDescription" tal:content="options/description">Document
+ Description goes here.</div>
+
+<metal:macro metal:use-macro="context/content_byline/macros/byline" />
+</metal:slot>
+
+<metal:slot metal:fill-slot="main">
+<tal:span tal:replace="structure options/text">Cooked Body</tal:span>
+
+<div class="Discussion" tal:condition="context/viewThreadsAtBottom|nothing">
+ <tal:span tal:replace="structure context/viewThreadsAtBottom" />
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/document_view_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,41 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main" i18n:domain="cmf_default">
-
- <p i18n:translate="">Link: <a href=""
- tal:attributes="href here/getRemoteUrl"
- tal:content="here/getRemoteUrl"
- i18n:name="link"
- >/index_html</a></p>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
- </div>
-
-</div>
-
-</body>
-</html>
-
Added: CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['url'] = context.getRemoteUrl()
+
+return context.link_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/favorite_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_content/file_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/file_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/file_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -26,4 +27,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.file_edit_template(**options)
+return context.file_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/file_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,68 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main" i18n:domain="cmf_default">
-
-<h2 i18n:translate=""> File Properties </h2>
-
- <table>
-
- <tr>
- <th align="right" i18n:translate="">Filename</th>
- <td tal:content="here/getId">My ID</td>
- </tr>
-
- <tr>
- <th align="right" i18n:translate="">Size</th>
- <td tal:content="here/size">1024K</td>
- </tr>
-
- <tr>
- <th align="right" i18n:translate="">Content-type</th>
- <td tal:content="here/content_type">application/gzip</td>
- <tr>
-
- <tr>
- <td> <br /> </td>
- <td>
- </td>
- </tr>
- </table>
-
-<h2 i18n:translate="">Download File</h2>
-
-<p> <a href="." title="Download File"
- tal:define="file here/absolute_url"
- tal:attributes="href file; title here/Title"
- tal:content="string:Download ${here/Title}">Download File</a>
-</p>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
- </div>
-
-</div>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/file_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/file_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/file_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,13 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['content_type'] = context.getContentType()
+options['id'] = context.getId()
+options['size'] = context.get_size()
+options['url'] = context.absolute_url()
+
+return context.file_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/file_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_content/file_view_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/file_view.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_content/file_view_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,50 @@
+<html metal:use-macro="context/main_template/macros/master">
+<head>
+
+<metal:slot fill-slot="base">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="header">
+<h1 id="DesktopTitle" tal:content="options/title">Document Title</h1>
+
+<div id="DesktopDescription" tal:content="options/description">Document
+ Description goes here.</div>
+
+<metal:macro metal:use-macro="context/content_byline/macros/byline" />
+</metal:slot>
+
+<metal:slot metal:fill-slot="main">
+<h2 i18n:translate="">File Properties</h2>
+
+<table>
+ <tr>
+ <th i18n:translate="">Filename</th>
+ <td tal:content="options/id">My ID</td>
+ </tr>
+ <tr>
+ <th i18n:translate="">Size</th>
+ <td tal:content="options/size">1024K</td>
+ </tr>
+ <tr>
+ <th i18n:translate="">Content-type</th>
+ <td tal:content="options/content_type">application/gzip</td>
+ <tr>
+</table>
+
+<h2 i18n:translate="">Download File</h2>
+
+<p><a href="." title="Download File"
+ tal:attributes="href options/url; title options/title"
+ tal:content="string:Download ${options/title}">Download File</a></p>
+
+<div class="Discussion" tal:condition="context/viewThreadsAtBottom|nothing">
+ <tal:span tal:replace="structure context/viewThreadsAtBottom" />
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/file_view_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -15,11 +16,14 @@
options = {}
+options['title'] = form.get('title', context.Title())
+options['description'] = form.get('description', context.Description())
+
buttons = []
target = context.getActionInfo('object/edit')['url']
-buttons.append( {'name': 'change', 'value': _('Change')} )
-buttons.append( {'name': 'change_and_view', 'value': _('Change and View')} )
+buttons.append( {'name': 'change', 'value': _(u'Change')} )
+buttons.append( {'name': 'change_and_view', 'value': _(u'Change and View')} )
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.folder_edit_template(**options)
+return context.folder_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -3,7 +3,7 @@
<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
<h1 i18n:translate="">Edit: <tal:span
- tal:content="context/Title" i18n:name="obj_title">Title</tal:span></h1>
+ tal:content="options/title" i18n:name="obj_title">Title</tal:span></h1>
</metal:slot>
<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
@@ -16,20 +16,15 @@
<tr>
<th i18n:translate="">Title</th>
<td>
- <input type="text"
- name="title"
- value=""
- tal:attributes="value context/Title"
- size="65" />
+ <input type="text" name="title" value="" size="65"
+ tal:attributes="value options/title" />
</td>
</tr>
<tr>
<th i18n:translate="">Description</th>
<td>
- <textarea name="description:text" rows="5"
- cols="65" wrap="soft"
- tal:content="context/Description">
- </textarea>
+ <textarea name="description:text" rows="5" cols="65" wrap="soft"
+ tal:content="options/description"></textarea>
</td>
</tr>
<tr>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,6 +1,7 @@
##parameters=change='', change_and_edit='', change_and_view=''
##
from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
mdtool = getToolByName(script, 'portal_metadata')
@@ -39,6 +40,9 @@
options['extra_subjects'] = tuple(extra_subjects)
options['subject'] = tuple(subject)
options['format'] = form.get('format', context.Format())
+options['contributors'] = form.get('contributors', context.Contributors())
+options['language'] = form.get('language', context.Language())
+options['rights'] = form.get('rights', context.Rights())
buttons = []
target = context.getActionInfo('object/metadata')['url']
@@ -49,4 +53,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.full_metadata_edit_template(**options)
+return context.full_metadata_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -68,7 +68,7 @@
</select>
</td>
<th align="right" i18n:translate="">Contributors</th>
- <td tal:define="contrib_lines python: '\n'.join( context.Contributors() )">
+ <td tal:define="contrib_lines python: '\n'.join(options['contributors'])">
<textarea name="contributors:lines" rows="5" cols="30"
tal:content="contrib_lines"></textarea>
</td>
@@ -103,13 +103,13 @@
<tr valign="top">
<th align="right" i18n:translate="">Language</th>
<td> <input type="text" name="language" value=""
- tal:attributes="value context/Language" />
+ tal:attributes="value options/language" />
</td>
</tr>
<tr valign="top">
<th align="right" i18n:translate="">Rights</th>
<td> <input type="text" name="rights" value=""
- tal:attributes="value context/Rights" />
+ tal:attributes="value options/rights" />
</td>
</tr>
<tr>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_content/image_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/image_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/image_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -26,4 +27,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.image_edit_template(**options)
+return context.image_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/image_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,36 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main">
-
- <span tal:replace="structure here/tag">Tag</span>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
- </div>
-
-</div>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/image_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/image_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/image_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['image'] = context.tag()
+
+return context.image_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/image_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_content/image_view_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/image_view.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_content/image_view_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,29 @@
+<html metal:use-macro="context/main_template/macros/master">
+<head>
+
+<metal:slot fill-slot="base">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="header">
+<h1 id="DesktopTitle" tal:content="options/title">Document Title</h1>
+
+<div id="DesktopDescription" tal:content="options/description">Document
+ Description goes here.</div>
+
+<metal:macro metal:use-macro="context/content_byline/macros/byline" />
+</metal:slot>
+
+<metal:slot metal:fill-slot="main">
+<tal:span tal:replace="structure options/image">Image Tag</tal:span>
+
+<div class="Discussion" tal:condition="context/viewThreadsAtBottom|nothing">
+ <tal:span tal:replace="structure context/viewThreadsAtBottom" />
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/image_view_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_content/link_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/link_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/link_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -25,4 +26,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.link_edit_template(**options)
+return context.link_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/link_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,40 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main" i18n:domain="cmf_default">
-
- <p i18n:translate="">Link: <a href=""
- tal:attributes="href here/remote_url"
- tal:content="here/remote_url"
- i18n:name="link"
- >http://www.zope.org</a></p>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
- </div>
-
-</div>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/link_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/link_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/link_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['url'] = context.getRemoteUrl()
+
+return context.link_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/link_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_content/link_view_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/link_view.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_content/link_view_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,31 @@
+<html metal:use-macro="context/main_template/macros/master">
+<head>
+
+<metal:slot fill-slot="base">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="header">
+<h1 id="DesktopTitle" tal:content="options/title">Document Title</h1>
+
+<div id="DesktopDescription" tal:content="options/description">Document
+ Description goes here.</div>
+
+<metal:macro metal:use-macro="context/content_byline/macros/byline" />
+</metal:slot>
+
+<metal:slot metal:fill-slot="main">
+<p i18n:translate="">Link:
+ <a href="" tal:attributes="href options/url" tal:content="options/url"
+ i18n:name="link">http://www.zope.org</a></p>
+
+<div class="Discussion" tal:condition="context/viewThreadsAtBottom|nothing">
+ <tal:span tal:replace="structure context/viewThreadsAtBottom" />
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/link_view_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,6 +1,7 @@
##parameters=change='', change_and_edit='', change_and_view=''
##
from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
mdtool = getToolByName(script, 'portal_metadata')
@@ -49,4 +50,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.metadata_edit_template(**options)
+return context.metadata_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,5 +1,6 @@
##parameters=change='', change_and_view=''
##
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -29,4 +30,4 @@
options['form'] = { 'action': target,
'listButtonInfos': tuple(buttons) }
-return context.newsitem_edit_template(**options)
+return context.newsitem_edit_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,36 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<head>
- <metal:block fill-slot="base"
- ><tal:span tal:replace="structure here/getBaseTag"
-/></metal:block>
-</head>
-<body>
-
-<div metal:fill-slot="header">
-
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
-
- <div metal:use-macro="here/content_byline/macros/byline">By Me</div>
-
-</div>
-
-<div metal:fill-slot="main">
-
- <div tal:replace="structure here/CookedBody">Body</div>
-
- <div class="Discussion">
- <span tal:replace="structure here/viewThreadsAtBottom"
- tal:condition="here/viewThreadsAtBottom|nothing"></span>
- </div>
-
-</div>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,10 @@
+##parameters=
+##
+from Products.CMFDefault.utils import decode
+
+options = {}
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['text'] = context.CookedBody()
+
+return context.document_view_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_view.py
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,173 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<body>
-
-<div metal:fill-slot="main" i18n:domain="cmf_default">
-
-<div class="Desktop"
- tal:define="s_tool here/portal_syndication;
- s_site_allowed s_tool/isSiteSyndicationAllowed;
- s_here_allowed python:s_tool.isSyndicationAllowed(here);
- s_allowed python:s_site_allowed and s_here_allowed;
- ">
-
-<h2 i18n:translate="">Default Syndication Properties</h2>
-
-<div tal:condition="python:s_allowed">
-
- <form action="editSynProperties" method="post"
- tal:attributes="action string:${here/absolute_url}/editSynProperties"
- >
-
- <table width="100%" border="0">
-
- <tr>
- <th colspan="2" valign="top" align="left"
- i18n:translate="">Channel Properties</th>
- </tr>
-
- <tr>
- <td colspan="2">
-
- <table width="90%" border="1">
- <tr>
- <td>
-
- <table>
- <tr>
- <td valign="top" height="30"
- i18n:translate="">Channel Title:</td>
- <td valign="top" height="30"
- tal:content="here/Title">Title</td>
- </tr>
-
- <tr>
- <td valign="top" height="30"
- i18n:translate="">Channel Description:</td>
- <td valign="top" height="30"
- tal:content="here/Description">Description</td>
- </tr>
-
- </table>
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- </table>
-
- <table width="100%" border="0">
-
- <tr>
- <th valign="top" align="left" i18n:translate="">Syndication Module Properties</th>
- </tr>
-
- <tr>
- <td colspan="2">
-
- <table width="90%" border="1">
- <tr>
- <td>
-
- <table>
-
- <tr>
- <th align="left" i18n:translate="">Element</th>
- <th align="left" i18n:translate="">Default Value</th>
- </tr>
-
- <tr>
- <td i18n:translate="">UpdatePeriod</td>
- <td>
- <select name="updatePeriod">
- <option value="hourly"
- tal:define="upd python:s_tool.getUpdatePeriod(here)"
- tal:repeat="item s_tool/buildUpdatePeriods"
- tal:attributes="value python:item[0];
- selected python:item[0] == upd"
- tal:content="python: item[1]"
- i18n:translate="">Hourly
- </option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td i18n:translate="">UpdateFrequency</td>
- <td>
- <input type="text" name="updateFrequency:int" size="3" value=""
- tal:attributes="value python:s_tool.getUpdateFrequency(here)"
- >
- </td>
- </tr>
-
- <tr>
- <td i18n:translate="">UpdateBase</td>
- <td>
- <input type="text" name="updateBase:date" value="" size="25"
- tal:attributes="value python:s_tool.getUpdateBase(here)">
- </td>
- </tr>
-
- <tr>
- <td i18n:translate="">Max Syndicated Items</td>
- <td>
- <input type="text" name="max_items:int" value="" size="3"
- tal:attributes="value python:s_tool.getMaxItems(here)">
- </td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" name="edit" value="Save"
- i18n:attributes="value"></td>
- </tr>
-
- </table>
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- <tr>
- <td> <br /> </td>
- </tr>
-
- </table>
- </form>
-
- <form action="disableSyndication" method="post"
- tal:attributes="action string:${here/absolute_url}/disableSyndication"
- >
- <input type="submit" value="Disable Syndication" i18n:attributes="value">
- <input type="hidden" name="isAllowed:int" value="0">
- </form>
-
-</div><!-- s_allowed -->
-
-<div tal:condition="python: s_site_allowed and not(s_here_allowed)">
-
- <form action="enableSyndication" method="post"
- tal:attributes="action string:${here/absolute_url}/enableSyndication"
- >
- <input type="hidden" name="isAllowed:int" value="1">
- <input type="submit" value="Enable Syndication" i18n:attributes="value">
- </form>
-
-</div><!-- s_site_allowed and not s_here_allowed -->
-
-<div tal:condition="python:not(s_allowed)">
- <h4 i18n:translate="">Syndication is Disabled</h4>
-</div>
-
-</div><!-- class="Desktop -->
-
-</div><!-- metal:fill-slot="main" -->
-
-</body>
-</html>
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -2,6 +2,7 @@
##
from Products.PythonScripts.standard import structured_text
from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import html_marshal
from Products.CMFDefault.utils import Message as _
@@ -44,4 +45,4 @@
'listHiddenVarInfos': tuple(hidden_vars),
'listButtonInfos': tuple(buttons) }
-return context.discussion_reply_template(**options)
+return context.discussion_reply_template(**decode(options, script))
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/expanded_title.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/expanded_title.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/expanded_title.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -2,10 +2,15 @@
##parameters=
##title=Build title which includes site title
##
-site_title = context.portal_url.getPortalObject().Title()
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
+
+utool = getToolByName(script, 'portal_url')
+
+site_title = utool.getPortalObject().Title()
page_title = context.Title()
if page_title != site_title:
page_title = site_title + ": " + page_title
-return page_title
+return decode(page_title, script)
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/expanded_title.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -8,6 +8,7 @@
from Products.CMFDefault.permissions import ListFolderContents
from Products.CMFDefault.permissions import ManageProperties
from Products.CMFDefault.permissions import ViewManagementScreens
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import html_marshal
from Products.CMFDefault.utils import Message as _
@@ -75,6 +76,8 @@
options = {}
+options['title'] = context.Title()
+
items_manage_allowed = mtool.checkPermission(ViewManagementScreens, context)
items_delete_allowed = mtool.checkPermission(DeleteObjects, context)
items_add_allowed = mtool.checkPermission(AddPortalContent, context)
@@ -188,4 +191,4 @@
'is_orderable': is_orderable,
'is_sortable': is_sortable }
-return context.folder_contents_template(**options)
+return context.folder_contents_template(**decode(options, script))
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -3,7 +3,7 @@
<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
<h1 i18n:translate="">Folder Contents: <tal:span
- tal:content="context/Title" i18n:name="obj_title">Title</tal:span></h1>
+ tal:content="options/title" i18n:name="obj_title">Title</tal:span></h1>
</metal:slot>
<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/folder_contents_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Added: CMF/trunk/CMFDefault/skins/zpt_generic/getMainGlobals.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/getMainGlobals.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/getMainGlobals.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,32 @@
+##parameters=
+##
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
+
+atool = getToolByName(script, 'portal_actions')
+mtool = getToolByName(script, 'portal_membership')
+ptool = getToolByName(script, 'portal_properties')
+utool = getToolByName(script, 'portal_url')
+wtool = getToolByName(script, 'portal_workflow')
+portal_object = utool.getPortalObject()
+
+default_charset = ptool.getProperty('default_charset', None)
+if default_charset:
+ context.REQUEST.RESPONSE.setHeader('Content-Type',
+ 'text/html;charset=%s' % default_charset)
+
+globals = {'utool': utool,
+ 'mtool': mtool,
+ 'atool': atool,
+ 'wtool': wtool,
+ 'portal_object': portal_object,
+ 'portal_title': portal_object.Title(),
+ 'object_title': context.Title(),
+ 'object_description': context.Description(),
+ 'portal_url': utool(),
+ 'member': mtool.getAuthenticatedMember(),
+ 'membersfolder': mtool.getMembersFolder(),
+ 'isAnon': mtool.isAnonymousUser(),
+ 'wf_state': wtool.getInfoFor(context, 'review_state', '')}
+
+return decode(globals, context)
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/getMainGlobals.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/index_html.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/index_html.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/index_html.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -2,6 +2,7 @@
##
from ZTUtils import Batch
from ZTUtils import LazyFilter
+from Products.CMFDefault.utils import decode
options = {}
@@ -18,4 +19,4 @@
options['batch'] = { 'listItemInfos': listItemInfos,
'navigation': navigation }
-return context.index_html_template(**options)
+return context.index_html_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/index_html.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_categorized.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/index_html_categorized.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/index_html_categorized.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,9 +1,9 @@
-<html metal:use-macro="here/main_template/macros/master" >
+<html metal:use-macro="context/main_template/macros/master">
<body style="position: relative">
<div metal:fill-slot="header"
- tal:define="global has_local python: 'local_pt' in here.objectIds();
- global util_macros here/index_html_utils/macros;
+ tal:define="global has_local python: 'local_pt' in context.objectIds();
+ global util_macros context/index_html_utils/macros;
" >
<div tal:condition="not: has_local">
@@ -14,7 +14,7 @@
<div tal:condition="has_local">
- <div metal:use-macro="here/local_pt/macros/header | default">
+ <div metal:use-macro="context/local_pt/macros/header | default">
'local_pt' header goes here.
</div>
@@ -32,7 +32,7 @@
<br />
<div metal:use-macro="util_macros/index_content" />
-
+
<div metal:use-macro="util_macros/index_links" />
<div metal:use-macro="util_macros/index_folders" />
@@ -41,7 +41,7 @@
<div tal:condition="has_local">
- <div metal:use-macro="here/local_pt/macros/body | default">
+ <div metal:use-macro="context/local_pt/macros/body | default">
'local_pt' body goes here.
</div>
@@ -51,9 +51,7 @@
<div id="right_sidebar"
style="width: 20%">
-
- <div metal:use-macro="util_macros/news_box" />
-
+<tal:span tal:replace="structure context/news_box" />
</div>
</div>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_categorized.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/index_html_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/index_html_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,17 +1,18 @@
<html metal:use-macro="context/main_template/macros/master">
<body>
-<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
- <div tal:condition="not: options/has_local">
-<metal:macro metal:use-macro="context/index_html_utils/macros/index_header" />
- </div>
- <div tal:condition="options/has_local">
- <div metal:use-macro="context/local_pt/macros/header | default">
- 'local_pt' header goes here.
- </div>
- </div>
-</metal:slot>
+<metal:slot metal:fill-slot="header" i18n:domain="cmf_default"
+><tal:case tal:condition="not: options/has_local"
+><h1 id="DesktopTitle" tal:content="object_title">Page Title</h1>
+<div id="DesktopDescription" tal:content="object_description">Description
+ of the resource goes here, perhaps even wrapping lines; this is to make it
+ long enough to test.</div></tal:case
+><tal:case tal:condition="options/has_local"
+><div metal:use-macro="context/local_pt/macros/header | default">'local_pt'
+ header goes here.</div></tal:case
+></metal:slot>
+
<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
tal:define="batch options/batch">
<div id="content_well"
@@ -30,9 +31,7 @@
</div>
<div id="right_sidebar"
style="width: 20%">
-
-<metal:macro metal:use-macro="context/index_html_utils/macros/news_box" />
-
+<tal:span tal:replace="structure context/news_box" />
</div>
</metal:slot>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_utils.html
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/index_html_utils.html 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/index_html_utils.html 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,9 +1,9 @@
<div metal:define-macro="index_header">
<h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
+ tal:content="context/Title">Document Title</h1>
- <div id="DesktopDescription" tal:content="here/Description">
+ <div id="DesktopDescription" tal:content="context/Description">
Document Description goes here.
</div>
@@ -18,8 +18,8 @@
, 'FAQ'
, 'News Item'
);
- types types | here/show_content_types | default_types;
- raw_items python: here.contentValues(
+ types types | context/show_content_types | default_types;
+ raw_items python: context.contentValues(
filter={'portal_type': types } );
items python: auth_filter( raw_items, skip='View' );
">
@@ -57,8 +57,8 @@
, 'Favorite'
, 'Topic'
);
- types types | here/show_link_types | default_types;
- raw_items python: here.contentValues(
+ types types | context/show_link_types | default_types;
+ raw_items python: context.contentValues(
filter={ 'portal_type': types } );
items python: auth_filter( raw_items, skip='View' );
">
@@ -93,8 +93,8 @@
default_types python:( 'Folder'
,
);
- types types | here/show_folder_types | default_types;
- raw_items python: here.contentValues(
+ types types | context/show_folder_types | default_types;
+ raw_items python: context.contentValues(
filter={ 'portal_type': types } );
items python: auth_filter( raw_items, skip='View' );
">
@@ -122,47 +122,3 @@
</div>
</div>
-
-<div metal:define-macro="news_box" i18n:domain="cmf_default">
-
- <table class="NewsItems"
- cellspacing="0"
- cellpadding="0"
- border="0"
- width="100%"
- tal:define="news python: here.portal_catalog( meta_type='News Item'
- , sort_on='Date'
- , sort_order='reverse'
- , review_state='published'
- );
- Batch python:modules['ZTUtils'].Batch;
- batch python:Batch(news, 10, 0, orphan=1)">
- <tr>
- <td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
- <img src="spacer.gif" alt=" " width="1" height="2" border="0" />
- </td>
- <td valign="top" class="NewsTitle" width="100%">
- <b i18n:translate="">News</b>
- </td>
- </tr>
- <tr class="NewsItemRow" tal:condition="news"
- tal:repeat="news batch">
- <td valign="top">
- <a href="" tal:attributes="href python:news.getURL()"
- tal:content="news/Title"></a><br />
- <span tal:replace="news/Date">Date</span>
- </td>
- </tr>
- <tr class="NewsItemRow" tal:condition="python:not(news)">
- <td valign="top" i18n:translate="">
- No news is no news.
- </td>
- </tr>
- <tr class="NewsItemRow">
- <td>
- <a href="recent_news" i18n:translate="">More...</a>
- </td>
- </tr>
-</table>
-
-</div>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/index_html_utils.html
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/main_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/main_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/main_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,36 +1,38 @@
<metal:macro metal:define-macro="master"
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<html tal:define="utool nocall:here/portal_url;
- mtool here/portal_membership;
- atool here/portal_actions;
- wtool here/portal_workflow;
- portal_object utool/getPortalObject;
- portal_title portal_object/Title;
- object_title here/Title;
- portal_url utool;
- member mtool/getAuthenticatedMember;
- membersfolder mtool/getMembersFolder;
- isAnon mtool/isAnonymousUser;
- actions python: atool.listFilteredActionsFor( here );
+<html tal:define="globals context/getMainGlobals;
+ utool globals/utool;
+ mtool globals/mtool;
+ atool globals/atool;
+ wtool globals/wtool;
+ portal_object globals/portal_object;
+ portal_title globals/portal_title;
+ object_title globals/object_title;
+ object_description globals/object_description;
+ portal_url globals/portal_url;
+ member globals/member;
+ membersfolder globals/membersfolder;
+ isAnon globals/isAnon;
+ actions python: atool.listFilteredActionsFor(context);
user_actions actions/user;
object_actions actions/object;
workflow_actions actions/workflow;
folder_actions actions/folder;
global_actions actions/global;
- wf_state python:wtool.getInfoFor(here,'review_state','');
+ wf_state globals/wf_state;
"
>
<head>
- <title tal:content="here/expanded_title"> Title goes here </title>
+ <title tal:content="context/expanded_title">Title goes here</title>
<metal:slot define-slot="base" />
<link rel="stylesheet" type="text/css" href="zpt_stylesheet.css"
- tal:attributes="href here/zpt_stylesheet.css/absolute_url" />
+ tal:attributes="href context/zpt_stylesheet.css/absolute_url" />
<link rel="stylesheet" type="text/css" href="CalendarStyle.css"
- tal:condition="here/CalendarStyle.css|nothing"
- tal:attributes="href here/CalendarStyle.css/absolute_url" />
+ tal:condition="context/CalendarStyle.css|nothing"
+ tal:attributes="href context/CalendarStyle.css/absolute_url" />
<metal:slot define-slot="style_slot" />
</head>
@@ -147,10 +149,10 @@
<tr class="ContextActionsRow">
<td class="ActionTitle"
- tal:define="getIcon python:hasattr(here, 'getIcon') and here.getIcon();
- icon python:getIcon or getattr(here, 'icon', '');
- typ python:getattr(here, 'Type', '');
- objID python:here.truncID( here.getId(), size=15 )">
+ tal:define="getIcon python: hasattr(context, 'getIcon') and context.getIcon();
+ icon python: getIcon or getattr(context, 'icon', '');
+ typ python: getattr(context, 'Type', '');
+ objID python: context.truncID(context.getId(), size=15)">
<img src="icon" align="left" title="Type" alt="[X]"
height="16" width="16"
@@ -240,7 +242,7 @@
<tr>
<td>
- <div metal:use-macro="here/calendarBox/macros/calendarBox | default">
+ <div metal:use-macro="context/calendarBox/macros/calendarBox | default">
<!-- CMFCalendar not Installed -->
</div>
</td>
@@ -258,7 +260,7 @@
<td id="ForematterCell" width="78%">
<p id="Breadcrumbs" style="padding-top: 5px">
- <span tal:repeat="bc here/breadcrumbs"
+ <span tal:repeat="bc context/breadcrumbs"
><a href="."
tal:attributes="href bc/url" tal:content="bc/id"
>ID</a><span tal:condition="not: repeat/bc/end"> / </span>
@@ -270,37 +272,27 @@
tal:content="request/portal_status_message"
i18n:translate="">Status message.</p>
- <div metal:define-slot="header">
+<metal:slot metal:define-slot="header">
+<h1 id="DesktopTitle" tal:content="object_title">Page Title</h1>
- <h1 id="DesktopTitle"
- tal:content="here/Title"> Page Title </h1>
+<div id="DesktopDescription" tal:content="object_description">Description
+ of the resource goes here, perhaps even wrapping lines; this is to make it
+ long enough to test.</div>
+</metal:slot>
+<!-- end formatter -->
- <div id="DesktopDescription"
- tal:content="here/Description">
- Description of the resource goes here, perhaps even wrapping
- lines; this is to make it long enough to test.
- </div>
+<div id="Desktop">
- </div>
+<metal:slot metal:define-slot="main">
+<h2>Section Header</h2>
- <!-- end formatter -->
+<p>The content of the object is <a href="render">rendered</a> hre. Lorem ipsum
+ dolorem. Nihil obstat imprimatur. Semper ubi sub ubi. Non illegitimi
+ carborundum. In vino veritas. E pluribus unam.</p>
+</metal:slot>
- <div id="Desktop">
-
- <div metal:define-slot="main">
-
- <h2> Section Header </h2>
-
- <p> The content of the object is <a href="render">rendered</a> hre.
- Lorem ipsum dolorem. Nihil obstat imprimatur. Semper ubi sub ubi.
- Non illegitimi carborundum. In vino veritas. E pluribus unam.
- </p>
-
- <!-- end main slot -->
- </div>
-
<div id="Permalink"
- tal:define="url here/get_permalink | nothing"
+ tal:define="url context/get_permalink | nothing"
tal:condition="url">
<span i18n:translate="" tal:omit-tag="">Permanent Link:</span>
<a href="" tal:content="url" tal:attributes="href url">
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/main_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,37 +0,0 @@
- <table class="NewsItems" cellspacing="0" cellpadding="0" border="0"
- width="100%" i18n:domain="cmf_default">
- <tbody tal:define="news python: here.portal_catalog(portal_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
- Batch python:modules['ZTUtils'].Batch;
- global batch python:Batch(news, 10, 0, orphan=1)">
- <tr>
- <td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
- <img src="spacer.gif" alt=" "
- width="1" height="2" border="0" />
- </td>
- <td valign="top" class="NewsTitle" width="100%">
- <b i18n:translate="">News</b>
- </td>
- </tr>
- <tr class="NewsItemRow"
- tal:condition="news"
- tal:repeat="news batch">
- <td>
- <a href=""
- tal:attributes="href python:news.getURL()"
- tal:content="news/Title"></a><br />
- <span tal:replace="news/Date">Date</span>
- </td>
- </tr>
- <tr class="NewsItemRow"
- tal:condition="python:not(news)">
- <td valign="top" i18n:translate="">
- No news is no news.
- </td>
- </tr>
- <tr class="NewsItemRow">
- <td>
- <a href="recent_news" i18n:translate="">More...</a>
- </td>
- </tr>
- </tbody>
- </table>
Added: CMF/trunk/CMFDefault/skins/zpt_generic/news_box.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/news_box.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/news_box.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,20 @@
+##parameters=
+##
+from ZTUtils import Batch
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
+
+ctool = getToolByName(script, 'portal_catalog')
+
+options = {}
+
+items = ctool.searchResults(portal_type='News Item', sort_on='Date',
+ sort_order='reverse', review_state='published')
+batch_obj = Batch(items, 10, 0, orphan=1)
+items = [ {'title': item.Title,
+ 'date': item.Date,
+ 'url': item.getURL()}
+ for item in batch_obj ]
+options['listItemInfos'] = items
+
+return context.news_box_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/news_box.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_generic/news_box_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/news_box.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/news_box_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,26 @@
+ <table class="NewsItems" cellspacing="0" cellpadding="0" border="0"
+ width="100%" i18n:domain="cmf_default">
+ <tr>
+ <td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
+ <img src="spacer.gif" alt=" " width="1" height="2" border="0" />
+ </td>
+ <td valign="top" class="NewsTitle" width="100%">
+ <b i18n:translate="">News</b>
+ </td>
+ </tr>
+ <tr class="NewsItemRow" tal:repeat="item_info options/listItemInfos">
+ <td>
+ <a href="" tal:attributes="href item_info/url"
+ tal:content="item_info/title"></a><br />
+ <span tal:replace="item_info/date">Date</span>
+ </td>
+ </tr>
+ <tr class="NewsItemRow" tal:condition="not: options/listItemInfos">
+ <td i18n:translate="">No news is no news.</td>
+ </tr>
+ <tr class="NewsItemRow">
+ <td>
+ <a href="recent_news" i18n:translate="">More...</a>
+ </td>
+ </tr>
+ </table>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/news_box_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,64 +0,0 @@
-<html metal:use-macro="context/main_template/macros/master">
-<body>
-
-<metal:slot metal:fill-slot="main" i18n:domain="cmf_default">
-<div class="Desktop" tal:define="b_start string:0;b_start request/b_start | b_start;
- newsitems python: context.portal_catalog.searchResults(portal_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
- Batch python:modules['ZTUtils'].Batch;
- global batch python:Batch(newsitems, 10, int(b_start), orphan=1)">
-
- <p tal:define="p batch/previous" tal:condition="p">
- <a href=""
- tal:attributes="href string:?b_start=${p/first}"
- i18n:translate=""><span tal:replace="p/length"
- i18n:name="count">n</span> more recent articles</a>
- </p>
-
- <table cellspacing="0" border="0" width="90%"
- tal:repeat="newsitem batch"
- tal:condition="newsitems">
- <tr>
- <td class="NewsListing" align="left" valign="top">
- <a href="" class="NewsListing"
- tal:attributes="href newsitem/getURL"
- tal:content="newsitem/Title">Title</a>
- </td>
- <td class="NewsListing" align="right" valign="top"
- tal:content="newsitem/Date">Date
- </td>
- </tr>
- <tr><td class="NewsByLine" valign="top" colspan="2" align="left">
- By <tal:case tal:condition="newsitem/listCreators"
- ><tal:loop tal:repeat="creator newsitem/listCreators"
- ><tal:case tal:condition="not: repeat/creator/start"
- ><tal:case tal:condition="not: repeat/creator/end">, </tal:case
- ><tal:case tal:condition="repeat/creator/end"
- > <span tal:omit-tag="" i18n:translate="">and</span> </tal:case
- ></tal:case
- ><tal:span tal:content="creator">creator</tal:span></tal:loop></tal:case
- ><tal:case tal:condition="not: newsitem/listCreators"
- ><span tal:omit-tag="" i18n:translate="">unknown</span></tal:case>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <em> <span tal:define="pss modules/Products.PythonScripts.standard; niDescription newsitem/Description"
- tal:replace="structure python:pss.structured_text(niDescription)">Description</span></em>
- </td>
- </tr>
- </table>
- <div tal:condition="python:not(newsitems)">
- <p i18n:translate="">No news is good news!</p>
- </div>
- <p tal:define="n batch/next" tal:condition="n">
- <a href=""
- tal:attributes="href string:?b_start=${batch/end}"
- i18n:translate=""><span tal:replace="n/length"
- i18n:name="count">n</span> older articles</a>
- </p>
-
-</div>
-</metal:slot>
-
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,31 @@
+##parameters=b_start=0
+##
+from Products.PythonScripts.standard import structured_text
+from ZTUtils import Batch
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
+
+ctool = getToolByName(script, 'portal_catalog')
+utool = getToolByName(script, 'portal_url')
+portal_url = utool()
+
+
+options = {}
+
+target = '%s/recent_news' % portal_url
+items = ctool.searchResults(portal_type='News Item', sort_on='Date',
+ sort_order='reverse', review_state='published')
+batch_obj = Batch(items, 10, b_start, orphan=1)
+
+items = [ {'creators': item.listCreators,
+ 'date': item.Date,
+ 'description': structured_text(item.Description),
+ 'title': item.Title,
+ 'url': item.getURL()}
+ for item in batch_obj ]
+
+navigation = context.getBatchNavigation(batch_obj, target)
+options['batch'] = {'listItemInfos': items,
+ 'navigation': navigation}
+
+return context.recent_news_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_generic/recent_news_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/recent_news.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/recent_news_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,51 @@
+<html metal:use-macro="context/main_template/macros/master">
+<body>
+
+<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
+ tal:define="batch options/batch">
+<p tal:define="p batch/navigation/previous" tal:condition="p/url">
+ <a href="" tal:attributes="href p/url"
+ i18n:translate=""><span tal:replace="p/length"
+ i18n:name="count">n</span> more recent articles</a></p>
+
+<table cellspacing="0" border="0" width="90%"
+ tal:repeat="item_info batch/listItemInfos">
+ <tr>
+ <td class="NewsListing">
+ <a href="" class="NewsListing" tal:attributes="href item_info/url"
+ tal:content="item_info/title">Title</a>
+ </td>
+ <td class="NewsListing" align="right" tal:content="item_info/date">
+ Date
+ </td>
+ </tr>
+ <tr>
+ <td class="NewsByLine" colspan="2">
+ By <tal:case tal:condition="item_info/creators"
+ ><tal:loop tal:repeat="creator item_info/creators"
+ ><tal:case tal:condition="not: repeat/creator/start"
+ ><tal:case tal:condition="not: repeat/creator/end">, </tal:case
+ ><tal:case tal:condition="repeat/creator/end"
+ > <i18n:span i18n:translate="">and</i18n:span> </tal:case></tal:case
+ ><tal:span tal:content="creator">creator</tal:span></tal:loop></tal:case
+ ><tal:case tal:condition="not: item_info/creators"
+ ><i18n:span i18n:translate="">unknown</i18n:span></tal:case>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" style="font-style: italic">
+ <tal:span tal:replace="structure item_info/description" />
+ </td>
+ </tr>
+</table>
+<p tal:condition="not: batch/listItemInfos" i18n:translate="">No news
+ is good news!</p>
+
+<p tal:define="n batch/navigation/next" tal:condition="n/url">
+ <a href="" tal:attributes="href n/url"
+ i18n:translate=""><span tal:replace="n/length"
+ i18n:name="count">n</span> older articles</a></p>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/recent_news_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,6 +1,7 @@
##parameters=change=''
##
from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
atool = getToolByName(script, 'portal_actions')
@@ -18,7 +19,7 @@
target = atool.getActionInfo('global/configPortal')['url']
buttons = []
-buttons.append( {'name': 'change', 'value': _('Change')} )
+buttons.append( {'name': 'change', 'value': _(u'Change')} )
options['form'] = { 'action': target,
'email_from_name': ptool.getProperty('email_from_name'),
'email_from_address':
@@ -31,4 +32,4 @@
ptool.getProperty('default_charset', ''),
'listButtonInfos': tuple(buttons) }
-return context.reconfig_template(**options)
+return context.reconfig_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_form.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/search.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/search.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/search.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -3,6 +3,7 @@
from Products.PythonScripts.standard import thousands_commas
from ZTUtils import Batch
from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
from Products.CMFDefault.utils import Message as _
ctool = getToolByName(script, 'portal_catalog')
@@ -32,13 +33,22 @@
del kw[k]
items = ctool.searchResults(kw)
batch_obj = Batch(items, 25, b_start, orphan=1)
+
+items = [ {'description': item.Description,
+ 'icon': item.getIcon,
+ 'title': item.Title,
+ 'type': item.Type,
+ 'date': item.Date,
+ 'url': item.getURL()+'/view'}
+ for item in batch_obj ]
+
length = batch_obj.sequence_length
summary = { 'length': length and thousands_commas(length) or '',
- 'type': (length == 1) and _('item') or _('items'),
+ 'type': (length == 1) and _(u'item') or _(u'items'),
'match': kw.get('SearchableText') }
navigation = context.getBatchNavigation(batch_obj, target, **kw)
options['batch'] = { 'summary': summary,
- 'listItemBrains': batch_obj,
+ 'listItemInfos': tuple(items),
'navigation': navigation }
-return context.search_results_template(**options)
+return context.search_results_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/search.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Deleted: CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,167 +0,0 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-<body>
-<div metal:fill-slot="main" i18n:domain="cmf_default">
-
-<div class="Desktop">
-
-<h1 i18n:translate="">Search <span tal:replace="here/Title"
- i18n:name="title" /></h1>
-
-<form action="search"
- tal:attributes="action string:${here/portal_url}/search"
->
-
-<table class="FormLayout">
-
- <tr tal:condition="python: here.portal_membership.checkPermission('Review portal content', here)">
- <th i18n:translate="">Review Status</th>
- <td>
- <select name="review_state" size="3" multiple>
- <option value="" selected i18n:translate="">-- any --</option>
- <option value="private" i18n:translate="">private</option>
- <option value="pending" i18n:translate="">pending</option>
- <option value="published" i18n:translate="">published</option>
- </select>
- <dl class="FieldHelp">
- <dd i18n:translate="">As a reviewer, you may search for items based on
- their review state. If you wish to constrain results to items in
- certain states, select them from this list.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr valign="top">
- <th i18n:translate="">Full Text</th>
- <td>
- <input name="SearchableText" size="40" />
- <dl class="FieldHelp">
- <dd i18n:translate="">For a simple text search, enter your search term
- here. Multiple words may be found by combining
- them with <b>AND</b> and <b>OR</b>. This will
- find text in items' contents, title and
- description.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr>
- <th i18n:translate="">Title</th>
- <td>
- <input name="Title" size="20" />
- </td>
- </tr>
-
- <tr valign="top">
- <th i18n:translate="">Subject</th>
- <td tal:define="items python: here.portal_catalog.uniqueValuesFor('Subject')">
- <select name="Subject:list" multiple size="5">
- <option value="" selected i18n:translate="">-- any --</option>
- <option value=""
- tal:repeat="item items"
- tal:attributes="value item"
- tal:content="item">
- </option>
- </select>
- </td>
- </tr>
-
- <tr>
- <th i18n:translate="">Description</th>
- <td>
- <input name="Description" size="20" />
- <dl class="FieldHelp">
- <dd i18n:translate=""> You may also search the items' descriptions and
- titles specifically. Multiple words may be found
- by combining them with <b>AND</b> and <b>OR</b>.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr>
- <th i18n:translate="">Find new items since...</th>
- <td tal:define="today python: here.ZopeTime().earliestTime();
- mtool here/portal_membership;
- member python:mtool.getAuthenticatedMember();
- lastLogin member/last_login_time|nothing;
- yesterday python:(today-1).Date();
- lastWeek python:(today-7).Date();
- lastMth python:(today-31).Date();
- ">
- <select name="created.query:record:date">
- <option value="1970/01/01 00:00:01 GMT"
- i18n:translate="">Ever</option>
- <option value=""
- tal:condition="python:not(here.portal_membership.isAnonymousUser())"
- tal:attributes="value lastLogin"
- i18n:translate="">Last login</option>
- <option value=""
- tal:attributes="value yesterday"
- i18n:translate="">Yesterday</option>
- <option value=""
- tal:attributes="value lastWeek"
- i18n:translate="">Last week</option>
- <option value=""
- tal:attributes="value lastMth"
- i18n:translate="">Last month</option>
- </select>
- <input type="hidden" name="created.range:record" value="min" />
- <dl class="FieldHelp">
- <dd i18n:translate="">You may find only recent items by selecting a
- time-frame.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr>
- <th i18n:translate="">Item type</th>
- <td tal:define="typeinfos here/portal_types/listTypeInfo" >
- <select name="portal_type:list" multiple size="5">
- <option value="" selected i18n:translate="">-- any --</option>
- <option value=""
- tal:repeat="typeinfo typeinfos"
- tal:attributes="value typeinfo/getId"
- tal:content="typeinfo/Title"
- i18n:translate=""></option>
- </select>
- <dl class="FieldHelp">
- <dd i18n:translate="">You may limit your results to particular kinds of
- items by selecting them above. To find all kinds
- of items, do not select anything.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr>
- <th i18n:translate="">Creator</th>
- <td>
- <input name="listCreators" size="20" />
-
- <dl class="FieldHelp">
- <dd i18n:translate="">To find items by a particular user only, enter
- their username above. Note that you must enter
- their username <i>exactly</i>.
- </dd>
- </dl>
- </td>
- </tr>
-
- <tr>
- <td><br /></td>
- <td>
- <input type="submit" value="Search" i18n:attributes="value" />
- </td>
- </tr>
-</table>
-</form>
-
-</div>
-</div>
-</body>
-</html>
Added: CMF/trunk/CMFDefault/skins/zpt_generic/search_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/search_form.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/search_form.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,42 @@
+##parameters=search=''
+##
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.permissions import ReviewPortalContent
+from Products.CMFDefault.utils import decode
+from Products.CMFDefault.utils import Message as _
+
+ctool = getToolByName(script, 'portal_catalog')
+mtool = getToolByName(script, 'portal_membership')
+ttool = getToolByName(script, 'portal_types')
+utool = getToolByName(script, 'portal_url')
+portal_url = utool()
+
+
+options = {}
+options['title'] = context.Title()
+
+is_review_allowed = mtool.checkPermission(ReviewPortalContent, context)
+options['is_review_allowed'] = is_review_allowed
+options['listAvailableSubjects'] = ctool.uniqueValuesFor('Subject')
+
+created = []
+today = context.ZopeTime().earliestTime()
+member = mtool.getAuthenticatedMember()
+created.append({'value': '1970/01/01 00:00:01 GMT', 'title': _(u'Ever')})
+if member:
+ created.append({'value': member.last_login_time,
+ 'title': _(u'Last login')})
+created.append({'value': (today-1).Date(), 'title': _(u'Yesterday')})
+created.append({'value': (today-7).Date(), 'title': _(u'Last week')})
+created.append({'value': (today-31).Date(), 'title': _(u'Last month')})
+options['listCreatedInfos'] = tuple(created)
+
+options['listTypeInfos'] = ttool.listTypeInfo()
+
+buttons = []
+target = '%s/search' % portal_url
+buttons.append( {'name': 'search', 'value': _(u'Search')} )
+options['form'] = { 'action': target,
+ 'listButtonInfos': tuple(buttons) }
+
+return context.search_form_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/search_form.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_generic/search_form_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/search_form.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/search_form_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,139 @@
+<html metal:use-macro="context/main_template/macros/master">
+<body>
+
+<metal:slot metal:fill-slot="header" i18n:domain="cmf_default">
+<h1 i18n:translate="">Search <tal:span
+ tal:content="options/title" i18n:name="obj_title">Title</tal:span></h1>
+</metal:slot>
+
+<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
+ tal:define="form options/form">
+<form action="search" method="post"
+ tal:attributes="action form/action">
+<table class="FormLayout">
+ <tr tal:condition="options/is_review_allowed">
+ <th i18n:translate="">Review Status</th>
+ <td>
+ <select name="review_state" size="3" multiple>
+ <option value="" selected i18n:translate="">-- any --</option>
+ <option value="private" i18n:translate="">private</option>
+ <option value="pending" i18n:translate="">pending</option>
+ <option value="published" i18n:translate="">published</option>
+ </select>
+ <dl class="FieldHelp">
+ <dd i18n:translate="">As a reviewer, you may search for items based on
+ their review state. If you wish to constrain results to items in
+ certain states, select them from this list.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <th i18n:translate="">Full Text</th>
+ <td>
+ <input name="SearchableText" size="40" />
+ <dl class="FieldHelp">
+ <dd i18n:translate="">For a simple text search, enter your search term
+ here. Multiple words may be found by combining
+ them with <b>AND</b> and <b>OR</b>. This will
+ find text in items' contents, title and
+ description.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr>
+ <th i18n:translate="">Title</th>
+ <td>
+ <input name="Title" size="20" />
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <th i18n:translate="">Subject</th>
+ <td>
+ <select name="Subject:list" multiple size="5">
+ <option value="" selected i18n:translate="">-- any --</option>
+ <option value="" tal:repeat="item options/listAvailableSubjects"
+ tal:attributes="value item"
+ tal:content="item">Subject</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th i18n:translate="">Description</th>
+ <td>
+ <input name="Description" size="20" />
+ <dl class="FieldHelp">
+ <dd i18n:translate=""> You may also search the items' descriptions and
+ titles specifically. Multiple words may be found
+ by combining them with <b>AND</b> and <b>OR</b>.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr>
+ <th i18n:translate="">Find new items since...</th>
+ <td>
+ <select name="created.query:record:date">
+ <option value="" tal:repeat="info options/listCreatedInfos"
+ tal:attributes="value info/value"
+ tal:content="info/title">Date</option>
+ </select>
+ <input type="hidden" name="created.range:record" value="min" />
+ <dl class="FieldHelp">
+ <dd i18n:translate="">You may find only recent items by selecting a
+ time-frame.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr>
+ <th i18n:translate="">Item type</th>
+ <td>
+ <select name="portal_type:list" multiple size="5">
+ <option value="" selected="selected" i18n:translate="">-- any --</option>
+ <option value="" tal:repeat="typeinfo options/listTypeInfos"
+ tal:attributes="value typeinfo/getId"
+ tal:content="typeinfo/Title">TYPE</option>
+ </select>
+ <dl class="FieldHelp">
+ <dd i18n:translate="">You may limit your results to particular kinds of
+ items by selecting them above. To find all kinds
+ of items, do not select anything.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr>
+ <th i18n:translate="">Creator</th>
+ <td>
+ <input name="listCreators" size="20" />
+
+ <dl class="FieldHelp">
+ <dd i18n:translate="">To find items by a particular user only, enter
+ their username above. Note that you must enter
+ their username <i>exactly</i>.
+ </dd>
+ </dl>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ <td>
+ <metal:macro metal:use-macro="context/form_widgets/macros/buttons" />
+ </td>
+ </tr>
+</table>
+</form>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/search_form_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/search_results_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/search_results_template.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/search_results_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -10,7 +10,7 @@
<div class="Desktop">
<metal:macro metal:use-macro="context/batch_widgets/macros/summary" />
-<table class="SearchResults" tal:condition="batch/listItemBrains">
+<table class="SearchResults" tal:condition="batch/listItemInfos">
<thead>
<tr>
<td width="16"> </td>
@@ -19,32 +19,31 @@
<th i18n:translate="">Date</th>
</tr>
</thead>
- <tbody tal:repeat="item_brain batch/listItemBrains">
- <tr tal:define="objURL string:${item_brain/getURL}/view">
- <td><a href=""
- tal:condition="item_brain/getIcon|nothing"
- tal:attributes="href objURL"><img src="" border="0" alt="" title=""
- tal:define="alt item_brain/Type"
- tal:attributes="src item_brain/getIcon;
- alt alt;
- title alt" /></a></td>
- <td><a href=""
- tal:attributes="href objURL"><span
- tal:condition="item_brain/Title"
- tal:replace="item_brain/Title">Title</span><span
- tal:condition="not:item_brain/Title"
- tal:omit-tag=""
- i18n:translate="">(No title)</span></a></td>
- <td tal:content="item_brain/Type" i18n:translate="">Type</td>
- <td tal:content="item_brain/Date">Date</td>
+ <tbody tal:repeat="item_info batch/listItemInfos">
+ <tr>
+ <td
+ ><a href="" tal:condition="item_info/icon"
+ tal:attributes="href item_info/url"
+ ><img src="" border="0" alt="" title=""
+ tal:attributes="src item_info/icon;
+ alt item_info/type;
+ title item_info/type" /></a></td>
+ <td
+ ><a href="" tal:attributes="href item_info/url"
+ ><tal:case tal:condition="item_info/title"
+ tal:content="item_info/title">Title</tal:case
+ ><tal:case tal:condition="not:item_info/title"
+ i18n:translate="">(No title)</tal:case></a></td>
+ <td tal:content="item_info/type" i18n:translate="">Type</td>
+ <td tal:content="item_info/date">Date</td>
</tr>
<tr>
<td> </td>
- <td colspan="3"><em
- tal:condition="item_brain/Description"
- tal:content="item_brain/Description">Description</em><em
- tal:condition="not:item_brain/Description"
- i18n:translate="">(No description)</em></td>
+ <td colspan="3"
+ ><em tal:condition="item_info/description"
+ tal:content="item_info/description">Description</em
+ ><em tal:condition="not:item_info/description"
+ i18n:translate="">(No description)</em></td>
</tr>
</tbody>
</table>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/search_results_template.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/setup_talkback_tree.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/setup_talkback_tree.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/setup_talkback_tree.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,9 +1,15 @@
-## Script (Python) "setup_talkback_tree"
##parameters=tree_root
##title=Standard Tree
##
from ZTUtils import SimpleTreeMaker
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.permissions import ManagePortal
+from Products.CMFDefault.utils import decode
+mtool = getToolByName(script, 'portal_membership')
+utool = getToolByName(script, 'portal_url')
+portal_url = utool()
+
tm = SimpleTreeMaker('tb_tree')
def getKids(object):
return object.talkback.getReplies()
@@ -11,4 +17,27 @@
tree, rows = tm.cookieTree(tree_root)
rows.pop(0)
-return {'root': tree, 'rows': rows}
+
+is_delete_allowed = mtool.checkPermission(ManagePortal, context)
+
+items = []
+for row in rows:
+ branch = row.branch()
+ item = row.object
+ item_icon = item.getIcon(1)
+ item_url = item.absolute_url()
+ items.append({'tree_colspan': tree.height - row.depth,
+ 'tree_icon': branch and branch['img'] or '',
+ 'tree_id': row.id,
+ 'tree_indent': row.depth - 1,
+ 'tree_url': branch and branch['link'] or '',
+ 'creators': item.listCreators(),
+ 'date': item.CreationDate(),
+ 'delete_url': is_delete_allowed and \
+ ('%s/discitem_delete' % item_url) or '',
+ 'icon': item_icon and \
+ ('%s/%s' % (portal_url, item_icon)) or '',
+ 'title': item.Title(),
+ 'url': item_url})
+
+return decode(tuple(items), context)
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/setup_talkback_tree.py
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Added: CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm.py 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm.py 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,21 @@
+##parameters=
+##
+from Products.CMFCore.utils import getToolByName
+from Products.CMFDefault.utils import decode
+
+stool = getToolByName(script, 'portal_syndication')
+
+
+options = {}
+
+s_site_allowed = stool.isSiteSyndicationAllowed()
+s_here_allowed = stool.isSyndicationAllowed(context)
+
+options['title'] = context.Title()
+options['description'] = context.Description()
+options['s_site_allowed'] = s_site_allowed
+options['s_here_allowed'] = s_here_allowed
+options['s_allowed'] = s_site_allowed and s_here_allowed
+options['s_tool'] = stool
+
+return context.synPropertiesForm_template(**decode(options, script))
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm.py
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm_template.pt (from rev 41533, CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt)
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_control/synPropertiesForm.pt 2006-02-01 15:10:13 UTC (rev 41533)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm_template.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -0,0 +1,141 @@
+<html metal:use-macro="context/main_template/macros/master">
+<body>
+
+<metal:slot metal:fill-slot="main" i18n:domain="cmf_default"
+ tal:define="s_tool options/s_tool">
+<div class="Desktop">
+
+<h2 i18n:translate="">Default Syndication Properties</h2>
+
+<tal:case tal:condition="options/s_allowed"
+><form action="editSynProperties" method="post"
+ tal:attributes="action string:${context/absolute_url}/editSynProperties">
+
+<table width="100%" border="0">
+ <tr>
+ <th colspan="2" valign="top" align="left"
+ i18n:translate="">Channel Properties</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table width="90%" border="1">
+ <tr>
+ <td>
+
+ <table>
+ <tr>
+ <td valign="top" height="30"
+ i18n:translate="">Channel Title:</td>
+ <td valign="top" height="30"
+ tal:content="options/title">Title</td>
+ </tr>
+ <tr>
+ <td valign="top" height="30"
+ i18n:translate="">Channel Description:</td>
+ <td valign="top" height="30"
+ tal:content="options/description">Description</td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+
+</table>
+
+<table width="100%" border="0">
+ <tr>
+ <th valign="top" align="left" i18n:translate="">Syndication Module Properties</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table width="90%" border="1">
+ <tr>
+ <td>
+
+ <table>
+ <tr>
+ <th align="left" i18n:translate="">Element</th>
+ <th align="left" i18n:translate="">Default Value</th>
+ </tr>
+ <tr>
+ <td i18n:translate="">UpdatePeriod</td>
+ <td>
+ <select name="updatePeriod">
+ <option value="hourly"
+ tal:define="upd python:s_tool.getUpdatePeriod(context)"
+ tal:repeat="item s_tool/buildUpdatePeriods"
+ tal:attributes="value python:item[0];
+ selected python:item[0] == upd"
+ tal:content="python: item[1]"
+ i18n:translate="">Hourly
+ </option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td i18n:translate="">UpdateFrequency</td>
+ <td>
+ <input type="text" name="updateFrequency:int" size="3" value=""
+ tal:attributes="value python:s_tool.getUpdateFrequency(context)"
+ >
+ </td>
+ </tr>
+ <tr>
+ <td i18n:translate="">UpdateBase</td>
+ <td>
+ <input type="text" name="updateBase:date" value="" size="25"
+ tal:attributes="value python:s_tool.getUpdateBase(context)">
+ </td>
+ </tr>
+ <tr>
+ <td i18n:translate="">Max Syndicated Items</td>
+ <td>
+ <input type="text" name="max_items:int" value="" size="3"
+ tal:attributes="value python:s_tool.getMaxItems(context)">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" name="edit" value="Save"
+ i18n:attributes="value"></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> <br /> </td>
+ </tr>
+</table>
+</form>
+
+<form action="disableSyndication" method="post"
+ tal:attributes="action string:${context/absolute_url}/disableSyndication">
+ <input type="submit" value="Disable Syndication" i18n:attributes="value">
+ <input type="hidden" name="isAllowed:int" value="0">
+</form>
+</tal:case><!-- s_allowed -->
+
+<tal:case tal:condition="python: options['s_site_allowed'] and not options['s_here_allowed']"
+><form action="enableSyndication" method="post"
+ tal:attributes="action string:${context/absolute_url}/enableSyndication">
+ <input type="hidden" name="isAllowed:int" value="1">
+ <input type="submit" value="Enable Syndication" i18n:attributes="value">
+</form>
+</tal:case><!-- s_site_allowed and not s_here_allowed -->
+
+<tal:case tal:condition="not: options/s_allowed"
+><h4 i18n:translate="">Syndication is Disabled</h4>
+</tal:case>
+
+</div>
+</metal:slot>
+
+</body>
+</html>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/synPropertiesForm_template.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/talkback_tree.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/talkback_tree.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/talkback_tree.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,51 +1,36 @@
<html>
<body>
-<table cellspacing="0" border="0"
- metal:define-macro="tree"
- tal:define="t python:here.setup_talkback_tree(here);
- height t/root/height;
- mtool here/portal_membership;
- member mtool/getAuthenticatedMember;
- ">
- <tr tal:repeat="row t/rows">
+<table cellspacing="0" border="0" metal:define-macro="tree">
+ <tr tal:repeat="item python: context.setup_talkback_tree(context)">
<td colspan="1"
- tal:define="indent python: row.depth - 1"
- tal:condition="indent"
- tal:attributes="colspan indent" ></td>
- <td width="16"
- tal:define="rlink row/branch">
+ tal:condition="item/tree_indent"
+ tal:attributes="colspan item/tree_indent"></td>
+ <td width="16">
<a href="#" name=""
- tal:condition="rlink"
- tal:attributes="name row/id;
- href rlink/link"
- tal:content="structure rlink/img"><img src="/p_/pl"></a>
+ tal:condition="item/tree_url"
+ tal:attributes="name item/tree_id;
+ href item/tree_url"
+ tal:content="structure item/tree_icon"><img src="/p_/pl"></a>
</td>
- <td colspan="1" width="99%"
- tal:attributes="colspan python: height - row.depth"
- tal:define="obj nocall: row/object;
- url obj/absolute_url">
- <a href=""
- tal:attributes="href url"
- ><img border="0" src=""
- tal:attributes="src string:${obj/portal_url}/${obj/getIcon}" /></a>
- <a href=""
- tal:attributes="href url"
- tal:content="obj/Title">Title</a>,
- by <tal:case tal:condition="obj/listCreators"
- ><tal:loop tal:repeat="creator obj/listCreators"
- ><tal:case tal:condition="not: repeat/creator/start"
- ><tal:case tal:condition="not: repeat/creator/end">, </tal:case
- ><tal:case tal:condition="repeat/creator/end"
- > <span tal:omit-tag="" i18n:translate="">and</span> </tal:case
- ></tal:case
- ><tal:span tal:content="creator">creator</tal:span></tal:loop></tal:case
- ><tal:case tal:condition="not: obj/listCreators"
- ><span tal:omit-tag="" i18n:translate="">unknown</span></tal:case>
- on <span tal:replace="obj/CreationDate">Today</span>
- <a href="#"
- tal:condition="python: member.has_permission('Manage portal', here)"
- tal:attributes="href python: url + '/discitem_delete'">[ delete reply ]</a>
+ <td colspan="1" tal:attributes="colspan item/tree_colspan">
+ <a href="" tal:attributes="href item/url"
+ ><img border="0" src="" tal:attributes="src item/icon" /></a>
+ <a href="" tal:attributes="href item/url"
+ tal:content="item/title">Title</a>,
+ by <tal:case tal:condition="item/creators"
+ ><tal:loop tal:repeat="creator item/creators"
+ ><tal:case tal:condition="not: repeat/creator/start"
+ ><tal:case tal:condition="not: repeat/creator/end">, </tal:case
+ ><tal:case tal:condition="repeat/creator/end"
+ > <i18n:span i18n:translate="">and</i18n:span> </tal:case></tal:case
+ ><tal:span tal:content="creator">creator</tal:span></tal:loop></tal:case
+ ><tal:case tal:condition="not: item/creators"
+ ><i18n:span i18n:translate="">unknown</i18n:span></tal:case>
+ on <tal:span tal:content="item/date">Today</tal:span
+ ><tal:case tal:condition="item/delete_url"> [
+ <a href="#" tal:attributes="href item/delete_url"
+ i18n:translate="">delete reply</a> ]</tal:case>
</td>
</tr>
</table>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/talkback_tree.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/viewThreadsAtBottom.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/viewThreadsAtBottom.pt 2006-02-05 19:24:06 UTC (rev 41565)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/viewThreadsAtBottom.pt 2006-02-05 21:27:18 UTC (rev 41566)
@@ -1,6 +1,6 @@
-<div tal:condition="here/talkback|nothing" i18n:domain="cmf_default">
- <div tal:condition="python: here.talkback.hasReplies(here)">
- <h4 i18n:translate="">Comments:</h4>
- <span metal:use-macro="here/talkback_tree/macros/tree"></span>
- </div>
+<div tal:condition="context/talkback|nothing" i18n:domain="cmf_default">
+ <div tal:condition="python: context.talkback.hasReplies(context)">
+ <h4 i18n:translate="">Comments:</h4>
+ <metal:macro metal:use-macro="context/talkback_tree/macros/tree" />
+ </div>
</div>
Property changes on: CMF/trunk/CMFDefault/skins/zpt_generic/viewThreadsAtBottom.pt
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
More information about the CMF-checkins
mailing list