fradrive/templates/submission.hamlet

99 lines
3.0 KiB
Plaintext

$newline never
$if is _Just mcid
$maybe wdgt <- correctionWdgt
<section>
<h2>_{MsgTableRating}
$maybe warning <- correctionVisibleWarnWidget
^{warning}
^{wdgt}
<section>
<h2>
_{MsgSubmissionUserTable}
^{maybeVoid multipleSubmissionWarnWidget}
$if not (null subUsers)
<div .scrolltable>
<table .table .table--striped .table--hover>
<tr .table__tr>
<th .table__th>
<div .table__td-content>
_{MsgSubmissionUserDisplayName}
$if isLecturer
<th .table__th>
<div .table__td-content>
_{MsgSubmissionUserMatriculation}
<th .table__th>
<div .table__td-content>
_{MsgSubmissionUserEmail}
$forall subUser <- subUsers
$case subUser
$of Left email
<tr .table__tr>
<td .table__td>
<td .table__td>
<div .table__td-content .email>
<a href="mailto:#{email}">
#{email}
$of Right (uCId, User{userDisplayName, userSurname, userEmail, userMatrikelnummer})
<tr .table__tr>
<td .table__td>
<div .table__td-content>
^{simpleLink (nameWidget userDisplayName userSurname) (CourseR tid ssh csh (CUserR uCId))}
$if isLecturer
<td .table__td>
<div .table__td-content>
$maybe matriculation <- userMatrikelnummer
#{matriculation}
<td .table__td>
<div .table__td-content .email>
<a href="mailto:#{userEmail}">
#{userEmail}
<section>
$case sheetSubmissionMode
$of SubmissionMode False Nothing
<p>
_{MsgSubmissionNoUploadExpected}
$of _
<h2>
$if filesCorrected
_{MsgSubmissionFilesCorrected}
$else
_{MsgSubmissionFiles}
<p>
$if showCorrection
$maybe url <- urlArchive
<a href=#{url}>_{MsgSubmissionArchiveCorrected}
\ (
$maybe url <- urlOriginal
<a href=#{url}>_{MsgSubmissionOriginal}
)
$else
$maybe url <- urlOriginal
<a href=#{url}>_{MsgSubmissionArchive}
$maybe fileTable <- mFileTable
^{fileTable}
$if maySubmit && not (null lastEdits)
<h3>_{MsgTableLastEdit}
<ul>
$forall (mbName,time) <- lastEdits
$maybe name <- mbName
<li>_{MsgEditedBy name time}
$nothing
<li>#{time}
$# TODO(AuthorshipStatements): show statements confirmed (iff display is not anonymous (lecturer/submittor/non-anonymous corrector)?)
$if maySubmit
<section>
<h2>_{MsgSubmissionReplace}
^{formWidget}
$else
^{formWidget}