diff --git a/src/main/resources/languages/_de.properties b/src/main/resources/languages/_de.properties index 88a7358c86b1de5ff706e3478a4c90a18cfac21d..646e92888fe5040e4182d7b5d56f6967517cc8ce 100644 --- a/src/main/resources/languages/_de.properties +++ b/src/main/resources/languages/_de.properties @@ -40,6 +40,7 @@ title.transaction.new.normal=Buchung title.transaction.new.repeating=Wiederholend title.transaction.new.repeating.long=Wiederholende Buchung title.transaction.new.transfer=Umbuchung +title.transaction.new.from.template=Aus Vorlage title.datepicker.year=Jahr wählen title.datepicker.month=Monat wählen title.account.new=Neues Konto @@ -331,11 +332,14 @@ hotkeys.transactions.new.repeating=Neue widerholende Buchung anlegen hotkeys.transactions.new.repeating.key=r hotkeys.transactions.new.transfer=Neue Umbuchung anlegen hotkeys.transactions.new.transfer.key=t +hotkeys.transactions.new.template=Neue Buchung aus Vorlage anlegen +hotkeys.transactions.new.template.key=v hotkeys.transactions.filter=Filtern hotkeys.transactions.filter.key=f hotkeys.search=Suchen hotkeys.search.key=s + # charts charts.default.accountSumPerDay=Kontostand pro Tag charts.default.accountSumPerDay.localization='{"axisY": "Summe in "'} diff --git a/src/main/resources/languages/_en.properties b/src/main/resources/languages/_en.properties index 2565df4242a83bcfa967ab7308a366ec4749222e..d5c026f21db07af7e83d50c2f2d2bd4eeab7ae59 100644 --- a/src/main/resources/languages/_en.properties +++ b/src/main/resources/languages/_en.properties @@ -40,6 +40,7 @@ title.transaction.new.normal=Transaction title.transaction.new.repeating=Recurring title.transaction.new.repeating.long=Recurring Transaction title.transaction.new.transfer=Transfer +title.transaction.new.from.template=From template title.datepicker.year=Choose year title.datepicker.month=Choose month title.account.new=New Account @@ -331,6 +332,8 @@ hotkeys.transactions.new.repeating=Create a recuring transaction hotkeys.transactions.new.repeating.key=r hotkeys.transactions.new.transfer=Create a transfer hotkeys.transactions.new.transfer.key=t +hotkeys.transactions.new.template=Create a transaction from template +hotkeys.transactions.new.template.key=v hotkeys.transactions.filter=Filter hotkeys.transactions.filter.key=f hotkeys.search=Search diff --git a/src/main/resources/static/js/hotkeys.js b/src/main/resources/static/js/hotkeys.js index f88d4f559c323bf63743429242ef6ab49c2b4905..176d87c6ee2fe585019b87001f2f0e294b619eeb 100644 --- a/src/main/resources/static/js/hotkeys.js +++ b/src/main/resources/static/js/hotkeys.js @@ -22,6 +22,14 @@ Mousetrap.bind('t', function() } }); +Mousetrap.bind('v', function() +{ + if(areHotKeysEnabled()) + { + window.location.href = rootURL + '/transactions/newTransaction/template'; + } +}); + Mousetrap.bind('f', function() { if(areHotKeysEnabled()) diff --git a/src/main/resources/templates/hotkeys.ftl b/src/main/resources/templates/hotkeys.ftl index 71f5393ec4b33310dec4bbae25873eecb52d9382..b4d2fbc2ec021d79924cd13eba92d841872c8ccf 100644 --- a/src/main/resources/templates/hotkeys.ftl +++ b/src/main/resources/templates/hotkeys.ftl @@ -30,6 +30,10 @@ <@cellKey locale.getString("hotkeys.transactions.new.transfer.key")/> <div class="col s8 m5 l5">${locale.getString("hotkeys.transactions.new.transfer")}</div> </div> + <div class="row"> + <@cellKey locale.getString("hotkeys.transactions.new.template.key")/> + <div class="col s8 m5 l5">${locale.getString("hotkeys.transactions.new.template")}</div> + </div> <div class="row"> <@cellKey locale.getString("hotkeys.transactions.filter.key")/> <div class="col s8 m5 l5">${locale.getString("hotkeys.transactions.filter")}</div> diff --git a/src/main/resources/templates/transactions/transactionsMacros.ftl b/src/main/resources/templates/transactions/transactionsMacros.ftl index a78c95c7ec9cf30a5a4b31e5be66e318d491415d..ce06728f55442ccfd087bdeba4b00804f3a082cc 100644 --- a/src/main/resources/templates/transactions/transactionsMacros.ftl +++ b/src/main/resources/templates/transactions/transactionsMacros.ftl @@ -137,6 +137,10 @@ <i class="material-icons left">add</i>${locale.getString("title.transaction.new.short")} </a> <ul class="${listClasses}"> + <li> + <a href="<@s.url '/transactions/newTransaction/template'/>" class="btn-floating btn budgetmaster-baby-blue"><i class="material-icons">file_copy</i></a> + <a href="<@s.url '/transactions/newTransaction/template'/>" class="btn-floating btn mobile-fab-tip no-wrap">${locale.getString("title.transaction.new.from.template")}</a> + </li> <li> <a href="<@s.url '/transactions/newTransaction/transfer'/>" class="btn-floating btn budgetmaster-dark-green"><i class="material-icons">swap_horiz</i></a> <a href="<@s.url '/transactions/newTransaction/transfer'/>" class="btn-floating btn mobile-fab-tip no-wrap">${locale.getString("title.transaction.new.transfer")}</a>