Skip to content

Commit

Permalink
#724 - added new empty page and controller for csv import
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlocker8 committed Jan 8, 2023
1 parent 8467583 commit 2520ceb
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private Mappings()
public static final String TEMPLATES = "/templates";
public static final String TEMPLATE_GROUPS = "/templateGroups";
public static final String TRANSACTIONS = "/transactions";
public static final String TRANSACTION_IMPORT = "/transactionImport";
public static final String TAGS = "/tags";
public static final String HINTS = "/hints";
public static final String KEYWORDS = "/keywords";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 == "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>
<li><a href="<@s.url '${link}'/>" class="waves-effect"><i class="material-icons">${icon}</i>${text}</a></li>
</#if>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<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>

0 comments on commit 2520ceb

Please sign in to comment.