--- ImageArchive/ImageArchive.py 2004/08/03 13:44:18 1.27 +++ ImageArchive/ImageArchive.py 2004/09/01 17:40:15 1.28 @@ -511,23 +511,29 @@ class ImageCollection(Folder, Persistent def showRuler(self,selected=None): """show ruler""" showall =self.REQUEST.SESSION.get('showall','no') + ids=self.show_thumbs() + if len(ids)==0: + return "No entries" + if showall=='no': ids=self.show_thumbs() colRows=self.getColTimesRow() num=int(len(ids)/(colRows[0]*colRows[1])) + if not (operator.mod(len(ids),colRows[0]*colRows[1])==0): + num+=1 a=colRows[0]*colRows[1] #print num,num+1 - if num+1>1: + if num>1: ret="Show thumbnail group no:
" - for i in range(num+1): + for i in range(num): if (operator.mod(i,10)==0) and i>0: ret +="
" #alle 10 linebreak einfuegen k=i*a if selected: href=self.REQUEST['URL1']+"/selection?filename="+ids[k] else: - href=self.REQUEST['URL1']+"?filename="+ids[k] + href=self.REQUEST['URL1']+"?filename="+ids[int(k)] ret+="""%i  """%(href,i) @@ -608,7 +614,8 @@ class ImageCollection(Folder, Persistent """Ausgabe anzahl""" idsAll=self.show_thumbs() - + if len(idsAll)==0: #keine Einträge + return 0 if self.REQUEST.SESSION.has_key("filename"): filename=self.REQUEST.SESSION["filename"]