diff --git a/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm b/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm index 2dc28534..71f59ef9 100644 --- a/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm +++ b/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm @@ -8,11 +8,9 @@ module Comp.CustomFieldTable exposing ) import Api.Model.CustomField exposing (CustomField) -import Api.Model.CustomFieldList exposing (CustomFieldList) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (onClick) -import Util.Html import Util.Time @@ -44,7 +42,7 @@ update msg model = view : Model -> List CustomField -> Html Msg view _ items = div [] - [ table [ class "ui very basic center aligned table" ] + [ table [ class "ui very basic aligned table" ] [ thead [] [ tr [] [ th [ class "collapsing" ] [] diff --git a/modules/webapp/src/main/elm/Comp/EquipmentTable.elm b/modules/webapp/src/main/elm/Comp/EquipmentTable.elm index f89d3afa..097983e8 100644 --- a/modules/webapp/src/main/elm/Comp/EquipmentTable.elm +++ b/modules/webapp/src/main/elm/Comp/EquipmentTable.elm @@ -47,10 +47,11 @@ update _ msg model = view : Model -> Html Msg view model = - table [ class "ui selectable table" ] + table [ class "ui very basic aligned table" ] [ thead [] [ tr [] - [ th [] [ text "Name" ] + [ th [ class "collapsing" ] [] + , th [] [ text "Name" ] ] ] , tbody [] @@ -62,9 +63,18 @@ renderEquipmentLine : Model -> Equipment -> Html Msg renderEquipmentLine model equip = tr [ classList [ ( "active", model.selected == Just equip ) ] - , onClick (Select equip) ] - [ td [] + [ td [ class "collapsing" ] + [ a + [ href "#" + , class "ui basic small blue label" + , onClick (Select equip) + ] + [ i [ class "edit icon" ] [] + , text "Edit" + ] + ] + , td [] [ text equip.name ] ] diff --git a/modules/webapp/src/main/elm/Comp/FolderTable.elm b/modules/webapp/src/main/elm/Comp/FolderTable.elm index 46fb55f2..2727eb99 100644 --- a/modules/webapp/src/main/elm/Comp/FolderTable.elm +++ b/modules/webapp/src/main/elm/Comp/FolderTable.elm @@ -43,15 +43,15 @@ update msg model = view : Model -> List FolderItem -> Html Msg view _ items = div [] - [ table [ class "ui very basic center aligned table" ] + [ table [ class "ui very basic aligned table" ] [ thead [] [ tr [] [ th [ class "collapsing" ] [] , th [] [ text "Name" ] , th [] [ text "Owner" ] - , th [] [ text "Owner or Member" ] - , th [] [ text "#Member" ] - , th [] [ text "Created" ] + , th [ class "collapsing" ] [ text "Owner or Member" ] + , th [ class "collapsing" ] [ text "#Member" ] + , th [ class "collapsing" ] [ text "Created" ] ] ] , tbody [] @@ -79,14 +79,14 @@ viewItem item = , td [] [ text item.owner.name ] - , td [] + , td [ class "center aligned" ] [ Util.Html.checkbox item.isMember ] - , td [] + , td [ class "center aligned" ] [ String.fromInt item.memberCount |> text ] - , td [] + , td [ class "center aligned" ] [ Util.Time.formatDateShort item.created |> text ] diff --git a/modules/webapp/src/main/elm/Comp/OrgTable.elm b/modules/webapp/src/main/elm/Comp/OrgTable.elm index e78e408a..7c1d3f09 100644 --- a/modules/webapp/src/main/elm/Comp/OrgTable.elm +++ b/modules/webapp/src/main/elm/Comp/OrgTable.elm @@ -16,14 +16,14 @@ import Util.Contact type alias Model = - { equips : List Organization + { orgs : List Organization , selected : Maybe Organization } emptyModel : Model emptyModel = - { equips = [] + { orgs = [] , selected = Nothing } @@ -38,7 +38,7 @@ update : Flags -> Msg -> Model -> ( Model, Cmd Msg ) update _ msg model = case msg of SetOrgs list -> - ( { model | equips = list, selected = Nothing }, Cmd.none ) + ( { model | orgs = list, selected = Nothing }, Cmd.none ) Select equip -> ( { model | selected = Just equip }, Cmd.none ) @@ -49,16 +49,17 @@ update _ msg model = view : Model -> Html Msg view model = - table [ class "ui selectable table" ] + table [ class "ui very basic aligned table" ] [ thead [] [ tr [] - [ th [ class "collapsing" ] [ text "Name" ] + [ th [ class "collapsing" ] [] + , th [ class "collapsing" ] [ text "Name" ] , th [] [ text "Address" ] , th [] [ text "Contact" ] ] ] , tbody [] - (List.map (renderOrgLine model) model.equips) + (List.map (renderOrgLine model) model.orgs) ] @@ -66,9 +67,18 @@ renderOrgLine : Model -> Organization -> Html Msg renderOrgLine model org = tr [ classList [ ( "active", model.selected == Just org ) ] - , onClick (Select org) ] [ td [ class "collapsing" ] + [ a + [ href "#" + , class "ui basic small blue label" + , onClick (Select org) + ] + [ i [ class "edit icon" ] [] + , text "Edit" + ] + ] + , td [ class "collapsing" ] [ text org.name ] , td [] diff --git a/modules/webapp/src/main/elm/Comp/PersonTable.elm b/modules/webapp/src/main/elm/Comp/PersonTable.elm index 0a97598e..d94a7a5b 100644 --- a/modules/webapp/src/main/elm/Comp/PersonTable.elm +++ b/modules/webapp/src/main/elm/Comp/PersonTable.elm @@ -49,11 +49,12 @@ update _ msg model = view : Model -> Html Msg view model = - table [ class "ui selectable table" ] + table [ class "ui very basic aligned table" ] [ thead [] [ tr [] - [ th [ class "collapsing" ] [ text "Name" ] - , th [ class "collapsing" ] [ text "Concerning" ] + [ th [ class "collapsing" ] [] + , th [ class "collapsing" ] [ text "Name" ] + , th [ class "collapsing center aligned" ] [ text "Concerning" ] , th [] [ text "Address" ] , th [] [ text "Contact" ] ] @@ -67,12 +68,21 @@ renderPersonLine : Model -> Person -> Html Msg renderPersonLine model person = tr [ classList [ ( "active", model.selected == Just person ) ] - , onClick (Select person) ] [ td [ class "collapsing" ] - [ text person.name + [ a + [ href "#" + , class "ui basic small blue label" + , onClick (Select person) + ] + [ i [ class "edit icon" ] [] + , text "Edit" + ] ] , td [ class "collapsing" ] + [ text person.name + ] + , td [ class "center aligned" ] [ if person.concerning then i [ class "check square outline icon" ] [] diff --git a/modules/webapp/src/main/elm/Comp/TagTable.elm b/modules/webapp/src/main/elm/Comp/TagTable.elm index 97aa35cc..a191f5cc 100644 --- a/modules/webapp/src/main/elm/Comp/TagTable.elm +++ b/modules/webapp/src/main/elm/Comp/TagTable.elm @@ -47,10 +47,11 @@ update _ msg model = view : Model -> Html Msg view model = - table [ class "ui selectable table" ] + table [ class "ui very basic aligned table" ] [ thead [] [ tr [] - [ th [] [ text "Name" ] + [ th [ class "collapsing" ] [] + , th [ class "eight wide" ] [ text "Name" ] , th [] [ text "Category" ] ] ] @@ -63,9 +64,18 @@ renderTagLine : Model -> Tag -> Html Msg renderTagLine model tag = tr [ classList [ ( "active", model.selected == Just tag ) ] - , onClick (Select tag) ] - [ td [] + [ td [ class "collapsing" ] + [ a + [ href "#" + , class "ui basic small blue label" + , onClick (Select tag) + ] + [ i [ class "edit icon" ] [] + , text "Edit" + ] + ] + , td [] [ text tag.name ] , td []