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
140
Issues
140
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
gargantext
purescript-gargantext
Commits
e0335c21
Commit
e0335c21
authored
Apr 10, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DocTable] FIX delete doc view.
parent
1bd1ca55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+10
-7
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
e0335c21
...
...
@@ -239,8 +239,8 @@ loadPage {nodeId, tabType, params: {limit, offset, orderBy}} = do
, ngramCount : r.ngramCount
, delete : false
}
convOrderBy (T.ASC (T.ColumnName "Date")) = DateAsc
convOrderBy (T.DESC (T.ColumnName "Date")) = DateDesc
convOrderBy (T.ASC (T.ColumnName "Date"))
= DateAsc
convOrderBy (T.DESC (T.ColumnName "Date"))
= DateDesc
convOrderBy (T.ASC (T.ColumnName "Title")) = TitleAsc
convOrderBy (T.DESC (T.ColumnName "Title")) = TitleDesc
...
...
@@ -285,26 +285,29 @@ renderPage loaderDispatch { totalRecords, dispatch
fa true = "fas "
fa false = "far "
isChecked _id = Set.member _id documentIdsToDelete
toDelete (DocumentsView {_id}) = Set.member _id documentIdsToDelete
isDeleted (DocumentsView {_id}) = Set.member _id documentIdsDeleted
isFavorite {_id,fav} = maybe fav identity (localFavorites ^. at _id)
rows = (\(DocumentsView r) ->
let isFav = isFavorite r in
{ row:
[ div []
[ a [className $ fa isFav <> "fa-star" ,onClick $ (\_->
dispatch $ MarkFavorites r._id (not isFav))] []
[ a [ className $ fa isFav <> "fa-star"
, if (toDelete $ DocumentsView r) then style {textDecoration : "line-through"}
else style {textDecoration : ""}
, onClick $ (\_-> dispatch $ MarkFavorites r._id (not isFav))] []
]
-- TODO show date: Year-Month-Day only
, if (
r.delete
) then
, if (
toDelete $ DocumentsView r
) then
div [ style {textDecoration : "line-through"}][text r.date]
else
div [ ][text r.date]
, if (
r.delete
) then
, if (
toDelete $ DocumentsView r
) then
a [ href (toUrl Front Url_Document (Just r._id)), style {textDecoration : "line-through"}, target "blank"
] [ text r.title ]
else
a [ href (toUrl Front Url_Document (Just r._id)), target "blank" ] [ text r.title ]
, if (
r.delete
) then
, if (
toDelete $ DocumentsView r
) then
div [style {textDecoration : "line-through"}] [ text r.source]
else
div [] [ text r.source]
...
...
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