Commit b5a59874 authored by arturo's avatar arturo

[tree] new node adding: better name and icon

* Issue #309, feedbacks (2)
parent cfd99a6b
...@@ -229,11 +229,11 @@ instance Read NodeType where ...@@ -229,11 +229,11 @@ instance Read NodeType where
instance translateNodeType :: Translate NodeType where instance translateNodeType :: Translate NodeType where
translate l n = case l of translate l n = case l of
FR -> _translateFR n FR -> translateFR n
_ -> _translateEN n _ -> translateEN n
_translateFR :: NodeType -> String translateFR :: NodeType -> String
_translateFR = case _ of translateFR = case _ of
Annuaire -> "Annuaire" Annuaire -> "Annuaire"
Corpus -> "Corpus" Corpus -> "Corpus"
Dashboard -> "Dashboard" Dashboard -> "Dashboard"
...@@ -260,10 +260,10 @@ _translateFR = case _ of ...@@ -260,10 +260,10 @@ _translateFR = case _ of
NodeFrameNotebook -> "Carnet de notes" NodeFrameNotebook -> "Carnet de notes"
NodeFrameWrite -> "Éditeur de texte" NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio" NodeFrameVisio -> "Visio"
NodePublic n -> _translateFR n NodePublic n -> translateFR n
_translateEN :: NodeType -> String translateEN :: NodeType -> String
_translateEN = case _ of translateEN = case _ of
Annuaire -> "Annuaire" Annuaire -> "Annuaire"
Corpus -> "Corpus" Corpus -> "Corpus"
Dashboard -> "Dashboard" Dashboard -> "Dashboard"
...@@ -290,72 +290,72 @@ _translateEN = case _ of ...@@ -290,72 +290,72 @@ _translateEN = case _ of
NodeFrameNotebook -> "Notebook" NodeFrameNotebook -> "Notebook"
NodeFrameWrite -> "Write" NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio" NodeFrameVisio -> "Visio"
NodePublic n -> _translateEN n NodePublic n -> translateEN n
------------------------------------------------------ ------------------------------------------------------
_getIcon :: NodeType -> Boolean -> String getIcon :: NodeType -> Boolean -> String
_getIcon NodeUser false = "user-circle" getIcon NodeUser false = "user-circle"
_getIcon NodeUser true = "user" getIcon NodeUser true = "user"
------------------------------------------------------ ------------------------------------------------------
_getIcon Folder false = "folder" getIcon Folder false = "folder"
_getIcon Folder true = "folder-open-o" getIcon Folder true = "folder-open-o"
------------------------------------------------------ ------------------------------------------------------
_getIcon FolderPrivate true = "lock" getIcon FolderPrivate true = "lock"
_getIcon FolderPrivate false = "lock-circle" getIcon FolderPrivate false = "lock-circle"
_getIcon FolderShared true = "share-alt" getIcon FolderShared true = "share-alt"
_getIcon FolderShared false = "share-circle" getIcon FolderShared false = "share-circle"
_getIcon Team true = "users" getIcon Team true = "users"
_getIcon Team false = "users-closed" getIcon Team false = "users-closed"
_getIcon FolderPublic true = "globe-circle" getIcon FolderPublic true = "globe-circle"
_getIcon FolderPublic false = "globe" getIcon FolderPublic false = "globe"
------------------------------------------------------ ------------------------------------------------------
_getIcon Corpus true = "book" getIcon Corpus true = "book"
_getIcon Corpus false = "book-circle" getIcon Corpus false = "book-circle"
_getIcon Phylo _ = "code-fork" getIcon Phylo _ = "code-fork"
_getIcon Graph _ = "hubzilla" getIcon Graph _ = "hubzilla"
_getIcon Texts _ = "newspaper-o" getIcon Texts _ = "newspaper-o"
_getIcon Dashboard _ = "signal" getIcon Dashboard _ = "signal"
_getIcon NodeList _ = "list" getIcon NodeList _ = "list"
_getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
_getIcon Annuaire true = "address-card-o" getIcon Annuaire true = "address-card-o"
_getIcon Annuaire false = "address-card" getIcon Annuaire false = "address-card"
_getIcon NodeContact true = "address-card-o" getIcon NodeContact true = "address-card-o"
_getIcon NodeContact false = "address-card" getIcon NodeContact false = "address-card"
_getIcon NodeFrameWrite true = "file-text-o" getIcon NodeFrameWrite true = "file-text-o"
_getIcon NodeFrameWrite false = "file-text" getIcon NodeFrameWrite false = "file-text"
_getIcon NodeFrameCalc true = "calculator" getIcon NodeFrameCalc true = "calculator"
_getIcon NodeFrameCalc false = "calculator" getIcon NodeFrameCalc false = "calculator"
_getIcon NodeFrameNotebook true = "file-code-o" getIcon NodeFrameNotebook true = "file-code-o"
_getIcon NodeFrameNotebook false = "code" getIcon NodeFrameNotebook false = "code"
_getIcon NodeFrameVisio true = "video-camera" getIcon NodeFrameVisio true = "video-camera"
_getIcon NodeFrameVisio false = "video-camera" getIcon NodeFrameVisio false = "video-camera"
_getIcon (NodePublic nt) b = _getIcon nt b getIcon (NodePublic nt) b = getIcon nt b
_getIcon _ true = "folder-open" getIcon _ true = "folder-open"
_getIcon _ false = "folder-o" getIcon _ false = "folder-o"
------------------------------------------------------ ------------------------------------------------------
fldr :: NodeType -> Boolean -> String fldr :: NodeType -> Boolean -> String
fldr nt flag = classNamePrefix <> _getIcon nt flag fldr nt flag = classNamePrefix <> getIcon nt flag
charCodeIcon :: NodeType -> Boolean -> String charCodeIcon :: NodeType -> Boolean -> String
charCodeIcon nt flag = glyphiconToCharCode $ _getIcon nt flag charCodeIcon nt flag = glyphiconToCharCode $ getIcon nt flag
publicize :: NodeType -> NodeType publicize :: NodeType -> NodeType
publicize (NodePublic nt) = NodePublic nt publicize (NodePublic nt) = NodePublic nt
......
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