mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Remove old ui code in frontend
This commit is contained in:
@ -3,7 +3,6 @@ module Comp.SourceTable exposing
|
||||
, SelectMode(..)
|
||||
, isEdit
|
||||
, update
|
||||
, view
|
||||
, view2
|
||||
)
|
||||
|
||||
@ -13,7 +12,6 @@ import Data.Flags exposing (Flags)
|
||||
import Data.Priority
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onClick)
|
||||
import Styles as S
|
||||
import Util.Html
|
||||
|
||||
@ -53,79 +51,6 @@ update _ msg =
|
||||
|
||||
|
||||
|
||||
--- View
|
||||
|
||||
|
||||
view : List SourceAndTags -> Html Msg
|
||||
view sources =
|
||||
table [ class "ui table" ]
|
||||
[ thead []
|
||||
[ tr []
|
||||
[ th [ class "collapsing" ] []
|
||||
, th [ class "collapsing" ] [ text "Abbrev" ]
|
||||
, th [ class "collapsing" ] [ text "Enabled" ]
|
||||
, th [ class "collapsing" ] [ text "Counter" ]
|
||||
, th [ class "collapsing" ] [ text "Priority" ]
|
||||
, th [] [ text "Id" ]
|
||||
]
|
||||
]
|
||||
, tbody []
|
||||
(List.map renderSourceLine sources)
|
||||
]
|
||||
|
||||
|
||||
renderSourceLine : SourceAndTags -> Html Msg
|
||||
renderSourceLine source =
|
||||
tr
|
||||
[]
|
||||
[ td [ class "collapsing" ]
|
||||
[ a
|
||||
[ class "ui basic tiny primary button"
|
||||
, href "#"
|
||||
, onClick (Select source)
|
||||
]
|
||||
[ i [ class "edit icon" ] []
|
||||
, text "Edit"
|
||||
]
|
||||
, a
|
||||
[ classList
|
||||
[ ( "ui basic tiny primary button", True )
|
||||
, ( "disabled", not source.source.enabled )
|
||||
]
|
||||
, href "#"
|
||||
, disabled (not source.source.enabled)
|
||||
, onClick (Show source)
|
||||
]
|
||||
[ i [ class "eye icon" ] []
|
||||
, text "Show"
|
||||
]
|
||||
]
|
||||
, td [ class "collapsing" ]
|
||||
[ text source.source.abbrev
|
||||
]
|
||||
, td [ class "collapsing" ]
|
||||
[ if source.source.enabled then
|
||||
i [ class "check square outline icon" ] []
|
||||
|
||||
else
|
||||
i [ class "minus square outline icon" ] []
|
||||
]
|
||||
, td [ class "collapsing" ]
|
||||
[ source.source.counter |> String.fromInt |> text
|
||||
]
|
||||
, td [ class "collapsing" ]
|
||||
[ Data.Priority.fromString source.source.priority
|
||||
|> Maybe.map Data.Priority.toName
|
||||
|> Maybe.withDefault source.source.priority
|
||||
|> text
|
||||
]
|
||||
, td []
|
||||
[ text source.source.id
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
--- View2
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user