[NGRAMS] move the Add button

parent 86ad536b
...@@ -561,6 +561,13 @@ tableContainer { pageParams ...@@ -561,6 +561,13 @@ tableContainer { pageParams
, value pageParams.searchQuery , value pageParams.searchQuery
, onInput \e -> setSearchQuery (unsafeEventValue e) , onInput \e -> setSearchQuery (unsafeEventValue e)
] ]
, div [] (
if A.null props.tableBody && pageParams.searchQuery /= "" then [
button [ className "btn btn-primary"
, onClick $ const $ dispatch $ AddNewNgram pageParams.searchQuery
] [text $ "Add " <> pageParams.searchQuery]
] else []
)
] ]
, div [className "col-md-2", style {marginTop : "6px"}] , div [className "col-md-2", style {marginTop : "6px"}]
[ li [className " list-group-item"] [ li [className " list-group-item"]
...@@ -608,13 +615,6 @@ tableContainer { pageParams ...@@ -608,13 +615,6 @@ tableContainer { pageParams
, button [className "btn btn-primary", onClick $ const $ dispatch $ AddTermChildren] [text "Save"] , button [className "btn btn-primary", onClick $ const $ dispatch $ AddTermChildren] [text "Save"]
, button [className "btn btn-secondary", onClick $ const $ dispatch $ SetParentResetChildren Nothing] [text "Cancel"] , button [className "btn btn-secondary", onClick $ const $ dispatch $ SetParentResetChildren Nothing] [text "Cancel"]
]) ngramsParent) ]) ngramsParent)
, div [] (
if A.null props.tableBody && pageParams.searchQuery /= "" then [
button [ className "btn btn-primary"
, onClick $ const $ dispatch $ AddNewNgram pageParams.searchQuery
] [text $ "Add " <> pageParams.searchQuery]
] else []
)
, div [ _id "terms_table", className "panel-body" ] , div [ _id "terms_table", className "panel-body" ]
[ table [ className "table able" ] [ table [ className "table able" ]
[ thead [ className "tableHeader"] [props.tableHead] [ thead [ className "tableHeader"] [props.tableHead]
......
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