version 1.310.2.8, 2012/08/29 07:53:31
|
version 1.310.2.11, 2013/05/17 06:20:22
|
Line 544 class ECHO_link(ECHO_externalLink):
|
Line 544 class ECHO_link(ECHO_externalLink):
|
{'label':'add links config','action':'ECHO_link_addLinksForm'}, |
{'label':'add links config','action':'ECHO_link_addLinksForm'}, |
) |
) |
|
|
|
def getMDValueSimpleSearchField(self): |
|
"""returns value for simple search""" |
|
return " ".join([self.getTitle(),self.getDescription()]) |
|
|
def ECHO_link_addLinksForm(self): |
def ECHO_link_addLinksForm(self): |
"""Main configuration""" |
"""Main configuration""" |
|
|
Line 920 class ECHO_collection(CatalogAware, Fold
|
Line 924 class ECHO_collection(CatalogAware, Fold
|
return ret+"</rdf:Seq>" |
return ret+"</rdf:Seq>" |
|
|
|
|
|
def getExportAsJSON(self,REQUEST=None): |
|
import json |
|
ret = self.getExport() |
|
|
|
if REQUEST: |
|
REQUEST.response.setHeader("Content-type", "text/json; charset=utf-8") |
|
|
|
return json.dumps(ret) |
|
|
|
def getExport(self,REQUEST=None): |
|
|
|
"""JSON export collection content""" |
|
import json |
|
ret={} |
|
#contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection']) |
|
contents=self.ZopeFind(self,obj_metatypes=['ECHO_resource']) |
|
|
|
ret['description']=self.getDescription(); |
|
ret['title']=self.getTitle(); |
|
ret['label']=self.getLabel(); |
|
ret['content']=[] |
|
ret['echo_path']=self.absolute_url().replace(self.echo_pages.absolute_url(),'') |
|
|
|
|
|
for content in contents: |
|
|
|
ret['content'].append(content[1].getDRI(type="mpiwg")) |
|
|
|
return ret |
|
|
|
|
|
|
|
|
|
|
|
|
def changeLabels(self): |
def changeLabels(self): |
"""change form""" |
"""change form""" |
Line 1407 class ECHO_collection(CatalogAware, Fold
|
Line 1445 class ECHO_collection(CatalogAware, Fold
|
if not hasattr(self,'sortfield'): |
if not hasattr(self,'sortfield'): |
self.sortfield="weight" |
self.sortfield="weight" |
|
|
pt=zptFile(self, 'zpt/ChangeECHO_collection.zpt') |
pt=zptFile(self, 'zpt/ChangeECHO_Collection.zpt') |
return pt() |
return pt() |
|
|
|
|