refactor(firm): msg, titles and headings
This commit is contained in:
parent
65cdc8ddfe
commit
698a9c5497
@ -15,11 +15,13 @@ FirmSuperActRMSuperDef: Standard Firmenansprechpartner entfernen
|
|||||||
FirmSuperActRMSuperAll: Als aktiven Ansprechpartner komplett entfernen
|
FirmSuperActRMSuperAll: Als aktiven Ansprechpartner komplett entfernen
|
||||||
FirmsNotification: Firmen Benachrichtigung versenden
|
FirmsNotification: Firmen Benachrichtigung versenden
|
||||||
FirmNotification fsh@CompanyShorthand: Benachrichtigung an #{fsh} versenden
|
FirmNotification fsh@CompanyShorthand: Benachrichtigung an #{fsh} versenden
|
||||||
|
FirmsNotificationTitle: Firmen benachrichtigen
|
||||||
|
FirmNotificationTitle fsh@CompanyShorthand: #{fsh} benachrichtigen
|
||||||
FilterSupervisor: Hat aktiven Ansprechpartner
|
FilterSupervisor: Hat aktiven Ansprechpartner
|
||||||
FilterSupervisorCompany fsh@CompanyShorthand: Hat aktiven Ansprechpartner, #{fsh} der angehört
|
FilterSupervisorCompany fsh@CompanyShorthand: Hat aktiven Ansprechpartner, #{fsh} der angehört
|
||||||
FilterSupervisorForeign fsh@CompanyShorthand: Hat aktiven Ansprechpartner, der selbst nicht #{fsh} angehört
|
FilterSupervisorForeign fsh@CompanyShorthand: Hat aktiven Ansprechpartner, der selbst nicht #{fsh} angehört
|
||||||
FilterForeignSupervisor: Hat firmenfremde Ansprechpartner
|
FilterForeignSupervisor: Hat firmenfremde Ansprechpartner
|
||||||
FilterFirmPostalAddress: Postalische Firmenadresse vorhanden
|
FilterFirmExtern: Externe Firma
|
||||||
FirmSupervisorOf fsh@CompanyShorthand: Ansprechpartner #{fsh} angehörig
|
FirmSupervisorOf fsh@CompanyShorthand: Ansprechpartner #{fsh} angehörig
|
||||||
FirmSupervisorIndependent: Ansprechpartner ohne jegliche Firmenzugehörigkeit
|
FirmSupervisorIndependent: Ansprechpartner ohne jegliche Firmenzugehörigkeit
|
||||||
FirmEmployeeOf fsh@CompanyShorthand: Firmenangehörige #{fsh}
|
FirmEmployeeOf fsh@CompanyShorthand: Firmenangehörige #{fsh}
|
||||||
@ -15,11 +15,13 @@ FirmSuperActRMSuperDef: Remove as default supervisor
|
|||||||
FirmSuperActRMSuperAll: Remove all active supervisions for this company
|
FirmSuperActRMSuperAll: Remove all active supervisions for this company
|
||||||
FirmsNotification: Send company notification
|
FirmsNotification: Send company notification
|
||||||
FirmNotification fsh: Send notification to company #{fsh}
|
FirmNotification fsh: Send notification to company #{fsh}
|
||||||
|
FirmsNotificationTitle: Company notification
|
||||||
|
FirmNotificationTitle fsh@CompanyShorthand: #{fsh} notification
|
||||||
FilterSupervisor: Has active supervisor
|
FilterSupervisor: Has active supervisor
|
||||||
FilterSupervisorCompany fsh: Has active company supervisor belonging to #{fsh}
|
FilterSupervisorCompany fsh: Has active company supervisor belonging to #{fsh}
|
||||||
FilterSupervisorForeign fsh: Has active supervisor not belonging to #{fsh}
|
FilterSupervisorForeign fsh: Has active supervisor not belonging to #{fsh}
|
||||||
FilterForeignSupervisor: Has company-external supervisors
|
FilterForeignSupervisor: Has company-external supervisors
|
||||||
FilterFirmPostalAddress: Postal company addresse known
|
FilterFirmExtern: External company
|
||||||
FirmSupervisorOf fsh@CompanyShorthand: Supervisors belonging to #{fsh}
|
FirmSupervisorOf fsh@CompanyShorthand: Supervisors belonging to #{fsh}
|
||||||
FirmSupervisorIndependent: Independent supervisors
|
FirmSupervisorIndependent: Independent supervisors
|
||||||
FirmEmployeeOf fsh@CompanyShorthand: #{fsh} associated users
|
FirmEmployeeOf fsh@CompanyShorthand: #{fsh} associated users
|
||||||
@ -64,8 +64,10 @@ postCCommR tid ssh csh = do
|
|||||||
|
|
||||||
return (cid, tuts, exams, sheets)
|
return (cid, tuts, exams, sheets)
|
||||||
|
|
||||||
|
let heading = SomeMessage . prependCourseTitle tid ssh csh $ SomeMessage MsgCommCourseHeading
|
||||||
commR CommunicationRoute
|
commR CommunicationRoute
|
||||||
{ crHeading = SomeMessage . prependCourseTitle tid ssh csh $ SomeMessage MsgCommCourseHeading
|
{ crHeading = heading
|
||||||
|
, crTitle = heading
|
||||||
, crUltDest = SomeRoute $ CourseR tid ssh csh CCommR
|
, crUltDest = SomeRoute $ CourseR tid ssh csh CCommR
|
||||||
, crJobs = crJobsCourseCommunication cid
|
, crJobs = crJobsCourseCommunication cid
|
||||||
, crTestJobs = crTestJobsCourseCommunication cid
|
, crTestJobs = crTestJobsCourseCommunication cid
|
||||||
|
|||||||
@ -333,7 +333,7 @@ mkFirmAllTable isAdmin uid = do
|
|||||||
, prismAForm (singletonFilter "company-number") mPrev $ aopt textField (fslI MsgTableCompanyNo)
|
, prismAForm (singletonFilter "company-number") mPrev $ aopt textField (fslI MsgTableCompanyNo)
|
||||||
, prismAForm (singletonFilter "is-supervisor") mPrev $ aopt textField (fslI MsgTableSupervisor)
|
, prismAForm (singletonFilter "is-supervisor") mPrev $ aopt textField (fslI MsgTableSupervisor)
|
||||||
, prismAForm (singletonFilter "foreign-supervisor" . maybePrism _PathPiece) mPrev $ aopt (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgFilterForeignSupervisor)
|
, prismAForm (singletonFilter "foreign-supervisor" . maybePrism _PathPiece) mPrev $ aopt (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgFilterForeignSupervisor)
|
||||||
, prismAForm (singletonFilter "company-postal" . maybePrism _PathPiece) mPrev $ aopt (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgFilterFirmPostalAddress)
|
, prismAForm (singletonFilter "company-postal" . maybePrism _PathPiece) mPrev $ aopt (boolField . Just $ SomeMessage MsgBoolIrrelevant) (fslI MsgFilterFirmExtern)
|
||||||
]
|
]
|
||||||
dbtStyle = def { dbsFilterLayout = defaultDBSFilterLayout }
|
dbtStyle = def { dbsFilterLayout = defaultDBSFilterLayout }
|
||||||
acts :: Map FirmAllAction (AForm Handler FirmAllActionData)
|
acts :: Map FirmAllAction (AForm Handler FirmAllActionData)
|
||||||
@ -601,7 +601,7 @@ postFirmUsersR fsh = do
|
|||||||
redirect (FirmCommR fsh, [(toPathPiece GetRecipient, toPathPiece cID) | cID <- cuids])
|
redirect (FirmCommR fsh, [(toPathPiece GetRecipient, toPathPiece cID) | cID <- cuids])
|
||||||
|
|
||||||
siteLayout (citext2widget companyName) $ do
|
siteLayout (citext2widget companyName) $ do
|
||||||
setTitle $ toHtml $ CI.original companyShorthand <> " (" <> tshow companyAvsId <> ")"
|
setTitle $ toHtml $ CI.original companyShorthand <> "-" <> tshow companyAvsId
|
||||||
$(widgetFile "firm-users")
|
$(widgetFile "firm-users")
|
||||||
|
|
||||||
|
|
||||||
@ -768,7 +768,7 @@ postFirmSupersR fsh = do
|
|||||||
|
|
||||||
|
|
||||||
siteLayout (citext2widget fsh) $ do
|
siteLayout (citext2widget fsh) $ do
|
||||||
setTitle $ citext2Html fsh
|
setTitle $ citext2Html $ fsh <> " Supers"
|
||||||
-- TODO: factor out company info section hamlet here and from user table
|
-- TODO: factor out company info section hamlet here and from user table
|
||||||
[whamlet|
|
[whamlet|
|
||||||
<section>
|
<section>
|
||||||
@ -854,7 +854,8 @@ handleFirmCommR ultDest cs = do
|
|||||||
return usr
|
return usr
|
||||||
|
|
||||||
commR CommunicationRoute
|
commR CommunicationRoute
|
||||||
{ crHeading = SomeMessage $ case cs of { [c] -> MsgFirmNotification c; _ -> MsgFirmsNotification }
|
{ crHeading = SomeMessage $ case cs of { [c] -> MsgFirmNotification c ; _ -> MsgFirmsNotification }
|
||||||
|
, crTitle = SomeMessage $ case cs of { [c] -> MsgFirmNotificationTitle c ; _ -> MsgFirmsNotificationTitle }
|
||||||
, crUltDest = ultDest
|
, crUltDest = ultDest
|
||||||
, crJobs = crJobsFirmCommunication cs -- :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
, crJobs = crJobsFirmCommunication cs -- :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
||||||
, crTestJobs = crTestFirmCommunication cs -- :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
, crTestJobs = crTestFirmCommunication cs -- :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
||||||
|
|||||||
@ -32,9 +32,10 @@ postTCommR tid ssh csh tutn = do
|
|||||||
)
|
)
|
||||||
return (tutData, usertuts)
|
return (tutData, usertuts)
|
||||||
|
|
||||||
|
let heading = SomeMessage . prependCourseTitle tid ssh csh $ SomeMessage MsgCommTutorialHeading
|
||||||
commR CommunicationRoute
|
commR CommunicationRoute
|
||||||
{ crHeading = SomeMessage . prependCourseTitle tid ssh csh $ SomeMessage MsgCommTutorialHeading
|
{ crHeading = heading
|
||||||
|
, crTitle = heading
|
||||||
, crUltDest = SomeRoute $ CTutorialR tid ssh csh tutn TCommR
|
, crUltDest = SomeRoute $ CTutorialR tid ssh csh tutn TCommR
|
||||||
, crJobs = crJobsCourseCommunication cid
|
, crJobs = crJobsCourseCommunication cid
|
||||||
, crTestJobs = crTestJobsCourseCommunication cid
|
, crTestJobs = crTestJobsCourseCommunication cid
|
||||||
|
|||||||
@ -80,6 +80,7 @@ data CommunicationRoute = CommunicationRoute
|
|||||||
, crRecipientAuth :: Maybe (UserId -> DB AuthResult) -- ^ Only resolve userids given as GET-Parameter if they fulfil this criterion
|
, crRecipientAuth :: Maybe (UserId -> DB AuthResult) -- ^ Only resolve userids given as GET-Parameter if they fulfil this criterion
|
||||||
, crJobs, crTestJobs :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
, crJobs, crTestJobs :: Communication -> ConduitT () Job (YesodDB UniWorX) ()
|
||||||
, crHeading :: SomeMessage UniWorX
|
, crHeading :: SomeMessage UniWorX
|
||||||
|
, crTitle :: SomeMessage UniWorX
|
||||||
, crUltDest :: SomeRoute UniWorX
|
, crUltDest :: SomeRoute UniWorX
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +270,7 @@ commR CommunicationRoute{..} = do
|
|||||||
, formSubmit = FormNoSubmit
|
, formSubmit = FormNoSubmit
|
||||||
}
|
}
|
||||||
siteLayoutMsg crHeading $ do
|
siteLayoutMsg crHeading $ do
|
||||||
setTitleI crHeading
|
setTitleI crTitle
|
||||||
let commTestTip = $(i18nWidgetFile "comm-test-tip")
|
let commTestTip = $(i18nWidgetFile "comm-test-tip")
|
||||||
[whamlet|
|
[whamlet|
|
||||||
$newline never
|
$newline never
|
||||||
|
|||||||
Reference in New Issue
Block a user