Changeset 439

Show
Ignore:
Timestamp:
08/03/06 08:39:23
Author:
crchemist
Message:

Adde view action.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPingTool/trunk/Extensions/Install.py

    r438 r439  
    4545    safeEditProperty(np,'metaTypesNotToList', meta_types, 'lines') 
    4646 
     47    sp = getattr(pp,'site_properties') 
     48    sp.typesUseViewActionInListings += ('PingInfo',) 
    4749 
    48      
    4950    print >> out, "\nSuccessfully installed %s." % PROJECTNAME 
    5051    return out.getvalue() 
  • qPingTool/trunk/PingTool.py

    r438 r439  
    99from Products.CMFCore.CMFCorePermissions import ManageProperties 
    1010from Acquisition import aq_base 
    11  
     11from Products.CMFCore.utils import _getViewFor 
     12from Products.PageTemplates.PageTemplateFile import PageTemplateFile 
    1213from Products.XMLRPCMethod.XMLRPCMethod import RPCThread, XMLRPCMethod 
    1314from Products.CMFCore.utils import getToolByName 
     
    1516 
    1617_marker = [] 
     18 
    1719def modify_fti(fti): 
    1820    fti['title'] = 'Portal Ping Tool' 
     
    2022    fti['filter_content_types'] = 1 
    2123    fti['icon'] = 'tool.gif' 
     24    fti['immediate_view'] = 'view' 
     25    fti['default_view'] = 'view' 
     26 
    2227    actions = ( 
    2328              { 'id': 'view', 
     
    2732                'category':'object', 
    2833              }, ) 
    29     fti['actions']=tuple(actions) 
     34    aliases ={'(Default)':'folder_listing','view': 'folder_contents'} 
     35                
     36    fti['aliases'] = aliases 
     37    fti['actions'] = tuple(actions) 
    3038 
    31  
    32 class PingTool(BaseFolder, PloneFolder, ActionProviderBase): #, BaseFolder): 
     39class PingTool(BaseFolder, PloneFolder, ActionProviderBase): 
    3340    """This tool serve for operation with ActionInfo objects 
    3441    """ 
     
    3643    schema = BaseSchema 
    3744    filter_content_types = 1 
    38     allowed_content_types = ['PingInfo'] 
     45    allowed_content_types = ('PingInfo',) 
    3946    global_allowed = 0 
    4047 
    4148    meta_type = archetype_name = portal_type = 'PingTool' 
    42  
    4349 
    4450    __implements__ = (IOrderedContainer,) 
     
    5359                  , category='folder' 
    5460                  , visible=1 
    55                   ) 
    56                , 
     61                  ), 
    5762               ) 
    58  
    5963 
    6064    def pingFeedReader(self,context): 
     
    6973            #return "failure", "Please setup 'canonical_url' property for your Plone site" 
    7074            url = context.portal_url.getRelativeContentURL(blog) 
    71             url = canonical_url + url           
     75            url = canonical_url + url 
    7276        else: 
    7377            url = blog.absolute_url()   
  • qPingTool/trunk/__init__.py

    r438 r439  
    44from Products.CMFCore.DirectoryView import registerDirectory 
    55import os, os.path 
    6 import PingInfo, PingTool  
     6import PingInfo, PingTool 
    77from config import * 
    88 
     
    1515 
    1616def initialize(context): 
    17  
    1817    utils.ToolInit("PingTool", tools=tools, product_name=PROJECTNAME, icon=TOOL_ICON, 
    1918                  ).initialize(context) 
    20      
     19 
    2120    content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) 
    2221