## -*- coding: utf_8 -*- <% from fcp import mlitem from fcutils import util from cStringIO import StringIO %> <% sendOptions = mlitem.sendWebID|mlitem.sendBodyPreview nFiles = None myMLItem = None jsonStr = StringIO() if dirList: nFiles = len(dirList) else: nFiles = 0 if fcp and fcp.MyMLItem: myMLItem = fcp.MyMLItem thisWebID = myMLItem.WebID() else: thisWebID = util.padStringToGivenLength('', 24, '0') thisWebID = thisWebID + ('%02X%02X' % (7,0)) thisWebID = str(thisWebID) bFullPage = False if (Page=='NEXT' or Page=='PREVIOUS' or Page=='ALL') else True if myMLItem: jsonStr.write( '{"MYMLITEM":'+myMLItem.AsJSONArrayItem(mlitem.sendAll,(client.serverTZ,client.clientTZ))+',"NFILES":'+str(nFiles) + ',"MLDS":[') else: jsonStr.write( '{"NFILES":'+str(nFiles) + ',"MLDS":[') if bFullPage: context.write('