diff options
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View/Paging.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/View/Paging.elm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm index 15bb5a1..b8d7db9 100644 --- a/src/client/elm/LoggedIn/Home/View/Paging.elm +++ b/src/client/elm/LoggedIn/Home/View/Paging.elm @@ -2,6 +2,10 @@ module LoggedIn.Home.View.Paging exposing ( paymentsPaging ) +import Color + +import FontAwesome + import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) @@ -15,14 +19,12 @@ import Msg exposing (Msg) import LoggedData exposing (LoggedData) import Model.Payment as Payment exposing (Payments, perPage) -import View.Icon exposing (renderIcon) - showedPages : Int showedPages = 5 paymentsPaging : Payments -> HomeModel.Model -> Html Msg paymentsPaging payments homeModel = - let maxPage = ceiling (toFloat (List.length (Payment.punctual payments)) / toFloat perPage) + let maxPage = ceiling (toFloat (List.length payments) / toFloat perPage) pages = truncatePages homeModel.currentPage [1..maxPage] in if maxPage == 1 then @@ -58,7 +60,7 @@ firstPage homeModel = ] , onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| 1) ] - [ renderIcon "fast-backward" ] + [ FontAwesome.fast_backward Color.darkGrey 20 ] previousPage : HomeModel.Model -> Html Msg previousPage homeModel = @@ -69,7 +71,7 @@ previousPage homeModel = then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage - 1) else Msg.NoOp ] - [ renderIcon "backward" ] + [ FontAwesome.backward Color.darkGrey 20 ] nextPage : HomeModel.Model -> Int -> Html Msg nextPage homeModel maxPage = @@ -80,7 +82,7 @@ nextPage homeModel maxPage = then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage + 1) else Msg.NoOp ] - [ renderIcon "forward" ] + [ FontAwesome.forward Color.darkGrey 20 ] lastPage : HomeModel.Model -> Int -> Html Msg lastPage homeModel maxPage = @@ -88,7 +90,7 @@ lastPage homeModel maxPage = [ class "page" , onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| maxPage) ] - [ renderIcon "fast-forward" ] + [ FontAwesome.fast_forward Color.darkGrey 20 ] paymentsPage : HomeModel.Model -> Int -> Html Msg paymentsPage homeModel page = |