Commit 24d2b4d5 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[REFACT|FEAT] Move with params to Folders/Corpus/Annuaire (WIP)

parent d7a3bac1
...@@ -241,6 +241,9 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt ...@@ -241,6 +241,9 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
cpt {action: Merge {subTreeParams}, dispatch, id, nodeType, session} _ = do cpt {action: Merge {subTreeParams}, dispatch, id, nodeType, session} _ = do
pure $ copyFromCorpusView {dispatch, id, nodeType, session, subTreeParams} pure $ copyFromCorpusView {dispatch, id, nodeType, session, subTreeParams}
cpt {action: Move {subTreeParams}, dispatch, id, nodeType, session} _ = do
pure $ copyFromCorpusView {dispatch, id, nodeType, session, subTreeParams}
cpt {action: Link _} _ = pure $ fragmentPT $ "Soon, you will be able " cpt {action: Link _} _ = pure $ fragmentPT $ "Soon, you will be able "
<> "to link the corpus with your Annuaire" <> "to link the corpus with your Annuaire"
<> " (and reciprocally)." <> " (and reciprocally)."
......
...@@ -24,7 +24,7 @@ data NodeAction = Documentation NodeType ...@@ -24,7 +24,7 @@ data NodeAction = Documentation NodeType
| Share | Share
| Add (Array NodeType) | Add (Array NodeType)
| Merge { subTreeParams :: SubTreeParams } | Merge { subTreeParams :: SubTreeParams }
| Move | Move { subTreeParams :: SubTreeParams }
| Clone | Clone
| Link NodeType | Link NodeType
...@@ -47,7 +47,7 @@ instance eqNodeAction :: Eq NodeAction where ...@@ -47,7 +47,7 @@ instance eqNodeAction :: Eq NodeAction where
eq Download Download = true eq Download Download = true
eq Upload Upload = true eq Upload Upload = true
eq Refresh Refresh = true eq Refresh Refresh = true
eq Move Move = true eq (Move x) (Move y) = x == y
eq Clone Clone = true eq Clone Clone = true
eq Delete Delete = true eq Delete Delete = true
eq Share Share = true eq Share Share = true
...@@ -63,7 +63,7 @@ instance showNodeAction :: Show NodeAction where ...@@ -63,7 +63,7 @@ instance showNodeAction :: Show NodeAction where
show Download = "Download" show Download = "Download"
show Upload = "Upload" show Upload = "Upload"
show Refresh = "Refresh" show Refresh = "Refresh"
show Move = "Move" show (Move t) = "Move with subtree params" <> show t
show Clone = "Clone" show Clone = "Clone"
show Delete = "Delete" show Delete = "Delete"
show Share = "Share" show Share = "Share"
...@@ -85,7 +85,7 @@ glyphiconNodeAction (Merge _) = "random" ...@@ -85,7 +85,7 @@ glyphiconNodeAction (Merge _) = "random"
glyphiconNodeAction Refresh = "refresh" glyphiconNodeAction Refresh = "refresh"
glyphiconNodeAction Config = "wrench" glyphiconNodeAction Config = "wrench"
glyphiconNodeAction Share = "user-plus" glyphiconNodeAction Share = "user-plus"
glyphiconNodeAction Move = "share-square-o" glyphiconNodeAction (Move _) = "share-square-o"
glyphiconNodeAction _ = "" glyphiconNodeAction _ = ""
...@@ -156,7 +156,7 @@ settingsBox Folder = ...@@ -156,7 +156,7 @@ settingsBox Folder =
, Folder , Folder
, Annuaire , Annuaire
] ]
, Move , Move moveParameters
, Delete , Delete
] ]
} }
...@@ -172,7 +172,7 @@ settingsBox Corpus = ...@@ -172,7 +172,7 @@ settingsBox Corpus =
, SearchBox , SearchBox
, Upload , Upload
, Download , Download
, Move , Move moveParameters
--, Clone --, Clone
, Link Annuaire , Link Annuaire
, Delete , Delete
...@@ -238,7 +238,7 @@ settingsBox Annuaire = ...@@ -238,7 +238,7 @@ settingsBox Annuaire =
, edit : true , edit : true
, doc : Documentation Annuaire , doc : Documentation Annuaire
, buttons : [ Upload , buttons : [ Upload
, Move , Move moveParameters
, Delete , Delete
] ]
} }
...@@ -249,3 +249,21 @@ settingsBox _ = ...@@ -249,3 +249,21 @@ settingsBox _ =
, doc : Documentation NodeUser , doc : Documentation NodeUser
, buttons : [] , buttons : []
} }
moveParameters = { subTreeParams : SubTreeParams
{ showtypes: [ FolderPrivate
, FolderShared
, Team
, FolderPublic
, Folder
]
, valitypes: [ FolderPrivate
, FolderShared
, Team
, FolderPublic
, Folder
]
}
}
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