fradrive/templates/course/user/profile.hamlet

64 lines
2.6 KiB
Plaintext

$newline never
$# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later
<section>
<div .profile>
<dl .deflist.profile-dl>
$maybe title <- userTitle
<dt .deflist__dt>_{MsgTitle}
<dd .deflist__dd>#{title}
<dt .deflist__dt>_{MsgSurname}
<dd .deflist__dd>#{userSurname}
<dt .deflist__dt>_{MsgFirstName}
<dd .deflist__dd>#{userFirstName}
<dt .deflist__dt>_{MsgTableMatrikelNr}
<dd .deflist__dd>
$maybe matnr <- userMatrikelnummer
#{matnr}
$nothing
_{MsgNoMatrikelKnown}
$maybe sex <- guardOn showSex =<< userSex
<dt .deflist__dt>_{MsgTableSex}
<dd .deflist__dd>_{sex}
<dt .deflist__dt>_{MsgTableEmail}
<dd .deflist__dd>#{mailtoHtml (pickValidEmail userDisplayEmail userEmail)}
$maybe date <- mRegAt
<dt .deflist__dt>_{MsgRegisteredSince}
<dd .deflist__dd>#{date}
$if mayRegister
<dt .deflist__dt>
<dd .deflist__dd>
^{regButtonWidget}
$maybe _ <- mRegistration
<p>
_{MsgCourseDeregisterLecturerTip}
<dt .deflist__dt>_{MsgStudyTerms}
<dd .deflist__dd>
$if null studies
_{MsgNoStudyTermsKnown}
$else
<div .scrolltable>
<table .table.table--striped.table--hover.table--condensed>
<tr .table__row>
<th .table__th>_{MsgTableStudyTerm}
<th .table__th>_{MsgTableStudyFeatureDegree}
<th .table__th>_{MsgTableStudyFeatureType}
<th .table__th>_{MsgTableStudyFeatureAge}
<th .table__th>_{MsgTableStudyFeatureValid}
<th .table__th>_{MsgTableStudyFeatureUpdate}
$forall ((Entity _ StudyFeatures{studyFeaturesType, studyFeaturesSemester, studyFeaturesValid, studyFeaturesFirstObserved, studyFeaturesLastObserved}), (Entity _ degree), (Entity _ field)) <- studies
<tr .table__row>
<td .table__td>_{field}
<td .table__td>_{degree}
<td .table__td>_{studyFeaturesType}
<td .table__td>#{studyFeaturesSemester}
<td .table__td>#{hasTickmark studyFeaturesValid}
<td .table__td>
$maybe fObs <- studyFeaturesFirstObserved
^{formatTimeRangeW SelFormatDate fObs $ Just studyFeaturesLastObserved}
$nothing
^{formatTimeW SelFormatDate studyFeaturesLastObserved}