feat(exam-correct): add sortable style and date column

This commit is contained in:
Sarah Vaupel 2020-01-09 09:59:07 +01:00 committed by Gregor Kleen
parent e60aef4f8b
commit 87bda1607e
5 changed files with 39 additions and 31 deletions

View File

@ -1395,6 +1395,7 @@ ExamRegistrationInviteExplanation: Sie wurden eingeladen, Prüfungsteilnehmer zu
ExamCorrectHeading examname@Text: Prüfungsergebnisse für #{examname} eintragen
ExamCorrectHeadDate: Zeit
ExamCorrectHeadParticipant: Teilnehmer
ExamCorrectHeadParticipantTooltip: Geben Sie hier einen beliebigen eindeutigen Identifikator des Teilnehmers an. Definitiv eindeutig ist die Matrikelnummer des Teilnehmers, aber auch der Name oder ein Teil der Matrikelnummer können unter Umständen (je nach Liste aller Prüfungsteilnehmer) bereits eindeutig sein.
ExamCorrectHeadPart exampartnum@ExamPartNumber: #{exampartnum}

View File

@ -1393,6 +1393,7 @@ ExamRegistrationInviteExplanation: You were invited to register for an exam.
ExamCorrectHeading examname: Submit corrections for #{examname}
ExamCorrectHeadDate: Time
ExamCorrectHeadParticipant: Participant
ExamCorrectHeadParticipantTooltip: Enter any string that uniquely identifies the participant. Their matriculation number is definitely unique, but also their name or a part of their matriculation number may already be unique for this participant (depending on the list of all participants).
ExamCorrectHeadPart exampartnum: #{exampartnum}

View File

@ -60,7 +60,7 @@ getECorrectR tid ssh csh examn = do
siteLayoutMsg heading $ do
setTitleI heading
$(widgetFile "widgets/exam-correct")
$(widgetFile "exam-correct")
postECorrectR :: TermId -> SchoolId -> CourseShorthand -> ExamName -> Handler Value
postECorrectR = error "ECorrectR not implemented" -- use returnJson & requireCheckJsonBody

View File

@ -0,0 +1,36 @@
$newline never
<section>
<div uw-hide-columns="exam-correct">
<table uw-exam-correct .table .table--striped>
<thead>
<tr .table__row .table__row--head>
<th .table__th .sortable .sorted-desc uw-hide-column-header="date">
_{MsgExamCorrectHeadDate}
<th .table__th .sortable uw-hide-column-header="participant">
_{MsgExamCorrectHeadParticipant}
^{iconTooltip participantHeadTooltip Nothing True}
$forall ExamPart{examPartNumber,examPartName} <- examParts
<th .table__th .sortable uw-hide-column-header=#{examPartNumber}>
$maybe name <- examPartName
<span .tooltip>
<span>
_{MsgExamCorrectHeadPart examPartNumber}
<span .tooltip__content>
_{MsgExamCorrectHeadPartName name}
$nothing
_{MsgExamCorrectHeadPart examPartNumber}
<th .table__th .sortable uw-hide-column-header="status">
_{MsgExamCorrectHeadStatus}
<tbody #exam-correct--new>
<tr .table__row>
<td .table__td>
<td .table__td>
<input #exam-correct__participant type="text">
$forall ExamPart{examPartNumber} <- examParts
<td .table__td>
^{ptsInput examPartNumber}
<td #exam-correct__status .table__td>
<button #exam-correct__send-btn .btn .btn-primary>
_{MsgExamCorrectButtonSend}
<tbody>

View File

@ -1,30 +0,0 @@
$newline never
<section>
<table #exam-correct uw-hide-columns="exam-corrections" .table .table--striped>
<thead>
<tr .table__row .table__row--head>
<th .table__th uw-hide-column-header="participant">
_{MsgExamCorrectHeadParticipant}
^{iconTooltip participantHeadTooltip Nothing True}
$forall ExamPart{examPartNumber,examPartName} <- examParts
<th .table__th>
$maybe name <- examPartName
<span .tooltip>
<span>
_{MsgExamCorrectHeadPart examPartNumber}
<span .tooltip__content>
_{MsgExamCorrectHeadPartName name}
$nothing
_{MsgExamCorrectHeadPart examPartNumber}
<th .table__th uw-hide-column-header="status">_{MsgExamCorrectHeadStatus}
<tbody>
<tr #exam-correct__new .table__row>
<td .table__td>
<input #exam-correct__participant type="text">
$forall ExamPart{examPartNumber} <- examParts
<td .table__td>
^{ptsInput examPartNumber}
<td #exam-correct__status .table__td>
<button #exam-correct__send-btn .btn .btn-primary>
_{MsgExamCorrectButtonSend}