diff options
author | Joris | 2016-06-25 15:10:03 +0200 |
---|---|---|
committer | Joris | 2016-06-25 22:09:04 +0200 |
commit | 70720548c9af024dbb6080638ac8e5470c2213eb (patch) | |
tree | a149bd6d8f1448de11ac4b0b41c52bc82052035a /src/client/elm/LoggedIn/Home/View/Paging.elm | |
parent | 4ce4de89a5400b0d8b9cddaa2922901a081fdaaa (diff) |
Use the search to view either punctual or monthly payments
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View/Paging.elm')
-rw-r--r-- | src/client/elm/LoggedIn/Home/View/Paging.elm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm index da69232..90ae522 100644 --- a/src/client/elm/LoggedIn/Home/View/Paging.elm +++ b/src/client/elm/LoggedIn/Home/View/Paging.elm @@ -1,5 +1,5 @@ module LoggedIn.Home.View.Paging exposing - ( paymentsPaging + ( view ) import Color exposing (Color) @@ -22,11 +22,11 @@ import Model.Payment as Payment exposing (Payments, perPage) showedPages : Int showedPages = 5 -paymentsPaging : HomeModel.Model -> Payments -> Html Msg -paymentsPaging homeModel payments = +view : HomeModel.Model -> Payments -> Html Msg +view homeModel payments = let maxPage = ceiling (toFloat (List.length payments) / toFloat perPage) pages = truncatePages homeModel.currentPage [1..maxPage] - in if maxPage == 1 + in if maxPage <= 1 then text "" else |