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

#724 - added new empty page and controller for csv import

parent 8467583a
No related branches found
No related tags found
No related merge requests found
package de.deadlocker8.budgetmaster.transactions;
import de.deadlocker8.budgetmaster.controller.BaseController;
import de.deadlocker8.budgetmaster.services.HelpersService;
import de.deadlocker8.budgetmaster.utils.Mappings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping(Mappings.TRANSACTION_IMPORT)
public class TransactionImportController extends BaseController
{
private static class ReturnValues
{
public static final String TRANSACTION_IMPORT = "transactions/transactionImport";
}
private final TransactionService transactionService;
private final HelpersService helpers;
@Autowired
public TransactionImportController(TransactionService transactionService, HelpersService helpers)
{
this.transactionService = transactionService;
this.helpers = helpers;
}
@GetMapping
public String transactionImport(HttpServletRequest request, Model model)
{
return ReturnValues.TRANSACTION_IMPORT;
}
}
\ No newline at end of file
...@@ -23,6 +23,7 @@ public final class Mappings ...@@ -23,6 +23,7 @@ public final class Mappings
public static final String TEMPLATES = "/templates"; public static final String TEMPLATES = "/templates";
public static final String TEMPLATE_GROUPS = "/templateGroups"; public static final String TEMPLATE_GROUPS = "/templateGroups";
public static final String TRANSACTIONS = "/transactions"; public static final String TRANSACTIONS = "/transactions";
public static final String TRANSACTION_IMPORT = "/transactionImport";
public static final String TAGS = "/tags"; public static final String TAGS = "/tags";
public static final String HINTS = "/hints"; public static final String HINTS = "/hints";
public static final String KEYWORDS = "/keywords"; public static final String KEYWORDS = "/keywords";
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<li class="sub-menu <#if activeID == "transactions">active</#if>"><a href="<@s.url '${link}'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${icon}</i>${text}</a></li> <li class="sub-menu <#if activeID == "transactions">active</#if>"><a href="<@s.url '${link}'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${icon}</i>${text}</a></li>
<li class="sub-menu sub-menu-entry <#if activeID == "templates">active</#if>"><a href="<@s.url '/templates'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.TEMPLATE.getIcon()}</i>${locale.getString("menu.transactions.templates")}</a></li> <li class="sub-menu sub-menu-entry <#if activeID == "templates">active</#if>"><a href="<@s.url '/templates'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.TEMPLATE.getIcon()}</i>${locale.getString("menu.transactions.templates")}</a></li>
<li class="sub-menu sub-menu-entry <#if activeID == "recurring">active</#if>"><a href="<@s.url '/transactions/recurringOverview'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.RECURRING_TRANSACTIONS.getIcon()}</i>${locale.getString("menu.transactions.recurring")}</a></li> <li class="sub-menu sub-menu-entry <#if activeID == "recurring">active</#if>"><a href="<@s.url '/transactions/recurringOverview'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="material-icons">${entityType.RECURRING_TRANSACTIONS.getIcon()}</i>${locale.getString("menu.transactions.recurring")}</a></li>
<li class="sub-menu sub-menu-entry <#if activeID == "importCSV">active</#if>"><a href="<@s.url '/transactions/recurringOverview'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="${entityType.TRANSACTION_IMPORT.getIcon()} fontawesome-icon fontawesome-icon-additional-margin-left"></i>${locale.getString("menu.transactions.import")}</a></li> <li class="sub-menu sub-menu-entry <#if activeID == "importCSV">active</#if>"><a href="<@s.url '/transactionImport'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="${entityType.TRANSACTION_IMPORT.getIcon()} fontawesome-icon fontawesome-icon-additional-margin-left"></i>${locale.getString("menu.transactions.import")}</a></li>
<#else> <#else>
<li><a href="<@s.url '${link}'/>" class="waves-effect"><i class="material-icons">${icon}</i>${text}</a></li> <li><a href="<@s.url '${link}'/>" class="waves-effect"><i class="material-icons">${icon}</i>${text}</a></li>
</#if> </#if>
......
<html>
<head>
<#import "../helpers/header.ftl" as header>
<@header.globals/>
<@header.header "BudgetMaster - ${locale.getString('menu.transactions.import')}"/>
<#import "/spring.ftl" as s>
</head>
<@header.body>
<#import "../helpers/navbar.ftl" as navbar>
<@navbar.navbar "importCSV" settings/>
<#import "../search/searchMacros.ftl" as searchMacros>
<main>
<div class="card main-card background-color">
<div class="container">
<div class="section center-align">
<div class="headline">${locale.getString("menu.transactions.import")}</div>
</div>
</div>
<@header.content>
</@header.content>
</div>
</main>
<!-- Scripts-->
<#import "../helpers/scripts.ftl" as scripts>
<@scripts.scripts/>
</@header.body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment