diff --git a/src/Foundation.hs b/src/Foundation.hs index ba6cc663e..e10d1c515 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -399,12 +399,6 @@ defaultMenuLayout menu widget = do asidenav = $(widgetFile "widgets/asidenav") breadcrumbs :: Widget breadcrumbs = $(widgetFile "widgets/breadcrumbs") - modal :: [Char] -> [Char] -> Widget - modal modalTrigger modalContent = do - let - modalId :: Int32 - modalId = 13 - $(widgetFile "widgets/modal") pageactionprime :: Widget pageactionprime = $(widgetFile "widgets/pageactionprime") -- functions to determine if there are page-actions @@ -420,6 +414,7 @@ defaultMenuLayout menu widget = do addStylesheet $ StaticR css_fonts_css addStylesheet $ StaticR css_icons_css $(widgetFile "default-layout") + $(widgetFile "standalone/modal") $(widgetFile "standalone/showHide") $(widgetFile "standalone/sortable") $(widgetFile "standalone/inputs") diff --git a/src/Handler/Utils/Templates.hs b/src/Handler/Utils/Templates.hs index 245159eeb..8bae783b0 100644 --- a/src/Handler/Utils/Templates.hs +++ b/src/Handler/Utils/Templates.hs @@ -6,3 +6,17 @@ import Import.NoFoundation lipsum :: WidgetT site IO () lipsum = $(widgetFile "widgets/lipsum") + +modal :: [Char] -> Maybe [Char] -> WidgetT site IO () +modal modalTrigger (Just modalContent) = do + let + modalId :: Int32 + modalId = 13 + $(widgetFile "widgets/modal") +modal modalTrigger Nothing = do + let + modalId :: Int32 + modalId = 13 + modalContent :: [Char] + modalContent = "placeholder" + $(widgetFile "widgets/modal") diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index d606ccf37..b628912f0 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -6,8 +6,6 @@ ^{asidenav} - ^{modal ".toggler" "

Neue Veranstaltung


Erstelle eine neue Veranstaltung! Jetzt und hier. Kostenlos."} -
diff --git a/templates/home.hamlet b/templates/home.hamlet index 36ea5a429..0ee62ec29 100644 --- a/templates/home.hamlet +++ b/templates/home.hamlet @@ -72,11 +72,14 @@ Knopf-Test:
^{btnWdgt} - $if True - $# meant to be 'if js-supported' -

  • - Modals: -