aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn
diff options
context:
space:
mode:
authorJoris2016-06-29 23:33:40 +0200
committerJoris2016-06-29 23:33:40 +0200
commitba33dfef23d070bfff92d6322808507c1b7d2814 (patch)
tree9258e6972d6110ee44d25295d6dc30bfa4113d90 /src/client/elm/LoggedIn
parent071b07463ab3f6894928b13553e98cd47c9ccb18 (diff)
Responsive home page
Diffstat (limited to 'src/client/elm/LoggedIn')
-rw-r--r--src/client/elm/LoggedIn/Home/Header/View.elm36
-rw-r--r--src/client/elm/LoggedIn/Home/View/Paging.elm8
-rw-r--r--src/client/elm/LoggedIn/Home/View/Table.elm2
-rw-r--r--src/client/elm/LoggedIn/Income/View.elm2
4 files changed, 24 insertions, 24 deletions
diff --git a/src/client/elm/LoggedIn/Home/Header/View.elm b/src/client/elm/LoggedIn/Home/Header/View.elm
index 6ddd846..95cef3c 100644
--- a/src/client/elm/LoggedIn/Home/Header/View.elm
+++ b/src/client/elm/LoggedIn/Home/Header/View.elm
@@ -36,25 +36,23 @@ import Utils.Tuple as Tuple
view : LoggedData -> Home.Model -> Payments -> Frequency -> Html Msg
view loggedData { search } payments frequency =
- Html.div
- [ class "header" ]
- [ ExceedingPayers.view loggedData
- , searchLine loggedData search frequency
- , infos loggedData payments
- ]
-
-searchLine : LoggedData -> Form String Home.Search -> Frequency -> Html Msg
-searchLine loggedData search frequency =
let currentDate = Date.fromTime loggedData.currentTime
in Html.div
- [ class "searchLine" ]
- [ searchForm loggedData search
- , AddPaymentButton.view
- loggedData
- (DialogModel.addPaymentInitial loggedData.translations currentDate frequency)
- "AddPayment"
- (text (getMessage "AddPayment" loggedData.translations))
- Nothing
+ [ class "header" ]
+ [ div
+ [ class "payerAndAdd" ]
+ [ ExceedingPayers.view loggedData
+ , AddPaymentButton.view
+ loggedData
+ (DialogModel.addPaymentInitial loggedData.translations currentDate frequency)
+ "AddPayment"
+ (text (getMessage "AddPayment" loggedData.translations))
+ Nothing
+ ]
+ , Html.div
+ [ class "searchLine" ]
+ [ searchForm loggedData search ]
+ , infos loggedData payments
]
searchForm : LoggedData -> Form String Home.Search -> Html Msg
@@ -78,7 +76,9 @@ infos loggedData payments =
sum = paymentsSum loggedData.conf payments
in div
[ class "infos" ]
- [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations
+ [ span
+ [ class "total" ]
+ [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations ]
, span
[ class "partition" ]
[ text <| paymentsPartition loggedData payments ]
diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm
index 90ae522..5bcb827 100644
--- a/src/client/elm/LoggedIn/Home/View/Paging.elm
+++ b/src/client/elm/LoggedIn/Home/View/Paging.elm
@@ -60,7 +60,7 @@ firstPage homeModel =
]
, onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| 1)
]
- [ FontAwesome.fast_backward grey 15 ]
+ [ FontAwesome.fast_backward grey 13 ]
previousPage : HomeModel.Model -> Html Msg
previousPage homeModel =
@@ -71,7 +71,7 @@ previousPage homeModel =
then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage - 1)
else Msg.NoOp
]
- [ FontAwesome.backward grey 15 ]
+ [ FontAwesome.backward grey 13 ]
nextPage : HomeModel.Model -> Int -> Html Msg
nextPage homeModel maxPage =
@@ -82,7 +82,7 @@ nextPage homeModel maxPage =
then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage + 1)
else Msg.NoOp
]
- [ FontAwesome.forward grey 15 ]
+ [ FontAwesome.forward grey 13 ]
lastPage : HomeModel.Model -> Int -> Html Msg
lastPage homeModel maxPage =
@@ -90,7 +90,7 @@ lastPage homeModel maxPage =
[ class "page"
, onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| maxPage)
]
- [ FontAwesome.fast_forward grey 15 ]
+ [ FontAwesome.fast_forward grey 13 ]
paymentsPage : HomeModel.Model -> Int -> Html Msg
paymentsPage homeModel page =
diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm
index 05c9e06..429632c 100644
--- a/src/client/elm/LoggedIn/Home/View/Table.elm
+++ b/src/client/elm/LoggedIn/Home/View/Table.elm
@@ -131,7 +131,7 @@ paymentLine loggedData homeModel frequency payment =
text ""
else
let dialogConfig =
- { className = "paymentDialog"
+ { className = "deletePaymentDialog"
, title = getMessage "ConfirmPaymentDelete" loggedData.translations
, body = always <| text ""
, confirm = getMessage "Confirm" loggedData.translations
diff --git a/src/client/elm/LoggedIn/Income/View.elm b/src/client/elm/LoggedIn/Income/View.elm
index 9638ddc..2b69806 100644
--- a/src/client/elm/LoggedIn/Income/View.elm
+++ b/src/client/elm/LoggedIn/Income/View.elm
@@ -113,7 +113,7 @@ incomeView loggedData (incomeId, income) =
, text " − "
, text <| Format.price loggedData.conf income.amount
, let dialogConfig =
- { className = "incomeDialog"
+ { className = "deleteIncomeDialog"
, title = getMessage "ConfirmIncomeDelete" loggedData.translations
, body = always <| text ""
, confirm = getMessage "Confirm" loggedData.translations