diff options
Diffstat (limited to 'Omni/Jr/Web.hs')
| -rw-r--r-- | Omni/Jr/Web.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs index 03072bb..a316d74 100644 --- a/Omni/Jr/Web.hs +++ b/Omni/Jr/Web.hs @@ -682,6 +682,12 @@ statusBadge status = TaskCore.Done -> ("badge badge-done", "Done") in Lucid.span_ [Lucid.class_ cls] label +complexityBadge :: (Monad m) => Int -> Lucid.HtmlT m () +complexityBadge complexity = + let cls = "badge badge-complexity badge-complexity-" <> tshow complexity + label = "ℂ " <> tshow complexity + in Lucid.span_ [Lucid.class_ cls, Lucid.title_ "Task Complexity (1-5)"] (Lucid.toHtml label) + sortDropdown :: (Monad m) => Text -> SortOrder -> Lucid.HtmlT m () sortDropdown basePath currentSort = Lucid.div_ [Lucid.class_ "sort-dropdown"] <| do @@ -1524,6 +1530,11 @@ instance Lucid.ToHtml TaskDetailPage where statusBadgeWithForm (TaskCore.taskStatus task) (TaskCore.taskId task) metaSep priorityBadgeWithForm (TaskCore.taskPriority task) (TaskCore.taskId task) + case TaskCore.taskComplexity task of + Nothing -> pure () + Just c -> do + metaSep + complexityBadge c case TaskCore.taskNamespace task of Nothing -> pure () Just ns -> do |
