Commit a9618110 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[tree] add dashboard view for Folder, Private, Shared, Public

parent 3b8f6267
......@@ -57,7 +57,11 @@ appCpt = R.hooksComponent "G.C.App.app" cpt where
case fst route of
Home -> forested $ homeLayout LL_EN
Login -> login { sessions, backends, visible: showLogin }
Folder sid _ -> withSession sid $ \_ -> forested (folder {})
--Folder sid _ -> withSession sid $ \_ -> forested (folder {})
Folder sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderPrivate sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderPublic sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderShared sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
Corpus sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
Texts sid nodeId -> withSession sid $ \session -> forested $ textsLayout { nodeId, session, frontends }
Lists sid nodeId -> withSession sid $ \session -> forested $ listsLayout { nodeId, session }
......
......@@ -11,6 +11,9 @@ router :: Match AppRoute
router = oneOf
[ Login <$ route "login"
, Folder <$> (route "folder" *> sid) <*> int
, FolderPrivate <$> (route "folderPrivate" *> sid) <*> int
, FolderPublic <$> (route "folderPublic" *> sid) <*> int
, FolderShared <$> (route "folderShared" *> sid) <*> int
, CorpusDocument <$> (route "corpus" *> sid) <*> int
<*> (lit "list" *> int)
<*> (lit "document" *> int)
......
......@@ -8,6 +8,9 @@ data AppRoute
= Home
| Login
| Folder SessionId Int
| FolderPrivate SessionId Int
| FolderPublic SessionId Int
| FolderShared SessionId Int
| Corpus SessionId Int
| Document SessionId Int Int
| CorpusDocument SessionId Int Int Int
......@@ -40,6 +43,9 @@ instance showAppRoute :: Show AppRoute where
show Home = "Home"
show Login = "Login"
show (Folder s i) = "Folder" <> show i <> " (" <> show s <> ")"
show (FolderPrivate s i) = "FolderPrivate" <> show i <> " (" <> show s <> ")"
show (FolderPublic s i) = "FolderPublic" <> show i <> " (" <> show s <> ")"
show (FolderShared s i) = "FolderShared" <> show i <> " (" <> show s <> ")"
show (Corpus s i) = "Corpus" <> show i <> " (" <> show s <> ")"
show (Document _ s i) = "Document" <> show i <> " (" <> show s <> ")"
show (CorpusDocument s _ _ i) = "CorpusDocument" <> show i <> " (" <> show s <> ")"
......@@ -55,6 +61,9 @@ appPath :: AppRoute -> String
appPath Home = ""
appPath Login = "login"
appPath (Folder s i) = "folder/" <> show s <> "/" <> show i
appPath (FolderPrivate s i) = "folderPrivate/" <> show s <> "/" <> show i
appPath (FolderPublic s i) = "folderPublic/" <> show s <> "/" <> show i
appPath (FolderShared s i) = "folderShared/" <> show s <> "/" <> show i
appPath (CorpusDocument s c l i) = "corpus/" <> show s <> "/" <> show c <> "/list/" <> show l <> "/document/" <> show i
appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i
appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i
......
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