Commit 4585b6fc authored by Karen Konou's avatar Karen Konou

Revert "Folder view: refactor to fix dependency loop"

This reverts commit 5b9aac47.
parent 5b9aac47
......@@ -108,5 +108,14 @@ folderCpt = here.component "folderCpt" cpt where
getFolderPath :: NodeType -> SessionId -> Int -> String
getFolderPath nodeType sid nodeId = appPath $ fromMaybe Home $ nodeTypeAppRoute nodeType sid nodeId
backButton :: R.Element
backButton =
H.button {
className: "btn btn-primary"
, on: {click: back}
} [
H.i { className: "fa fa-arrow-left"} []
]
loadFolders :: Record Props -> Aff FTree
loadFolders {nodeId, session} = get session $ TreeFirstLevel (Just nodeId) ""
'use strict';
exports.back = function() {
return function() {
history.back();
}
}
\ No newline at end of file
module Gargantext.Components.FolderView.BackButton where
import Gargantext.Prelude (Unit)
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
foreign import back :: Effect Unit
backButton :: R.Element
backButton =
H.button {
className: "btn btn-primary"
, on: {click: back}
} [
H.i { className: "fa fa-arrow-left"} []
]
\ No newline at end of file
......@@ -13,7 +13,7 @@ import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.FolderView.BackButton (backButton)
import Gargantext.Components.FolderView as FV
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(NodeAPI))
......@@ -106,7 +106,7 @@ frameLayoutViewCpt = here.component "frameLayoutView" cpt
, reload
, session } _ =
pure $ H.div{} [
backButton
FV.backButton
, H.div { className : "frame"
, rows: "100%,*" }
[ H.iframe { src: hframeUrl nodeType base frame_id
......
module Gargantext.Components.Table where
import Gargantext.Prelude
import Data.Array as A
import Data.Maybe (Maybe(..))
import Data.Sequence as Seq
import Effect (Effect)
import Gargantext.Components.FolderView.BackButton (backButton)
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Search (SearchType(..))
import Gargantext.Components.Table.Types (ColumnName, OrderBy, OrderByDirection(..), Params, Props, TableContainerProps, columnName)
import Gargantext.Utils.Reactix (effectLink)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Prelude
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Table.Types (ColumnName, OrderBy, OrderByDirection(..), Params, Props, TableContainerProps, columnName)
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Search (SearchType(..))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix (effectLink)
here :: R2.Here
here = R2.here "Gargantext.Components.Table"
......@@ -63,7 +64,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
cacheState' <- T.useLive T.unequal cacheState
pure $ R.fragment
[ R2.row [backButton]
[ R2.row [FV.backButton]
,
R2.row
[ H.div {className: "col-md-3"} [ H.h3 {} [H.text title] ]
......
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