i18n cleanups course user page
This commit is contained in:
parent
c2dc23c116
commit
0751f23c8e
@ -72,6 +72,7 @@ CourseNewHeading: Neuen Kurs anlegen
|
|||||||
CourseEditHeading tid@TermId ssh@SchoolId csh@CourseShorthand: Kurs #{display tid}-#{display ssh}-#{csh} editieren
|
CourseEditHeading tid@TermId ssh@SchoolId csh@CourseShorthand: Kurs #{display tid}-#{display ssh}-#{csh} editieren
|
||||||
CourseEditTitle: Kurs editieren/anlegen
|
CourseEditTitle: Kurs editieren/anlegen
|
||||||
CourseMembers: Teilnehmer
|
CourseMembers: Teilnehmer
|
||||||
|
CourseMemberOf: Teilnehmer
|
||||||
CourseMembersCount n@Int: #{display n}
|
CourseMembersCount n@Int: #{display n}
|
||||||
CourseMembersCountLimited n@Int max@Int: #{display n}/#{display max}
|
CourseMembersCountLimited n@Int max@Int: #{display n}/#{display max}
|
||||||
CourseMembersCountOf n@Int mbNum@IntMaybe: #{display n} Anmeldungen #{maybeDisplay " von " mbNum " möglichen"}
|
CourseMembersCountOf n@Int mbNum@IntMaybe: #{display n} Anmeldungen #{maybeDisplay " von " mbNum " möglichen"}
|
||||||
@ -257,6 +258,7 @@ CloseAlert: Schliessen
|
|||||||
|
|
||||||
Name: Name
|
Name: Name
|
||||||
MatrikelNr: Matrikelnummer
|
MatrikelNr: Matrikelnummer
|
||||||
|
NoMatrikelKnown: Keine Matrikelnummer eingetragen
|
||||||
Theme: Oberflächen Design
|
Theme: Oberflächen Design
|
||||||
Favoriten: Anzahl gespeicherter Favoriten
|
Favoriten: Anzahl gespeicherter Favoriten
|
||||||
Plugin: Plugin
|
Plugin: Plugin
|
||||||
@ -414,12 +416,18 @@ SheetCorrectorSubmissionsTip: Abgabe erfolgt über ein Uni2work-externes Verfahr
|
|||||||
SubmissionNoUploadExpected: Es ist keine Abgabe von Dateien vorgesehen.
|
SubmissionNoUploadExpected: Es ist keine Abgabe von Dateien vorgesehen.
|
||||||
|
|
||||||
AdminFeaturesHeading: Studiengänge
|
AdminFeaturesHeading: Studiengänge
|
||||||
|
StudyTerms: Studiengänge
|
||||||
|
StudyTerm: Studiengang
|
||||||
|
NoStudyTermsKnown: Nicht eingeschrieben
|
||||||
StudyFeatureInference: Studiengangschlüssel-Inferenz
|
StudyFeatureInference: Studiengangschlüssel-Inferenz
|
||||||
StudyFeatureAge: Fachsemester
|
StudyFeatureAge: Fachsemester
|
||||||
StudyFeatureDegree: Abschluss
|
StudyFeatureDegree: Abschluss
|
||||||
FieldPrimary: Hauptfach
|
FieldPrimary: Hauptfach
|
||||||
FieldSecondary: Nebenfach
|
FieldSecondary: Nebenfach
|
||||||
NoPrimaryStudyField: (kein Hauptfach registriert)
|
NoPrimaryStudyField: (kein Hauptfach registriert)
|
||||||
|
StudyFeatureType:
|
||||||
|
StudyFeatureValid: Aktiv
|
||||||
|
StudyFeatureUpdate: Abgeglichen
|
||||||
|
|
||||||
DegreeKey: Schlüssel Abschluss
|
DegreeKey: Schlüssel Abschluss
|
||||||
DegreeName: Abschluss
|
DegreeName: Abschluss
|
||||||
|
|||||||
@ -58,12 +58,12 @@ all test = F.foldr (\needle acc -> acc E.&&. test needle) true
|
|||||||
$(sqlInTuples [2..16])
|
$(sqlInTuples [2..16])
|
||||||
|
|
||||||
-- | Example for usage of unValueN
|
-- | Example for usage of unValueN
|
||||||
_example_unValueN :: (E.Value a, E.Value b, E.Value c) -> (a,b,c)
|
_exampleUnValueN :: (E.Value a, E.Value b, E.Value c) -> (a,b,c)
|
||||||
_example_unValueN = $(unValueN 3)
|
_exampleUnValueN = $(unValueN 3)
|
||||||
|
|
||||||
-- | Example for usage of unValueNIs
|
-- | Example for usage of unValueNIs
|
||||||
_example_unValueNIs :: (E.Value a, b, E.Value c) -> (a,b,c)
|
_exampleUnValueNIs :: (E.Value a, b, E.Value c) -> (a,b,c)
|
||||||
_example_unValueNIs = $(unValueNIs 3 [1,3])
|
_exampleUnValueNIs = $(unValueNIs 3 [1,3])
|
||||||
|
|
||||||
-- | Example for usage of sqlIJproj
|
-- | Example for usage of sqlIJproj
|
||||||
_queryFeaturesDegree :: (a `E.InnerJoin` b `E.InnerJoin` c) -> b
|
_queryFeaturesDegree :: (a `E.InnerJoin` b `E.InnerJoin` c) -> b
|
||||||
|
|||||||
@ -65,7 +65,7 @@ unValueNIs :: Int -> [Int] -> ExpQ
|
|||||||
unValueNIs arity uvIdx = do
|
unValueNIs arity uvIdx = do
|
||||||
vs <- replicateM arity $ newName "v"
|
vs <- replicateM arity $ newName "v"
|
||||||
let pat = tupP $ map varP vs
|
let pat = tupP $ map varP vs
|
||||||
let rhs = tupE $ map uvEi $ zip vs [1..]
|
let rhs = tupE $ zipWith (curry uvEi) vs [1 ..]
|
||||||
lam1E pat rhs
|
lam1E pat rhs
|
||||||
where
|
where
|
||||||
uvEi (v,i) | i `elem` uvIdx = [e|E.unValue $(varE v)|]
|
uvEi (v,i) | i `elem` uvIdx = [e|E.unValue $(varE v)|]
|
||||||
|
|||||||
@ -868,7 +868,7 @@ postCUserR tid ssh csh uCId = do
|
|||||||
|] -- _{MsgLastEdit} ^{formatTimeW SelFormatDateTime etime} ^{nameWidget ename esurname}
|
|] -- _{MsgLastEdit} ^{formatTimeW SelFormatDateTime etime} ^{nameWidget ename esurname}
|
||||||
|
|
||||||
((noteRes, noteView), noteEnctype) <- runFormPost . identifyForm FIDcUserNote . renderAForm FormStandard $
|
((noteRes, noteView), noteEnctype) <- runFormPost . identifyForm FIDcUserNote . renderAForm FormStandard $
|
||||||
(aopt (annotateField editByWgt htmlField') (fslpI MsgCourseUserNote "Html" & setTooltip MsgCourseUserNoteTooltip) $ Just noteText)
|
aopt (annotateField editByWgt htmlField') (fslpI MsgCourseUserNote "HTML" & setTooltip MsgCourseUserNoteTooltip) (Just noteText)
|
||||||
<* submitButton
|
<* submitButton
|
||||||
formResult noteRes $ \mbNote -> (do
|
formResult noteRes $ \mbNote -> (do
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
@ -888,52 +888,12 @@ postCUserR tid ssh csh uCId = do
|
|||||||
addMessageI Success MsgCourseUserNoteSaved
|
addMessageI Success MsgCourseUserNoteSaved
|
||||||
redirect currentRoute -- reload page after post
|
redirect currentRoute -- reload page after post
|
||||||
)
|
)
|
||||||
|
-- generate output
|
||||||
|
let headingLong = [whamlet|^{nameWidget userDisplayName userSurname} - _{MsgCourseMemberOf} #{csh} #{display tid}|]
|
||||||
-- USE src/utils/Form.formResult
|
headingShort = prependCourseTitle tid ssh csh $ SomeMessage userDisplayName
|
||||||
defaultLayout -- TODO
|
siteLayout headingLong $ do
|
||||||
[whamlet|
|
setTitleI headingShort
|
||||||
<h2>^{nameWidget userDisplayName userSurname}
|
$(widgetFile "course-user")
|
||||||
<section>
|
|
||||||
<div .profile>
|
|
||||||
<dl .deflist.profile-dl>
|
|
||||||
<dt .deflist__dt> _{MsgEMail}
|
|
||||||
<dd .deflist__dd> #{mailtoHtml userEmail}
|
|
||||||
<dt .deflist__dt> _{MsgMatrikelNr}
|
|
||||||
<dd .deflist__dd>
|
|
||||||
$maybe matnr <- userMatrikelnummer
|
|
||||||
#{matnr}
|
|
||||||
$nothing
|
|
||||||
Keine eingetragene Matrikelnummer
|
|
||||||
<dt .deflist__dt> Studiengänge
|
|
||||||
<dd .deflist__dd>
|
|
||||||
$if null studies
|
|
||||||
Nicht eingeschrieben
|
|
||||||
$else
|
|
||||||
<div .scrolltable>
|
|
||||||
<table .table.table--striped.table--hover.table--condensed>
|
|
||||||
<tr .table__row>
|
|
||||||
<th .table__th> Studiengang
|
|
||||||
<th .table__th> Abschluss
|
|
||||||
<th .table__th> Studienart
|
|
||||||
<th .table__th> Semester
|
|
||||||
<th .table__th> Aktiv
|
|
||||||
<th .table__th> Update
|
|
||||||
$forall ((Entity _ StudyFeatures{..}), (Entity _ degree), (Entity _ field)) <- studies
|
|
||||||
$with _ <- notUsedT studyFeaturesUser
|
|
||||||
<tr.table__row>
|
|
||||||
<td .table__td>_{field}#{notUsedT studyFeaturesField}
|
|
||||||
<td .table__td>_{degree}#{notUsedT studyFeaturesDegree}
|
|
||||||
<td .table__td>_{studyFeaturesType}
|
|
||||||
<td .table__td>#{display studyFeaturesSemester}
|
|
||||||
<td .table__td>#{hasTickmark studyFeaturesValid}
|
|
||||||
<td .table__td>^{formatTimeW SelFormatDate studyFeaturesUpdated}
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<a id="note-form">
|
|
||||||
<form method=post action=@{currentRoute}#note-form enctype=#{noteEnctype}>
|
|
||||||
^{noteView}
|
|
||||||
|]
|
|
||||||
|
|
||||||
|
|
||||||
getCHiWisR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
getCHiWisR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
||||||
|
|||||||
@ -108,12 +108,16 @@ prependCourseTitle tid ssh csh msg = UniWorXMessages
|
|||||||
, SomeMessage $ toPathPiece ssh
|
, SomeMessage $ toPathPiece ssh
|
||||||
, SomeMessage dashText
|
, SomeMessage dashText
|
||||||
, SomeMessage csh
|
, SomeMessage csh
|
||||||
|
, SomeMessage colonText
|
||||||
, SomeMessage msg
|
, SomeMessage msg
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
dashText :: Text
|
dashText :: Text
|
||||||
dashText = "-"
|
dashText = "-"
|
||||||
|
|
||||||
|
colonText :: Text
|
||||||
|
colonText = ":"
|
||||||
|
|
||||||
warnTermDays :: TermId -> [Maybe UTCTime] -> DB ()
|
warnTermDays :: TermId -> [Maybe UTCTime] -> DB ()
|
||||||
warnTermDays tid times = do
|
warnTermDays tid times = do
|
||||||
Term{..} <- get404 tid
|
Term{..} <- get404 tid
|
||||||
|
|||||||
@ -88,7 +88,7 @@ afterN n = do
|
|||||||
f <- newName "f"
|
f <- newName "f"
|
||||||
g <- newName "g"
|
g <- newName "g"
|
||||||
--let rhs = [|$(curryN n) (g . ($(uncurryN n) f))|]
|
--let rhs = [|$(curryN n) (g . ($(uncurryN n) f))|]
|
||||||
lamE [(varP g),(varP f)] [|$(curryN n) ($(varE g) . ($(uncurryN n) $(varE f)))|]
|
lamE [varP g, varP f] [|$(curryN n) $(varE g) . $(uncurryN n) $(varE f)|]
|
||||||
|
|
||||||
|
|
||||||
-- Special Show-Instances for Themes
|
-- Special Show-Instances for Themes
|
||||||
|
|||||||
39
templates/course-user.hamlet
Normal file
39
templates/course-user.hamlet
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<section>
|
||||||
|
<div .profile>
|
||||||
|
<dl .deflist.profile-dl>
|
||||||
|
<dt .deflist__dt> _{MsgEMail}
|
||||||
|
<dd .deflist__dd> #{mailtoHtml userEmail}
|
||||||
|
<dt .deflist__dt> _{MsgMatrikelNr}
|
||||||
|
<dd .deflist__dd>
|
||||||
|
$maybe matnr <- userMatrikelnummer
|
||||||
|
#{matnr}
|
||||||
|
$nothing
|
||||||
|
_{MsgNoMatrikelKnown}
|
||||||
|
<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>_{MsgStudyTerm}
|
||||||
|
<th .table__th>_{MsgStudyFeatureDegree}
|
||||||
|
<th .table__th>_{MsgStudyFeatureType}
|
||||||
|
<th .table__th>_{MsgStudyFeatureAge}
|
||||||
|
<th .table__th>_{MsgStudyFeatureValid}
|
||||||
|
<th .table__th>_{MsgStudyFeatureUpdate}
|
||||||
|
$forall ((Entity _ StudyFeatures{..}), (Entity _ degree), (Entity _ field)) <- studies
|
||||||
|
$with _ <- notUsedT studyFeaturesUser
|
||||||
|
<tr.table__row>
|
||||||
|
<td .table__td>_{field}#{notUsedT studyFeaturesField}
|
||||||
|
<td .table__td>_{degree}#{notUsedT studyFeaturesDegree}
|
||||||
|
<td .table__td>_{studyFeaturesType}
|
||||||
|
<td .table__td>#{display studyFeaturesSemester}
|
||||||
|
<td .table__td>#{hasTickmark studyFeaturesValid}
|
||||||
|
<td .table__td>^{formatTimeW SelFormatDate studyFeaturesUpdated}
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<a id="note-form">
|
||||||
|
<form method=post action=@{currentRoute}#note-form enctype=#{noteEnctype}>
|
||||||
|
^{noteView}
|
||||||
@ -17,7 +17,7 @@
|
|||||||
$nothing
|
$nothing
|
||||||
_{MsgNever}
|
_{MsgNever}
|
||||||
$if not $ null admin_rights
|
$if not $ null admin_rights
|
||||||
<dt .deflist__dt> Administrator
|
<dt .deflist__dt>_{MsgAdminFor}
|
||||||
<dd .deflist__dd>
|
<dd .deflist__dd>
|
||||||
<ul .list-ul>
|
<ul .list-ul>
|
||||||
$forall (E.Value institute) <- admin_rights
|
$forall (E.Value institute) <- admin_rights
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<a href=@{SchoolShowR $ SchoolKey institute}>
|
<a href=@{SchoolShowR $ SchoolKey institute}>
|
||||||
#{display institute}
|
#{display institute}
|
||||||
$if not $ null lecturer_rights
|
$if not $ null lecturer_rights
|
||||||
<dt .deflist__dt> Lehrberechtigt
|
<dt .deflist__dt>_{MsgLecturerFor}
|
||||||
<dd .deflist__dd>
|
<dd .deflist__dd>
|
||||||
<ul .list-ul>
|
<ul .list-ul>
|
||||||
$forall (E.Value institute) <- lecturer_rights
|
$forall (E.Value institute) <- lecturer_rights
|
||||||
@ -45,12 +45,12 @@
|
|||||||
<div .scrolltable>
|
<div .scrolltable>
|
||||||
<table .table.table--striped.table--hover.table--condensed>
|
<table .table.table--striped.table--hover.table--condensed>
|
||||||
<tr .table__row>
|
<tr .table__row>
|
||||||
<th .table__th> Studiengang
|
<th .table__th>_{MsgStudyTerm}
|
||||||
<th .table__th> Abschluss
|
<th .table__th>_{MsgStudyFeatureDegree}
|
||||||
<th .table__th> Studienart
|
<th .table__th>_{MsgStudyFeatureType}
|
||||||
<th .table__th> Semester
|
<th .table__th>_{MsgStudyFeatureAge}
|
||||||
<th .table__th> Aktiv
|
<th .table__th>_{MsgStudyFeatureValid}
|
||||||
<th .table__th> Update
|
<th .table__th>_{MsgStudyFeatureUpdate}
|
||||||
|
|
||||||
$forall ((Entity _ StudyFeatures{..}), (Entity _ degree), (Entity _ field)) <- studies
|
$forall ((Entity _ StudyFeatures{..}), (Entity _ degree), (Entity _ field)) <- studies
|
||||||
$with _ <- notUsedT studyFeaturesUser
|
$with _ <- notUsedT studyFeaturesUser
|
||||||
|
|||||||
Reference in New Issue
Block a user