$# Displays gradings Summary for various purposes
$# Expects several variables:
$#  sumSummaries    :: SheetGradeSummary -- summary over all grading types
$#  hasPasses       :: Maybe Int    -- Should Passing be displayed?
$#  hasMarkedPasses :: Maybe Int    -- Number of marked pass-sheets
$#  hasPoints       :: Maybe Points -- Should Points  be displayed?
$#  hasMarkedPoints :: Maybe Int    -- Number of marked point-sheets
$#  rowWdgts        :: Liste von Widgets für jede Zeile (Normal,Bonus,KeineWertung)
$# --
<div>
  <h3>_{MsgSummaryTitle} _{title $ getSum $ numSheets $ sumSummaries}
  <div .scrolltable>
    <table .table .table--striped>
      <tr .table__row .table__row--head>
        <th>
          $# empty cell for row headers
        $maybe _ <- hasMarkedPasses
          <th .table__th colspan=2>_{MsgCorrectionAchievedPass}
        $maybe _ <- hasPasses
          <th .table__th>_{MsgSheetGradingPassing'}
        $maybe _ <- hasMarkedPoints
          <th .table__th colspan=2>_{MsgCorrectionAchievedPoints}
        $maybe _ <- hasPoints
          <th .table__th>_{MsgSheetGradingPoints'}
        <th .table__th>_{MsgSheetGradingCount'}
          $# Number of Sheet/Submissions used for calculating maximum passes/points
      $forall someRow <- rowsShown
        ^{rowWgt someRow}
      $maybe nrNoGrade <- positiveSum $ numNotGraded
        <tr .table__row>
          <th .table__th>_{MsgSheetTypeNotGraded}
          $maybe _ <- hasMarkedPasses
            <td colspan=2>
          $maybe _ <- hasPasses
            <td .table__td>
          $maybe _ <- hasMarkedPoints
            <td .table__td colspan=2>
          $maybe _ <- hasPoints
            <td .table__td>
          <td .table__td>#{nrNoGrade}
  $maybe _ <- positiveSum $ bonusSummary ^. _numSheets
    <p>_{MsgSheetTypeInfoBonus} #
      $maybe _ <- positiveSum $ bonusSummary ^. _achievedPoints
        _{MsgSheetGradingBonusIncluded}
  $maybe _ <- positiveSum $ informationalSummary ^. _numSheets
    <p>_{MsgSheetTypeInfoNotGraded}
