Changeset 2633

Show
Ignore:
Timestamp:
01/26/06 16:32:09 (18 years ago)
Author:
jerome
Message:

Minor fix to improve readabilityy

Files:
1 modified

Legend:

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

    r2631 r2633  
    224224                    for job in history : 
    225225                        oddeven += 1 
    226                         if oddeven % 2 : 
    227                             oddevenclass = "odd" 
    228                         else :     
    229                             oddevenclass = "even" 
    230                         if job.JobAction == "DENY" : 
    231                             oddevenclass = "deny" 
    232                         elif job.JobAction == "WARN" :     
    233                             oddevenclass = "warn" 
    234                         elif job.JobAction == "PROBLEM" : 
    235                             oddevenclass = "problem" 
    236                         elif job.JobAction == "CANCEL" : 
    237                             oddevenclass = "cancel" 
     226                        if job.JobAction == "ALLOW" :     
     227                            if oddeven % 2 : 
     228                                oddevenclass = "odd" 
     229                            else :     
     230                                oddevenclass = "even" 
     231                        else : 
     232                            oddevenclass = (job.JobAction or "UNKNOWN").lower() 
    238233                        username_url = '<a href="%s?%s">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode({"history" : 1, "username" : job.UserName}), job.UserName) 
    239234                        printername_url = '<a href="%s?%s">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode({"history" : 1, "printername" : job.PrinterName}), job.PrinterName)