module Web.View.Entries.Index where
import Web.View.Prelude
data IndexView = IndexView { entries :: [Entry] }
instance View IndexView where
html IndexView { .. } = [hsx|
{breadcrumb}
| Entry |
|
|
|
{forEach entries renderEntry}
|]
where
breadcrumb = renderBreadcrumb
[ breadcrumbLink "Entries" EntriesAction
]
renderEntry :: Entry -> Html
renderEntry entry = [hsx|
| {entry} |
Show |
Edit |
Delete |
|]