Changeset 1614 for pykota/trunk/cgi-bin
- Timestamp:
- 07/21/04 15:32:02 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/printquota.cgi
r1582 r1614 23 23 # 24 24 # $Log$ 25 # Revision 1.31 2004/07/21 13:32:02 jalet 26 # All messages should be translatable now. 27 # 25 28 # Revision 1.30 2004/07/01 17:45:48 jalet 26 29 # Added code to handle the description field for printers … … 134 137 <html> 135 138 <head> 136 <title> PyKota Reports</title>139 <title>%s</title> 137 140 <link rel="stylesheet" type="text/css" href="/pykota.css" /> 138 141 </head> … … 145 148 <a href="http://www.librelogiciel.com/software/"><img src="http://www.librelogiciel.com/software/PyKota/pykota.png" alt="PyKota's Logo" /></a> 146 149 <br /> 147 <a href="http://www.librelogiciel.com/software/">PyKota v ersion%s</a>150 <a href="http://www.librelogiciel.com/software/">PyKota v%s</a> 148 151 </p> 149 152 </td> 150 153 <td colspan="2"> 151 <h1> PyKota Reports</h1>154 <h1>%s</h1> 152 155 </td> 153 156 </tr> 154 157 <tr> 155 158 <td colspan="3" align="center"> 156 <input type="submit" name="action" value=" Report" />159 <input type="submit" name="action" value="%s" /> 157 160 </td> 158 161 </tr> … … 160 163 161 164 footer = """ 165 <table> 166 <tr> 167 <td colspan="3" align="center"> 168 <input type="submit" name="action" value="%s" /> 169 </td> 170 </tr> 171 </table> 162 172 </form> 163 173 </body> … … 176 186 """Displays the administrative interface.""" 177 187 global header, footer 178 print header % version.__version__188 print header % (_("PyKota Reports"), version.__version__, _("PyKota Reports"), _("Report")) 179 189 print self.body 180 print footer 190 print footer % _("Report") 181 191 182 192 def error(self, message) : … … 200 210 def htmlUGNamesInput(self, value="*") : 201 211 """Input field for user/group names wildcard.""" 202 return 'User / Group names mask : <input type="text" name="ugmask" size="20" value="%s" /> <em>e.g. <strong>jo*</strong></em>' % (value or "*")212 return _("User / Group names mask") + (' : <input type="text" name="ugmask" size="20" value="%s" /> <em>e.g. <strong>jo*</strong></em>' % (value or "*")) 203 213 204 214 def htmlGroupsCheckbox(self, isgroup=0) : 205 215 """Groups checkbox.""" 206 216 if isgroup : 207 return 'Groups report: <input type="checkbox" checked="checked" name="isgroup" />'217 return _("Groups report") + ' : <input type="checkbox" checked="checked" name="isgroup" />' 208 218 else : 209 return 'Groups report: <input type="checkbox" name="isgroup" />'219 return _("Groups report") + ' : <input type="checkbox" name="isgroup" />' 210 220 211 221 def guiAction(self) : … … 215 225 if self.form.has_key("action") : 216 226 action = self.form["action"].value 217 if action == "Report":227 if action == _("Report") : 218 228 if self.form.has_key("printers") : 219 229 printersfield = self.form["printers"] … … 277 287 else : 278 288 hostname = None 279 self.report = ["<h2> History</h2>"]289 self.report = ["<h2>%s</h2>" % _("History")] 280 290 history = self.storage.retrieveHistory(user, printer, datelimit, hostname) 281 291 if not history : 282 self.report.append("<h3> Empty</h3>")292 self.report.append("<h3>%s</h3>" % _("Empty")) 283 293 else : 284 294 self.report.append('<table class="pykotatable" border="1">') 285 headers = [ "Date", "Action", "User", "Printer", "Hostname", "JobId", "JobSize", "JobPrice", "Copies", "JobBytes", "PageCounter", "Title", "Filename", "Options"]295 headers = [_("Date"), _("Action"), _("User"), _("Printer"), _("Hostname"), _("JobId"), _("JobSize"), _("JobPrice"), _("Copies"), _("JobBytes"), _("PageCounter"), _("Title"), _("Filename"), _("Options")] 286 296 self.report.append('<tr class="pykotacolsheader">%s</tr>' % "".join(["<th>%s</th>" % h for h in headers])) 287 297 oddeven = 0