fradrive/templates/submission.hamlet

126 lines
4.1 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>
<thead>
<tr .table__row .table__row--head>
<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}
$if isLecturer && doAuthorshipStatements
<th .table__th>
<div .table__td-content>
_{MsgSubmissionUserAuthorshipStatementState}
<tbody>
$forall subUser <- subUsers
$case subUser
$of Left email
<tr .table__row>
<td .table__td>
$if isLecturer
<td .table__td>
<td .table__td>
<div .table__td-content .email>
<a href="mailto:#{email}">
#{email}
$if isLecturer && doAuthorshipStatements
<td .table__td>
$of Right (uCId, User{userDisplayName, userSurname, userEmail, userMatrikelnummer}, stmt)
<tr .table__row>
<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}
$# TODO(AuthorshipStatements): show authorship statements to submittors?
$if isLecturer && doAuthorshipStatements
<td .table__td>
<div .table__td-content>
_{stmt}
$if isLecturer && doAuthorshipStatements
<tfoot>
<tr .table__row .table__row--foot .no-stripe .no-hover>
<td>
<td>
<td>
<td .table__td>
<div .table__td-content .explanation>
<dl .deflist>
$forall (stmt, explanation) <- asStatuses
<dt .deflist__dt>
_{stmt}
<dd .deflist__dd>
^{explanation}
<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}
$if maySubmit
<section>
<h2>_{MsgSubmissionReplace}
^{formWidget}
$else
^{formWidget}