Changeset 3413 for pykota/trunk/pykota/reporters/html.py
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/reporters/html.py
r3411 r3413 8 8 # the Free Software Foundation, either version 3 of the License, or 9 9 # (at your option) any later version. 10 # 10 # 11 11 # This program is distributed in the hope that it will be useful, 12 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 # GNU General Public License for more details. 15 # 15 # 16 16 # You should have received a copy of the GNU General Public License 17 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. … … 27 27 28 28 from pykota.reporter import BaseReporter 29 30 class Reporter(BaseReporter) : 29 30 class Reporter(BaseReporter) : 31 31 """HTML reporter.""" 32 32 def generateReport(self) : … … 35 35 if self.isgroup : 36 36 prefix = "Group" 37 else : 37 else : 38 38 prefix = "User" 39 39 for printer in self.printers : … … 55 55 if oddeven % 2 : 56 56 oddevenclass = "odd" 57 else : 57 else : 58 58 oddevenclass = "even" 59 59 (pages, money, name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid, overcharge, warncount) = self.getQuota(entry, entrypquota) … … 61 61 if datelimit == "DENY" : 62 62 oddevenclass = "deny" 63 else : 63 else : 64 64 oddevenclass = "warn" 65 65 if (not self.tool.config.getDisableHistory()) and (not self.isgroup) : … … 68 68 total += pages 69 69 totalmoney += money 70 71 if total or totalmoney : 70 71 if total or totalmoney : 72 72 (tpage, tmoney) = self.getTotals(total, totalmoney) 73 73 self.report.append('<tr class="totals"><td colspan="8"> </td><td align="right">%s</td><td align="right">%s</td><td> </td></tr>' % (tpage, tmoney)) 74 74 self.report.append('<tr class="realpagecounter"><td colspan="8"> </td><td align="right">%s</td><td> </td></tr>' % self.getPrinterRealPageCounter(printer)) 75 75 self.report.append('</table>') 76 if self.isgroup : 76 if self.isgroup : 77 77 self.report.append('<p class="warning">%s</p>' % _("Totals may be inaccurate if some users are members of several groups.")) 78 return "\n".join(self.report) 79 78 return "\n".join(self.report) 79