#1 -- add admin page
This commit is contained in:
parent
5efcaa1a3c
commit
9c42cb677e
@ -36,9 +36,11 @@ dependencies {
|
||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
|
||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
|
||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
|
||||
implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa'
|
||||
//implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security'
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J
|
||||
implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect'
|
||||
implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa'
|
||||
//implementation group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5'
|
||||
implementation group: 'com.h2database', name:'h2'
|
||||
implementation group: 'javax.xml.bind', name:'jaxb-api'
|
||||
implementation group: 'org.javassist', name:'javassist'
|
||||
|
BIN
data/db.mv.db
BIN
data/db.mv.db
Binary file not shown.
@ -21,6 +21,7 @@ public class MvcConfiguration implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addViewController("/index");
|
||||
registry.addViewController("/admin");
|
||||
registry.addViewController("/editNews");
|
||||
}
|
||||
|
||||
|
16
src/main/resources/templates/admin.html
Normal file
16
src/main/resources/templates/admin.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!--
|
||||
~ Copyright (C) 2021 Anton Romanov - All Rights Reserved
|
||||
~ You may use, distribute and modify this code, please write to: romanov73@gmail.com.
|
||||
~
|
||||
-->
|
||||
|
||||
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||
<html
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{default}">
|
||||
<div class="container" layout:fragment="content">
|
||||
<a href="/editNews/0" class="btn btn-outline-dark">
|
||||
<i class="fa fa-plus-square" aria-hidden="true"> Добавить новость</i>
|
||||
</a>
|
||||
</div>
|
||||
</html>
|
@ -40,6 +40,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/news">Отчеты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin">Администратору</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
Loading…
Reference in New Issue
Block a user