finalized for productive deployment
This commit is contained in:
parent
45943b415b
commit
437b9cbd43
@ -1,13 +1,2 @@
|
|||||||
arguments=
|
|
||||||
auto.sync=false
|
|
||||||
build.scans.enabled=false
|
|
||||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
|
||||||
connection.project.dir=
|
connection.project.dir=
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
gradle.user.home=
|
|
||||||
java.home=
|
|
||||||
jvm.arguments=
|
|
||||||
offline.mode=false
|
|
||||||
override.workspace.settings=false
|
|
||||||
show.console.view=false
|
|
||||||
show.executions.view=false
|
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
<wb-module deploy-name="CampOrganizer2">
|
<wb-module deploy-name="CampOrganizer2">
|
||||||
|
<property name="context-root" value="CampOrganizer2"/>
|
||||||
<property name="context-root" value="CampOrganizer2"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
|
</wb-module>
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
|
||||||
|
|
||||||
</wb-module>
|
|
||||||
|
|
||||||
</project-modules>
|
</project-modules>
|
||||||
|
@ -18,7 +18,7 @@ apply plugin: 'war'
|
|||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
|
|
||||||
group = 'de.jottyfan.camporganizer'
|
group = 'de.jottyfan.camporganizer'
|
||||||
version = '0.3.7'
|
version = '0.3.8'
|
||||||
sourceCompatibility = 17
|
sourceCompatibility = 17
|
||||||
mainClassName = "de.jottyfan.camporganizer.Main"
|
mainClassName = "de.jottyfan.camporganizer.Main"
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/mail")
|
@GetMapping("/admin/mail")
|
||||||
public String getMail(Model model, HttpServletRequest request) {
|
public String getMail(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
MailBean mailBean = new MailBean();
|
MailBean mailBean = new MailBean();
|
||||||
mailBean.setFrom(from);
|
mailBean.setFrom(from);
|
||||||
mailBean.getTo().add(getCurrentEmail(request));
|
mailBean.getTo().add(getCurrentEmail(request));
|
||||||
@ -49,7 +48,6 @@ public class AdminController extends CommonController {
|
|||||||
@PostMapping("/admin/mail/send")
|
@PostMapping("/admin/mail/send")
|
||||||
public String sendMail(@Valid @ModelAttribute("bean") MailBean bean, final BindingResult bindingResult, Model model,
|
public String sendMail(@Valid @ModelAttribute("bean") MailBean bean, final BindingResult bindingResult, Model model,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
for (ObjectError error : bindingResult.getAllErrors())
|
for (ObjectError error : bindingResult.getAllErrors())
|
||||||
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
||||||
@ -61,29 +59,25 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/document")
|
@GetMapping("/admin/document")
|
||||||
public String getDocuments(Model model, HttpServletRequest request) {
|
public String getDocuments(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("documents", service.getAllDocuments());
|
model.addAttribute("documents", service.getAllDocuments());
|
||||||
return "/admin/document";
|
return "/admin/document";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/document/add")
|
@GetMapping("/admin/document/add")
|
||||||
public String prepareAddDocument(Model model, HttpServletRequest request) {
|
public String prepareAddDocument(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", new DocumentBean());
|
model.addAttribute("bean", new DocumentBean());
|
||||||
return "/admin/document_edit";
|
return "/admin/document_edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/document/edit/{id}")
|
@GetMapping("/admin/document/edit/{id}")
|
||||||
public String prepareAddDocument(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
public String prepareAddDocument(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", service.getDocument(id));
|
model.addAttribute("bean", service.getDocument(id));
|
||||||
return "/admin/document_edit";
|
return "/admin/document_edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/admin/document/update")
|
@PostMapping("/admin/document/update")
|
||||||
public String updateDocument(@Valid @ModelAttribute("bean") DocumentBean bean,
|
public String updateDocument(@Valid @ModelAttribute("bean") DocumentBean bean, final BindingResult bindingResult,
|
||||||
final BindingResult bindingResult, Model model, HttpServletRequest request) {
|
Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
for (ObjectError error : bindingResult.getAllErrors())
|
for (ObjectError error : bindingResult.getAllErrors())
|
||||||
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
||||||
@ -95,21 +89,18 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/document/delete/{id}")
|
@GetMapping("/admin/document/delete/{id}")
|
||||||
public String deleteDocument(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
public String deleteDocument(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
service.deleteDocument(id);
|
service.deleteDocument(id);
|
||||||
return "redirect:/admin/document";
|
return "redirect:/admin/document";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/location")
|
@GetMapping("/admin/location")
|
||||||
public String getLocations(Model model, HttpServletRequest request) {
|
public String getLocations(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("locations", service.getLocations());
|
model.addAttribute("locations", service.getLocations());
|
||||||
return "/admin/location";
|
return "/admin/location";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/location/add")
|
@GetMapping("/admin/location/add")
|
||||||
public String prepareAddLocation(Model model, HttpServletRequest request) {
|
public String prepareAddLocation(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", new LocationBean());
|
model.addAttribute("bean", new LocationBean());
|
||||||
model.addAttribute("documents", service.getLocationDocuments());
|
model.addAttribute("documents", service.getLocationDocuments());
|
||||||
return "/admin/location_edit";
|
return "/admin/location_edit";
|
||||||
@ -117,16 +108,14 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/location/edit/{id}")
|
@GetMapping("/admin/location/edit/{id}")
|
||||||
public String prepareAddLocation(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
public String prepareAddLocation(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", service.getLocation(id));
|
model.addAttribute("bean", service.getLocation(id));
|
||||||
model.addAttribute("documents", service.getLocationDocuments());
|
model.addAttribute("documents", service.getLocationDocuments());
|
||||||
return "/admin/location_edit";
|
return "/admin/location_edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/admin/location/update")
|
@PostMapping("/admin/location/update")
|
||||||
public String updateDocument(@Valid @ModelAttribute("bean") LocationBean bean,
|
public String updateDocument(@Valid @ModelAttribute("bean") LocationBean bean, final BindingResult bindingResult,
|
||||||
final BindingResult bindingResult, Model model, HttpServletRequest request) {
|
Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
for (ObjectError error : bindingResult.getAllErrors()) {
|
for (ObjectError error : bindingResult.getAllErrors()) {
|
||||||
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
||||||
@ -140,14 +129,12 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/location/delete/{id}")
|
@GetMapping("/admin/location/delete/{id}")
|
||||||
public String deleteLocation(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
public String deleteLocation(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
service.deleteLocation(id);
|
service.deleteLocation(id);
|
||||||
return "redirect:/admin/location";
|
return "redirect:/admin/location";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/camp")
|
@GetMapping("/admin/camp")
|
||||||
public String getCamplist(Model model, HttpServletRequest request) {
|
public String getCamplist(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("camps", service.getAllCamps());
|
model.addAttribute("camps", service.getAllCamps());
|
||||||
model.addAttribute("locations", service.getLocations());
|
model.addAttribute("locations", service.getLocations());
|
||||||
return "/admin/camp";
|
return "/admin/camp";
|
||||||
@ -155,7 +142,6 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/camp/add")
|
@GetMapping("/admin/camp/add")
|
||||||
public String prepareAddCamp(Model model, HttpServletRequest request) {
|
public String prepareAddCamp(Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", new CampBean());
|
model.addAttribute("bean", new CampBean());
|
||||||
model.addAttribute("documents", service.getCampDocuments());
|
model.addAttribute("documents", service.getCampDocuments());
|
||||||
model.addAttribute("locations", service.getLocations());
|
model.addAttribute("locations", service.getLocations());
|
||||||
@ -165,7 +151,6 @@ public class AdminController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/admin/camp/edit/{id}")
|
@GetMapping("/admin/camp/edit/{id}")
|
||||||
public String prepareEditCamp(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
public String prepareEditCamp(@PathVariable Integer id, Model model, HttpServletRequest request) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", service.getCamp(id));
|
model.addAttribute("bean", service.getCamp(id));
|
||||||
model.addAttribute("documents", service.getCampDocuments());
|
model.addAttribute("documents", service.getCampDocuments());
|
||||||
model.addAttribute("locations", service.getLocations());
|
model.addAttribute("locations", service.getLocations());
|
||||||
@ -178,9 +163,8 @@ public class AdminController extends CommonController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/admin/camp/update")
|
@PostMapping("/admin/camp/update")
|
||||||
public String updateDocument(@Valid @ModelAttribute("bean") CampBean bean,
|
public String updateDocument(@Valid @ModelAttribute("bean") CampBean bean, final BindingResult bindingResult,
|
||||||
final BindingResult bindingResult, Model model, HttpServletRequest request, RedirectAttributes redirect) {
|
Model model, HttpServletRequest request, RedirectAttributes redirect) {
|
||||||
super.setupSession(model, request);
|
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
for (ObjectError error : bindingResult.getAllErrors()) {
|
for (ObjectError error : bindingResult.getAllErrors()) {
|
||||||
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
LOGGER.error("error {}: {}", error.getCode(), error.getDefaultMessage());
|
||||||
@ -198,8 +182,8 @@ public class AdminController extends CommonController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/admin/camp/delete/{id}")
|
@GetMapping("/admin/camp/delete/{id}")
|
||||||
public String deleteCamp(@PathVariable Integer id, Model model, HttpServletRequest request, RedirectAttributes redirect) {
|
public String deleteCamp(@PathVariable Integer id, Model model, HttpServletRequest request,
|
||||||
super.setupSession(model, request);
|
RedirectAttributes redirect) {
|
||||||
String error = service.deleteCamp(id);
|
String error = service.deleteCamp(id);
|
||||||
redirect.addAttribute("error", error);
|
redirect.addAttribute("error", error);
|
||||||
return error != null ? "redirect:/admin/camp/edit/" + id : "redirect:/admin/camp";
|
return error != null ? "redirect:/admin/camp/edit/" + id : "redirect:/admin/camp";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package de.jottyfan.camporganizer.module.business.bookings;
|
package de.jottyfan.camporganizer.module.business.bookings;
|
||||||
|
|
||||||
import javax.annotation.security.RolesAllowed;
|
import javax.annotation.security.RolesAllowed;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -16,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
|
|
||||||
import de.jottyfan.camporganizer.module.business.bookings.impl.AddPaymentBean;
|
import de.jottyfan.camporganizer.module.business.bookings.impl.AddPaymentBean;
|
||||||
import de.jottyfan.camporganizer.module.business.bookings.impl.BookerBean;
|
import de.jottyfan.camporganizer.module.business.bookings.impl.BookerBean;
|
||||||
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -24,24 +23,16 @@ import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class BookingsController {
|
public class BookingsController extends CommonController {
|
||||||
private static final Logger LOGGER = LogManager.getLogger(BookingsController.class);
|
private static final Logger LOGGER = LogManager.getLogger(BookingsController.class);
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private HttpServletRequest request;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBusinessService indexService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBookingsService bookingsService;
|
private IBookingsService bookingsService;
|
||||||
|
|
||||||
@GetMapping("/business/bookings")
|
@GetMapping("/business/bookings")
|
||||||
@RolesAllowed({"business_booking"})
|
@RolesAllowed({"business_booking"})
|
||||||
public String getBookings(Model model) {
|
public String getBookings(Model model) {
|
||||||
String username = indexService.getCurrentUser(request);
|
model.addAttribute("bookers", bookingsService.getBookers(getCurrentUser()));
|
||||||
model.addAttribute("currentUser", username);
|
|
||||||
model.addAttribute("bookers", bookingsService.getBookers(username));
|
|
||||||
model.addAttribute("addBean", new AddPaymentBean());
|
model.addAttribute("addBean", new AddPaymentBean());
|
||||||
return "business/bookings";
|
return "business/bookings";
|
||||||
}
|
}
|
||||||
@ -49,9 +40,7 @@ public class BookingsController {
|
|||||||
@GetMapping("/business/bookings/{id}")
|
@GetMapping("/business/bookings/{id}")
|
||||||
@RolesAllowed({"business_booking"})
|
@RolesAllowed({"business_booking"})
|
||||||
public String getBooking(Model model, @PathVariable Integer id) {
|
public String getBooking(Model model, @PathVariable Integer id) {
|
||||||
String username = indexService.getCurrentUser(request);
|
BookerBean bean = bookingsService.getBooker(id, getCurrentUser());
|
||||||
model.addAttribute("currentUser", username);
|
|
||||||
BookerBean bean = bookingsService.getBooker(id, username);
|
|
||||||
model.addAttribute("booker", bean);
|
model.addAttribute("booker", bean);
|
||||||
model.addAttribute("addBean", new AddPaymentBean());
|
model.addAttribute("addBean", new AddPaymentBean());
|
||||||
return bean == null ? getBookings(model) : "business/booker";
|
return bean == null ? getBookings(model) : "business/booker";
|
||||||
|
@ -7,13 +7,15 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class BusinessController {
|
public class BusinessController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -17,7 +18,7 @@ import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class CampController {
|
public class CampController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
|
|
||||||
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
|
||||||
import de.jottyfan.camporganizer.module.business.privileges.impl.PrivilegesBean;
|
import de.jottyfan.camporganizer.module.business.privileges.impl.PrivilegesBean;
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -20,7 +21,7 @@ import de.jottyfan.camporganizer.module.business.privileges.impl.PrivilegesBean;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class PrivilegesController {
|
public class PrivilegesController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
@ -34,14 +34,12 @@ public class CamplistController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/camplist")
|
@GetMapping("/camplist")
|
||||||
public String index(Model model) {
|
public String index(Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("camps", service.getAllCamps(true));
|
model.addAttribute("camps", service.getAllCamps(true));
|
||||||
return super.isLoggedIn(request) ? dashboard(model) : "/camplist";
|
return super.isLoggedIn(request) ? dashboard(model) : "/camplist";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/dashboard")
|
@GetMapping("/dashboard")
|
||||||
public String dashboard(Model model) {
|
public String dashboard(Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("mybookings", service.getBookingsOf(super.getCurrentUser(request)));
|
model.addAttribute("mybookings", service.getBookingsOf(super.getCurrentUser(request)));
|
||||||
model.addAttribute("bookingBean", new BookingBean());
|
model.addAttribute("bookingBean", new BookingBean());
|
||||||
model.addAttribute("keycloakProfileUrl", keycloak.getUserClientUrl());
|
model.addAttribute("keycloakProfileUrl", keycloak.getUserClientUrl());
|
||||||
|
@ -93,7 +93,7 @@ public class CamplistGateway {
|
|||||||
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
||||||
.where(T_PROFILE.USERNAME.eq(username))
|
.where(T_PROFILE.USERNAME.eq(username))
|
||||||
.and(T_PERSON.PK.isNotNull())
|
.and(T_PERSON.PK.isNotNull())
|
||||||
.orderBy(V_CAMP.ARRIVE, T_PERSON.CREATED);
|
.orderBy(V_CAMP.ARRIVE.desc(), T_PERSON.CREATED);
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
List<BookingBean> list = new ArrayList<>();
|
List<BookingBean> list = new ArrayList<>();
|
||||||
|
@ -3,7 +3,8 @@ package de.jottyfan.camporganizer.module.camplist;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.keycloak.KeycloakSecurityContext;
|
import org.keycloak.KeycloakSecurityContext;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -12,6 +13,9 @@ import org.springframework.ui.Model;
|
|||||||
*/
|
*/
|
||||||
public abstract class CommonController {
|
public abstract class CommonController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* try to get current keycloak user
|
* try to get current keycloak user
|
||||||
*
|
*
|
||||||
@ -36,15 +40,9 @@ public abstract class CommonController {
|
|||||||
return ksc == null ? null : ksc.getIdToken().getEmail();
|
return ksc == null ? null : ksc.getIdToken().getEmail();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@ModelAttribute("currentUser")
|
||||||
* setup the session for the template
|
public String getCurrentUser() {
|
||||||
*
|
return getCurrentUser(request);
|
||||||
* @param model the model
|
|
||||||
* @param request the request
|
|
||||||
*/
|
|
||||||
public void setupSession(Model model, HttpServletRequest request) {
|
|
||||||
String username = getCurrentUser(request);
|
|
||||||
model.addAttribute("currentUser", username);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +10,7 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.impl.CampOverviewBean;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.impl.CampOverviewBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,7 +19,7 @@ import de.jottyfan.camporganizer.module.confirmation.confirmation.impl.CampOverv
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class ConfirmationController {
|
public class ConfirmationController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
@ -28,7 +29,6 @@ public class ConfirmationController {
|
|||||||
|
|
||||||
@GetMapping("/confirmation")
|
@GetMapping("/confirmation")
|
||||||
public String getIndex(Model model) {
|
public String getIndex(Model model) {
|
||||||
String username = indexService.getCurrentUser(request);
|
|
||||||
List<CampOverviewBean> campoverview = indexService.getCampOverview(request);
|
List<CampOverviewBean> campoverview = indexService.getCampOverview(request);
|
||||||
CampOverviewBean campoverviewsummary = new CampOverviewBean(LocalDate.now(), "summary");
|
CampOverviewBean campoverviewsummary = new CampOverviewBean(LocalDate.now(), "summary");
|
||||||
for (CampOverviewBean bean : campoverview) {
|
for (CampOverviewBean bean : campoverview) {
|
||||||
@ -36,7 +36,6 @@ public class ConfirmationController {
|
|||||||
campoverviewsummary.setRejected(bean.getRejected() + campoverviewsummary.getRejected());
|
campoverviewsummary.setRejected(bean.getRejected() + campoverviewsummary.getRejected());
|
||||||
campoverviewsummary.setUntouched(bean.getUntouched() + campoverviewsummary.getUntouched());
|
campoverviewsummary.setUntouched(bean.getUntouched() + campoverviewsummary.getUntouched());
|
||||||
}
|
}
|
||||||
model.addAttribute("currentUser", username);
|
|
||||||
model.addAttribute("campoverview", campoverview);
|
model.addAttribute("campoverview", campoverview);
|
||||||
model.addAttribute("campoverviewsummary", campoverviewsummary);
|
model.addAttribute("campoverviewsummary", campoverviewsummary);
|
||||||
model.addAttribute("untouched", indexService.getUntouched(request));
|
model.addAttribute("untouched", indexService.getUntouched(request));
|
||||||
|
@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.IConfirmationService;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.IConfirmationService;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.person.impl.PersonBean;
|
import de.jottyfan.camporganizer.module.confirmation.person.impl.PersonBean;
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ import de.jottyfan.camporganizer.module.confirmation.person.impl.PersonBean;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class PersonController {
|
public class PersonController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
@ -15,13 +15,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class DocumentController {
|
public class DocumentController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DocumentService service;
|
private DocumentService service;
|
||||||
|
@ -8,13 +8,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class ICalController {
|
public class ICalController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IICalService service;
|
private IICalService service;
|
||||||
|
@ -11,13 +11,15 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class MigrationController {
|
public class MigrationController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MigrationService service;
|
private MigrationService service;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package de.jottyfan.camporganizer.module.registration;
|
package de.jottyfan.camporganizer.module.registration;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -22,15 +21,11 @@ import de.jottyfan.camporganizer.module.camplist.CommonController;
|
|||||||
@Controller
|
@Controller
|
||||||
public class RegistrationController extends CommonController {
|
public class RegistrationController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private HttpServletRequest request;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RegistrationService service;
|
private RegistrationService service;
|
||||||
|
|
||||||
@GetMapping("/registration/{fkCamp}")
|
@GetMapping("/registration/{fkCamp}")
|
||||||
public String index(@PathVariable(name = "fkCamp", required = true) Integer fkCamp, Model model) {
|
public String index(@PathVariable(name = "fkCamp", required = true) Integer fkCamp, Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
if (service.campIsNotYetOver(fkCamp)) {
|
if (service.campIsNotYetOver(fkCamp)) {
|
||||||
CampBean campBean = service.getCamp(fkCamp);
|
CampBean campBean = service.getCamp(fkCamp);
|
||||||
model.addAttribute("camp", campBean);
|
model.addAttribute("camp", campBean);
|
||||||
@ -45,8 +40,8 @@ public class RegistrationController extends CommonController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/registration/register")
|
@PostMapping("/registration/register")
|
||||||
public String register(@Valid @ModelAttribute("bean") RegistrationBean bean, final BindingResult bindingResult, Model model) {
|
public String register(@Valid @ModelAttribute("bean") RegistrationBean bean, final BindingResult bindingResult,
|
||||||
super.setupSession(model, request);
|
Model model) {
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
CampBean campBean = service.getCamp(bean.getFkCamp());
|
CampBean campBean = service.getCamp(bean.getFkCamp());
|
||||||
model.addAttribute("camp", campBean);
|
model.addAttribute("camp", campBean);
|
||||||
@ -58,21 +53,18 @@ public class RegistrationController extends CommonController {
|
|||||||
|
|
||||||
@GetMapping("/registration/cancel/{id}")
|
@GetMapping("/registration/cancel/{id}")
|
||||||
public String cancellation(@PathVariable Integer id, final Model model) {
|
public String cancellation(@PathVariable Integer id, final Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
model.addAttribute("bean", service.getBooking(id));
|
model.addAttribute("bean", service.getBooking(id));
|
||||||
return "/registration/cancellation";
|
return "/registration/cancellation";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/registration/remove/{id}")
|
@GetMapping("/registration/remove/{id}")
|
||||||
public String remove(@PathVariable Integer id, final Model model) {
|
public String remove(@PathVariable Integer id, final Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
service.removeBooking(id);
|
service.removeBooking(id);
|
||||||
return "redirect:/dashboard";
|
return "redirect:/dashboard";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/registration/toggleconsent/{id}")
|
@GetMapping("/registration/toggleconsent/{id}")
|
||||||
public String toggleConsent(@PathVariable Integer id, final Model model) {
|
public String toggleConsent(@PathVariable Integer id, final Model model) {
|
||||||
super.setupSession(model, request);
|
|
||||||
service.toggleConsent(id);
|
service.toggleConsent(id);
|
||||||
return "redirect:/dashboard";
|
return "redirect:/dashboard";
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,15 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class RssController {
|
public class RssController extends CommonController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RssService service;
|
private RssService service;
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class AllgemeinesController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the allgemeines page
|
|
||||||
*
|
|
||||||
* @return the allgemeines page
|
|
||||||
*/
|
|
||||||
@GetMapping("/allgemeines")
|
|
||||||
public String getAllgemeines() {
|
|
||||||
return "/allgemeines";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class DatenschutzController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the datenschutz page
|
|
||||||
*
|
|
||||||
* @return the datenschutz page
|
|
||||||
*/
|
|
||||||
@GetMapping("/datenschutz")
|
|
||||||
public String getDatenschutz() {
|
|
||||||
return "/datenschutz";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class ImpressumController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the impressum page
|
|
||||||
*
|
|
||||||
* @return the impresum page
|
|
||||||
*/
|
|
||||||
@GetMapping("/impressum")
|
|
||||||
public String getImpressum() {
|
|
||||||
return "/impressum";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class IndexController {
|
|
||||||
|
|
||||||
@GetMapping("/")
|
|
||||||
public String getIndex() {
|
|
||||||
return "/index";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class KontaktController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the kontakt page
|
|
||||||
*
|
|
||||||
* @return the kontakt page
|
|
||||||
*/
|
|
||||||
@GetMapping("/kontakt")
|
|
||||||
public String getKontakt() {
|
|
||||||
return "/kontakt";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class ReportsController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the sub page
|
|
||||||
*
|
|
||||||
* @return the sub page
|
|
||||||
*/
|
|
||||||
@GetMapping("/reports/{subpage}")
|
|
||||||
public String getSubpage(@PathVariable("subpage") String subpage) {
|
|
||||||
return "/reports/" + subpage;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,87 @@
|
|||||||
|
package de.jottyfan.camporganizer.module.staticpages;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.module.camplist.CommonController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class StaticPagesController extends CommonController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the index page
|
||||||
|
*
|
||||||
|
* @return the index page
|
||||||
|
*/
|
||||||
|
@GetMapping("/")
|
||||||
|
public String getIndex() {
|
||||||
|
return "/index";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the sub page
|
||||||
|
*
|
||||||
|
* @return the sub page
|
||||||
|
*/
|
||||||
|
@GetMapping("/reports/{subpage}")
|
||||||
|
public String getSubpage(@PathVariable("subpage") String subpage) {
|
||||||
|
return "/reports/" + subpage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the verein page
|
||||||
|
*
|
||||||
|
* @return the verein page
|
||||||
|
*/
|
||||||
|
@GetMapping("/verein")
|
||||||
|
public String getVerein() {
|
||||||
|
return "/verein";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the kontakt page
|
||||||
|
*
|
||||||
|
* @return the kontakt page
|
||||||
|
*/
|
||||||
|
@GetMapping("/kontakt")
|
||||||
|
public String getKontakt() {
|
||||||
|
return "/kontakt";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the allgemeines page
|
||||||
|
*
|
||||||
|
* @return the allgemeines page
|
||||||
|
*/
|
||||||
|
@GetMapping("/allgemeines")
|
||||||
|
public String getAllgemeines() {
|
||||||
|
return "/allgemeines";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the datenschutz page
|
||||||
|
*
|
||||||
|
* @return the datenschutz page
|
||||||
|
*/
|
||||||
|
@GetMapping("/datenschutz")
|
||||||
|
public String getDatenschutz() {
|
||||||
|
return "/datenschutz";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the impressum page
|
||||||
|
*
|
||||||
|
* @return the impresum page
|
||||||
|
*/
|
||||||
|
@GetMapping("/impressum")
|
||||||
|
public String getImpressum() {
|
||||||
|
return "/impressum";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,23 +0,0 @@
|
|||||||
package de.jottyfan.camporganizer.module.staticpages;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class VereinController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* load the verein page
|
|
||||||
*
|
|
||||||
* @return the verein page
|
|
||||||
*/
|
|
||||||
@GetMapping("/verein")
|
|
||||||
public String getVerein() {
|
|
||||||
return "/verein";
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,49 +11,7 @@
|
|||||||
<span>alte Zugangsdaten ins neue System </span><a th:href="@{/migration/login}">umziehen</a>
|
<span>alte Zugangsdaten ins neue System </span><a th:href="@{/migration/login}">umziehen</a>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<div th:replace="/fragments/camplist.html::camplist(camps=${camps})"></div>
|
||||||
var mytoggle = new MyToggle();
|
|
||||||
</script>
|
|
||||||
<div class="card bottomdist16 block660" style="background: transparent" th:each="c : ${camps}">
|
|
||||||
<div class="card-header mytoggle_btn" style="background: transparent" th:onclick="mytoggle.toggle('campdiv_[[${c.pk}]]')">
|
|
||||||
<div style="margin-left: auto; margin-right: auto;">
|
|
||||||
<span th:text="${c.name}" class="headlinefont"></span><span class="headlinefont"> </span><span th:text="${#numbers.formatInteger(c.year, 0)}" class="headlinefont"
|
|
||||||
th:if="${c.year != null}"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div th:id="'campdiv_' + ${c.pk}" class="card-body mytoggle_collapsed">
|
|
||||||
<table style="width: 100%">
|
|
||||||
<tr>
|
|
||||||
<td rowspan="4"><img th:src="@{/images/Icon_Stern.svg}" width="36px" height="36px" style="margin-left: 24px" /></td>
|
|
||||||
<td rowspan="4">
|
|
||||||
<div>
|
|
||||||
Biblische Geschichten<br /> Nachtwanderung<br /> Gruppenspiele<br /> Ausflüge<br /> Überraschungen
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td><span class="cabin">Ort</span></td>
|
|
||||||
<td><a th:href="${c.url}" th:text="${c.locationName}" target="_blank"></a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img th:src="@{/images/Icon_Alter.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
|
||||||
<td><div th:text="${c.minAge} + ' - ' + ${c.maxAge} + ' Jahre'" style="margin-top: 24px"></div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img th:src="@{/images/Icon_Datum.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
|
||||||
<td><div th:text="${#temporals.format(c.arrive, 'dd.MM.')} + ' - ' + ${#temporals.format(c.depart, 'dd.MM.yyyy')}" th:if="${c.arrive != null&& c.depart != null}"
|
|
||||||
style="margin-top: 24px"></div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img th:src="@{/images/Icon_Preis.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
|
||||||
<td><div style="margin-top: 24px">
|
|
||||||
<p th:text="${c.price}"></p>
|
|
||||||
</div></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div style="text-align: center; margin-top: 64px">
|
|
||||||
<a class="btn btn-linda buttonfont" th:href="@{/registration/{id}(id=${c.pk})}">jetzt anmelden</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
</body>
|
</body>
|
||||||
|
@ -16,33 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-6 col-lg-3" th:each="c : ${camps}">
|
<div th:replace="/fragments/camplist.html::camplist(camps=${camps})"></div>
|
||||||
<div class="card" style="background-color: rgba(255, 255, 255, 0.5)">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="menufont" th:text="${c.locationName}" style="padding: 8px"></div>
|
|
||||||
<div>
|
|
||||||
<h1 th:text="${c.name}" class="menufont"></h1>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<span style="margin: 24px"><img th:src="@{/images/Icon_Alter.svg}" width="24px" height="24px" /></span> <span class="menufont" th:text="${c.minAge} + ' - ' + ${c.maxAge} + ' Jahre'"></span>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<span style="margin: 24px"><img th:src="@{/images/Icon_Datum.svg}" width="24px" height="24px" /></span> <span class="menufont"
|
|
||||||
th:text="${#temporals.format(c.arrive, 'dd.MM.')} + ' - ' + ${#temporals.format(c.depart, 'dd.MM.yyyy')}" th:if="${c.arrive != null && c.depart != null}"></span>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<span style="margin: 24px"><img th:src="@{/images/Icon_Preis.svg}" width="24px" height="24px" /></span> <span class="menufont" th:text="${c.price}"></span>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<a class="btn btn-outline-primary form-control menufont" th:href="@{/registration/{id}(id=${c.pk})}">Jetzt anmelden</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
@ -61,9 +35,8 @@
|
|||||||
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
|
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
|
||||||
aria-expanded="true" th:aria-controls="'#acc-body-' + ${b.pk}">
|
aria-expanded="true" th:aria-controls="'#acc-body-' + ${b.pk}">
|
||||||
<i class="fas fa-check framed framed-green" th:if="${b.accept}"></i> <i class="fas fa-ban framed framed-red" th:if="${b.accept} == false"></i> <i
|
<i class="fas fa-check framed framed-green" th:if="${b.accept}"></i> <i class="fas fa-ban framed framed-red" th:if="${b.accept} == false"></i> <i
|
||||||
class="fas fa-question framed framed-orange" th:if="${b.accept} == null"></i> <span
|
class="fas fa-question framed framed-orange" th:if="${b.accept} == null"></i>
|
||||||
th:text="${b.forename + ' ' + b.surname + ' in ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" style="font-weight: bolder"></span> in <span
|
<span th:text="${b.forename + ' ' + b.surname + ' für ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" class="headlinefont"></span>
|
||||||
th:text="${b.locationName}"></span>
|
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div th:id="'acc-body-' + ${b.pk}" class="accordion-collapse collapse" th:aria-labelledby="'acc-head-' + ${b.pk}">
|
<div th:id="'acc-body-' + ${b.pk}" class="accordion-collapse collapse" th:aria-labelledby="'acc-head-' + ${b.pk}">
|
||||||
|
50
src/main/resources/templates/fragments/camplist.html
Normal file
50
src/main/resources/templates/fragments/camplist.html
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
||||||
|
<body>
|
||||||
|
<div th:fragment="camplist(camps)">
|
||||||
|
<script type="text/javascript">
|
||||||
|
var mytoggle = new MyToggle();
|
||||||
|
</script>
|
||||||
|
<div class="card bottomdist16 block660" style="background: transparent" th:each="c : ${camps}">
|
||||||
|
<div class="card-header mytoggle_btn" style="background: transparent" th:onclick="mytoggle.toggle('campdiv_[[${c.pk}]]')">
|
||||||
|
<div style="margin-left: auto; margin-right: auto;">
|
||||||
|
<span th:text="${c.name}" class="headlinefont"></span><span class="headlinefont"> </span><span th:text="${#numbers.formatInteger(c.year, 0)}" class="headlinefont"
|
||||||
|
th:if="${c.year != null}"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:id="'campdiv_' + ${c.pk}" class="card-body mytoggle_collapsed">
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="4"><img th:src="@{/images/Icon_Stern.svg}" width="36px" height="36px" style="margin-left: 24px" /></td>
|
||||||
|
<td rowspan="4">
|
||||||
|
<div>
|
||||||
|
Biblische Geschichten<br /> Nachtwanderung<br /> Gruppenspiele<br /> Ausflüge<br /> Überraschungen
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><span class="cabin">Ort</span></td>
|
||||||
|
<td><a th:href="${c.url}" th:text="${c.locationName}" target="_blank"></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img th:src="@{/images/Icon_Alter.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
||||||
|
<td><div th:text="${c.minAge} + ' - ' + ${c.maxAge} + ' Jahre'" style="margin-top: 24px"></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img th:src="@{/images/Icon_Datum.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
||||||
|
<td><div th:text="${#temporals.format(c.arrive, 'dd.MM.')} + ' - ' + ${#temporals.format(c.depart, 'dd.MM.yyyy')}" th:if="${c.arrive != null&& c.depart != null}"
|
||||||
|
style="margin-top: 24px"></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img th:src="@{/images/Icon_Preis.svg}" width="36px" height="36px" style="margin-top: 24px" /></td>
|
||||||
|
<td><div style="margin-top: 24px">
|
||||||
|
<p th:text="${c.price}"></p>
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="text-align: center; margin-top: 64px">
|
||||||
|
<a class="btn btn-linda buttonfont" th:href="@{/registration/{id}(id=${c.pk})}">jetzt anmelden</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -8,47 +8,48 @@
|
|||||||
<th:block layout:fragment="content">
|
<th:block layout:fragment="content">
|
||||||
<div class="mainpage">
|
<div class="mainpage">
|
||||||
<div class="alert alert-success alert-dismissible fade show block660" role="alert">
|
<div class="alert alert-success alert-dismissible fade show block660" role="alert">
|
||||||
Mit dem Umzug in das neue Anmeldeportal ist es leider notwendig, dass du dir ein neues Login anlegst.
|
Mit dem Umzug in das neue Anmeldeportal ist es leider notwendig, dass du dir ein neues Login anlegst. Damit das für dich leichter geht, haben wir ein Migrationswerkzeug entwickelt, mit dem
|
||||||
Damit das für dich leichter geht, haben wir ein Migrationswerkzeug entwickelt, mit dem du deinen alten Zugang übertragen kannst.<br />
|
du deinen alten Zugang übertragen kannst.<br /> <br /> Wichtig dabei ist, dass du beim Anlegen des neuen Zugangs eine gültige E-Mail-Adresse verwendest. Die wird im neuen System
|
||||||
<br />
|
benötigt, falls du dein Passwort vergessen hast. Damit eine sinnvolle Zuordnung möglich ist, gib bitte ebenfalls Vor- und Nachname an.<br /> <br /> Nach dem Umzug werden bisherige
|
||||||
Wichtig dabei ist, dass du beim Anlegen des neuen Zugangs eine gültige E-Mail-Adresse verwendest. Die wird im neuen System benötigt,
|
Anmeldungen nur dann automatisch zugewiesen, wenn der Nutzername bisher nur in Kleinbuchstaben geschrieben war. Alle anderen Nutzer sollten für den Zugriff auf ihre Anmeldungen eine E-Mail
|
||||||
falls du dein Passwort vergessen hast. Damit eine sinnvolle Zuordnung möglich ist, gib bitte ebenfalls Vor- und Nachname an.<br />
|
an <a href="mailto:webmaster@jungscharfreizeiten.de">webmaster@jungscharfreizeiten.de</a> schicken.<br />
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="block660">
|
<div class="block660">
|
||||||
<div class="card centered-card" style="max-width: 48rem">
|
<div class="card centered-card" style="max-width: 48rem">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form th:action="@{/migration/loginold}" th:object="${bean}" method="post">
|
<form th:action="@{/migration/loginold}" th:object="${bean}" method="post">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 rowdist">
|
<div class="col-sm-6 rowdist">
|
||||||
<span class="error" th:each="error : ${#fields.errors('username')}">[[${error}]]<br /></span>
|
<span class="error" th:each="error : ${#fields.errors('username')}">[[${error}]]<br /></span> <input type="text" placeholder="username" th:field="*{username}"
|
||||||
<input type="text" placeholder="username" th:field="*{username}" th:class="${'form-control ' + (#fields.hasErrors('username') ? 'inputerror' : '')}" />
|
th:class="${'form-control ' + (#fields.hasErrors('username') ? 'inputerror' : '')}" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 rowdist">
|
||||||
|
<span class="error" th:each="error : ${#fields.errors('password')}">[[${error}]]<br /></span> <input type="password" placeholder="Passwort" th:field="*{password}"
|
||||||
|
th:class="${'form-control ' + (#fields.hasErrors('password') ? 'inputerror' : '')}" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 rowdist">
|
||||||
|
<span class="error" th:each="error : ${#fields.errors('forename')}">[[${error}]]<br /></span> <input type="text" placeholder="Vorname" th:field="*{forename}"
|
||||||
|
th:class="${'form-control ' + (#fields.hasErrors('forename') ? 'inputerror' : '')}" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 rowdist">
|
||||||
|
<span class="error" th:each="error : ${#fields.errors('surname')}">[[${error}]]<br /></span> <input type="text" placeholder="Nachname" th:field="*{surname}"
|
||||||
|
th:class="${'form-control ' + (#fields.hasErrors('surname') ? 'inputerror' : '')}" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 rowdist">
|
||||||
|
<span class="error" th:each="error : ${#fields.errors('email')}">[[${error}]]<br /></span> <input type="text" placeholder="E-Mail" th:field="*{email}"
|
||||||
|
th:class="${'form-control ' + (#fields.hasErrors('email') ? 'inputerror' : '')}" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 rowdist">
|
<div class="row">
|
||||||
<span class="error" th:each="error : ${#fields.errors('password')}">[[${error}]]<br /></span>
|
<div class="col-sm-12 rowdist centered">
|
||||||
<input type="password" placeholder="Passwort" th:field="*{password}" th:class="${'form-control ' + (#fields.hasErrors('password') ? 'inputerror' : '')}" />
|
<input type="submit" class="btn btn-linda buttonfont" value="jetzt umziehen" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 rowdist">
|
|
||||||
<span class="error" th:each="error : ${#fields.errors('forename')}">[[${error}]]<br /></span>
|
|
||||||
<input type="text" placeholder="Vorname" th:field="*{forename}" th:class="${'form-control ' + (#fields.hasErrors('forename') ? 'inputerror' : '')}" />
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 rowdist">
|
|
||||||
<span class="error" th:each="error : ${#fields.errors('surname')}">[[${error}]]<br /></span>
|
|
||||||
<input type="text" placeholder="Nachname" th:field="*{surname}" th:class="${'form-control ' + (#fields.hasErrors('surname') ? 'inputerror' : '')}" />
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 rowdist">
|
|
||||||
<span class="error" th:each="error : ${#fields.errors('email')}">[[${error}]]<br /></span>
|
|
||||||
<input type="text" placeholder="E-Mail" th:field="*{email}" th:class="${'form-control ' + (#fields.hasErrors('email') ? 'inputerror' : '')}" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
</form>
|
||||||
<div class="col-sm-12 rowdist centered">
|
</div>
|
||||||
<input type="submit" class="btn btn-linda buttonfont" value="jetzt umziehen" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,21 +70,6 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item"><a class="btn btn-icon-silent menufont" th:href="@{/kontakt}">Kontakt</a></li>
|
<li class="nav-item"><a class="btn btn-icon-silent menufont" th:href="@{/kontakt}">Kontakt</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav mb-2 mb-lg-0" th:if="${not #strings.isEmpty(currentUser)}">
|
|
||||||
<li class="nav-item">
|
|
||||||
<div class="dropdown">
|
|
||||||
<button class="btn btn-hoverborder navbar-collapse" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
||||||
<img th:src="@{/images/Icon_Profil.svg}" width="24px" height="24px" />
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl}}" target="_blank">Benutzername ändern</a></li>
|
|
||||||
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl} + '/password'}" target="_blank">Password ändern</a></li>
|
|
||||||
<li><hr /></li>
|
|
||||||
<li><a class="dropdown-item" th:href="@{/logout}"><b th:inline="text">[[${currentUser}]]</b> ausloggen</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<ul class="navbar-nav mb-2 mb-lg-0" sec:authorize="hasRole('business')">
|
<ul class="navbar-nav mb-2 mb-lg-0" sec:authorize="hasRole('business')">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
@ -134,13 +119,28 @@
|
|||||||
<li class="nav-item"><a href="https://www.onkelwernerfreizeiten.de/cloud" class="btn btn-secondary btn-icon-silent menufont" target="_blank">Nextcloud</a></li>
|
<li class="nav-item"><a href="https://www.onkelwernerfreizeiten.de/cloud" class="btn btn-secondary btn-icon-silent menufont" target="_blank">Nextcloud</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul layout:fragment="header"></ul>
|
<ul layout:fragment="header"></ul>
|
||||||
<ul class="nav navbar-nav ms-auto right-dist">
|
<ul class="nav navbar-nav ms-auto right-dist" th:if="${#strings.isEmpty(currentUser)}">
|
||||||
<li>
|
<li>
|
||||||
<span th:if="${#strings.isEmpty(currentUser)}">
|
<span>
|
||||||
<a th:href="@{/dashboard}" class="btn btn-outline-secondary menufont">einloggen</a>
|
<a th:href="@{/dashboard}" class="btn btn-outline-secondary menufont">einloggen</a>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="nav navbar-nav ms-auto right-dist" th:unless="${#strings.isEmpty(currentUser)}">
|
||||||
|
<li class="nav-item">
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn btn-hoverborder navbar-collapse" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
<img th:src="@{/images/Icon_Profil.svg}" width="24px" height="24px" />
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
|
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl}}" target="_blank">Benutzername ändern</a></li>
|
||||||
|
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl} + '/password'}" target="_blank">Password ändern</a></li>
|
||||||
|
<li><hr /></li>
|
||||||
|
<li><a class="dropdown-item" th:href="@{/logout}"><b th:inline="text">[[${currentUser}]]</b> ausloggen</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</nav>
|
</nav>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user