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

{renderEntriesSection entries}
|] renderHubOption :: Hub -> Html renderHubOption h = [hsx||] renderEntriesSection :: [InstitutionalKnowledgeEntry] -> Html renderEntriesSection [] = [hsx|

No entries found.

|] renderEntriesSection entries = [hsx|
{forEach entries renderEntry}
|] renderEntry :: InstitutionalKnowledgeEntry -> Html renderEntry e = [hsx|

{e.summary}

View

{show e.createdAt}

|]