Skip to content
Snippets Groups Projects
transactions.ftl 5.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>
    
            <@navbar.navbar "transactions" settings/>
    
            <#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 "/transactions"/>
    
                        <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(budget.getIncomeSum())}</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(budget.getExpenditureSum())}</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(budget.getRest())}</h5>
    
                                    <h5 class="center budget-headline">${locale.getString("title.rest")}</h5>
    
                        <@transactionsMacros.buttons filterConfiguration.isActive()/>
    
                        <#list transactions as transaction>
    
                            <div class="hide-on-large-only">
                                <div class="row valign-wrapper transaction-row">
                                    <div class="col s3 center-align bold transaction-text">
                                        ${helpers.getDateStringWithoutYear(transaction.date)}
                                    </div>
    
                                    <@transactionsMacros.transactionType transaction/>
    
                                    <@transactionsMacros.transactionButtons transaction/>
                                </div>
                                <div class="row valign-wrapper">
                                    <@transactionsMacros.transactionCategory transaction "center-align"/>
                                    <@transactionsMacros.transactionNameAndDescription transaction/>
    
                                    <@transactionsMacros.transactionAmount transaction account/>
    
                            <div class="hide-on-med-and-down">
                                <div class="row valign-wrapper transaction-row">
                                    <div class="col l1 xl1 bold transaction-text">
                                        ${helpers.getDateStringWithoutYear(transaction.date)}
                                    </div>
                                    <@transactionsMacros.transactionCategory transaction "left-align"/>
    
                                    <@transactionsMacros.transactionType transaction/>
    
                                    <@transactionsMacros.transactionNameAndDescription transaction/>
    
                                    <@transactionsMacros.transactionAmount transaction account/>
    
                                    <@transactionsMacros.transactionButtons transaction/>
                                </div>
    
    
                        <#-- 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>