Newer
Older
<html>
<head>
<#import "../header.ftl" as header>
<@header.header "BudgetMaster"/>
<@header.style "categories"/>
</head>
<body class="budgetmaster-blue-light">
<#import "../navbar.ftl" as navbar>

Robert Goldmann
committed
<@navbar.navbar "transactions"/>

Robert Goldmann
committed
<div class="card main-card background-color">

Robert Goldmann
committed
<#import "../datePicker.ftl" as datePicker>

Robert Goldmann
committed
<@datePicker.datePicker currentDate springMacroRequestContext.getRequestUri()/>

Robert Goldmann
committed
<div class="container">
<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>

Robert Goldmann
committed
<h5 class="center budget-headline">${locale.getString("title.incomes")}</h5>

Robert Goldmann
committed
</div>
</div>
<div class="col s4">
<div class="icon-block">

Robert Goldmann
committed
<h1 class="center ${redTextColor} budget-headline-icon"><i class="material-icons icon-budget">file_upload</i></h1>

Robert Goldmann
committed
<h5 class="center budget">${helpers.getCurrencyString(paymentSum)}</h5>

Robert Goldmann
committed
<h5 class="center budget-headline">${locale.getString("title.expenditures")}</h5>

Robert Goldmann
committed
</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>

Robert Goldmann
committed
<h5 class="center budget-headline">${locale.getString("title.rest")}</h5>

Robert Goldmann
committed
</div>
</div>

Robert Goldmann
committed

Robert Goldmann
committed
<#-- button new -->
<div class="row valign-wrapper">
<div class="col s12 center-align"><a href="<@s.url '/transactions/newTransaction'/>" class="waves-effect waves-light btn budgetmaster-blue"><i class="material-icons left">add</i>${locale.getString("title.transaction.new")}</a></div>

Robert Goldmann
committed
</div>

Robert Goldmann
committed
<#-- transactions list -->

Robert Goldmann
committed
<#list transactions as transaction>

Robert Goldmann
committed
<tr>

Robert Goldmann
committed
<td>${helpers.getDateString(transaction.date)}</td>
<td><#if transaction.isRepeating()><i class="material-icons">repeat</i></#if></td>

Robert Goldmann
committed
<td>

Robert Goldmann
committed
<div class="category-circle" style="background-color: ${transaction.category.color}">
<span style="color: ${transaction.category.getAppropriateTextColor()}">
${transaction.category.name?capitalize[0]}

Robert Goldmann
committed
</span>
</div>
</td>
<td class="transaction-name">

Robert Goldmann
committed
<div>${transaction.name}</div>
<#if transaction.description??>
<div class="italic">${transaction.description}</div>

Robert Goldmann
committed
</#if>
</td>

Robert Goldmann
committed
<#if transaction.amount <= 0>
<td class="bold ${redTextColor}">${helpers.getCurrencyString(transaction.amount)}</td>

Robert Goldmann
committed
<#else>

Robert Goldmann
committed
<td class="bold ${greenTextColor}">${helpers.getCurrencyString(transaction.amount)}</td>

Robert Goldmann
committed
<td>

Robert Goldmann
committed
<#if (transaction.category.type.name() != "REST")>
<a href="<@s.url '/transactions/${transaction.ID?c}/edit'/>" class="btn-flat no-padding text-color"><i class="material-icons left">edit</i></a>
<a href="<@s.url '/transactions/${transaction.ID?c}/requestDelete'/>" class="btn-flat no-padding text-color"><i class="material-icons left">delete</i></a>

Robert Goldmann
committed
</#if>
</td>
</tr>

Robert Goldmann
committed
<#if transactions?size == 0>
<div class="headline center-align">${locale.getString("placeholder")}</div>
</#if>

Robert Goldmann
committed
<#if currentTransaction??>

Robert Goldmann
committed
<div id="modalConfirmDelete" class="modal background-color">

Robert Goldmann
committed
<h4>${locale.getString("info.title.transaction.delete")}</h4>

Robert Goldmann
committed
<#if currentTransaction.isRepeating()>
<p>${locale.getString("info.text.transaction.repeating.delete", currentTransaction.name)}</p>
<#else>
<p>${locale.getString("info.text.transaction.delete", currentTransaction.name)}</p>
</#if>

Robert Goldmann
committed
<div class="modal-footer background-color">
<a href="<@s.url '/transactions'/>" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a>
<a href="<@s.url '/transactions/${currentTransaction.ID?c}/delete'/>" class="modal-action modal-close waves-effectwaves-light green btn-flat white-text">${locale.getString("delete")}</a>
<#import "../scripts.ftl" as scripts>
<@scripts.scripts/>
<script src="<@s.url '/js/transactions.js'/>"></script>
<script src="<@s.url '/js/datePicker.js'/>"></script>

Robert Goldmann
committed
<script>document.cookie = "currentDate=${helpers.getDateString(currentDate)}";</script>