Logo Search packages:      
Sourcecode: zope-extfile version File versions

def zope-extfile-1.4.2::ExtFile::ExtFile::getIconPath (   self  ) 

Depending on the MIME Type of the file/image an icon
    can be displayed. This function determines which
    image in the lib/python/Products/ExtFile/icons/...
    directory shold be used as icon for this file/image

Definition at line 340 of file ExtFile.py.

00340                          :
        """ Depending on the MIME Type of the file/image an icon
            can be displayed. This function determines which
            image in the lib/python/Products/ExtFile/icons/...
            directory shold be used as icon for this file/image
        """
        cat, sub = string.split(self.content_type, '/')
        if hasattr(self,'has_preview') and self.has_preview: cat = 'image'
        if self._types.has_key(cat):
            file = self._types[cat]['default']
            for item in self._types[cat].keys():
                if string.find(sub,item)>=0:
                    file = self._types[cat][item]
                    break
            return join('icons',cat,file)
        else:
            return join('icons',self._types['default'])
    
    security.declareProtected(ViewPermission, 'static_url')
    def static_url(self, icon=0, preview=0):


Generated by  Doxygen 1.6.0   Back to index