Skip to content
Snippets Groups Projects
Commit 037ee8ae authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#576 - use entity types on index page

parent 5a11426a
No related branches found
No related tags found
No related merge requests found
Pipeline #4840 failed
...@@ -35,6 +35,11 @@ public enum EntityType ...@@ -35,6 +35,11 @@ public enum EntityType
return color; return color;
} }
public String getColorAsTextColor()
{
return color.replace("background", "text");
}
public String getLocalizationKey() public String getLocalizationKey()
{ {
return "entity." + this.name().toLowerCase(); return "entity." + this.name().toLowerCase();
......
...@@ -31,31 +31,31 @@ ...@@ -31,31 +31,31 @@
<div class="hide-on-small-only"><br></div> <div class="hide-on-small-only"><br></div>
<div class="row home-menu-flex"> <div class="row home-menu-flex">
<@indexFunctions.homeEntry url="/accounts" icon="account_balance" iconColor="" headlineText="menu.accounts" bodyText="home.menu.accounts"> <@indexFunctions.homeEntry url="/accounts" icon=entityType.HOME.getIcon() iconColor="" headlineText="menu.accounts" bodyText="home.menu.accounts">
<@indexFunctions.action url="/accounts" name="home.menu.accounts.action.manage"/> <@indexFunctions.action url="/accounts" name="home.menu.accounts.action.manage"/>
<@indexFunctions.action url="/accounts/newAccount" name="home.menu.accounts.action.new"/> <@indexFunctions.action url="/accounts/newAccount" name="home.menu.accounts.action.new"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
<@indexFunctions.homeEntry url="/transactions" icon="list" iconColor="text-blue-baby" headlineText="menu.transactions" bodyText="home.menu.transactions"> <@indexFunctions.homeEntry url="/transactions" icon=entityType.TRANSACTION.getIcon() iconColor=entityType.TRANSACTION.getColorAsTextColor() headlineText="menu.transactions" bodyText="home.menu.transactions">
<@indexFunctions.action url="/transactions" name="home.menu.transactions.action.manage"/> <@indexFunctions.action url="/transactions" name="home.menu.transactions.action.manage"/>
<@indexFunctions.action url="/transactions/newTransaction/normal" name="home.menu.transactions.action.new"/> <@indexFunctions.action url="/transactions/newTransaction/normal" name="home.menu.transactions.action.new"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
<@indexFunctions.homeEntry url="/templates" icon="file_copy" iconColor="text-orange-dark" headlineText="menu.templates" bodyText="home.menu.templates"> <@indexFunctions.homeEntry url="/templates" icon=entityType.TEMPLATE.getIcon() iconColor=entityType.TEMPLATE.getColorAsTextColor() headlineText="menu.templates" bodyText="home.menu.templates">
<@indexFunctions.action url="/templates" name="home.menu.templates.action.manage"/> <@indexFunctions.action url="/templates" name="home.menu.templates.action.manage"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
<@indexFunctions.homeEntry url="/charts" icon="show_chart" iconColor="text-purple" headlineText="menu.charts" bodyText="home.menu.charts"> <@indexFunctions.homeEntry url="/charts" icon=entityType.CHART.getIcon() iconColor=entityType.CHART.getColorAsTextColor() headlineText="menu.charts" bodyText="home.menu.charts">
<@indexFunctions.action url="/charts/manage" name="home.menu.charts.action.manage"/> <@indexFunctions.action url="/charts/manage" name="home.menu.charts.action.manage"/>
<br> <br>
<@indexFunctions.action url="/charts" name="home.menu.charts.action.show"/> <@indexFunctions.action url="/charts" name="home.menu.charts.action.show"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
<@indexFunctions.homeEntry url="/reports" icon="description" iconColor="text-green" headlineText="menu.reports" bodyText="home.menu.reports"> <@indexFunctions.homeEntry url="/reports" icon=entityType.REPORT.getIcon() iconColor=entityType.REPORT.getColorAsTextColor() headlineText="menu.reports" bodyText="home.menu.reports">
<@indexFunctions.action url="/reports" name="home.menu.reports.action.new"/> <@indexFunctions.action url="/reports" name="home.menu.reports.action.new"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
<@indexFunctions.homeEntry url="/categories" icon="label" iconColor="text-orange" headlineText="menu.categories" bodyText="home.menu.categories"> <@indexFunctions.homeEntry url="/categories" icon=entityType.CATEGORY.getIcon() iconColor=entityType.CATEGORY.getColorAsTextColor() headlineText="menu.categories" bodyText="home.menu.categories">
<@indexFunctions.action url="/categories" name="home.menu.categories.action.manage"/> <@indexFunctions.action url="/categories" name="home.menu.categories.action.manage"/>
<@indexFunctions.action url="/categories/newCategory" name="home.menu.categories.action.new"/> <@indexFunctions.action url="/categories/newCategory" name="home.menu.categories.action.new"/>
</@indexFunctions.homeEntry> </@indexFunctions.homeEntry>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment