Merged new pageActions from master
This commit is contained in:
parent
afc022eee7
commit
fcc2f68cea
@ -209,7 +209,7 @@ instance Yesod UniWorX where
|
|||||||
|
|
||||||
favourites <- forM favourites' $ \(Entity _ c@Course{..})
|
favourites <- forM favourites' $ \(Entity _ c@Course{..})
|
||||||
-> let
|
-> let
|
||||||
courseRoute = CourseR courseTermId courseShorthand CourseShowR
|
courseRoute = CourseR courseTerm courseShorthand CourseShowR
|
||||||
in (c, courseRoute, ) <$> filterM (menuItemAccessCallback . menuItem) (pageActions courseRoute)
|
in (c, courseRoute, ) <$> filterM (menuItemAccessCallback . menuItem) (pageActions courseRoute)
|
||||||
|
|
||||||
-- We break up the default layout into two components:
|
-- We break up the default layout into two components:
|
||||||
@ -427,7 +427,7 @@ pageActions (CourseR tid csh CourseShowR) =
|
|||||||
, menuItemAccessCallback' = return True
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
pageActions (CourseR tid csh (SheetR SheetListR)) =
|
pageActions (CSheetR tid csh SheetListR) =
|
||||||
[ PageActionPrime $ MenuItem
|
[ PageActionPrime $ MenuItem
|
||||||
{ menuItemLabel = "Neues Übungsblatt"
|
{ menuItemLabel = "Neues Übungsblatt"
|
||||||
, menuItemIcon = Nothing
|
, menuItemIcon = Nothing
|
||||||
@ -435,6 +435,14 @@ pageActions (CourseR tid csh (SheetR SheetListR)) =
|
|||||||
, menuItemAccessCallback' = return True
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
pageActions (CSheetR tid csh (SheetShowR shn)) =
|
||||||
|
[ PageActionPrime $ MenuItem
|
||||||
|
{ menuItemLabel = "Abgabe"
|
||||||
|
, menuItemIcon = Nothing
|
||||||
|
, menuItemRoute = CSheetR tid csh (SubmissionR shn newSubmission)
|
||||||
|
, menuItemAccessCallback' = return True
|
||||||
|
}
|
||||||
|
]
|
||||||
pageActions TermShowR =
|
pageActions TermShowR =
|
||||||
[ PageActionPrime $ MenuItem
|
[ PageActionPrime $ MenuItem
|
||||||
{ menuItemLabel = "Neues Semester"
|
{ menuItemLabel = "Neues Semester"
|
||||||
@ -451,6 +459,7 @@ pageActions (CourseListTermR _) =
|
|||||||
, menuItemAccessCallback' = return True
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
pageActions _ = []
|
pageActions _ = []
|
||||||
|
|
||||||
defaultLinks :: [MenuTypes]
|
defaultLinks :: [MenuTypes]
|
||||||
|
|||||||
@ -187,16 +187,7 @@ getSheetShowR tid csh shn = do
|
|||||||
-- return desired columns
|
-- return desired columns
|
||||||
return $ (file E.^. FileTitle, sheetFile E.^. SheetFileType)
|
return $ (file E.^. FileTitle, sheetFile E.^. SheetFileType)
|
||||||
let fileLinks = map (\(E.Value fName, E.Value fType) -> CSheetR tid csh (SheetFileR shn fType fName)) fileNameTypes
|
let fileLinks = map (\(E.Value fName, E.Value fType) -> CSheetR tid csh (SheetFileR shn fType fName)) fileNameTypes
|
||||||
|
defaultLayout $ do
|
||||||
let pageActions =
|
|
||||||
[ PageActionPrime $ MenuItem
|
|
||||||
{ menuItemLabel = "Abgabe"
|
|
||||||
, menuItemIcon = Nothing
|
|
||||||
, menuItemRoute = CSheetR tid csh (SubmissionR shn newSubmission)
|
|
||||||
, menuItemAccessCallback' = return True
|
|
||||||
}
|
|
||||||
]
|
|
||||||
defaultLinkLayout pageActions $ do
|
|
||||||
setTitle $ toHtml $ T.append "Übung " $ sheetName sheet
|
setTitle $ toHtml $ T.append "Übung " $ sheetName sheet
|
||||||
$(widgetFile "sheetShow")
|
$(widgetFile "sheetShow")
|
||||||
[whamlet| Under Construction !!! |] -- TODO
|
[whamlet| Under Construction !!! |] -- TODO
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user