Skip to content
Snippets Groups Projects
Commit 8da2dc4a authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#338 - use accordion for template manage page too; truncate long template names

parent c7593f33
No related branches found
No related tags found
No related merge requests found
Pipeline #3380 passed
......@@ -2,6 +2,10 @@
font-weight: 600;
}
.template-header-name {
max-width: 60%;
}
.collapsible-header-button {
position: absolute;
right: 15px;
......
......@@ -2,9 +2,14 @@
font-weight: 600;
}
.template-header-name {
max-width: 60%;
}
.collapsible-header-button {
position: absolute;
right: 15px;
top: 8px;
font-weight: bold;
}
......@@ -28,7 +28,7 @@
<div class="headline center-align">${locale.getString("placeholder")}</div>
</div>
<#else>
<@templateFunctions.listTemplates templates/>
<@templateFunctions.listTemplates templates false/>
</#if>
</div>
</main>
......
......@@ -13,7 +13,7 @@
</div>
</#macro>
<#macro listTemplates templates>
<#macro listTemplates templates isEditable>
<div class="container">
<div class="row">
<div class="col s12">
......@@ -22,6 +22,14 @@
<li>
<div class="collapsible-header bold">
<@templateHeader template/>
<div class="collapsible-header-button">
<#if isEditable>
<a href="<@s.url '/templates/${template.ID?c}/edit'/>" class="btn-flat no-padding text-color"><i class="material-icons left">edit</i></a>
<a href="<@s.url '/templates/${template.ID?c}/requestDelete'/>" class="btn-flat no-padding text-color"><i class="material-icons left">delete</i></a>
<#else>
<a href="<@s.url '/templates/${template.ID?c}/select'/>" class="waves-effect waves-light btn budgetmaster-blue"><i class="material-icons left">note_add</i>${locale.getString("title.transaction.new", locale.getString("title.transaction.new.normal"))}</a>
</#if>
</div>
</div>
<div class="collapsible-body">
<div class="row no-margin-bottom">
......@@ -50,10 +58,7 @@
<#else>
<i class="material-icons">payment</i>
</#if>
${template.getTemplateName()}
<div class="collapsible-header-button">
<a href="<@s.url '/templates/${template.ID?c}/select'/>" class="waves-effect waves-light btn budgetmaster-blue"><i class="material-icons left">note_add</i>${locale.getString("title.transaction.new", locale.getString("title.transaction.new.normal"))}</a>
</div>
<div class="truncate template-header-name">${template.getTemplateName()}</div>
</#macro>
<#macro templateName template>
......
......@@ -2,6 +2,8 @@
<head>
<#import "../helpers/header.ftl" as header>
<@header.header "BudgetMaster"/>
<@header.style "collapsible"/>
<@header.style "templates"/>
<#import "/spring.ftl" as s>
</head>
<body class="budgetmaster-blue-light">
......@@ -9,6 +11,7 @@
<@navbar.navbar "templates" settings/>
<#import "templateFunctions.ftl" as templateFunctions>
<#import "../categories/categoriesFunctions.ftl" as categoriesFunctions>
<main>
<div class="card main-card background-color">
......@@ -20,30 +23,14 @@
<br>
<@templateFunctions.buttons/>
<br>
<div class="container">
<#if templates?size == 0>
<div class="container">
<div class="headline center-align">${locale.getString("placeholder")}</div>
</div>
<#else>
<table class="bordered">
<thead>
<tr>
<th>${locale.getString("chart.new.label.name")}</th>
<th>${locale.getString("chart.actions")}</th>
</tr>
</thead>
<#list templates as template>
<tr>
<td>${template.getTemplateName()}</td>
<td>
<a href="<@s.url '/templates/${template.ID?c}/edit'/>" class="btn-flat no-padding text-color"><i class="material-icons left">edit</i></a>
<a href="<@s.url '/templates/${template.ID?c}/requestDelete'/>" class="btn-flat no-padding text-color"><i class="material-icons left">delete</i></a>
</td>
</tr>
</#list>
</table>
<@templateFunctions.listTemplates templates true/>
</#if>
</div>
</div>
<#if currentTemplate??>
<!-- confirm delete modal -->
......@@ -53,7 +40,7 @@
<p>${locale.getString("info.text.template.delete", currentTemplate.getName())}</p>
</div>
<div class="modal-footer background-color">
<a href="<@s.url '/templates/manage'/>" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a>
<a href="<@s.url '/templates'/>" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a>
<a href="<@s.url '/templates/${currentTemplate.getID()?c}/delete'/>" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${locale.getString("info.title.template.delete")}</a>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment