Skip to content
Snippets Groups Projects
transactions.ftl 4.42 KiB
Newer Older
  • Learn to ignore specific revisions
  • <html>
        <head>
    
    Robert Goldmann's avatar
    Robert Goldmann committed
            <#import "../helpers/header.ftl" as header>
    
            <@header.header "BudgetMaster"/>
    
            <@header.style "categories"/>
    
            <@header.style "globalDatepicker"/>
    
            <@header.style "filter"/>
    
            <#import "/spring.ftl" as s>
    
        </head>
        <body class="budgetmaster-blue-light">
    
    Robert Goldmann's avatar
    Robert Goldmann committed
            <#import "../helpers/navbar.ftl" as navbar>
    
            <#import "transactionsMacros.ftl" as transactionsMacros>
    
            <#import "../filter/filterMacros.ftl" as filterMacros>
    
                <div class="card main-card background-color">
    
                    <#import "../helpers/globalDatePicker.ftl" as datePicker>
    
                    <@datePicker.datePicker currentDate springMacroRequestContext.getRequestUri()/>
    
                        <div class="row">
                            <div class="col s4">
                                <div class="icon-block">
                                    <h1 class="center text-green budget-headline-icon"><i class="material-icons icon-budget">file_download</i></h1>
                                    <h5 class="center budget">${helpers.getCurrencyString(incomeSum)}</h5>
    
                                    <h5 class="center budget-headline">${locale.getString("title.incomes")}</h5>
    
                                </div>
                            </div>
                            <div class="col s4">
                                <div class="icon-block">
    
                                    <h1 class="center ${redTextColor} budget-headline-icon"><i class="material-icons icon-budget">file_upload</i></h1>
    
                                    <h5 class="center budget">${helpers.getCurrencyString(paymentSum)}</h5>
    
                                    <h5 class="center budget-headline">${locale.getString("title.expenditures")}</h5>
    
                                </div>
                            </div>
                            <div class="col s4">
                                <div class="icon-block">
                                    <h1 class="center budgetmaster-blue-text budget-headline-icon"><i class="fas fa-piggy-bank icon-budget"></i></h1>
                                    <h5 class="center budget">${helpers.getCurrencyString(rest)}</h5>
    
                                    <h5 class="center budget-headline">${locale.getString("title.rest")}</h5>
    
                        <@transactionsMacros.buttons filterConfiguration.isActive()/>
    
                        <#list transactions as transaction>
                            <div class="row valign-wrapper transaction-row">
                                <div class="col s3 l1 center-align bold transaction-text">
                                    ${helpers.getDateStringWithoutYear(transaction.date)}
                                </div>
                                <@transactionsMacros.transactionRepeating transaction/>
                                <@transactionsMacros.transactionButtons transaction/>
    
                            <div class="row valign-wrapper">
                                <@transactionsMacros.transactionCategory transaction/>
                                <@transactionsMacros.transactionNameAndDescription transaction/>
                                <@transactionsMacros.transactionAmount transaction.getAmount()/>
                            </div>
                            <hr>
                        </#list>
    
    
                        <#-- show placeholde text if no transactions are present in the current month or REST ist the only transaction -->
    
                        <@transactionsMacros.placeholder transactions/>
    
                    <@transactionsMacros.deleteModal currentTransaction/>
    
    
                <@filterMacros.filterModal filterConfiguration/>
    
            </main>
    
            <!--  Scripts-->
    
    Robert Goldmann's avatar
    Robert Goldmann committed
            <#import "../helpers/scripts.ftl" as scripts>
    
            <script src="<@s.url '/js/transactions.js'/>"></script>
    
            <script src="<@s.url '/js/globalDatePicker.js'/>"></script>
    
            <script src="<@s.url '/js/filter.js'/>"></script>
    
            <script>document.cookie = "currentDate=${helpers.getDateString(currentDate)}";</script>