version 1.310.2.3, 2012/01/16 18:57:50
|
version 1.310.2.6, 2012/01/19 19:03:28
|
Line 36 from Globals import Persistent, package_
|
Line 36 from Globals import Persistent, package_
|
from Acquisition import Implicit |
from Acquisition import Implicit |
from Products.ZCatalog.CatalogPathAwareness import CatalogAware |
from Products.ZCatalog.CatalogPathAwareness import CatalogAware |
from Products.ZCTextIndex.ZCTextIndex import manage_addLexicon |
from Products.ZCTextIndex.ZCTextIndex import manage_addLexicon |
|
import ECHO_helpers |
|
from Acquisition import aq_parent |
try: |
try: |
from Products.MetaDataProvider.MetaDataClient import MetaDataClient |
from Products.MetaDataProvider.MetaDataClient import MetaDataClient |
except: |
except: |
Line 693 class ECHO_collection(CatalogAware, Fold
|
Line 695 class ECHO_collection(CatalogAware, Fold
|
meta_type='ECHO_collection' |
meta_type='ECHO_collection' |
default_catalog='resourceCatalog' |
default_catalog='resourceCatalog' |
|
|
|
rootMetaTypes = ['ECHO_root', 'ECHO_main', 'ECHO_nav'] |
|
|
# viewClassificationList=viewClassificationListMaster |
# viewClassificationList=viewClassificationListMaster |
displayTypes=displayTypes |
displayTypes=displayTypes |
|
|
Line 705 class ECHO_collection(CatalogAware, Fold
|
Line 709 class ECHO_collection(CatalogAware, Fold
|
return crumbs[0][2].getId() |
return crumbs[0][2].getId() |
|
|
p = self |
p = self |
|
|
sec = None |
sec = None |
# descend parents to the root (and remember the last id) |
# descend parents to the root (and remember the last id) |
while p is not None and p.meta_type != 'ECHO_root' and p.meta_type!='ECHO_main' and p.meta_type!='ECHO_nav': |
while p is not None and p.meta_type not in self.rootMetaTypes: |
sec = p.getId() |
sec = p.getId() |
p = p.aq_parent |
p = aq_parent(p.context) |
|
|
return sec |
return sec |
|
|
Line 724 class ECHO_collection(CatalogAware, Fold
|
Line 727 class ECHO_collection(CatalogAware, Fold
|
sec = None |
sec = None |
subsec = None |
subsec = None |
# descend parents to the root (and remember the last id) |
# descend parents to the root (and remember the last id) |
while p is not None and p.meta_type != 'ECHO_root' and p.meta_type!='ECHO_main' and p.meta_type!='ECHO_nav': |
while p is not None and p.meta_type not in self.rootMetaTypes: |
subsec = sec |
subsec = sec |
sec = p.getId() |
sec = p.getId() |
p = p.aq_parent |
p = aq_parent(p.context) |
|
|
return subsec |
return subsec |
|
|
|
|
|
def getCrumb(self): |
|
"""returns breadcrumb for this object""" |
|
return ECHO_helpers.getCrumb(self) |
|
|
|
def getHierCrumbs(self): |
|
"""returns a list of hierarchical breadcrumbs from self to the ECHO_root""" |
|
return ECHO_helpers.getHierCrumbs(self) |
|
|
|
|
def exportImportObjects_html(self,RESPONSE): |
def exportImportObjects_html(self,RESPONSE): |
"""ImportObject""" |
"""ImportObject""" |
pt=zptFile(self, 'zpt/exportImportObjects.zpt') |
pt=zptFile(self, 'zpt/exportImportObjects.zpt') |
Line 1532 class ECHO_collection(CatalogAware, Fold
|
Line 1544 class ECHO_collection(CatalogAware, Fold
|
|
|
def area_img(self): |
def area_img(self): |
"""area image""" |
"""area image""" |
bt = BrowserCheck(self) |
bt = browserType(self) |
if bt.isIE or bt.isN4: |
if bt['isIE'] or bt['isN4']: |
return sendFile(self, 'images/red.gif', 'image/gif') |
return sendFile(self, 'images/red.gif', 'image/gif') |
else: |
else: |
return sendFile(self, 'images/reda.png', 'image/png') |
return sendFile(self, 'images/reda.png', 'image/png') |
Line 1907 class ECHO_root(Folder,Persistent,Implic
|
Line 1919 class ECHO_root(Folder,Persistent,Implic
|
def getECHORoot(self): |
def getECHORoot(self): |
return self |
return self |
|
|
|
def getBrowserType(self): |
|
"""returns browserType object""" |
|
return browserType(self) |
|
|
def mod_re_sub(self,pattern,replace,string): |
def mod_re_sub(self,pattern,replace,string): |
"""re.sub aus mod re zur Verfuegung stellen""" |
"""re.sub aus mod re zur Verfuegung stellen""" |