Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
81ccb3fa
Commit
81ccb3fa
authored
Jan 29, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Corpus fields] basic UI
parent
bfa9c156
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
Renameable.purs
src/Gargantext/Components/Renameable.purs
+3
-3
Table.purs
src/Gargantext/Components/Table.purs
+17
-13
No files found.
src/Gargantext/Components/Renameable.purs
View file @
81ccb3fa
...
...
@@ -58,9 +58,9 @@ renameableTextCpt = here.component "renameableText" cpt
isEditing' <- T.useLive T.unequal isEditing
pure $ if isEditing' then
notEditing props []
else
editing props []
else
notEditing props []
notEditing :: R2.Component RenameableTextProps
...
...
@@ -103,7 +103,7 @@ editingCpt = here.component "editing" cpt
, type: "text"
}
, H.div { className: "btn input-group-append"
, on: { click: submit } }
, on: { click: submit
state'
} }
[ H.span { className: "fa fa-floppy-o" } []
]
]
...
...
src/Gargantext/Components/Table.purs
View file @
81ccb3fa
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 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.Renameable (renameable)
import Gargantext.Components.Search (SearchType(..))
import Gargantext.
Utils.Reactix as R2
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
here :: R2.Here
here = R2.here "Gargantext.Components.Table"
...
...
@@ -55,6 +55,10 @@ initialParams :: Params
initialParams = stateParams {page: 1, pageSize: PS10, orderBy: Nothing, searchType: SearchDoc}
-- TODO: Not sure this is the right place for this
onRenameDummy :: String -> Effect Unit
onRenameDummy _ = do
pure unit
tableHeaderLayout :: R2.Component TableHeaderLayoutProps
tableHeaderLayout = R.createElement tableHeaderLayoutCpt
tableHeaderLayoutCpt :: R.Component TableHeaderLayoutProps
...
...
@@ -67,7 +71,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
[ R2.row [FV.backButton {} []]
,
R2.row
[ H.div {className: "col-md-3"} [ H.h3 {} [
H.text title
] ]
[ H.div {className: "col-md-3"} [ H.h3 {} [
renameable {text: title, onRename: onRenameDummy} []
] ]
, H.div {className: "col-md-9"}
[ H.hr {style: {height: "2px", backgroundColor: "black"}} ]
]
...
...
@@ -75,11 +79,11 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
[ H.div {className: "col-md-8 content"}
[ H.p {}
[ H.span {className: "fa fa-globe"} []
,
H.text $ " " <> desc
,
renameable {text: " " <> desc, onRename: onRenameDummy} []
]
, H.p {}
[ H.span {className: "fa fa-search-plus"} []
,
H.text $ " " <> query
,
renameable {text: " " <> query, onRename: onRenameDummy} []
]
, H.p { className: "cache-toggle"
, on: { click: cacheClick cacheState } }
...
...
@@ -90,11 +94,11 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
, H.div {className: "col-md-4 content"}
[ H.p {}
[ H.span {className: "fa fa-calendar"} []
,
H.text $ " " <> date
,
renameable {text: " " <> date, onRename: onRenameDummy} []
]
, H.p {}
[ H.span {className: "fa fa-user"} []
,
H.text $ " " <> user
,
renameable {text: " " <> user, onRename: onRenameDummy} []
]
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment