From d90b937796e0fe08935f7bd1895d7860d99ef5aa Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Tue, 1 Oct 2024 13:46:32 +0300 Subject: [PATCH] wip --- .../HBS2/Git/Web/Html/Parts/Issues/Sidebar.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hbs2-git-dashboard/hbs2-git-dashboard-core/HBS2/Git/Web/Html/Parts/Issues/Sidebar.hs b/hbs2-git-dashboard/hbs2-git-dashboard-core/HBS2/Git/Web/Html/Parts/Issues/Sidebar.hs index c763597b..69671bbe 100644 --- a/hbs2-git-dashboard/hbs2-git-dashboard-core/HBS2/Git/Web/Html/Parts/Issues/Sidebar.hs +++ b/hbs2-git-dashboard/hbs2-git-dashboard-core/HBS2/Git/Web/Html/Parts/Issues/Sidebar.hs @@ -28,6 +28,7 @@ issuesSidebar lww topInfoBlock p' = do fmw <- lift $ countFixmeByAttribute (RepoLww lww) "workflow" fmt <- lift $ countFixmeByAttribute (RepoLww lww) "fixme-tag" ass <- lift $ countFixmeByAttribute (RepoLww lww) "assigned" + cla <- lift $ countFixmeByAttribute (RepoLww lww) "class" repoTopInfoBlock lww topInfoBlock @@ -88,6 +89,18 @@ issuesSidebar lww topInfoBlock p' = do span_ [] $ toHtml $ show $ pretty s + summary_ [class_ "sidebar-title"] $ small_ $ strong_ "Class" + + for_ cla $ \(s,n) -> do + li_ [] $ small_ [] do + a_ [ class_ "secondary" + , hxGet_ (toURL (Paged 0 (RepoFixmeHtmx (Map.insert "class" (coerce s) p) (RepoLww lww)))) + , hxTarget_ "#fixme-tab-data" + ] do + span_ [style_ "display: inline-block; width: 4ch; text-align: right; padding-right: 0.5em;"] $ + toHtml $ show $ pretty n + + span_ [] $ toHtml $ show $ pretty s pure ()