Permalink
Browse files

separating out views

  • Loading branch information...
1 parent c8b643d commit a11b885f39ee19417a14420bddaa51e9198ccaa1 @alsonkemp alsonkemp committed Nov 17, 2008
Showing with 36 additions and 0 deletions.
  1. +8 −0 Turbinado/View/Helpers.hs
  2. +18 −0 Turbinado/View/Helpers/Misc.hs
  3. +10 −0 Turbinado/View/Helpers/Tags.hs
@@ -0,0 +1,8 @@
+module Turbinado.View.Helpers (
+ module Turbinado.View.Helpers.Misc,
+ module Turbinado.View.Helpers.Tags
+ ) where
+
+import Turbinado.View.Helpers.Misc
+import Turbinado.View.Helpers.Tags
+
@@ -0,0 +1,18 @@
+module Turbinado.View.Helpers.Misc (
+ breadCrumbs
+ ) where
+
+import Data.List
+import qualified Network.URI as URI
+import qualified Network.HTTP as HTTP
+import System.FilePath
+
+
+import Turbinado.View
+
+
+breadCrumbs :: View XML
+breadCrumbs = do e <- getEnvironment
+ let r = getRequest e
+ ps = tail $ splitDirectories $ URI.uriPath $ rqURI r
+ return $ cdata $"<div class='breadcrumbs'>" ++ (concat $ intersperse " : " ps) ++ "</div>"
@@ -0,0 +1,10 @@
+module Turbinado.View.Helpers.Tags (
+ anchorTag
+ ) where
+
+import Turbinado.View
+
+anchorTag :: String -> String -> View XML
+anchorTag l t = <a href=l><% t %></a>
+
+

0 comments on commit a11b885

Please sign in to comment.