[CMF-checkins] CVS: CMF/CMFDefault/skins/zpt_generic - folder_factories.pt:1.7 folder_filter_form.pt:1.4 index_html.pt:1.5 news_box.pt:1.3 recent_news.pt:1.5 search_form.pt:1.5
Florent Guillaume
fg@nuxeo.com
Fri, 5 Jul 2002 15:45:06 -0400
Update of /cvs-repository/CMF/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv2727/CMFDefault/skins/zpt_generic
Modified Files:
folder_factories.pt folder_filter_form.pt index_html.pt
news_box.pt recent_news.pt search_form.pt
Log Message:
Fixed the Types Tool so that TypeInformation's Title is decorrelated
from its Id (the old TypeInformation.Type() should not be used anymore).
The Id is what gets put in the "portal_type" attribute of a content
object, which one gets at using somecontent.getPortalTypeName(). The
Title is returned by somecontent.Type().
"portal_type" is now indexed, and in most cases should be used when
doing catalog queries instead of "Type". Note that when upgrading from
older versions this index will have to be added by hand (see
INSTALL.txt).
Fixed PortalFolder's filtering so that it correctly restricts itself to
the portal types allowed by the TypesTool (Tracker #483).
=== CMF/CMFDefault/skins/zpt_generic/folder_factories.pt 1.6 => 1.7 ===
<td align="left" colspan="2" class="ListName"><label for=""
tal:attributes="for string:cb_${repeat/item/number}"
- tal:content="item/Type"></label>
+ tal:content="item/Title"></label>
</td>
</tr>
<tr valign="top">
=== CMF/CMFDefault/skins/zpt_generic/folder_filter_form.pt 1.3 => 1.4 ===
tal:define="filter python:here.decodeFolderFilter(
request.get('folderfilter', '') );
- Type python:filter.get( 'Type', [] );
+ portal_type python:filter.get( 'portal_type', [] );
Subject python:filter.get( 'Subject', () );
">
<tr>
@@ -43,15 +43,15 @@
<tr>
<td align="left" valign="top" width="*">Content Type:</td>
<td align="left" valign="top">
- <select name="filter_by_Type:list" multiple size="3"
- tal:define="types python:here.portal_types.listContentTypes()">
+ <select name="filter_by_portal_type:list" multiple size="3"
+ tal:define="typeinfos here/portal_types/listTypeInfo">
container=here )">
<option value="type"
- tal:repeat="type types"
- tal:attributes="value type;
- selected python:type in Type;
+ tal:repeat="typeinfo typeinfos"
+ tal:attributes="value typeinfo/getId;
+ selected python:typeinfo.getId() in portal_type;
"
- tal:content="type"
+ tal:content="typeinfo/Title"
> type </option>
<option tal:condition="nothing">Foo</option>
</select>
=== CMF/CMFDefault/skins/zpt_generic/index_html.pt 1.4 => 1.5 ===
<div tal:define="raw_items python: here.contentValues(
- filter={'Type':( 'Document'
+ filter={'portal_type':( 'Document'
, 'Image'
, 'File'
, 'News Item'
@@ -67,7 +67,7 @@
<div tal:define="raw_items python: here.contentValues(
- filter={'Type':( 'Link'
+ filter={'portal_type':( 'Link'
, 'Favorite'
, 'Topic'
) } );
@@ -97,7 +97,7 @@
<div tal:define="raw_items python: here.contentValues(
- filter={ 'Type': 'Folder' } );
+ filter={ 'portal_type': 'Folder' } );
items python: auth_filter( raw_items, skip='' );
">
<div tal:condition="items">
=== CMF/CMFDefault/skins/zpt_generic/news_box.pt 1.2 => 1.3 ===
- <tbody tal:define="news python: here.portal_catalog(meta_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
+ <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>
=== CMF/CMFDefault/skins/zpt_generic/recent_news.pt 1.4 => 1.5 ===
<div metal:fill-slot="main">
<div tal:define="b_start string:0;b_start request/b_start | b_start;
- newsitems python: here.portal_catalog.searchResults(meta_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
+ newsitems python: here.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)">
=== CMF/CMFDefault/skins/zpt_generic/search_form.pt 1.4 => 1.5 ===
<th> Item type
</th>
- <td tal:define="items python: here.portal_types.listContentTypes()" >
- <select name="Type:list" multiple size="5">
+ <td tal:define="typeinfos here/portal_types/listTypeInfo" >
+ <select name="portal_type:list" multiple size="5">
<option value="" selected>-- any --</option>
<option value=""
- tal:repeat="item items"
- tal:attributes="value item"
- tal:content="item"></option>
+ tal:repeat="typeinfo typeinfos"
+ tal:attributes="value typeinfo/getId"
+ tal:content="typeinfo/Title"></option>
</select>
<dl class="FieldHelp">
<dd> You may limit your results to particular kinds of