Exemple #1
0
 def getTitle(self):
     if self.allParams.get("archive", "no") == "yes":
         answer = "SEHICL Archive: Season {0}".format(ArchiveUtils.getSeasonText(self.allParams.get("season")))
     else:
         report = self.getReport()
         answer = "SEHICL Averages: {0} Bowling".format(report.leagueName)
     return answer
Exemple #2
0
 def getReportHeading(self, report):
     if self.allParams.get("archive", "no") == "yes":
         answer = "{0} Bowling: Season {1}".format(
             report.leagueName, ArchiveUtils.getSeasonText(self.allParams.get("season"))
         )
     else:
         answer = "{0} Bowling".format(report.leagueName)
     return answer
Exemple #3
0
 def getReportHeading(self, report):
     if self.allParams.get("archive", "no") == "yes":
         answer = "{0} Bowling: Season {1}".format(
             report.leagueName,
             ArchiveUtils.getSeasonText(self.allParams.get("season")))
     else:
         answer = "{0} Bowling".format(report.leagueName)
     return answer
Exemple #4
0
 def getTitle(self):
     if self.allParams.get("archive", "no") == "yes":
         answer = "SEHICL Archive: Season {0}".format(
             ArchiveUtils.getSeasonText(self.allParams.get("season")))
     else:
         report = self.getReport()
         answer = "SEHICL Averages: {0} Bowling".format(report.leagueName)
     return answer
Exemple #5
0
 def getTitle(self):
     report = self.getReport()
     if self.allParams.get("archive", "no") == "yes":
         answer = "SEHICL Archive: Season {0}".format(ArchiveUtils.getSeasonText(self.allParams.get("season")))
     elif len(report.tables) != 1:
         answer = "SEHICL Tables"
     else:
         answer = "SEHICL Table: {0}".format(report.tables[0].leagueName)
     return answer
Exemple #6
0
 def getTitle(self):
     report = self.getReport()
     if self.allParams.get("archive", "no") == "yes":
         answer = "SEHICL Archive: Season {0}".format(
             ArchiveUtils.getSeasonText(self.allParams.get("season")))
     elif len(report.tables) != 1:
         answer = "SEHICL Tables"
     else:
         answer = "SEHICL Table: {0}".format(report.tables[0].leagueName)
     return answer
Exemple #7
0
 def getLeagueTable(self, table):
     html = """
     <div class="nobreak">
     <h1>{heading}</h1>
     {status}
     {click}
     <table id="table">
         <thead>
             <tr>
                 <th class="position number"></th>
                 <th class="teamname"></th>
                 <th class="played number">P</th>
                 <th class="won number">W</th>
                 <th class="tied number">T</th>
                 <th class="lost number">L</th>
                 <th class="batpoints number">Bat</th>
                 <th class="bowlpoints number">Bowl</th>
                 <th class="runrate number">RR</th>
                 <th colspan="2">Ded</th>
                 <th class="points number">Pts</th>
             </tr>
         </thead>
         <tbody>
             {rows}
         </tbody>
     </table>
     {deductions}
     {notes}
     </div>
     """
     if self.allParams.get("archive", "no") == "yes":
         heading = "{0}: Season {1}".format(
             table.leagueName,
             ArchiveUtils.getSeasonText(self.allParams.get("season")))
         clickMessage = ""
     else:
         heading = table.leagueName
         clickMessage = "<p class=\"noprint\">Click on a team to see all matches for that team.</p>"
     statusMessage = self.getStatusMessage(table)
     deductionReasons = []
     tableRows = self.getRows(table, deductionReasons)
     theDeductions = self.getDeductionInfoForTable(deductionReasons)
     notes = "<p class=\"tablenotes\">\n{0}\n</p>".format(
         string.join(table.notes, "<br>\n")) if len(table.notes) > 0 else ""
     answer = html.format(heading=heading,
                          status=statusMessage,
                          rows=tableRows,
                          deductions=theDeductions,
                          click=clickMessage,
                          notes=notes)
     return answer
Exemple #8
0
 def getLeagueTable(self, table):
     html = """
     <div class="nobreak">
     <h1>{heading}</h1>
     {status}
     {click}
     <table id="table">
         <thead>
             <tr>
                 <th class="position number"></th>
                 <th class="teamname"></th>
                 <th class="played number">P</th>
                 <th class="won number">W</th>
                 <th class="tied number">T</th>
                 <th class="lost number">L</th>
                 <th class="batpoints number">Bat</th>
                 <th class="bowlpoints number">Bowl</th>
                 <th class="runrate number">RR</th>
                 <th colspan="2">Ded</th>
                 <th class="points number">Pts</th>
             </tr>
         </thead>
         <tbody>
             {rows}
         </tbody>
     </table>
     {deductions}
     {notes}
     </div>
     """
     if self.allParams.get("archive", "no") == "yes":
         heading = "{0}: Season {1}".format(table.leagueName, ArchiveUtils.getSeasonText(self.allParams.get("season")))
         clickMessage = ""
     else:
         heading = table.leagueName
         clickMessage = "<p class=\"noprint\">Click on a team to see all matches for that team.</p>"
     statusMessage = self.getStatusMessage(table)
     deductionReasons = []
     tableRows = self.getRows(table, deductionReasons)
     theDeductions = self.getDeductionInfoForTable(deductionReasons)
     notes = "<p class=\"tablenotes\">\n{0}\n</p>".format(string.join(table.notes, "<br>\n")) if len(table.notes) > 0 else ""
     answer = html.format(heading=heading, status=statusMessage, rows=tableRows, deductions=theDeductions, click=clickMessage, notes=notes)
     return answer