This commit is contained in:
Jottyfan
2023-09-09 23:15:47 +02:00
parent bd081ff48a
commit e991c26c13
27 changed files with 909 additions and 0 deletions

30
.classpath Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin/default"/>
</classpath>

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/.gradle/
/bin/
/build/

36
.project Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>BiCO</name>
<comment>Project BiCO created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="BiCO">
<property name="context-root" value="BiCO"/>
<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-module>
</project-modules>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.web"/>
<installed facet="jst.web" version="2.4"/>
<installed facet="jst.java" version="17"/>
</faceted-project>

71
build.gradle Normal file
View File

@ -0,0 +1,71 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.3'
id "io.spring.dependency-management" version "1.1.2"
id 'war'
id 'eclipse'
id 'application'
}
group = 'de.jottyfan.bico'
version = '0.0.0'
description = """BibleClassOrganizer"""
sourceCompatibility = 17
targetCompatibility = 17
mainClassName = "de.jottyfan.bico.Main"
repositories {
mavenCentral()
maven {
url "https://www.jottyfan.de/libs/"
}
maven {
url "https://repo.maven.apache.org/maven2"
}
}
war {
doFirst {
manifest {
attributes("Implementation-Title": project.name,
"Implementation-Version": version,
"Implementation-Timestamp": new Date())
}
}
baseName = project.name
version = version
archiveName = 'BiCO.war'
}
dependencies {
implementation 'de.jottyfan:bicolib:1'
implementation 'org.springframework.boot:spring-boot-starter-jooq'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.0.0'
implementation 'org.webjars:bootstrap:5.3.1'
implementation 'org.webjars.npm:bootstrap-icons:1.10.5'
implementation 'org.webjars:jquery:3.7.1'
implementation 'org.webjars:datatables:1.13.5'
implementation 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
// add version to manifest
springBoot {
buildInfo()
}

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

172
gradlew vendored Executable file
View File

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS --illegal-access=permit $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
rootProject.name = 'BiCO'

View File

@ -0,0 +1,23 @@
package de.jottyfan.bico;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
*
* @author jotty
*
*/
@SpringBootApplication
public class Main extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Main.class);
}
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}

View File

@ -0,0 +1,40 @@
package de.jottyfan.bico.config;
import javax.sql.DataSource;
import org.jooq.SQLDialect;
import org.jooq.impl.DataSourceConnectionProvider;
import org.jooq.impl.DefaultConfiguration;
import org.jooq.impl.DefaultDSLContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
/**
*
* @author jotty
*
*/
@Configuration
public class DatabaseConfiguration {
@Autowired
private DataSource dataSource;
@Bean
public DataSourceConnectionProvider connectionProvider() {
return new DataSourceConnectionProvider(new TransactionAwareDataSourceProxy(dataSource));
}
@Bean
public DefaultDSLContext dsl() {
return new DefaultDSLContext(configuration());
}
public DefaultConfiguration configuration() {
DefaultConfiguration jooqConfiguration = new DefaultConfiguration();
jooqConfiguration.set(connectionProvider());
jooqConfiguration.set(SQLDialect.POSTGRES);
return jooqConfiguration;
}
}

View File

@ -0,0 +1,10 @@
package de.jottyfan.bico.modules;
/**
*
* @author jotty
*
*/
public abstract class CommonController {
}

View File

@ -0,0 +1,19 @@
package de.jottyfan.bico.modules.index;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import de.jottyfan.bico.modules.CommonController;
/**
*
* @author jotty
*
*/
@Controller
public class IndexController extends CommonController {
@GetMapping("/")
public String getIndex() {
return "redirect:/sheet";
}
}

View File

@ -0,0 +1,25 @@
package de.jottyfan.bico.modules.index.model;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.info.BuildProperties;
import org.springframework.stereotype.Component;
/**
*
* @author jotty
*
*/
@Component
public class ManifestBean {
@Autowired(required = false)
private BuildProperties buildProperties;
/**
* @return the version of this project
*/
public String getVersion() {
return buildProperties != null ? buildProperties.getVersion()
: this.getClass().getPackage().getImplementationVersion();
}
}

View File

@ -0,0 +1,26 @@
package de.jottyfan.bico.modules.sheet;
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 de.jottyfan.bico.modules.CommonController;
/**
*
* @author jotty
*
*/
@Controller
public class SheetController extends CommonController {
@Autowired
private SheetService service;
@GetMapping("/sheet")
public String getSheet(Model model) {
model.addAttribute("list", service.getList());
return "/sheet";
}
}

View File

@ -0,0 +1,54 @@
package de.jottyfan.bico.modules.sheet;
import static de.jottyfan.bico.db.Tables.V_CALENDAR;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jooq.DSLContext;
import org.jooq.SelectSeekStep1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import de.jottyfan.bico.db.tables.records.VCalendarRecord;
import de.jottyfan.bico.modules.sheet.model.SheetBean;
/**
*
* @author jotty
*
*/
@Repository
public class SheetRepository {
private static final Logger LOGGER = LogManager.getLogger(SheetRepository.class);
@Autowired
private DSLContext jooq;
public List<SheetBean> getList() {
SelectSeekStep1<VCalendarRecord, LocalDate> sql = jooq.selectFrom(V_CALENDAR).orderBy(V_CALENDAR.SLOT_DAY);
LOGGER.trace(sql.toString());
List<SheetBean> list = new ArrayList<>();
for (VCalendarRecord r : sql.fetch()) {
SheetBean bean = new SheetBean();
bean.setAbbreviation(r.getAbbreviation());
bean.setBibleverse(r.getBibleverse());
bean.setBookPages(r.getBookPages());
bean.setFullname(r.getFullname());
bean.setLessonNotes(r.getLessonNotes());
bean.setSlotDay(r.getSlotDay());
bean.setSlotNotes(r.getSlotNotes());
bean.setSourceName(r.getSourceName());
bean.setSubjectNotes(r.getSubjectNotes());
bean.setSubtheme(r.getSubtheme());
bean.setTheme(r.getTheme());
bean.setWorksheets(r.getWorksheets());
list.add(bean);
}
return list;
}
}

View File

@ -0,0 +1,25 @@
package de.jottyfan.bico.modules.sheet;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import de.jottyfan.bico.modules.sheet.model.SheetBean;
/**
*
* @author jotty
*
*/
@Service
public class SheetService {
@Autowired
private SheetRepository repository;
public List<SheetBean> getList() {
return repository.getList();
}
}

View File

@ -0,0 +1,194 @@
package de.jottyfan.bico.modules.sheet.model;
import java.io.Serializable;
import java.time.LocalDate;
/**
*
* @author jotty
*
*/
public class SheetBean implements Serializable {
private static final long serialVersionUID = 1L;
private LocalDate slotDay;
private String fullname;
private String abbreviation;
private String sourceName;
private String theme;
private String subtheme;
private String bookPages;
private String worksheets;
private String bibleverse;
private String subjectNotes;
private String lessonNotes;
private String slotNotes;
/**
* @return the slotDay
*/
public LocalDate getSlotDay() {
return slotDay;
}
/**
* @param slotDay the slotDay to set
*/
public void setSlotDay(LocalDate slotDay) {
this.slotDay = slotDay;
}
/**
* @return the fullname
*/
public String getFullname() {
return fullname;
}
/**
* @param fullname the fullname to set
*/
public void setFullname(String fullname) {
this.fullname = fullname;
}
/**
* @return the abbreviation
*/
public String getAbbreviation() {
return abbreviation;
}
/**
* @param abbreviation the abbreviation to set
*/
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
/**
* @return the sourceName
*/
public String getSourceName() {
return sourceName;
}
/**
* @param sourceName the sourceName to set
*/
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
/**
* @return the theme
*/
public String getTheme() {
return theme;
}
/**
* @param theme the theme to set
*/
public void setTheme(String theme) {
this.theme = theme;
}
/**
* @return the subtheme
*/
public String getSubtheme() {
return subtheme;
}
/**
* @param subtheme the subtheme to set
*/
public void setSubtheme(String subtheme) {
this.subtheme = subtheme;
}
/**
* @return the bookPages
*/
public String getBookPages() {
return bookPages;
}
/**
* @param bookPages the bookPages to set
*/
public void setBookPages(String bookPages) {
this.bookPages = bookPages;
}
/**
* @return the worksheets
*/
public String getWorksheets() {
return worksheets;
}
/**
* @param worksheets the worksheets to set
*/
public void setWorksheets(String worksheets) {
this.worksheets = worksheets;
}
/**
* @return the bibleverse
*/
public String getBibleverse() {
return bibleverse;
}
/**
* @param bibleverse the bibleverse to set
*/
public void setBibleverse(String bibleverse) {
this.bibleverse = bibleverse;
}
/**
* @return the subjectNotes
*/
public String getSubjectNotes() {
return subjectNotes;
}
/**
* @param subjectNotes the subjectNotes to set
*/
public void setSubjectNotes(String subjectNotes) {
this.subjectNotes = subjectNotes;
}
/**
* @return the lessonNotes
*/
public String getLessonNotes() {
return lessonNotes;
}
/**
* @param lessonNotes the lessonNotes to set
*/
public void setLessonNotes(String lessonNotes) {
this.lessonNotes = lessonNotes;
}
/**
* @return the slotNotes
*/
public String getSlotNotes() {
return slotNotes;
}
/**
* @param slotNotes the slotNotes to set
*/
public void setSlotNotes(String slotNotes) {
this.slotNotes = slotNotes;
}
}

View File

@ -0,0 +1,25 @@
# database credentials from defined config file
spring.config.import = /etc/BiCO.properties
# define overwriteable arguments
spring.datasource.driver-class-name = ${db.class:org.postgresql.Driver}
spring.datasource.url = ${db.url}
spring.datasource.username = ${db.username}
spring.datasource.password = ${db.password}
server.servlet.context-path = ${my.context-path:/BiCO}
# security
spring.security.oauth2.client.registration.keycloak.client-id = ${keycloak.client-id}
spring.security.oauth2.client.registration.keycloak.scope = openid
spring.security.oauth2.client.registration.keycloak.authorization-grant-type = authorization_code
spring.security.oauth2.client.registration.keycloak.redirect-uri = ${keycloak.redirect-uri}
spring.security.oauth2.client.provider.keycloak.issuer-uri = ${keycloak.issuer-uri}
spring.security.oauth2.client.provider.keycloak.authorization-uri = ${keycloak.openid-url}/auth
spring.security.oauth2.client.provider.keycloak.token-uri = ${keycloak.openid-url}/token
spring.security.oauth2.client.provider.keycloak.user-info-uri = ${keycloak.openid-url}/userinfo
spring.security.oauth2.client.provider.keycloak.jwk-set-uri = ${keycloak.openid-url}/certs
spring.security.oauth2.client.provider.keycloak.user-name-attribute = preferred_username
# for development only
server.port = 8081

View File

@ -0,0 +1,16 @@
html {
width: 100%;
height: 100%;
}
body {
background-color: #abc;
}
[data-bs-theme=dark] body {
background-color: rgb(36, 31, 49);
}
.borderdist {
margin: 8px;
}

View File

@ -0,0 +1,23 @@
var locale_de = {
"sEmptyTable": "Keine Daten in der Tabelle vorhanden",
"sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen",
"sInfoEmpty": "0 bis 0 von 0 Einträgen",
"sInfoFiltered": "(gefiltert von _MAX_ Einträgen)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "_MENU_ Einträge anzeigen",
"sLoadingRecords": "Wird geladen...",
"sProcessing": "Bitte warten...",
"sSearch": "Suchen",
"sZeroRecords": "Keine Einträge vorhanden.",
"oPaginate": {
"sFirst": "Erste",
"sPrevious": "Zurück",
"sNext": "Nächste",
"sLast": "Letzte"
},
"oAria": {
"sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
}
};

View File

@ -0,0 +1,5 @@
toggleDarkMode = function() {
var oldValue = $("html").attr("data-bs-theme");
var newValue = oldValue == "dark" ? "light" : "dark";
$("html").attr("data-bs-theme", newValue);
}

View File

@ -0,0 +1,46 @@
<!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">
<head>
<title>Camp Organizer 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<th:block layout:fragment="content">
<div class="borderdist">
<table id="table" class="table table-striped">
<thead>
<tr>
<th>Tag</th>
<th>Kürzel</th>
<th>Quelle</th>
<th>Thema</th>
<th>Unterthema</th>
<th>Tag-Anmerkungen</th>
</tr>
</thead>
<tbody>
<tr th:each="s : ${list}">
<td th:text="${#temporals.format(s.slotDay, 'yyyy-MM-dd')}"></td>
<td th:text="${s.abbreviation}"></td>
<td th:text="${s.sourceName}"></td>
<td th:text="${s.theme}"></td>
<td th:text="${s.subtheme}"></td>
<td th:text="${s.slotNotes}"></td>
</tr>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
$("#table").DataTable({
"columnDefs" : [ {
"targets" : 0,
"type" : "date-eu"
} ],
"language" : locale_de
});
});
</script>
</div>
</th:block>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" data-bs-theme="dark">
<head>
<title>Camp Organizer 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap/5.3.1/css/bootstrap.min.css}" />
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap-icons/1.10.5/font/bootstrap-icons.css}" />
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/datatables/1.13.5/css/jquery.dataTables.min.css}" />
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/style.css}" />
<script th:src="@{/webjars/bootstrap/5.3.1/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/webjars/jquery/3.7.1/jquery.min.js}"></script>
<script th:src="@{/webjars/datatables/1.13.5/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/js/dataTables.de.js}"></script>
<script th:src="@{/js/stylehelp.js}"></script>
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg headerlayout">
<button class="navbar-toggler" style="margin-right: 40px" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent" style="margin-right: 20px">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/}">Startseite</a></li>
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/sheet}">Übersicht</a></li>
</ul>
<ul layout:fragment="header"></ul>
<ul class="nav navbar-nav ms-auto">
<li class="nav-item">
<a href="https://gitlab.com/jottyfan/bico/-/issues" class="btn btn-outline-secondary" target="_blank" th:text="${'v' + @manifestBean.getVersion()}"></a>
</li>
<li class="nav-item">
<a href="#" class="btn btn-outline-secondary" onclick="toggleDarkMode()"><i class="bi bi-moon"></i></a>
</li>
</ul>
</div>
</nav>
<div layout:fragment="content">content</div>
</body>
</html>