From bad828aa07151c22035c58f569df82999399c13e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 26 Jan 2019 12:44:22 +0100 Subject: [PATCH] Introduce MenuType `Footer`; plumb footer.hamlet into defaultLinks footer.hamlet now works much like navbar.hamlet --- src/Foundation.hs | 4 ++-- templates/widgets/footer.hamlet | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Foundation.hs b/src/Foundation.hs index 9517f607e..94287ba49 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -250,7 +250,7 @@ uniworxMessages :: [UniWorXMessage] -> UniWorXMessages uniworxMessages = UniWorXMessages . map SomeMessage -- Menus and Favourites -data MenuType = NavbarAside | NavbarRight | NavbarSecondary | PageActionPrime | PageActionSecondary +data MenuType = NavbarAside | NavbarRight | NavbarSecondary | PageActionPrime | PageActionSecondary | Footer deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) data MenuItem = MenuItem @@ -1068,7 +1068,7 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the , menuItemAccessCallback' = return True } , return MenuItem - { menuItemType = NavbarRight + { menuItemType = Footer , menuItemLabel = MsgMenuVersion , menuItemIcon = Just "book" , menuItemRoute = SomeRoute VersionR diff --git a/templates/widgets/footer.hamlet b/templates/widgets/footer.hamlet index 00cd79d96..e133ec47b 100644 --- a/templates/widgets/footer.hamlet +++ b/templates/widgets/footer.hamlet @@ -1,3 +1,12 @@