Commit 5f3d7a83 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] back for NodeDocs

parent 143e9929
...@@ -41,10 +41,10 @@ update = R.createElement updateCpt ...@@ -41,10 +41,10 @@ update = R.createElement updateCpt
updateCpt :: R.Component UpdateProps updateCpt :: R.Component UpdateProps
updateCpt = here.component "update" cpt where updateCpt = here.component "update" cpt where
cpt props@{ nodeType: Dashboard } _ = pure $ updateDashboard props [] cpt props@{ nodeType: Dashboard } _ = pure $ updateDashboard props []
cpt props@{ nodeType: Graph } _ = pure $ updateGraph props [] cpt props@{ nodeType: Graph } _ = pure $ updateGraph props []
cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props [] cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props []
cpt props@{ nodeType: Texts } _ = pure $ updateTexts props [] cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props []
cpt props@{ nodeType: _ } _ = pure $ updateOther props [] cpt props@{ nodeType: _ } _ = pure $ updateOther props []
updateDashboard :: R2.Component UpdateProps updateDashboard :: R2.Component UpdateProps
updateDashboard = R.createElement updateDashboardCpt updateDashboard = R.createElement updateDashboardCpt
......
...@@ -181,7 +181,8 @@ settingsBox Corpus = ...@@ -181,7 +181,8 @@ settingsBox Corpus =
, SearchBox , SearchBox
, Download , Download
--, Clone --, Clone
, Add [ NodeList , Add [ NodeTexts
, NodeList
, Graph , Graph
, Dashboard , Dashboard
, NodeFrameWrite , NodeFrameWrite
...@@ -195,10 +196,10 @@ settingsBox Corpus = ...@@ -195,10 +196,10 @@ settingsBox Corpus =
] ]
} }
settingsBox Texts = settingsBox NodeTexts =
SettingsBox { show : true SettingsBox { show : true
, edit : false , edit : false
, doc : Documentation Texts , doc : Documentation NodeTexts
, buttons : [ Refresh , buttons : [ Refresh
, Upload , Upload
, Download , Download
......
...@@ -13,8 +13,8 @@ hasStatus _ Refresh = Dev ...@@ -13,8 +13,8 @@ hasStatus _ Refresh = Dev
hasStatus _ Config = Dev hasStatus _ Config = Dev
hasStatus _ (Merge _) = Dev hasStatus _ (Merge _) = Dev
hasStatus _ (Documentation _) = Dev hasStatus _ (Documentation _) = Dev
hasStatus Annuaire Upload = Dev hasStatus Annuaire Upload = Dev
hasStatus Texts Upload = Dev hasStatus NodeTexts Upload = Dev
hasStatus Corpus (Add _) = Dev hasStatus Corpus (Add _) = Dev
hasStatus _ _ = Stable hasStatus _ _ = Stable
...@@ -267,7 +267,7 @@ renderRouteCpt = here.component "renderRoute" cpt where ...@@ -267,7 +267,7 @@ renderRouteCpt = here.component "renderRoute" cpt where
GR.RouteFrameCode s n -> routeFrame (Record.merge { nodeType: NodeFrameNotebook } $ sessionNodeProps s n) [] GR.RouteFrameCode s n -> routeFrame (Record.merge { nodeType: NodeFrameNotebook } $ sessionNodeProps s n) []
GR.RouteFrameVisio s n -> routeFrame (Record.merge { nodeType: NodeFrameVisio } $ sessionNodeProps s n) [] GR.RouteFrameVisio s n -> routeFrame (Record.merge { nodeType: NodeFrameVisio } $ sessionNodeProps s n) []
GR.Team s n -> team (sessionNodeProps s n) [] GR.Team s n -> team (sessionNodeProps s n) []
GR.Texts s n -> texts (sessionNodeProps s n) [] GR.NodeTexts s n -> texts (sessionNodeProps s n) []
GR.UserPage s n -> user (sessionNodeProps s n) [] GR.UserPage s n -> user (sessionNodeProps s n) []
] ]
...@@ -328,7 +328,7 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where ...@@ -328,7 +328,7 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
, metaData , metaData
, session , session
} [] ] } [] ]
GR.Texts _s _n -> do GR.NodeTexts _s _n -> do
pure $ wrapper pure $ wrapper
[ Texts.textsSidePanel { boxes [ Texts.textsSidePanel { boxes
, session , session
......
...@@ -26,7 +26,7 @@ router = oneOf ...@@ -26,7 +26,7 @@ router = oneOf
, Dashboard <$> (route "dashboard" *> sid) <*> int , Dashboard <$> (route "dashboard" *> sid) <*> int
, PGraphExplorer <$> (route "graph" *> sid) <*> int , PGraphExplorer <$> (route "graph" *> sid) <*> int
, PhyloExplorer <$> (route "phylo" *> sid) <*> int , PhyloExplorer <$> (route "phylo" *> sid) <*> int
, Texts <$> (route "texts" *> sid) <*> int , NodeTexts <$> (route "texts" *> sid) <*> int
, Lists <$> (route "lists" *> sid) <*> int , Lists <$> (route "lists" *> sid) <*> int
, ContactPage <$> (route "annuaire" *> sid) <*> int , ContactPage <$> (route "annuaire" *> sid) <*> int
<*> (lit "contact" *> int) <*> (lit "contact" *> int)
......
...@@ -30,7 +30,7 @@ data AppRoute ...@@ -30,7 +30,7 @@ data AppRoute
| RouteFrameWrite SessionId Int | RouteFrameWrite SessionId Int
| RouteFrameVisio SessionId Int | RouteFrameVisio SessionId Int
| Team SessionId Int | Team SessionId Int
| Texts SessionId Int | NodeTexts SessionId Int
| UserPage SessionId Int | UserPage SessionId Int
...@@ -74,7 +74,7 @@ instance Show AppRoute where ...@@ -74,7 +74,7 @@ instance Show AppRoute where
show (PGraphExplorer s i) = "graphExplorer" <> show i <> " (" <> show s <> ")" show (PGraphExplorer s i) = "graphExplorer" <> show i <> " (" <> show s <> ")"
show (PhyloExplorer s i) = "phyloExplorer" <> show i <> " (" <> show s <> ")" show (PhyloExplorer s i) = "phyloExplorer" <> show i <> " (" <> show s <> ")"
show (Dashboard s i) = "Dashboard" <> show i <> " (" <> show s <> ")" show (Dashboard s i) = "Dashboard" <> show i <> " (" <> show s <> ")"
show (Texts s i) = "texts" <> show i <> " (" <> show s <> ")" show (NodeTexts s i) = "texts" <> show i <> " (" <> show s <> ")"
show (Lists s i) = "lists" <> show i <> " (" <> show s <> ")" show (Lists s i) = "lists" <> show i <> " (" <> show s <> ")"
show (Annuaire s i) = "Annuaire" <> show i <> " (" <> show s <> ")" show (Annuaire s i) = "Annuaire" <> show i <> " (" <> show s <> ")"
show (UserPage s i) = "User" <> show i <> " (" <> show s <> ")" show (UserPage s i) = "User" <> show i <> " (" <> show s <> ")"
...@@ -101,7 +101,7 @@ appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> " ...@@ -101,7 +101,7 @@ appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "
appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i
appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i
appPath (PhyloExplorer s i) = "phylo/" <> show s <> "/" <> show i appPath (PhyloExplorer s i) = "phylo/" <> show s <> "/" <> show i
appPath (Texts s i) = "texts/" <> show s <> "/" <> show i appPath (NodeTexts s i) = "texts/" <> show s <> "/" <> show i
appPath (Lists s i) = "lists/" <> show s <> "/" <> show i appPath (Lists s i) = "lists/" <> show s <> "/" <> show i
appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i
appPath (UserPage s i) = "user/" <> show s <> "/" <> show i appPath (UserPage s i) = "user/" <> show s <> "/" <> show i
...@@ -127,7 +127,7 @@ nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i ...@@ -127,7 +127,7 @@ nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i
nodeTypeAppRoute GT.Team s i = Just $ Team s i nodeTypeAppRoute GT.Team s i = Just $ Team s i
nodeTypeAppRoute GT.Texts s i = Just $ Texts s i nodeTypeAppRoute GT.NodeTexts s i = Just $ NodeTexts s i
nodeTypeAppRoute GT.NodeFrameWrite s i = Just $ RouteFrameWrite s i nodeTypeAppRoute GT.NodeFrameWrite s i = Just $ RouteFrameWrite s i
nodeTypeAppRoute GT.NodeFrameCalc s i = Just $ RouteFrameCalc s i nodeTypeAppRoute GT.NodeFrameCalc s i = Just $ RouteFrameCalc s i
nodeTypeAppRoute GT.NodeFrameVisio s i = Just $ RouteFrameVisio s i nodeTypeAppRoute GT.NodeFrameVisio s i = Just $ RouteFrameVisio s i
......
...@@ -148,7 +148,7 @@ data NodeType = Annuaire ...@@ -148,7 +148,7 @@ data NodeType = Annuaire
| Nodes | Nodes
| Phylo | Phylo
| Team | Team
| Texts | NodeTexts
| Tree | Tree
| Url_Document | Url_Document
-- TODO Optional Nodes -- TODO Optional Nodes
...@@ -190,7 +190,7 @@ instance Show NodeType where ...@@ -190,7 +190,7 @@ instance Show NodeType where
show Tree = "NodeTree" show Tree = "NodeTree"
show Team = "NodeTeam" show Team = "NodeTeam"
show NodeList = "NodeList" show NodeList = "NodeList"
show Texts = "NodeDocs" show NodeTexts = "NodeTexts"
show NodeFrameWrite = "NodeFrameWrite" show NodeFrameWrite = "NodeFrameWrite"
show NodeFrameCalc = "NodeFrameCalc" show NodeFrameCalc = "NodeFrameCalc"
show NodeFrameNotebook = "NodeFrameNotebook" show NodeFrameNotebook = "NodeFrameNotebook"
...@@ -218,7 +218,7 @@ instance Read NodeType where ...@@ -218,7 +218,7 @@ instance Read NodeType where
read "Tree" = Just Tree read "Tree" = Just Tree
read "NodeTeam" = Just Team read "NodeTeam" = Just Team
read "NodeList" = Just NodeList read "NodeList" = Just NodeList
read "NodeTexts" = Just Texts read "NodeTexts" = Just NodeTexts
read "Annuaire" = Just Annuaire read "Annuaire" = Just Annuaire
read "NodeFrameWrite" = Just NodeFrameWrite read "NodeFrameWrite" = Just NodeFrameWrite
read "NodeFrameCalc" = Just NodeFrameCalc read "NodeFrameCalc" = Just NodeFrameCalc
...@@ -254,7 +254,7 @@ translateFR = case _ of ...@@ -254,7 +254,7 @@ translateFR = case _ of
Nodes -> "Nœuds" Nodes -> "Nœuds"
Phylo -> "Phylo" Phylo -> "Phylo"
Team -> "Équipe" Team -> "Équipe"
Texts -> "Textes" NodeTexts -> "Textes"
Tree -> "Arbre" Tree -> "Arbre"
Url_Document -> "Document URL" Url_Document -> "Document URL"
-- --
...@@ -284,7 +284,7 @@ translateEN = case _ of ...@@ -284,7 +284,7 @@ translateEN = case _ of
Nodes -> "Nodes" Nodes -> "Nodes"
Phylo -> "Phylo" Phylo -> "Phylo"
Team -> "Team" Team -> "Team"
Texts -> "Texts" NodeTexts -> "Texts"
Tree -> "Tree" Tree -> "Tree"
Url_Document -> "URL document" Url_Document -> "URL document"
-- --
...@@ -322,7 +322,7 @@ getIcon Corpus false = "book-circle" ...@@ -322,7 +322,7 @@ getIcon Corpus false = "book-circle"
getIcon Phylo _ = "code-fork" getIcon Phylo _ = "code-fork"
getIcon Graph _ = "hubzilla" getIcon Graph _ = "hubzilla"
getIcon Texts _ = "newspaper-o" getIcon NodeTexts _ = "newspaper-o"
getIcon Dashboard _ = "signal" getIcon Dashboard _ = "signal"
getIcon NodeList _ = "list" getIcon NodeList _ = "list"
getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
...@@ -397,7 +397,7 @@ nodeTypePath NodeUser = "user" ...@@ -397,7 +397,7 @@ nodeTypePath NodeUser = "user"
nodeTypePath NodeContact = "contact" nodeTypePath NodeContact = "contact"
nodeTypePath Tree = "tree" nodeTypePath Tree = "tree"
nodeTypePath NodeList = "lists" nodeTypePath NodeList = "lists"
nodeTypePath Texts = "texts" nodeTypePath NodeTexts = "texts"
nodeTypePath Team = "team" nodeTypePath Team = "team"
nodeTypePath NodeFrameWrite = "write" nodeTypePath NodeFrameWrite = "write"
nodeTypePath NodeFrameCalc = "calc" nodeTypePath NodeFrameCalc = "calc"
......
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