From e56aaedad92f8585a70277edce8ed8ad065d681c Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 13 Sep 2015 10:27:47 +0200 Subject: Using flexbox for the add payment form --- src/client/View/LoggedIn/Monthly.elm | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/client/View/LoggedIn/Monthly.elm') diff --git a/src/client/View/LoggedIn/Monthly.elm b/src/client/View/LoggedIn/Monthly.elm index 518724b..9195479 100644 --- a/src/client/View/LoggedIn/Monthly.elm +++ b/src/client/View/LoggedIn/Monthly.elm @@ -42,19 +42,13 @@ monthlyCount model monthly = let count = List.length monthly.payments total = List.sum << List.map .cost <| monthly.payments key = if count > 1 then "PluralMonthlyCount" else "SingularMonthlyCount" - in if count == 0 - then - div - [ class "count" ] - [ text (getMessage "NoMonthlyPayment" model.translations) ] - else - button - [ class "count" - , onClick actions.address (UpdateLoggedIn << UpdateMonthly <| ToggleDetail) - ] - [ text (getParamMessage [toString count, price model total] key model.translations) - , expand ExpandDown monthly.visibleDetail - ] + in button + [ class "header" + , onClick actions.address (UpdateLoggedIn << UpdateMonthly <| ToggleDetail) + ] + [ text (getParamMessage [toString count, price model total] key model.translations) + , expand ExpandDown monthly.visibleDetail + ] paymentsTable : Model -> LoggedInView -> Monthly -> Html paymentsTable model loggedInView monthly = -- cgit v1.2.3