From abbf907d709325c4d479527d6d23b6586e30ec3c Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Sun, 11 Jul 2021 13:09:33 +0200 Subject: [PATCH] #626 - converted report column hint to new macro --- .../budgetmaster/hints/HintService.java | 2 +- .../resources/languages/base_de.properties | 1 - .../resources/languages/base_en.properties | 1 - .../resources/languages/hints_de.properties | 1 + .../resources/languages/hints_en.properties | 3 ++- src/main/resources/static/css/reports.css | 18 ------------------ .../resources/templates/reports/reports.ftl | 9 +++------ 7 files changed, 7 insertions(+), 28 deletions(-) diff --git a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java index 66ea76340..f5d868137 100644 --- a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java +++ b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java @@ -54,7 +54,7 @@ public class HintService implements Resettable @Override public void createDefaults() { - final List<String> hintKeys = List.of("hint.first.use.teaser"); + final List<String> hintKeys = List.of("hint.first.use.teaser", "hint.report.columns"); for(String localizationKey : hintKeys) { diff --git a/src/main/resources/languages/base_de.properties b/src/main/resources/languages/base_de.properties index f4f19a780..8acec9797 100644 --- a/src/main/resources/languages/base_de.properties +++ b/src/main/resources/languages/base_de.properties @@ -355,7 +355,6 @@ about.credits=Credits: # REPORT report.settings=Einstellungen report.columns=Spalten auswählen -report.columns.advice=Hinweis: Du kannst die Reihenfolge der Spalten per Drag&Drop anpassen. report.checkbox.include.budget=Budgetkalkulation hinzufügen report.checkbox.split.tables=Einnahmen und Ausgaben als getrennte Tabellen report.checkbox.inclue.categorybudgets=Verbrauch nach Kategorien hinzufügen diff --git a/src/main/resources/languages/base_en.properties b/src/main/resources/languages/base_en.properties index d40786eec..99c75ad2d 100644 --- a/src/main/resources/languages/base_en.properties +++ b/src/main/resources/languages/base_en.properties @@ -356,7 +356,6 @@ about.credits=Credits: # REPORT report.settings=Settings report.columns=Select columns -report.columns.advice=Note: You can change the order of the columns by drag&drop. report.checkbox.include.budget=Include budget calculation report.checkbox.split.tables=Split incomes and payments into separate tables report.checkbox.inclue.categorybudgets=Include consumption by categories diff --git a/src/main/resources/languages/hints_de.properties b/src/main/resources/languages/hints_de.properties index 809066bbd..5f3419b97 100644 --- a/src/main/resources/languages/hints_de.properties +++ b/src/main/resources/languages/hints_de.properties @@ -3,3 +3,4 @@ button.hints.reset=Alle Tipps zurücksetzen notification.hints.reset=Alle Tipps zurückgesetzt hint.first.use.teaser=Neu im BudgetMaster? Sieh dir die Einführung an! +hint.report.columns=Hinweis: Du kannst die Reihenfolge der Spalten per Drag&Drop anpassen. diff --git a/src/main/resources/languages/hints_en.properties b/src/main/resources/languages/hints_en.properties index 807b90116..94ad28725 100644 --- a/src/main/resources/languages/hints_en.properties +++ b/src/main/resources/languages/hints_en.properties @@ -2,4 +2,5 @@ headline.hints=Hints button.hints.reset=Reset all hints notification.hints.reset=All hints reset -hint.first.use.teaser=New to BudgetMaster? Check out the first use guide! \ No newline at end of file +hint.first.use.teaser=New to BudgetMaster? Check out the first use guide! +hint.report.columns=Note: You can change the order of the columns by drag&drop. \ No newline at end of file diff --git a/src/main/resources/static/css/reports.css b/src/main/resources/static/css/reports.css index f3dc35b78..23a2fc8bf 100644 --- a/src/main/resources/static/css/reports.css +++ b/src/main/resources/static/css/reports.css @@ -36,24 +36,6 @@ color: #878787; } -.table-advice { - width: auto; - margin: 1vmin; - border: 2px solid var(--color-text); - border-radius: 5px; - padding: 0 1vmin; - display: inline-block; -} - -.table-advice td { - padding: 10px; - font-size: 1.5vmin; -} - -.table-advice i { - font-size: 2.5vmin; -} - .columnName-selected { background-color: var(--color-blue-light); } diff --git a/src/main/resources/templates/reports/reports.ftl b/src/main/resources/templates/reports/reports.ftl index 19a42f6a3..b5fd9e248 100644 --- a/src/main/resources/templates/reports/reports.ftl +++ b/src/main/resources/templates/reports/reports.ftl @@ -69,12 +69,9 @@ <div class="row no-margin"> <div class="col s12 center-align"> <div class="headline-small text-default">${locale.getString("report.columns")}</div> - <table class="no-border-table table-advice"> - <tr> - <td><i class="material-icons">info_outline</i></td> - <td>${locale.getString("report.columns.advice")}</td> - </tr> - </table> + <br> + <#assign hint=helpers.getHintByLocalizationKey("hint.report.columns")/> + <@header.hint hint=hint/> </div> </div> <div class="row"> -- GitLab