Changeset 1278

Show
Ignore:
Timestamp:
01/12/04 16:28:45 (20 years ago)
Author:
jalet
Message:

Now can output the user's history on several printers at the same time.

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/printquota.cgi

    r1276 r1278  
    2323# 
    2424# $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# 
    2528# Revision 1.24  2004/01/12 14:52:03  jalet 
    2629# Cuts the date string 
     
    271274                    elif job.JobAction == "WARN" :     
    272275                        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)]))) 
    274278                self.report.append('</table>') 
    275279                dico = { "history" : 1, 
  • pykota/trunk/pykota/reporters/html.py

    r1277 r1278  
    2222# 
    2323# $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# 
    2427# Revision 1.7  2004/01/12 15:12:50  jalet 
    2528# Small fix for history 
     
    4447 
    4548import os 
     49import urllib 
    4650from mx import DateTime 
    4751 
     
    5862            prefix = "User" 
    5963        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))) 
    6166            self.report.append('<h3 class="printergracedelay">%s</h3>' % self.getPrinterGraceDelay(printer)) 
    6267            (pjob, ppage) = self.getPrinterPrices(printer)