[Checkins] SVN: Products.CMFTopic/trunk/Products/CMFTopic/ - added browser views
Yvo Schubbe
cvs-admin at zope.org
Mon Jul 23 09:10:01 UTC 2012
Log message for revision 127371:
- added browser views
Changed:
U Products.CMFTopic/trunk/Products/CMFTopic/CHANGES.txt
A Products.CMFTopic/trunk/Products/CMFTopic/browser/
A Products.CMFTopic/trunk/Products/CMFTopic/browser/TODO.txt
A Products.CMFTopic/trunk/Products/CMFTopic/browser/__init__.py
A Products.CMFTopic/trunk/Products/CMFTopic/browser/configure.zcml
A Products.CMFTopic/trunk/Products/CMFTopic/browser/tests.py
A Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.pt
A Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.py
A Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.txt
A Products.CMFTopic/trunk/Products/CMFTopic/browser/topic_criteria.pt
U Products.CMFTopic/trunk/Products/CMFTopic/configure.zcml
U Products.CMFTopic/trunk/Products/CMFTopic/interfaces/__init__.py
D Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/skins.xml
U Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/types/Topic.xml
A Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/
A Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/skins.xml
A Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/types/
U Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/types/Topic.xml
U Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_criteria_form.pt
-=-
Modified: Products.CMFTopic/trunk/Products/CMFTopic/CHANGES.txt
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/CHANGES.txt 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/CHANGES.txt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -4,7 +4,10 @@
2.3.0 (unreleased)
------------------
+- Browser views are now used by default. An additional setup profile allows you
+ to hook up the oldstyle skins and to make customizations TTW.
+
2.3.0-beta (2012-03-21)
-----------------------
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/TODO.txt
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/TODO.txt (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/TODO.txt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,37 @@
+Converting skins to views:
+
+ [x] ITopic @@view.html:
+ [x] topic_view.py
+ [x] topic_view_template.pt
+
+ [x] IMutableMinimalDublinCore @@properties.html (without acquireCriteria):
+ [x] topic_edit_control.py -> use @@properties.html from CMFDefault
+ [x] topic_edit_form.py -> use @@properties.html from CMFDefault
+ [x] topic_edit_template.pt -> use @@properties.html from CMFDefault
+
+ [x] IMutableTopic @@criteria.html (with acquireCriteria):
+ [x] topic_addCriterion.py -> CriteriaView (ADD)
+ [x] topic_deleteCriteria.py -> CriteriaView (DELETE)
+ [x] topic_editCriteria.py -> CriteriaView (EDIT)
+ [x] topic_criteria_form.pt -> topic_criteria.pt
+ [x] acquireCriteria: topic_edit_control.py -> CriteriaView (EDIT)
+ [x] acquireCriteria: topic_edit_form.py -> CriteriaView (EDIT)
+ [x] acquireCriteria: topic_edit_template.pt -> topic_criteria.pt
+
+ [x] FriendlyDateCriterion @@edit:
+ [x] friendlydatec_editform.pt -> friendlydatec_editform.pt
+
+ [x] ListCriterion @@edit:
+ [x] listc_edit.pt -> listc_edit.pt
+
+ [x] SimpleIntCriterion @@edit:
+ [x] sic_edit.pt -> sic_edit.pt
+
+ [x] SimpleStringCriterion @@edit:
+ [x] ssc_edit.pt -> ssc_edit.pt
+
+ [x] SortCriterion @@edit:
+ [x] sort_edit.pt -> sort_edit.pt
+
+ [x] ++resource++topic_icon.gif:
+ [x] topic_icon.gif
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/TODO.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/__init__.py
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/__init__.py (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/__init__.py 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,14 @@
+##############################################################################
+#
+# Copyright (c) 2012 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""CMFTopic browser views.
+"""
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/__init__.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/configure.zcml
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/configure.zcml (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/configure.zcml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,68 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser">
+
+ <browser:page
+ for="Products.CMFTopic.interfaces.ITopic"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="view.html"
+ class=".topic.TopicView"
+ template="topic.pt"
+ permission="zope2.View"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.interfaces.IMutableTopic"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="criteria.html"
+ class=".topic.TopicCriteriaView"
+ template="topic_criteria.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.DateCriteria.FriendlyDateCriterion"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="edit"
+ template="../skins/zpt_topic/friendlydatec_editform.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.ListCriterion.ListCriterion"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="edit"
+ template="../skins/zpt_topic/listc_edit.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.SimpleIntCriterion.SimpleIntCriterion"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="edit"
+ template="../skins/zpt_topic/sic_edit.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.SortCriterion.SortCriterion"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="edit"
+ template="../skins/zpt_topic/sort_edit.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:page
+ for="Products.CMFTopic.SimpleStringCriterion.SimpleStringCriterion"
+ layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
+ name="edit"
+ template="../skins/zpt_topic/ssc_edit.pt"
+ permission="cmf.ChangePortalTopics"
+ />
+
+ <browser:resource
+ name="topic_icon.gif"
+ image="../skins/zpt_topic/topic_icon.gif"
+ />
+
+</configure>
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/configure.zcml
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/tests.py
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/tests.py (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/tests.py 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2012 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Unit tests for browser module.
+"""
+
+import unittest
+from Testing import ZopeTestCase
+
+from Products.CMFTopic.testing import FunctionalLayer
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ s = ZopeTestCase.FunctionalDocFileSuite('topic.txt')
+ s.layer = FunctionalLayer
+ suite.addTest(s)
+ return suite
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/tests.py
___________________________________________________________________
Added: svn:eol-style
+ native
Copied: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.pt (from rev 127357, Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_view_template.pt)
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.pt (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.pt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,43 @@
+<html metal:use-macro="context/@@standard_macros/page">
+<head>
+
+<metal:slot fill-slot="style_slot">
+<tal:span tal:replace="structure context/getBaseTag" />
+</metal:slot>
+
+</head>
+<body>
+
+<metal:slot metal:fill-slot="body" i18n:domain="cmf_default"
+><h1 id="DesktopTitle" tal:content="view/title">TOPIC TITLE</h1>
+
+<p id="DesktopDescription" tal:condition="view/description|nothing"
+ tal:content="view/description">DESCRIPTION OF THE TOPIC.</p>
+
+<tal:case tal:condition="view/listSubtopicInfos"
+><h4 i18n:translate="">Subtopics:</h4>
+ <div tal:repeat="item_info view/listSubtopicInfos">
+ <a href="" tal:attributes="href item_info/url"
+ tal:content="item_info/title">Topic Title</a>
+ </div
+></tal:case>
+
+<h4 i18n:translate="">Topic Matches:</h4>
+<div tal:repeat="item_info view/listBatchItems">
+ <a href="" tal:attributes="href item_info/url"
+ ><tal:span tal:content="item_info/id">ID</tal:span>
+ <tal:case tal:condition="item_info/title"
+ tal:content="item_info/title">(Title)</tal:case></a>
+</div>
+
+<metal:macro metal:use-macro="context/@@batch_widget/navigation" />
+
+<h4 i18n:translate="">Query Parameters:</h4>
+
+<ul tal:condition="view/listQueries">
+ <li tal:repeat="item view/listQueries" tal:content="item">item</li>
+</ul>
+</metal:slot>
+
+</body>
+</html>
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.py
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.py (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.py 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,96 @@
+##############################################################################
+#
+# Copyright (c) 2012 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Topic views.
+"""
+
+from Products.CMFDefault.browser.utils import decode
+from Products.CMFDefault.browser.utils import memoize
+from Products.CMFDefault.browser.utils import ViewBase
+from Products.CMFDefault.browser.widgets.batch import BatchViewBase
+
+
+class TopicView(BatchViewBase):
+
+ def _get_items(self):
+ return self.context.queryCatalog()
+
+ @decode
+ def listQueries(self):
+ queries = self.context.buildQuery()
+ return tuple([ '%s: %s' % q for q in queries.items() ])
+
+ @decode
+ def listSubtopicInfos(self):
+ subtopics = [ {'title': item.Title() or item.getId(),
+ 'url': item.absolute_url()}
+ for item in self.context.contentValues() ]
+ return subtopics
+
+ @memoize
+ @decode
+ def listBatchItems(self):
+ batch_obj = self._getBatchObj()
+
+ items = []
+ for item in batch_obj:
+ items.append({'creators': item.listCreators,
+ 'date': item.Date,
+ 'description': item.Description,
+ 'id': item.getId,
+ 'title': item.Title and ('(%s)' % item.Title) or '',
+ 'url': '%s/view' % item.getURL()})
+ return tuple(items)
+
+
+# XXX: quick-and-dirty port from oldstyle skin
+class TopicCriteriaView(ViewBase):
+
+ def __call__(self, ADD=None, DELETE=None, EDIT=None, acquireCriteria=None,
+ criteria=(), field=None, criterion_type=None,
+ criterion_ids=()):
+ if ADD:
+ self.context.addCriterion(field=field,
+ criterion_type=criterion_type)
+ self.request.response.redirect(self._getViewURL())
+ return ''
+
+ elif DELETE and criterion_ids:
+ for cid in criterion_ids:
+ self.context.deleteCriterion(cid)
+ status = 'Criteria+deleted.'
+ self.request.response.redirect(
+ '%s?portal_status_message=%s' % (self._getViewURL(), status))
+ return ''
+
+ elif EDIT:
+ if acquireCriteria != self.context.acquireCriteria:
+ self.context.acquireCriteria = bool(acquireCriteria)
+ for rec in criteria:
+ crit = self.context.getCriterion(rec.id)
+ command = {}
+ for attr in crit.editableAttributes():
+ tmp = getattr(rec, attr, None)
+ # Due to having multiple radio buttons on the same page
+ # with the same name but belonging to different records,
+ # they needed to be associated with different records with
+ # ids
+ if tmp is None:
+ tmp = getattr(rec, '%s__%s' % (attr, rec.id), None)
+ command[attr] = tmp
+ crit.apply(command)
+ status = 'Changes+saved.'
+ self.request.response.redirect(
+ '%s?portal_status_message=%s' % (self._getViewURL(), status))
+ return ''
+
+ return self.index()
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.txt
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.txt (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.txt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,36 @@
+Favorite Views
+--------------
+
+Set up user.
+
+ >>> uf = app.site.acl_users
+ >>> _ignored = uf._doAddUser('mgr', 'mgrpw', ['Manager'], [])
+
+Create the browser object we'll be using.
+
+ >>> from Testing.testbrowser import Browser
+ >>> browser = Browser()
+ >>> browser.handleErrors = False
+ >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+
+Add a Topic.
+
+ >>> browser.open('http://localhost/site/++add++Topic')
+ >>> '[[cmf_default][Add [[cmf_default][Topic]]]]' in browser.contents
+ True
+ >>> browser.getControl(name='form.id').value = 'myTopic'
+ >>> browser.getControl('[[zope][Add]]').click()
+ >>> '[[cmf_default][[[cmf_default][Topic]] added.]]' in browser.contents
+ True
+
+Use the criteria form.
+
+ >>> browser.open('http://localhost/site/myTopic/@@criteria.html')
+ >>> 'Topic Criteria: myTopic' in browser.contents
+ True
+
+Use the view.
+
+ >>> browser.open('http://localhost/site/myTopic/@@view.html')
+ >>> '[[cmf_default][Topic Matches:]]' in browser.contents
+ True
Property changes on: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Copied: Products.CMFTopic/trunk/Products/CMFTopic/browser/topic_criteria.pt (from rev 127357, Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_criteria_form.pt)
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/browser/topic_criteria.pt (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/browser/topic_criteria.pt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,49 @@
+<html metal:use-macro="context/@@standard_macros/page">
+<body>
+
+<metal:slot metal:fill-slot="body">
+<h2>Topic Criteria: <span tal:replace="context/getId" /></h2>
+
+<form action="" method="post" tal:attributes="action request/ACTUAL_URL">
+<div>
+ <label for="acquireCriteria" i18n:translate="">Acquire Criteria from Parent</label>:
+ <input id="acquireCriteria" name="acquireCriteria:boolean" type="checkbox"
+ tal:attributes="checked context/acquireCriteria" />
+</div>
+<div tal:repeat="criterion context/listCriteria">
+ <div tal:replace="structure criterion/@@edit" />
+</div>
+<div>
+ <input name="EDIT" type="submit" value="Save changes" />
+ <input name="DELETE" type="submit" value="Delete selected" />
+</div>
+</form>
+
+<form action="" method="post" tal:attributes="action request/ACTUAL_URL">
+<h2> Add New Topic Criteria: </h2>
+<table class="FormLayout">
+<tr valign="top">
+ <th align="right"> Field id: </th>
+ <td>
+ <select name="field" tal:define="fields context/listAvailableFields">
+ <option value="" tal:repeat="field fields" tal:attributes="value field" tal:content="field">Field</option>
+ </select>
+ </td>
+</tr>
+<tr valign="top">
+ <th align="left"> Criteria type: </th>
+ <td>
+ <select name="criterion_type" tal:define="types context/listCriteriaTypes">
+ <option value="" tal:repeat="type types" tal:attributes="value type/name" tal:content="type/name">Type</option>
+ </select>
+ </td>
+</tr>
+</table>
+<div>
+ <input name="ADD" type="submit" value="Add" />
+</div>
+</form>
+</metal:slot>
+
+</body>
+</html>
Modified: Products.CMFTopic/trunk/Products/CMFTopic/configure.zcml
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/configure.zcml 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/configure.zcml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -10,6 +10,11 @@
title="Add portal topics"
/>
+ <permission
+ id="cmf.ChangePortalTopics"
+ title="Change portal topics"
+ />
+
<!-- Topic -->
<five:registerClass
@@ -23,6 +28,11 @@
name="cmf.topic"
/>
+ <!-- Load CMFDefault.skin first, we use the layer named "cmf" it defines -->
+ <include package="Products.CMFDefault.skin"/>
+
+ <include package=".browser"/>
+
<!-- directories -->
<cmf:registerDirectory name="zpt_topic"/>
@@ -37,6 +47,14 @@
for="Products.CMFCore.interfaces.ISiteRoot"
/>
+ <genericsetup:registerProfile
+ name="skins_support"
+ title="CMFTopic Oldstyle Skins"
+ description="Hooks up the oldstyle skins."
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ for="Products.CMFCore.interfaces.ISiteRoot"
+ />
+
<!-- exportimport -->
<adapter
Modified: Products.CMFTopic/trunk/Products/CMFTopic/interfaces/__init__.py
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/interfaces/__init__.py 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/interfaces/__init__.py 2012-07-23 09:09:57 UTC (rev 127371)
@@ -14,6 +14,7 @@
"""
from zope.interface import Interface
+from zope.schema import Bool
class ITopic(Interface):
@@ -24,6 +25,8 @@
the query.
"""
+ acquireCriteria = Bool(title=u'Acquire Criteria from Parent')
+
def queryCatalog(REQUEST=None, **kw):
""" Invoke the catalog using our criteria.
Deleted: Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/skins.xml
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/skins.xml 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/skins.xml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<object name="portal_skins" meta_type="CMF Skins Tool">
- <object name="zpt_topic" meta_type="Filesystem Directory View"
- directory="Products.CMFTopic:skins/zpt_topic"/>
- <skin-path name="*">
- <layer name="zpt_topic" insert-before="zpt_content"/>
- </skin-path>
-</object>
Modified: Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/types/Topic.xml
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/types/Topic.xml 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/types/Topic.xml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -4,22 +4,22 @@
<property name="title" i18n:translate="">Topic</property>
<property name="description"
i18n:translate="">Topics are canned queries for organizing content with up to date queries into the catalog.</property>
- <property name="icon_expr">string:${portal_url}/topic_icon.gif</property>
+ <property name="icon_expr">string:${portal_url}/++resource++topic_icon.gif</property>
<property name="content_meta_type">Portal Topic</property>
<property name="product"></property>
<property name="factory">cmf.topic</property>
<property name="add_view_expr">string:${folder_url}/++add++Topic</property>
<property name="link_target"></property>
- <property name="immediate_view">topic_edit_form</property>
+ <property name="immediate_view">properties.html</property>
<property name="global_allow">True</property>
<property name="filter_content_types">True</property>
<property name="allowed_content_types">
<element value="Topic"/>
</property>
<property name="allow_discussion">False</property>
- <alias from="(Default)" to="topic_view"/>
- <alias from="index.html" to="topic_view"/>
- <alias from="view" to="topic_view"/>
+ <alias from="(Default)" to="view.html"/>
+ <alias from="index.html" to="view.html"/>
+ <alias from="view" to="view.html"/>
<action title="View" action_id="view" category="object" condition_expr=""
icon_expr="string:${portal_url}/preview_icon.png" link_target=""
url_expr="string:${object_url}" visible="True">
@@ -27,18 +27,18 @@
</action>
<action title="Edit" action_id="edit" category="object" condition_expr=""
icon_expr="string:${portal_url}/edit_icon.png" link_target=""
- url_expr="string:${object_url}/topic_edit_form" visible="True">
+ url_expr="string:${object_url}/properties.html" visible="True">
<permission value="Change portal topics"/>
</action>
<action title="Criteria" action_id="criteria" category="object"
condition_expr="" icon_expr="string:${portal_url}/criteria_icon.png"
- link_target="" url_expr="string:${object_url}/topic_criteria_form"
+ link_target="" url_expr="string:${object_url}/criteria.html"
visible="True">
<permission value="Change portal topics"/>
</action>
<action title="Subtopics" action_id="folderContents" category="object"
condition_expr="" icon_expr="string:${portal_url}/folder_icon.png"
- link_target="" url_expr="string:${object_url}/folder_contents"
+ link_target="" url_expr="string:${object_url}/edit.html"
visible="True">
<permission value="List folder contents"/>
</action>
Copied: Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/skins.xml (from rev 127357, Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/skins.xml)
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/skins.xml (rev 0)
+++ Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/skins.xml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<object name="portal_skins" meta_type="CMF Skins Tool">
+ <object name="zpt_topic" meta_type="Filesystem Directory View"
+ directory="Products.CMFTopic:skins/zpt_topic"/>
+ <skin-path name="*">
+ <layer name="zpt_topic" insert-before="zpt_content"/>
+ </skin-path>
+</object>
Modified: Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/types/Topic.xml
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/profiles/default/types/Topic.xml 2012-07-20 14:22:14 UTC (rev 127357)
+++ Products.CMFTopic/trunk/Products/CMFTopic/profiles/skins_support/types/Topic.xml 2012-07-23 09:09:57 UTC (rev 127371)
@@ -1,55 +1,10 @@
<?xml version="1.0"?>
-<object name="Topic" meta_type="Factory-based Type Information"
- i18n:domain="cmf_default" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
- <property name="title" i18n:translate="">Topic</property>
- <property name="description"
- i18n:translate="">Topics are canned queries for organizing content with up to date queries into the catalog.</property>
- <property name="icon_expr">string:${portal_url}/topic_icon.gif</property>
- <property name="content_meta_type">Portal Topic</property>
- <property name="product"></property>
- <property name="factory">cmf.topic</property>
- <property name="add_view_expr">string:${folder_url}/++add++Topic</property>
- <property name="link_target"></property>
- <property name="immediate_view">topic_edit_form</property>
- <property name="global_allow">True</property>
- <property name="filter_content_types">True</property>
- <property name="allowed_content_types">
- <element value="Topic"/>
- </property>
- <property name="allow_discussion">False</property>
+<object name="Topic">
<alias from="(Default)" to="topic_view"/>
+ <alias from="criteria.html" to="topic_criteria_form"/>
+ <alias from="edit.html" to="folder_contents"/>
<alias from="index.html" to="topic_view"/>
+ <alias from="properties.html" to="topic_edit_form"/>
+ <alias from="view.html" to="topic_view"/>
<alias from="view" to="topic_view"/>
- <action title="View" action_id="view" category="object" condition_expr=""
- icon_expr="string:${portal_url}/preview_icon.png" link_target=""
- url_expr="string:${object_url}" visible="True">
- <permission value="View"/>
- </action>
- <action title="Edit" action_id="edit" category="object" condition_expr=""
- icon_expr="string:${portal_url}/edit_icon.png" link_target=""
- url_expr="string:${object_url}/topic_edit_form" visible="True">
- <permission value="Change portal topics"/>
- </action>
- <action title="Criteria" action_id="criteria" category="object"
- condition_expr="" icon_expr="string:${portal_url}/criteria_icon.png"
- link_target="" url_expr="string:${object_url}/topic_criteria_form"
- visible="True">
- <permission value="Change portal topics"/>
- </action>
- <action title="Subtopics" action_id="folderContents" category="object"
- condition_expr="" icon_expr="string:${portal_url}/folder_icon.png"
- link_target="" url_expr="string:${object_url}/folder_contents"
- visible="True">
- <permission value="List folder contents"/>
- </action>
- <action title="New..." action_id="new" category="object" condition_expr=""
- icon_expr="" link_target=""
- url_expr="string:${object_url}/folder_factories" visible="False">
- <permission value="Add portal topics"/>
- </action>
- <action title="Rename items" action_id="rename_items" category="object"
- condition_expr="" icon_expr="" link_target=""
- url_expr="string:${object_url}/folder_rename_form" visible="False">
- <permission value="Add portal topics"/>
- </action>
</object>
Modified: Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_criteria_form.pt
===================================================================
--- Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_criteria_form.pt 2012-07-23 07:45:08 UTC (rev 127370)
+++ Products.CMFTopic/trunk/Products/CMFTopic/skins/zpt_topic/topic_criteria_form.pt 2012-07-23 09:09:57 UTC (rev 127371)
@@ -5,12 +5,12 @@
<h2>Topic Criteria: <span tal:replace="context/getId" /></h2>
<form action="" method="post" tal:attributes="action context/absolute_url">
-<span tal:define="criteria context/listCriteria">
- <span tal:repeat="criterion criteria">
- <span tal:define="editform string:criterion/${criterion/getEditForm}"
+<div tal:define="criteria context/listCriteria">
+ <div tal:repeat="criterion criteria">
+ <div tal:define="editform string:criterion/${criterion/getEditForm}"
tal:replace="structure python:path(editform)" />
- </span>
-</span>
+ </div>
+</div>
<input type="submit" name="topic_editCriteria:action"
value=" Save changes " />
<input type="submit" name="topic_deleteCriteria:action"
More information about the checkins
mailing list