Newer
Older
<@header.header "BudgetMaster - ${locale.getString('menu.accounts')}"/>
<@navbar.navbar "accounts" settings/>
<#import "../helpers/customSelectMacros.ftl" as customSelectMacros>

Robert Goldmann
committed
<div class="card main-card background-color">
<div class="container">
<div class="section center-align">
<div class="headline"><i class="material-icons">account_balance</i> ${locale.getString("menu.accounts")}</div>
</div>
</div>
<@header.content>
<br>
<div class="center-align"><@header.buttonLink url='/accounts/newAccount' icon='add' localizationKey='title.account.new' id='button-new-account'/></div>
<br>
<div class="container account-container">

Robert Goldmann
committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<form name="AccountsFilter" action="<@s.url '/accounts/applyFilter'/>" method="post">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<table class="bordered">
<thead class="hide-on-med-and-down">
<tr>
<th></th>
<th>
<div>${locale.getString("account.new.label.state")}</div>
<div>
<label>
<input type="checkbox" name="includeFullAccess" <#if accountsFilterConfiguration?? && accountsFilterConfiguration.includeFullAccess>checked</#if>/>
<span><i class="fas fa-edit placeholder-icon-right"></i>${locale.getString("account.state.full.access")}</span>
</label>
</div>
<div>
<label>
<input type="checkbox" name="includeReadOnly" <#if accountsFilterConfiguration?? && accountsFilterConfiguration.includeReadOnly>checked</#if>/>
<span><i class="fas fa-lock placeholder-icon-right"></i>${locale.getString("account.state.read.only")}</span>
</label>
</div>
<div>
<label>
<input type="checkbox" name="includeHidden" <#if accountsFilterConfiguration?? && accountsFilterConfiguration.includeHidden>checked</#if>/>
<span><i class="far fa-eye-slash placeholder-icon-right"></i>${locale.getString("account.state.hidden")}</span>
</label>
</div>
</th>
<th>
<div>${locale.getString("account.new.label.endDate")}</div>
<div>
<label>
<input type="checkbox" name="includeWithEndDate" <#if accountsFilterConfiguration?? && accountsFilterConfiguration.includeWithEndDate>checked</#if>/>
<span><i class="fas fa-bell placeholder-icon-right"></i>${locale.getString("account.label.endDate.with")}</span>
</label>
</div>
<div>
<label>
<input type="checkbox" name="includeWithoutEndDate" <#if accountsFilterConfiguration?? && accountsFilterConfiguration.includeWithoutEndDate>checked</#if>/>
<span><i class="fas fa-bell-slash placeholder-icon-right"></i>${locale.getString("account.label.endDate.without")}</span>
</label>
</div>
</th>
<th>
<div>${locale.getString("account.new.label.name")}</div>
<div class="input-field">
<input type="text" name="name" value="<#if accountsFilterConfiguration??>${accountsFilterConfiguration.name}</#if>"/>
</div>
</th>
<th>
<div>${locale.getString("transaction.new.label.description")}</div>
<div class="input-field">
<input type="text" name="description" value="<#if accountsFilterConfiguration??>${accountsFilterConfiguration.description}</#if>"/>
</div>
</th>
<th class="vertical-align-middle">
<button class="btn waves-effect waves-light background-green" type="submit" id="accounts-filter-button">
<i class="fas fa-filter left"></i>${locale.getString("filter.apply")}
</button>
</th>
</tr>
</thead>

Robert Goldmann
committed

Robert Goldmann
committed
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<#list accounts as account>
<#if (account.getType().name() == "CUSTOM")>
<tr class="account-overview-row">
<td><@customSelectMacros.accountIcon account account.getName() "text-blue"/></td>
<td>
<#if account.getAccountState().name() == "READ_ONLY">
<div class="placeholder-icon placeholder-icon-right"></div>
<i class="fas fa-lock placeholder-icon-right"></i>
<#elseif account.getAccountState().name() == "HIDDEN">
<div class="placeholder-icon placeholder-icon-right"></div>
<i class="far fa-eye-slash placeholder-icon-right"></i>
<#else>
<a href="<@s.url '/accounts/${account.getID()?c}/setAsDefault'/>" class="btn-flat no-padding text-default tooltipped" data-position="left" data-tooltip="${locale.getString("account.tooltip.default")}"><i class="material-icons left"><#if account.isDefault()>star<#else>star_border</#if></i></a>
<i class="fas fa-edit placeholder-icon-right"></i>
</#if>
</td>
<td>
<#if account.getEndDate()??>
<i class="fas fa-bell placeholder-icon-right"></i> ${dateService.getDateStringNormal(account.getEndDate())}
<#else>
<div class="placeholder-icon"></div>
</#if>
</td>
<td>${account.getName()}</td>
<td>
<div class="truncate account-description">
${account.getDescription()}
</div>
</td>
<td>
<a href="<@s.url '/accounts/${account.getID()?c}/edit'/>" class="btn-flat no-padding text-default"><i class="material-icons left">edit</i></a>
<@header.buttonFlat url='/accounts/' + account.ID?c + '/requestDelete' icon='delete' localizationKey='' classes="no-padding text-default button-request-delete-account" isDataUrl=true/>
</td>
</tr>
</#if>
</#list>
</table>
</form>
<#if accounts?size == 0>
<div class="headline center-align">${locale.getString("placeholder")}</div>
</#if>
</div>
<div id="deleteModalContainerOnDemand"></div>
</main>
<#if accountNotDeletable??>
<!-- warning account not deletable -->

Robert Goldmann
committed
<div id="modalAccountNotDeletable" class="modal background-color">
<div class="modal-content">
<h4>${locale.getString("info.title.account.delete")}</h4>
<p>${locale.getString("warning.text.account.delete", currentAccount.getName())}</p>
</div>

Robert Goldmann
committed
<div class="modal-footer background-color">
<@header.buttonLink url='/accounts' icon='done' localizationKey='ok' color='green' id='buttonCloseWhatsNew' classes='modal-action modal-close text-white'/>
</div>
</div>
</#if>
<!-- Scripts-->
<@scripts.scripts/>
<script src="<@s.url '/js/accounts.js'/>"></script>