diff --git a/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/services/EntityType.java b/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/services/EntityType.java index df05dde04f4817bdfac635a08dd3f2102584461f..0558725a1a60c49da496c926960794c0462f60fc 100644 --- a/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/services/EntityType.java +++ b/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/services/EntityType.java @@ -19,7 +19,8 @@ public enum EntityType implements LocalizedEnum ABOUT("info", "background-grey", ImportRequired.NONE, null, null), TEMPLATE_GROUP("folder", "background-orange-dark", ImportRequired.OPTIONAL, "template groups", "template group"), ICON("icon", "background-grey", ImportRequired.NONE, "icons", "icon"), - TRANSACTION_NAME_KEYWORD("transaction_name_keyword", "background-grey", ImportRequired.NONE, "keywords", "keyword"); + TRANSACTION_NAME_KEYWORD("transaction_name_keyword", "background-grey", ImportRequired.NONE, "keywords", "keyword"), + RECURRING_TRANSACTIONS("repeat", "background-orange-dark", ImportRequired.NONE, "recurring", "recurring"); public enum ImportRequired { diff --git a/BudgetMasterServer/src/main/resources/languages/base_de.properties b/BudgetMasterServer/src/main/resources/languages/base_de.properties index 4770c62319bce0a967449b84d955f69902df1d5a..d7a232adb9bb90afa909afe583588d3c36863615 100644 --- a/BudgetMasterServer/src/main/resources/languages/base_de.properties +++ b/BudgetMasterServer/src/main/resources/languages/base_de.properties @@ -237,7 +237,8 @@ warning.empty.git.token=Bitte gib dein git-Zugriffstoken ein. # UI menu.home=Startseite menu.transactions=Buchungen -menu.templates=Vorlagen +menu.transactions.templates=Vorlagen +menu.transactions.recurring=Wiederholende Buchungen menu.template.groups=Vorlagengruppen menu.categories=Kategorien menu.charts=Diagramme diff --git a/BudgetMasterServer/src/main/resources/languages/base_en.properties b/BudgetMasterServer/src/main/resources/languages/base_en.properties index 09a169808bb716ace8cb6fba3c6df109d2043840..b98c327d5f007700658800af9fbfb01f30f4407d 100644 --- a/BudgetMasterServer/src/main/resources/languages/base_en.properties +++ b/BudgetMasterServer/src/main/resources/languages/base_en.properties @@ -238,7 +238,8 @@ warning.empty.git.token=Please insert your git access token. # UI menu.home=Home menu.transactions=Transactions -menu.templates=Templates +menu.transactions.templates=Templates +menu.transactions.recurring=Recurring Transactions menu.template.groups=Template Groups menu.categories=Categories menu.charts=Charts diff --git a/BudgetMasterServer/src/main/resources/static/css/navbar.css b/BudgetMasterServer/src/main/resources/static/css/navbar.css index acd7c9a07f9e77236d2f14568e642ed6c846310d..c8acbafcdd26db5283771dd3417aa243d4db93db 100644 --- a/BudgetMasterServer/src/main/resources/static/css/navbar.css +++ b/BudgetMasterServer/src/main/resources/static/css/navbar.css @@ -43,6 +43,18 @@ ul.sidenav.sidenav-fixed > li:last-child { right: 3rem; } +.sidenav .sub-menu-entry i { + margin-left: 2rem !important; +} + +.sidenav .sub-menu { + background-color: var(--color-grey-dark-almost-transparent); +} + +.sidenav li.sub-menu.active { + background-color: rgba(0, 0, 0, 0.25); +} + /* dark theme */ [data-theme="dark"] .sidenav, @@ -81,6 +93,10 @@ ul.sidenav.sidenav-fixed > li:last-child { background-color: rgba(255, 255, 255, 0.25); } +[data-theme="dark"] .sidenav li.sub-menu.active { + background-color: rgba(255, 255, 255, 0.35); +} + /*active nav bar sub list items*/ [data-theme="dark"] .sidenav .collapsible-body > ul:not(.collapsible) > li.active, [data-theme="dark"] .sidenav.fixed .collapsible-body > ul:not(.collapsible) > li.active { diff --git a/BudgetMasterServer/src/main/resources/templates/firstUse.ftl b/BudgetMasterServer/src/main/resources/templates/firstUse.ftl index 117127c89a0720075c05b1d2b37a1859879c050b..c86cf60f045bd80e5e9cf5bbeb1259b2cbc198bc 100644 --- a/BudgetMasterServer/src/main/resources/templates/firstUse.ftl +++ b/BudgetMasterServer/src/main/resources/templates/firstUse.ftl @@ -71,7 +71,7 @@ <div class="row left-align"> <div class="col s12"> <@indexFunctions.stepContent headline="home.first.use.step.5.headline" contentText="home.first.use.step.5.contentText" actionUrl="" actionName=""> - <h5>${locale.getString("menu.templates")}</h5> + <h5>${locale.getString("menu.transactions.templates")}</h5> <p> ${locale.getString("home.first.use.step.5.sub.1")} </p> diff --git a/BudgetMasterServer/src/main/resources/templates/helpers/navbar.ftl b/BudgetMasterServer/src/main/resources/templates/helpers/navbar.ftl index c0b256a848f0d2915c3ef2f5f17bbea103346c2b..3a815470e1803ba57debddb2c2e90784afd849ba 100644 --- a/BudgetMasterServer/src/main/resources/templates/helpers/navbar.ftl +++ b/BudgetMasterServer/src/main/resources/templates/helpers/navbar.ftl @@ -10,8 +10,7 @@ <@itemDivider/> <@itemWithIcon "home", "/", locale.getString("menu.home"), entityType.HOME.getIcon(), entityType.HOME.getColor(), activeID/> - <@itemWithIcon "transactions", "/transactions", locale.getString("menu.transactions"), entityType.TRANSACTION.getIcon(), entityType.TRANSACTION.getColor(), activeID/> - <@itemWithIcon "templates", "/templates", locale.getString("menu.templates"), entityType.TEMPLATE.getIcon(), entityType.TEMPLATE.getColor(), activeID/> + <@transactionsMenu "/transactions", locale.getString("menu.transactions"), entityType.TRANSACTION.getIcon(), entityType.TRANSACTION.getColor(), activeID/> <@itemWithIcon "charts" "/charts" locale.getString("menu.charts"), entityType.CHART.getIcon(), entityType.CHART.getColor(), activeID/> <@itemWithIcon "reports", "/reports", locale.getString("menu.reports"), entityType.REPORT.getIcon(), entityType.REPORT.getColor(), activeID/> <@itemWithIcon "categories", "/categories", locale.getString("menu.categories"), entityType.CATEGORY.getIcon(), entityType.CATEGORY.getColor(), activeID/> @@ -146,6 +145,16 @@ <li><a class="waves-effect background-red budgetmaster-text-update"><i class="material-icons" id="icon-update">${icon}</i>${text}</a></li> </#macro> +<#macro transactionsMenu link text icon activeColor activeID> + <#if activeID == "transactions" || activeID == "templates" || activeID == "recurring"> + <li class="sub-menu <#if activeID == "transactions">active</#if>"><a href="<@s.url '${link}'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${icon}</i>${text}</a></li> + <li class="sub-menu sub-menu-entry <#if activeID == "templates">active</#if>"><a href="<@s.url '/templates'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.TEMPLATE.getIcon()}</i>${locale.getString("menu.transactions.templates")}</a></li> + <li class="sub-menu sub-menu-entry <#if activeID == "recurring">active</#if>"><a href="<@s.url '/templates'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.RECURRING_TRANSACTIONS.getIcon()}</i>${locale.getString("menu.transactions.recurring")}</a></li> + <#else> + <li><a href="<@s.url '${link}'/>" class="waves-effect"><i class="material-icons">${icon}</i>${text}</a></li> + </#if> +</#macro> + <#macro backupReminder settings> <#if settings.needToShowBackupReminder()> <div id="modalBackupReminder" class="modal background-color"> diff --git a/BudgetMasterServer/src/main/resources/templates/index.ftl b/BudgetMasterServer/src/main/resources/templates/index.ftl index 695b0c9c4c48fe71a5bb1cca7ac40ebcfd4665e8..839fa53149bffb03fba6a9689a8b2328de61d0ec 100644 --- a/BudgetMasterServer/src/main/resources/templates/index.ftl +++ b/BudgetMasterServer/src/main/resources/templates/index.ftl @@ -40,7 +40,7 @@ <@indexFunctions.action url="/transactions/newTransaction/normal" name="home.menu.transactions.action.new"/> </@indexFunctions.homeEntry> - <@indexFunctions.homeEntry url="/templates" icon=entityType.TEMPLATE.getIcon() iconColor=entityType.TEMPLATE.getColorAsTextColor() headlineText="menu.templates" bodyText="home.menu.templates"> + <@indexFunctions.homeEntry url="/templates" icon=entityType.TEMPLATE.getIcon() iconColor=entityType.TEMPLATE.getColorAsTextColor() headlineText="menu.transactions.templates" bodyText="home.menu.templates"> <@indexFunctions.action url="/templates" name="home.menu.templates.action.manage"/> </@indexFunctions.homeEntry> diff --git a/BudgetMasterServer/src/main/resources/templates/templateGroups/templateGroupFunctions.ftl b/BudgetMasterServer/src/main/resources/templates/templateGroups/templateGroupFunctions.ftl index f6c4127e839e7a4e9e4c812886cb99dd07d69581..bbe72af24da62c8b79e1254dc79fae65d3950864 100644 --- a/BudgetMasterServer/src/main/resources/templates/templateGroups/templateGroupFunctions.ftl +++ b/BudgetMasterServer/src/main/resources/templates/templateGroups/templateGroupFunctions.ftl @@ -7,7 +7,7 @@ </#macro> <#macro buttonEditTemplateGroups> - <@header.buttonLink url='/templates' icon='file_copy' localizationKey='menu.templates'/> + <@header.buttonLink url='/templates' icon='file_copy' localizationKey='menu.transactions.templates'/> </#macro> <#macro buttons> diff --git a/BudgetMasterServer/src/main/resources/templates/templates/templates.ftl b/BudgetMasterServer/src/main/resources/templates/templates/templates.ftl index 0be7b79e4c8e9b0fef40dee1528fdc44b54ab343..5b43c357171d6f3827fe31f968fc9e5fe998ef26 100644 --- a/BudgetMasterServer/src/main/resources/templates/templates/templates.ftl +++ b/BudgetMasterServer/src/main/resources/templates/templates/templates.ftl @@ -2,7 +2,7 @@ <head> <#import "../helpers/header.ftl" as header> <@header.globals/> - <@header.header "BudgetMaster - ${locale.getString('menu.templates')}"/> + <@header.header "BudgetMaster - ${locale.getString('menu.transactions.templates')}"/> <@header.style "collapsible"/> <@header.style "templates"/> <#import "/spring.ftl" as s> @@ -18,7 +18,7 @@ <div class="card main-card background-color"> <div class="container"> <div class="section center-align"> - <div class="headline"><i class="material-icons">file_copy</i> ${locale.getString("menu.templates")}</div> + <div class="headline"><i class="material-icons">file_copy</i> ${locale.getString("menu.transactions.templates")}</div> </div> <@header.content>