Commit 87f2e795 authored by Abinaya Sudhir's avatar Abinaya Sudhir

Added count message to list

parent 1541c66b
...@@ -15,7 +15,7 @@ import DOM.WebStorage.Storage (getItem, setItem) ...@@ -15,7 +15,7 @@ import DOM.WebStorage.Storage (getItem, setItem)
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, jsonEmptyObject, (.?), (:=), (~>)) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, jsonEmptyObject, (.?), (:=), (~>))
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.HTTP.Method (Method(..)) import Data.HTTP.Method (Method(..))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..), fromMaybe)
import Data.MediaType.Common (applicationJSON) import Data.MediaType.Common (applicationJSON)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest) import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..)) import Network.HTTP.RequestHeader (RequestHeader(..))
...@@ -87,19 +87,19 @@ addcorpusviewSpec = simpleSpec performAction render ...@@ -87,19 +87,19 @@ addcorpusviewSpec = simpleSpec performAction render
div [className "container"] div [className "container"]
[ [
div [className "jumbotron"] div [className "jumbotron"]
[div [className "row"] [ div [className "row"]
[ [
div [className "col-md-3"] div [className "col-md-3"]
[ [
h3 [] [text "Treeview"] h3 [] [text "Treeview"]
] ]
, div [className "col-md-9"] , div [className "col-md-9"]
[ [
h3 [] [text "Corpusview"] h3 [] [text "Corpusview"]
, ul [className "list-group"] $ map fn1 state.response , ul [className "list-group"] $ map fn1 state.response
] ]
] ]
] ]
] ]
] ]
...@@ -109,7 +109,8 @@ fn1 :: Response -> ReactElement ...@@ -109,7 +109,8 @@ fn1 :: Response -> ReactElement
fn1 (Response o) = fn1 (Response o) =
li [className "list-group-item justify-content-between"] li [className "list-group-item justify-content-between"]
[ [
span [className "badge badge-default badge-pill"] [ text $ show o.count_count] span [] [text $ fromMaybe "" o.count_message]
, span [className "badge badge-default badge-pill"] [ text $ show o.count_count]
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment