Commit e441fc2d authored by Alexandre Delanoë's avatar Alexandre Delanoë

[RENAME] AnnotationDocumentView -> DocAnnotaiton

parent 51577839
module AnnotationDocumentView where module DocAnnotation where
import Prelude hiding (div) import Prelude hiding (div)
import React (ReactElement) import React (ReactElement)
......
...@@ -4,7 +4,7 @@ import DOM ...@@ -4,7 +4,7 @@ import DOM
import Gargantext.Data.Lang import Gargantext.Data.Lang
import AddCorpusview as AC import AddCorpusview as AC
import AnnotationDocumentView as D import DocAnnotation as D
import Control.Monad.Cont.Trans (lift) import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff (Eff) import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Class (liftEff) import Control.Monad.Eff.Class (liftEff)
...@@ -47,7 +47,7 @@ type AppState = ...@@ -47,7 +47,7 @@ type AppState =
, docViewState :: DV.State , docViewState :: DV.State
, searchState :: S.State , searchState :: S.State
, userPage :: UP.State , userPage :: UP.State
, annotationdocumentView :: D.State , docAnnotationView :: D.State
, ntreeView :: NT.State , ntreeView :: NT.State
, tabview :: TV.State , tabview :: TV.State
, search :: String , search :: String
...@@ -67,7 +67,7 @@ initAppState = ...@@ -67,7 +67,7 @@ initAppState =
, docViewState : DV.tdata , docViewState : DV.tdata
, searchState : S.initialState , searchState : S.initialState
, userPage : UP.initialState , userPage : UP.initialState
, annotationdocumentView : D.initialState , docAnnotationView : D.initialState
, ntreeView : NT.exampleTree , ntreeView : NT.exampleTree
, tabview : TV.initialState , tabview : TV.initialState
, search : "" , search : ""
...@@ -87,7 +87,7 @@ data Action ...@@ -87,7 +87,7 @@ data Action
| DocViewA DV.Action | DocViewA DV.Action
| SearchA S.Action | SearchA S.Action
| UserPageA UP.Action | UserPageA UP.Action
| AnnotationDocumentViewA D.Action | DocAnnotationViewA D.Action
| TreeViewA NT.Action | TreeViewA NT.Action
| TabViewA TV.Action | TabViewA TV.Action
| GraphExplorerA GE.Action | GraphExplorerA GE.Action
...@@ -195,14 +195,14 @@ _userPageAction = prism UserPageA \action -> ...@@ -195,14 +195,14 @@ _userPageAction = prism UserPageA \action ->
_-> Left action _-> Left action
_annotationdocumentviewState :: Lens' AppState D.State _docAnnotationViewState :: Lens' AppState D.State
_annotationdocumentviewState = lens (\s -> s.annotationdocumentView) (\s ss -> s{annotationdocumentView = ss}) _docAnnotationViewState = lens (\s -> s.docAnnotationView) (\s ss -> s{docAnnotationView = ss})
_annotationdocumentviewAction :: Prism' Action D.Action _docAnnotationViewAction :: Prism' Action D.Action
_annotationdocumentviewAction = prism AnnotationDocumentViewA \action -> _docAnnotationViewAction = prism DocAnnotationViewA \action ->
case action of case action of
AnnotationDocumentViewA caction -> Right caction DocAnnotationViewA caction -> Right caction
_-> Left action _-> Left action
...@@ -280,7 +280,7 @@ pagesComponent s = ...@@ -280,7 +280,7 @@ pagesComponent s =
-- selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus -- selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
selectSpec (AnnotationDocumentView i) = layout0 $ focus _annotationdocumentviewState _annotationdocumentviewAction D.docview selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState _docAnnotationViewAction D.docview
selectSpec Tabview = layout0 $ focus _tabviewState _tabviewAction TV.tab1 selectSpec Tabview = layout0 $ focus _tabviewState _tabviewAction TV.tab1
-- To be removed -- To be removed
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
...@@ -594,9 +594,9 @@ dispatchAction dispatcher _ UserPage = do ...@@ -594,9 +594,9 @@ dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ UserPageA $ UP.NoOp _ <- dispatcher $ UserPageA $ UP.NoOp
pure unit pure unit
dispatchAction dispatcher _ (AnnotationDocumentView i) = do dispatchAction dispatcher _ (DocAnnotation i) = do
_ <- dispatcher $ SetRoute $ AnnotationDocumentView i _ <- dispatcher $ SetRoute $ DocAnnotation i
_ <- dispatcher $ AnnotationDocumentViewA $ D.NoOp _ <- dispatcher $ DocAnnotationViewA $ D.NoOp
pure unit pure unit
......
...@@ -22,7 +22,7 @@ data Routes ...@@ -22,7 +22,7 @@ data Routes
| DocView | DocView
| SearchView | SearchView
| UserPage | UserPage
| AnnotationDocumentView Int | DocAnnotation Int
| Tabview | Tabview
| CorpusAnalysis | CorpusAnalysis
| PGraphExplorer | PGraphExplorer
...@@ -35,7 +35,7 @@ instance showRoutes :: Show Routes where ...@@ -35,7 +35,7 @@ instance showRoutes :: Show Routes where
show DocView = "DocView" show DocView = "DocView"
show SearchView = "SearchView" show SearchView = "SearchView"
show UserPage = "UserPage" show UserPage = "UserPage"
show (AnnotationDocumentView i) = "DocumentView" show (DocAnnotation i)= "DocumentView"
show Tabview = "Tabview" show Tabview = "Tabview"
show CorpusAnalysis = "corpus" show CorpusAnalysis = "corpus"
show PGraphExplorer = "graphExplorer" show PGraphExplorer = "graphExplorer"
...@@ -46,17 +46,17 @@ int = floor <$> num ...@@ -46,17 +46,17 @@ int = floor <$> num
routing :: Match Routes routing :: Match Routes
routing = routing =
Login <$ route "login" Login <$ route "login"
<|> Tabview <$ route "tabview" <|> Tabview <$ route "tabview"
<|> AnnotationDocumentView <$> (route "documentView" *> int) <|> DocAnnotation <$> (route "documentView" *> int)
<|> UserPage <$ route "userPage" <|> UserPage <$ route "userPage"
<|> SearchView <$ route "search" <|> SearchView <$ route "search"
<|> DocView <$ route "docView" <|> DocView <$ route "docView"
<|> AddCorpus <$ route "addCorpus" <|> AddCorpus <$ route "addCorpus"
<|> CorpusAnalysis <$ route "corpus" <|> CorpusAnalysis <$ route "corpus"
<|> PGraphExplorer <$ route "graphExplorer" <|> PGraphExplorer <$ route "graphExplorer"
<|> NGramsTable <$ route "ngrams" <|> NGramsTable <$ route "ngrams"
<|> Home <$ lit "" <|> Home <$ lit ""
where where
route str = lit "" *> lit str route str = lit "" *> lit str
......
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