[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/ Add support for handling permalinks if installed.
Charlie Clark
charlie at begeistert.org
Tue Sep 28 13:29:05 EDT 2010
Log message for revision 117021:
Add support for handling permalinks if installed.
Changed:
U Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py
U Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_form.py
U Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_template.pt
-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py 2010-09-28 17:24:21 UTC (rev 117020)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py 2010-09-28 17:29:05 UTC (rev 117021)
@@ -12,6 +12,7 @@
utool = getToolByName(script, 'portal_url')
wtool = getToolByName(script, 'portal_workflow')
portal_object = utool.getPortalObject()
+uidtool = getToolByName(script, 'portal_uidhandler', None)
if not 'charset' in (context.REQUEST.RESPONSE.getHeader('content-type') or ''):
# Some newstyle views set a different charset - don't override it.
@@ -31,6 +32,7 @@
'atool': atool,
'wtool': wtool,
'caltool_installed': caltool is not None,
+ 'uidtool_installed': uidtool is not None,
'portal_object': portal_object,
'portal_title': portal_object.Title(),
'object_title': context.Title(),
Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_form.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_form.py 2010-09-28 17:24:21 UTC (rev 117020)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_form.py 2010-09-28 17:29:05 UTC (rev 117021)
@@ -33,6 +33,7 @@
'email_charset': ptool.getProperty('email_charset'),
'enable_actionicons':
ptool.getProperty('enable_actionicons'),
+ 'enable-permalink':ptool.getProperty('enable_permalink'),
'listButtonInfos': tuple(buttons) }
return context.reconfig_template(**decode(options, script))
Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_template.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_template.pt 2010-09-28 17:24:21 UTC (rev 117020)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/reconfig_template.pt 2010-09-28 17:29:05 UTC (rev 117021)
@@ -118,6 +118,18 @@
</td>
</tr>
<tr>
+ <th i18n:translate="">Permalinks</th>
+ <td>
+ <input type="checkbox" name="enable_actionicons:boolean" value="True"
+ tal:attributes="checked form/enable_actionicons" />
+ <tal:span i18n:translate="">Show permalinks</tal:span>
+ <dl class="FieldHelp">
+ <dd i18n:translate="">If permalinks are enabled then a unique identifier is assigned to every item of content independent of it's id or position in a site. This requires the CMFUid tool to be installed.</dd>
+ </dl>
+ <span class="errors" tal:condition="not: globals/uidtool_installed">CMFUid is not installed</span>
+ </td>
+ </tr>
+ <tr>
<td> </td>
<td>
<metal:macro metal:use-macro="context/form_widgets/macros/buttons" />
More information about the checkins
mailing list