module Web.View.Tasks.Index where
import Web.View.Prelude
data IndexView = IndexView { tasks :: [Task] }
instance View IndexView where
html IndexView { .. } = [hsx|
{breadcrumb}
Task |
|
|
|
{forEach tasks renderTask}
|]
where
breadcrumb = renderBreadcrumb
[ breadcrumbLink "Tasks" TasksAction
]
renderTask :: Task -> Html
renderTask task = [hsx|
{task} |
Show |
Edit |
Delete |
|]