module Web.View.InstitutionalKnowledge.Index where import Web.View.Prelude data IndexView = IndexView { entries :: ![InstitutionalKnowledgeEntry] , hubs :: ![Hub] , mQuery :: !(Maybe Text) } instance View IndexView where html IndexView { .. } = [hsx|

Institutional Knowledge Base

{if null entries then [hsx|

No entries found.

|] else [hsx|
{forM_ entries renderEntry}
|]}
|] where renderEntry e = [hsx|

{e.summary}

View

{show e.createdAt}

|]