Commit f58560ea authored by Sudhir Kumar's avatar Sudhir Kumar

design changes, need to test

parent 4fd21b98
.
.logoSmall {
line-height:15px;
height:10px;
padding: 10px 10px;
}
#logo-designed {
border:15px;
}
......@@ -30,7 +27,6 @@
}
.tableHeader {
background-color : blue;
color: white;
}
......@@ -75,7 +71,6 @@ logoSmall {
}
.tableHeader {
background-color : blue;
color: white;
}
......@@ -148,8 +143,6 @@ text-align: center;
border:none;
}
#arrow {
width: 0;
height: 0;
......@@ -162,7 +155,6 @@ text-align: center;
left: -9px;
}
#rename-tooltip a:hover
{
text-decoration:none;
......@@ -174,3 +166,14 @@ text-align: center;
}
.nooverflow {
max-width: 300px;
height : 24px;
overflow: hidden;
text-overflow: ellipsis;
}
.nooverflow:hover {
overflow: visible;
height: auto;
}
\ No newline at end of file
......@@ -49,6 +49,7 @@ type Props =
-- ^ tabType is not ideal here since it is too much entangled with tabs and
-- ngramtable. Let's see how this evolves.
}
-- TODO: When a pagination link is clicked, reload data.
type State =
{ documentIdsToDelete :: Set Int
......@@ -138,8 +139,8 @@ instance decodeResponse :: DecodeJson Response where
filterSpec :: forall state props action. Spec state props action
filterSpec = simpleSpec defaultPerformAction render
where
render d p s c = [div [] [ text " Filter "
, input []
render d p s c = [div [ className "col-md-2"] [ text " Filter "
, input [className "form-control"]
]]
docViewSpec :: Spec {} Props Void
......@@ -327,7 +328,7 @@ searchResults squery = post "http://localhost:8008/count" unit
newtype FavoriteQuery = FavoriteQuery
newtype FavoriteQuery = FavoriteQuery
{ favorites :: Array Int
}
......
......@@ -315,9 +315,8 @@ tableContainer {searchQuery, dispatch, ngramsParent, ngramsChildren, ngramsTable
, text "Extracted Terms"
]
, div [className "row"]
[ div [className "savediv pull-left col-md-2", style { marginTop :"1.5em"}]
[ span [className "needsaveicon glyphicon glyphicon-import"] []
, button [_id "ImportListOrSaveAll", className "btn btn-warning", style {fontSize : "120%"}]
[ div [className "savediv pull-left col-md-2", style { marginTop :"35px"}]
[ button [_id "ImportListOrSaveAll", className "btn btn-warning", style {fontSize : "120%"}]
[ text "Import a Termlist" ]
]
, div [className "col-md-4", style {marginTop : "37px"}]
......@@ -330,21 +329,20 @@ tableContainer {searchQuery, dispatch, ngramsParent, ngramsChildren, ngramsTable
]
]
, div [_id "filter_terms", className "col-md-6", style{ marginTop : "2.1em",paddingLeft :"1em"}]
[ div [className "row", style {marginTop : "6px"}]
[ div [className "col-md-3"]
[ div [className "col-md-10 list-group", style {marginTop : "6px"}]
[ li [className " list-group-item"]
[ select [ _id "picklistmenu"
, className "form-control custom-select"
, onChange (\e -> dispatch (SetTermListFilter $ readTermList $ unsafeEventValue e))
] $ map optps1 termLists
]
, div [className "col-md-3"]
, li [className "list-group-item"]
[ select [ _id "picktermtype"
, className "form-control custom-select"
, style {marginLeft : "1em"}
, onChange (\e -> dispatch (SetTermTypeFilter $ readTermType $ unsafeEventValue e))
] $ map optps1 termTypes
]
, div [className "col-md-3"] [ props.pageSizeControl ]
, li [className " list-group-item"] [ props.pageSizeControl ]
]
]
, div [className "col-md-6", style {marginTop : "24px", marginBottom : "14px"}]
......@@ -371,8 +369,8 @@ tableContainer {searchQuery, dispatch, ngramsParent, ngramsChildren, ngramsTable
, button [className "btn btn-secondary", onClick $ const $ dispatch $ SetParentResetChildren Nothing] [text "Cancel"]
]) ngramsParent)
, div [ _id "terms_table", className "panel-body" ]
[ table [ className "table able table-bordered" ]
[ thead [ className "tableHeader table-bordered"] [props.tableHead]
[ table [ className "table able" ]
[ thead [ className "tableHeader"] [props.tableHead]
, tbody [] props.tableBody
]
]
......
module Gargantext.Pages.Annuaire where
import Data.Array (head)
import Gargantext.Prelude
import Data.Argonaut (class DecodeJson, decodeJson, (.?), (.??))
import Data.Lens (Prism', prism)
import Data.Array (head)
import Data.Either (Either(..))
import Data.Lens (Prism', prism)
import Data.Maybe (Maybe(..), maybe)
import Effect.Aff (Aff)
import React (ReactClass, ReactElement, Children)
import React as React
import React.DOM (a, br', div, input, p, text)
import React.DOM.Props (href)
import Effect.Class (liftEffect)
import Thermite ( Render, Spec
, createClass, simpleSpec, defaultPerformAction
)
------------------------------------------------------------------------------
import Gargantext.Prelude
import Gargantext.Components.Loader as Loader
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Table as T
import Gargantext.Config (toUrl, Path(..), NodeType(..), End(..))
import Gargantext.Config (toUrl, Path(..), NodeType(..), End(..))
import Gargantext.Config.REST (get)
import Gargantext.Pages.Annuaire.User.Contacts.Types (Contact(..), HyperdataContact(..), ContactWhere(..))
import React (ReactClass, ReactElement, Children)
import React as React
import React.DOM (a, br', div, input, p, text)
import React.DOM.Props (className, href, style)
import Thermite (Render, Spec, createClass, simpleSpec, defaultPerformAction)
------------------------------------------------------------------------------
type Props = Loader.InnerProps Int AnnuaireInfo ()
......@@ -91,7 +88,7 @@ loadedAnnuaireSpec = simpleSpec defaultPerformAction render
, user: ""
} <>
[ p [] []
, div [] [ text " Filter ", input []]
, div [className "col-md-3"] [ text " Filter ", input [className "form-control", style {"width" : "250px", "display": "inline-block"}]]
, br'
, pageLoader
{ path: initialPageParams nodeId
......@@ -157,7 +154,7 @@ renderContactCells (Just (Contact { id, hyperdata : (HyperdataContact contact@{w
, a [ href (toUrl Front NodeContact (Just id)) ] [ text $ maybe "name" identity contact.title ]
, text $ maybe "No ContactWhere" renderContactWhereOrg (head $ ou)
, text $ maybe "No ContactWhere" renderContactWhereDept (head $ ou)
, text $ maybe "No ContactWhere" renderContactWhereRole (head $ ou)
, div [className "nooverflow"] [text $ maybe "No ContactWhere" renderContactWhereRole (head $ ou)]
]
where
maybe' = maybe "" identity
......
......@@ -84,18 +84,18 @@ getDept = maybe "Empty Department" getDept' <<< head
getDept' obj = joinWith ", " $ (\(ContactWhere {labTeamDepts: l}) ->l) obj
getOffice :: Array ContactWhere -> String
getOffice = fromMaybe "Empty Office"
<<< maybe Nothing (\(ContactWhere {office:x}) -> x)
getOffice = fromMaybe "Empty Office"
<<< maybe Nothing (\(ContactWhere {office:x}) -> x)
<<< head
getCity :: Array ContactWhere -> String
getCity = fromMaybe "Empty City"
<<< maybe Nothing (\(ContactWhere {city:x}) -> x)
getCity = fromMaybe "Empty City"
<<< maybe Nothing (\(ContactWhere {city:x}) -> x)
<<< head
getCountry :: Array ContactWhere -> String
getCountry = fromMaybe "Empty Country"
<<< maybe Nothing (\(ContactWhere {country:x}) -> x)
getCountry = fromMaybe "Empty Country"
<<< maybe Nothing (\(ContactWhere {country:x}) -> x)
<<< head
-- | ContactWhere / Touch infos
......@@ -115,19 +115,19 @@ getMail' = fromMaybe "no mail" <<< _.mail <<< unwrap
-- | TODO format data in better design (UI) shape
contactInfos :: HyperdataContact -> Array ReactElement
contactInfos (HyperdataContact {who:who, ou:ou}) =
[ ul [className "list-group"] (infoRender (Tuple "Last Name" $ " " <> getLastName who))
, ul [className "list-group"] (infoRender (Tuple "First name" $ " " <> getFirstName who))
, ul [className "list-group"] (infoRender (Tuple "Organization" $ " " <> getOrga ou ))
, ul [className "list-group"] (infoRender (Tuple "Lab/Team/Dept"$ " " <> getOrga ou ))
, ul [className "list-group"] (infoRender (Tuple "Office" $ " " <> getOffice ou ))
, ul [className "list-group"] (infoRender (Tuple "City" $ " " <> getCity ou ))
, ul [className "list-group"] (infoRender (Tuple "Country" $ " " <> getCountry ou ))
, ul [className "list-group"] (infoRender (Tuple "Role" $ " " <> getRole ou ))
, ul [className "list-group"] (infoRender (Tuple "Phone" $ " " <> getPhone ou ))
, ul [className "list-group"] (infoRender (Tuple "Mail" $ " " <> getMail ou ))
[ li [className "list-group-item"] (infoRender (Tuple "Last Name" $ " " <> getLastName who))
, li [className "list-group-item"] (infoRender (Tuple "First name" $ " " <> getFirstName who))
, li [className "list-group-item"] (infoRender (Tuple "Organization" $ " " <> getOrga ou ))
, li [className "list-group-item"] (infoRender (Tuple "Lab/Team/Dept"$ " " <> getOrga ou ))
, li [className "list-group-item"] (infoRender (Tuple "Office" $ " " <> getOffice ou ))
, li [className "list-group-item"] (infoRender (Tuple "City" $ " " <> getCity ou ))
, li [className "list-group-item"] (infoRender (Tuple "Country" $ " " <> getCountry ou ))
, li [className "list-group-item"] (infoRender (Tuple "Role" $ " " <> getRole ou ))
, li [className "list-group-item"] (infoRender (Tuple "Phone" $ " " <> getPhone ou ))
, li [className "list-group-item"] (infoRender (Tuple "Mail" $ " " <> getMail ou ))
]
{- $
listInfo <.~$> hyperdata
where
......@@ -171,7 +171,7 @@ layoutUser' = simpleSpec defaultPerformAction render
where
render :: Render {} Props Void
render dispatch {loaded: Contact {name, hyperdata}} _ _ =
[ div [className "col-md-12"] $
[ ul [className "col-md-12 list-group"] $
display (fromMaybe "no name" name) (contactInfos hyperdata)
]
......
This diff is collapsed.
......@@ -5,7 +5,7 @@ import Data.Lens (over)
import Data.Maybe (Maybe(Nothing, Just))
import Effect (Effect)
import React (ReactElement)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul,i)
import React.DOM.Props (_data, _id, _type, aria, className, href, onChange, onClick, placeholder, role, src, style, tabIndex, target, title)
import Thermite (Render, Spec, _render, defaultPerformAction, defaultRender, focus, simpleSpec, withState, noState, cmapProps)
import Unsafe.Coerce (unsafeCoerce)
......@@ -54,14 +54,14 @@ pagesComponent s = case s.currentRoute of
selectSpec Home = layout0 $ noState (L.layoutLanding EN)
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec (Folder i) = layout0 $ noState F.layoutFolder
selectSpec (Corpus i) = layout0 $ cmapProps (const {nodeId: i}) $ noState Corpus.layout
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec (Document i) = layout0 $ focus _documentViewState _documentViewAction Annotation.docview
selectSpec (PGraphExplorer i)= layout1 $ focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec (Annuaire i) = layout0 $ cmapProps (const {annuaireId: i}) $ noState A.layout
selectSpec (UserPage i) = layout0 $ cmapProps (const {nodeId: i}) $ noState C.layoutUser
selectSpec (ContactPage i) = layout0 $ cmapProps (const {nodeId: i}) $ noState C.layoutUser
......@@ -92,10 +92,16 @@ layout0 layout =
outerLayout1
, rs bs
]
ls = over _render \render d p s c -> [
div [ className "col-md-2"] (render d p s c)
ls = over _render \render d p s c -> [
div [ className "col-md-2"] (render d p s c)
]
rs = over _render \render d p s c -> [ div [ className "col-md-10"] (render d p s c) ]
rs = over _render \render d p s c -> [
div [ case (s.loginState.authData) of
Just a ->
className "col-md-10"
Nothing ->
className "col-md-12"
] (render d p s c) ]
cont = over _render \render d p s c -> [ div [className "row" ] (render d p s c) ]
as = noState Tree.treeview
......@@ -133,11 +139,11 @@ layout1 layout =
outerLayout1
, rs bs
]
ls = over _render \render d p s c -> [
ls = over _render \render d p s c -> [
button [onClick $ \e -> d ShowTree, className "btn btn-primary",style {position:"relative", top: "99px",left:"-264px",zIndex : "1000"}] [text "ShowTree"]
, div [if (s.showTree) then className "col-md-2" else className "col-md-2"] if (s.showTree) then (render d p s c) else []
, div [if (s.showTree) then className "col-md-2" else className "col-md-2"] if (s.showTree) then (render d p s c) else []
]
rs = over _render \render d p s c -> [ div [if (s.showTree) then className "col-md-10" else className "col-md-12"] (render d p s c) ]
cont = over _render \render d p s c -> [ div [className "row" ] (render d p s c) ]
......@@ -308,7 +314,11 @@ divSearchBar = simpleSpec performAction render
}
, onChange \e -> dispatch $ Search (unsafeCoerce e).target.value
]
, button [onClick \e -> dispatch Go, className "btn btn-primary"] [text "Enter"]
-- , button [onClick \e -> dispatch Go, className "btn btn-primary"] [text "Enter"]
, span [onClick \e -> dispatch Go, style {color : "#039BE5"}]
[
i [className "material-icons md-36"] [text "control_point"]
]
]
]
......
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