Newer
Older

Robert Goldmann
committed
<html>
<head>
<@header.header "BudgetMaster - ${locale.getString('menu.reports')}"/>
<@header.style "globalDatepicker"/>
<@header.style "collapsible"/>

Robert Goldmann
committed
<#import "/spring.ftl" as s>
</head>
<@navbar.navbar "reports" settings/>

Robert Goldmann
committed
<#import "../transactions/transactionsMacros.ftl" as transactionsMacros>
<#import "../filter/filterMacros.ftl" as filterMacros>

Robert Goldmann
committed
<main>
<div class="card main-card background-color">
<#import "../helpers/globalDatePicker.ftl" as datePicker>

Robert Goldmann
committed
<@datePicker.datePicker currentDate "/reports"/>

Robert Goldmann
committed
<form name="NewReportSettings" action="<@s.url '/reports/generate'/>" method="post" onsubmit="return validateForm()">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="ID" value="${reportSettings.getID()?c}"/>
<input type="hidden" name="date" value="${dateService.getLongDateString(currentDate)}"/>
<div class="row">
<div class="col s12 center-align">
<@transactionsMacros.buttonFilter filterConfiguration.isActive()/>

Robert Goldmann
committed
<#-- settings -->
<div class="row">
<div class="col s12 center-align">
<div class="headline-small text-default">${locale.getString("report.settings")}</div>

Robert Goldmann
committed
</div>

Robert Goldmann
committed
<div class="row">
<div class="col s12 m8 offset-m2">
<div class="report-checkbox-container">

Robert Goldmann
committed
<input type="checkbox" name="includeBudget" <#if reportSettings.includeBudget>checked="checked"</#if>>
<span class="columnName-checkbox-label text-default">${locale.getString('report.checkbox.include.budget')}</span>

Robert Goldmann
committed
<div class="report-checkbox-container">

Robert Goldmann
committed
<input type="checkbox" name="splitTables" <#if reportSettings.splitTables>checked="checked"</#if>>
<span class="columnName-checkbox-label text-default">${locale.getString('report.checkbox.split.tables')}</span>

Robert Goldmann
committed
<div class="report-checkbox-container">
<input type="checkbox" name="includeCategoryBudgets" <#if reportSettings.includeCategoryBudgets>checked="checked"</#if>/>
<span class="columnName-checkbox-label text-default">${locale.getString('report.checkbox.inclue.categorybudgets')}</span>

Robert Goldmann
committed
</div>
</div>
<br>
<#-- columns -->
<div class="row no-margin">
<div class="col s12 center-align">
<div class="headline-small text-default">${locale.getString("report.columns")}</div>
<br>
<#assign hint=helpers.getHintByLocalizationKey("hint.report.columns")/>
<@header.hint hint=hint/>

Robert Goldmann
committed
</div>
</div>
<div class="row">
<div class="col s12 m8 offset-m2">
<div id="columnNames">
<#list reportSettings.getColumnsSorted() as column>

Robert Goldmann
committed
<div class="columnName">
<label>
<input type="checkbox" class="columnName-checkbox" data-index="${column?index}" name="columns['${column?index}'].activated" <#if column.isActivated()>checked="checked"</#if>/>
<span class="columnName-label">${locale.getString(column.getLocalizationKey())}</span>

Robert Goldmann
committed
</label>
<input type="hidden" name="columns['${column?index}'].ID" value="${column.getID()}"/>
<input type="hidden" name="columns['${column?index}'].localizationKey" value="${column.getLocalizationKey()}"/>
<input type="hidden" name="columns['${column?index}'].columnPosition" value=""/>

Robert Goldmann
committed
</div>
</#list>

Robert Goldmann
committed
</div>

Robert Goldmann
committed
<div class="row valign-wrapper">
<div class="col s12 center-align">
<@header.buttonSubmit name='buttonSave' icon='save' localizationKey='report.button.generate'/>

Robert Goldmann
committed
</div>
</div>
</form>

Robert Goldmann
committed
</div>

Robert Goldmann
committed
</div>
<@filterMacros.filterModal filterConfiguration/>

Robert Goldmann
committed
</main>
<!-- Scripts-->

Robert Goldmann
committed
<@scripts.scripts/>
<script src="<@s.url '/webjars/sortablejs/1.15.3/Sortable.min.js'/>"></script>
<script src="<@s.url '/js/reports.js'/>"></script>
<script src="<@s.url '/js/globalDatePicker.js'/>"></script>
<script src="<@s.url '/js/filter.js'/>"></script>
<script>document.cookie = "currentDate=${dateService.getDateStringNormal(currentDate)}";</script>