$# Displays one row of the grading summary
$# Expects several variables:
$#  summary    :: SheetGradeSummary -- summary to display
$#  sumHeader  :: UniWorXMessage    -- row header
$#  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
$#
$# TODO: Durschnittliche Punktzahl anzeigen
$# TODO: Extra-Spalte für Punkte Bewertet = numMarkedPoints / Punkte Gesamt = sumSheetPoints
$#
  $maybe _ <- positiveSum $ summary ^. _numSheets
    <tr .table__row>
      <th .table__th>_{sumHeader}
      $maybe _ <- hasMarkedPasses
        $with Sum pmax <- summary ^. _numMarkedPasses
          $if pmax > 0
            $with Sum pacv <- summary ^. _achievedPasses
              <td .table__td>
                $if pmax > 0
                  #{textPercent pacv pmax}
              <td .table__td>
                _{pacv} / _{pmax}
          $else
              <td .table__td>
              <td .table__td>
      $maybe _ <- hasPasses
        $with Sum numPass <- summary ^. _numSheetsPasses
          <td .table__td>
            $if numPass > 0
              _{numPass}
      $maybe _ <- hasMarkedPoints
        $with Sum pmax <- summary ^. _sumMarkedPoints
          $with Sum pacv <- summary ^. _achievedPoints
            <td .table__td>
              $if pmax > 0
                #{textPercent pacv pmax}
            <td .table__td>
              _{pacv} / _{pmax}
              $if ((summary ^. _numMarkedPoints) /= (summary ^. _numSheets))
                $# Falls Anzahl Blätter der Zeile verschieden von Anzahl gewerterer Blätter
                \ (_{title $ getSum $ summary ^. _numMarkedPoints})
                $# Kurze Alternative mit Hashtag-Symbol für "Anzahl"
                $# \ (##{summary ^. _numMarkedPoints})
      $maybe _ <- hasPoints
        <td .table__td>
          #{summary ^. _sumSheetsPoints}
          $if ((summary ^. _numSheetsPoints) /= (summary ^. _numSheets))
            $# Falls Anzahl Blätter der Zeile verschieden von Anzahl Blätter mit Punkten
            \ (_{title $ getSum $ summary ^. _numSheetsPoints})
            $# Kurze Alternative mit Hashtag-Symbol für "Anzahl"
            $# \ (##{summary ^. _numSheetsPoints})
      <td .table__td>#{summary ^. _numSheets}
