diff --git a/src/main/resources/languages/_de.properties b/src/main/resources/languages/_de.properties index f831bab39b230431a1d76803eeb1eff473c8d11c..708e0f7691712c28b698f7fb70301bf875ad49eb 100644 --- a/src/main/resources/languages/_de.properties +++ b/src/main/resources/languages/_de.properties @@ -46,6 +46,8 @@ delete=L today=Heute tagfield.placeholder=Tag hier eingeben placeholder=Keine Daten verf�gbar +placeholder.seems.empty=Ganz sch�n leer hier... +placeholder.advice=F�ge {0} hinzu # WEEK DAYS monday=Montag diff --git a/src/main/resources/languages/_en.properties b/src/main/resources/languages/_en.properties index 45bf57becb9d5ca5bd7a5c2f614297239cb716da..8b638624039899b067baad7c906ef15c690e4b89 100644 --- a/src/main/resources/languages/_en.properties +++ b/src/main/resources/languages/_en.properties @@ -46,6 +46,8 @@ delete=Delete today=Today tagfield.placeholder=Enter Tag here placeholder=No data available +placeholder.seems.empty=It's pretty empty here... +placeholder.advice=Get started by adding {0} # WEEK DAYS monday=Monday diff --git a/src/main/resources/static/css/dark/style.css b/src/main/resources/static/css/dark/style.css index 40fc468133953c0ecb4479ea8ae827bdf74a2986..e1c6994723d95ed20d83872a29ee39f08c2e4bb6 100644 --- a/src/main/resources/static/css/dark/style.css +++ b/src/main/resources/static/css/dark/style.css @@ -346,6 +346,12 @@ textarea { color: #FFFFFF; } +.headline-advice { + color: #FFFFFF; + opacity: 0.7; + margin-top: 0.5rem; +} + .headline-date { font-size: 4vmin; text-transform: capitalize; @@ -523,6 +529,10 @@ input[type="radio"]:not(:checked) + span::before, [type="radio"]:not(:checked) + border-bottom: 1px solid #FFFFFF; } +.placeholder-image { + width: 17vmin; +} + .hidden { display: none; } diff --git a/src/main/resources/static/css/style.css b/src/main/resources/static/css/style.css index b7b255279613720e147872305fb891657892a6be..3ce81ad1bcb25aea64bfe5d1c703c752e28501bc 100644 --- a/src/main/resources/static/css/style.css +++ b/src/main/resources/static/css/style.css @@ -284,6 +284,12 @@ main { color: #212121; } +.headline-advice { + color: #212121; + opacity: 0.7; + margin-top: 0.5rem; +} + .headline-date { font-size: 4vmin; text-transform: capitalize; diff --git a/src/main/resources/templates/transactions/transactions.ftl b/src/main/resources/templates/transactions/transactions.ftl index b65e11c88e17c74323d8b28fe8a308bb95d50800..5a87a362b759565e32a033f0cd42865954bb8af6 100644 --- a/src/main/resources/templates/transactions/transactions.ftl +++ b/src/main/resources/templates/transactions/transactions.ftl @@ -77,8 +77,16 @@ </tr> </#list> </table> - <#if transactions?size == 0> - <div class="headline center-align">${locale.getString("placeholder")}</div> + + <#-- show placeholde text if no transactions are present in the current month or REST ist the only transaction --> + <#assign isOnlyRest = transactions?size == 1 && transactions[0].category.type.name() == "REST"/> + <#if isOnlyRest> + <br> + </#if> + + <#if transactions?size == 0 || isOnlyRest> + <div class="headline center-align">${locale.getString("placeholder.seems.empty")}</div> + <div class="headline-advice center-align">${locale.getString("placeholder.advice", locale.getString("menu.transactions"))}</div> </#if> </div> </div>