version 1.53, 2005/12/05 14:17:59
|
version 1.60, 2007/06/29 08:21:16
|
Line 357 class VLP_subcollection(ECHO_collection)
|
Line 357 class VLP_subcollection(ECHO_collection)
|
|
|
#content of journals also displayed if not online |
#content of journals also displayed if not online |
|
|
if (type == "(Journal)"): |
if (type == "(JournalVolume)"): |
online ="" |
online ="" |
else: |
else: |
online ="AND online = 1" |
online ="AND online = 1" |
sort=self.collectionSort(type) |
sort=self.collectionSort(type) |
|
|
item = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature |
item = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature |
WHERE volumeid = '%s' """%self.getId() |
WHERE volumeid ~ '%s\\\\M' """%self.getId() |
+ """ %s AND not referenceType='%s' """%(online,type) |
+ """ %s AND not referenceType='%s' """%(online,type) |
+ """ORDER BY """ + sort)] |
+ """ORDER BY """ + sort)] |
|
|
tocItem = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature |
tocItem = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature |
WHERE volumeid = '%s' """%self.getId() |
WHERE reference = '%s' """%self.getId() |
+ """AND online = 1 AND referenceType='%s' """%type |
+ """AND online = 1 AND referenceType='%s' """%type |
+ """ORDER BY """ + sort)] |
+ """ORDER BY """ + sort)] |
|
|
Line 426 class VLP_collection(ECHO_collection):
|
Line 426 class VLP_collection(ECHO_collection):
|
|
|
def generateSubCollections(self,errorsTXT=""): |
def generateSubCollections(self,errorsTXT=""): |
"""erzeuge subcollectionen""" |
"""erzeuge subcollectionen""" |
founds=self.ZSQLSimpleSearch("select * from vl_literature where referencetype in ('(Book)','(Collection)','(Journal)')") |
founds=self.ZSQLSimpleSearch("select * from vl_literature where referencetype in ('(Edited Book)','(Book)','(Collection)','(JournalVolume)','(Generic Container)')") |
|
|
self.REQUEST.RESPONSE.write("<h2>Create Subcollections</h2>\n") |
self.REQUEST.RESPONSE.write("<h2>Create Subcollections</h2>\n") |
for found in founds: |
for found in founds: |
|
|
try: |
try: |
foundCol=self.ZopeFind(self,obj_ids=[found.reference]) |
foundCol=self.ZopeFind(self,obj_ids=[found.reference]) |
if foundCol: |
if foundCol: |
Line 475 class VLP_collection(ECHO_collection):
|
Line 476 class VLP_collection(ECHO_collection):
|
files=os.listdir(self.vlp_basis) |
files=os.listdir(self.vlp_basis) |
|
|
errorsTXT+="<h3>New Ressources</h3>" |
errorsTXT+="<h3>New Ressources</h3>" |
|
|
for fileName in files: |
for fileName in files: |
|
|
if fileName[0:3]=="lit": |
if fileName[0:3]=="lit": |
Line 503 class VLP_collection(ECHO_collection):
|
Line 505 class VLP_collection(ECHO_collection):
|
except: |
except: |
error=sys.exc_info()[0:2] |
error=sys.exc_info()[0:2] |
RESPONSE.write("<p>(ERROR (%s): %s %s)</p>\n"%(fileName,error[0],error[1])) |
RESPONSE.write("<p>(ERROR (%s): %s %s)</p>\n"%(fileName,error[0],error[1])) |
errorsTXT+="<p>File not created:%s "+"(ERROR: %s %s)</p>"%error |
errorsTXT+="<p>File not created:%s (ERROR: %s %s)</p>"%(fileName,error[0],error[1]) |
|
|
errorsTXT+=self.generateSubCollections() |
errorsTXT+=self.generateSubCollections() |
errorsTXT+="/n" |
errorsTXT+="\n" |
RESPONSE.write(errorsTXT) |
RESPONSE.write(errorsTXT) |
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 754 class VLP_resource(ECHO_resource,Cacheab
|
Line 756 class VLP_resource(ECHO_resource,Cacheab
|
def dir2index(self): |
def dir2index(self): |
"""dir to index""" |
"""dir to index""" |
|
|
excludeNames=['Icon'] |
excludeNames=['Icon',':2eD'] |
|
|
|
|
def calculateName(str): |
def calculateName(str): |