[CMF-checkins] CVS: CMF/CMFSetup/xml - ticExport.xml:1.1

Tres Seaver tseaver at zope.com
Thu May 27 00:23:52 EDT 2004


Update of /cvs-repository/CMF/CMFSetup/xml
In directory cvs.zope.org:/tmp/cvs-serv26869/xml

Added Files:
	ticExport.xml 
Log Message:


  - Initial pass at export of types tool.  Note that we have a big design
    issue outstanding, which should be resolved before going forward:

    o We can continue as presently, using a single, monolithic file for
      all types.  This is easiest to do, mimicking other handlers, but
      tends to create output files which are harder for humans to maintain
      (diff unfriendly, etc.).

    o We could chunk the XML out into per-type files within a 'typeinfo'
      subdirectory / folder.  It would require a bit more work now, but
      would make for smaller, more cohesive files (changes to one type
      would be localized);  it would also make testing a little simpler.


=== Added File CMF/CMFSetup/xml/ticExport.xml ===
<?xml version="1.0"?>
<types-tool xmlns:tal="http://xml.zope.org/namespaces/tal">
 <type-info
    id="foo"
    kind="Factory-based Type Information"
    title="Foo"
    meta_type="Foo Thing"
    icon="foo.png"
    immediate_view="foo_view"
    filter_content_types="False"
    allowed_content_types=""
    allow_discussion="False"
    global_allow="False"
    tal:repeat="info here/listTypeInfo"
    tal:attributes="id info/id;
                    kind info/kind;
                    title info/title;
                    meta_type info/meta_type;
                    icon info/icon;
                    product info/product | default;
                    factory info/factory | default;
                    permission info/permission | default;
                    constructor_path info/constructor_path | default;
                    immediate_view info/immediate_view;
                    filter_content_types info/filter_content_types;
                    allowed_content_types python:
                        ','.join( info[ 'allowed_content_types' ] );
                    allow_discussion info/allow_discussion;
                    global_allow info/global_allow;
                   "
    >
   <description tal:content="info/description">Foo things</description>
   <aliases>
    <alias from="(Default)" to="foo_view"
           tal:repeat="item info/aliases/items"
           tal:attributes="from python: item[ 0 ]; to python: item[ 1 ];"
    />
   </aliases>
   <action
      action_id="view"
      title="View"
      condition=""
      action_expr="string:${object_url}/foo_view"
      permissions="View"
      category="object"
      visible="True"
      tal:repeat="action info/actions"
      tal:attributes="action_id action/id;
                      title action/title;
                      condition action/condition;
                      action_expr action/action;
                      permissions python:
                        ','.join( action[ 'permissions' ] );
                      category action/category;
                      visible action/visible;
                     "
      />
 </type-info>
</types-tool>




More information about the CMF-checkins mailing list