Changeset 1278
- Timestamp:
- 01/12/04 16:28:45 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/printquota.cgi
r1276 r1278 23 23 # 24 24 # $Log$ 25 # Revision 1.25 2004/01/12 15:28:45 jalet 26 # Now can output the user's history on several printers at the same time. 27 # 25 28 # Revision 1.24 2004/01/12 14:52:03 jalet 26 29 # Cuts the date string … … 271 274 elif job.JobAction == "WARN" : 272 275 oddevenclass = "warn" 273 self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (job.JobDate[:19], job.User.Name, job.Printer.Name, job.PrinterPageCounter, job.JobId, job.JobSize, job.JobPrice, job.JobCopies, job.JobTitle, job.JobFileName, job.JobOptions, job.JobAction)]))) 276 username = '<a href="%s?%s">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode({"history" : 1, "username" : job.User.Name}), job.User.Name) 277 self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (job.JobDate[:19], username, job.Printer.Name, job.PrinterPageCounter, job.JobId, job.JobSize, job.JobPrice, job.JobCopies, job.JobTitle, job.JobFileName, job.JobOptions, job.JobAction)]))) 274 278 self.report.append('</table>') 275 279 dico = { "history" : 1, -
pykota/trunk/pykota/reporters/html.py
r1277 r1278 22 22 # 23 23 # $Log$ 24 # Revision 1.8 2004/01/12 15:28:45 jalet 25 # Now can output the user's history on several printers at the same time. 26 # 24 27 # Revision 1.7 2004/01/12 15:12:50 jalet 25 28 # Small fix for history … … 44 47 45 48 import os 49 import urllib 46 50 from mx import DateTime 47 51 … … 58 62 prefix = "User" 59 63 for printer in self.printers : 60 self.report.append('<h2 class="printername">%s</h2>' % self.getPrinterTitle(printer)) 64 phistoryurl = { "printername" : printer.Name, "history" : 1 } 65 self.report.append('<a href="%s?%s"><h2 class="printername">%s</h2></a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode(phistoryurl), self.getPrinterTitle(printer))) 61 66 self.report.append('<h3 class="printergracedelay">%s</h3>' % self.getPrinterGraceDelay(printer)) 62 67 (pjob, ppage) = self.getPrinterPrices(printer)