Compare commits
No commits in common. "master" and "0.1.0" have entirely different histories.
@ -1,9 +1,2 @@
|
|||||||
# seminar
|
# seminar
|
||||||
|
|
||||||
JDK: https://download.oracle.com/java/17/archive/jdk-17.0.6_windows-x64_bin.exe
|
|
||||||
|
|
||||||
IDE: IntelliJIDEA community version https://www.jetbrains.com/ru-ru/idea/download/#section=windows
|
|
||||||
|
|
||||||
To run: run project and open http://localhost:8080/
|
|
||||||
|
|
||||||
Demo: http://seminar.athene.tech
|
|
@ -48,7 +48,6 @@ dependencies {
|
|||||||
implementation group: 'org.webjars', name: 'font-awesome', version: '4.7.0'
|
implementation group: 'org.webjars', name: 'font-awesome', version: '4.7.0'
|
||||||
implementation group: 'org.webjars', name: 'momentjs', version: '2.24.0'
|
implementation group: 'org.webjars', name: 'momentjs', version: '2.24.0'
|
||||||
implementation group: 'org.webjars', name: 'bootstrap-glyphicons', version: 'bdd2cbfba0'
|
implementation group: 'org.webjars', name: 'bootstrap-glyphicons', version: 'bdd2cbfba0'
|
||||||
implementation group: 'org.webjars', name: 'summernote', version: '0.8.10'
|
|
||||||
|
|
||||||
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
||||||
}
|
}
|
||||||
|
BIN
data/db.mv.db
Normal file
BIN
data/db.mv.db
Normal file
Binary file not shown.
@ -70,7 +70,8 @@ public class MeetingController {
|
|||||||
|
|
||||||
@PostMapping("saveMeeting")
|
@PostMapping("saveMeeting")
|
||||||
@Secured({UserRoleConstants.ADMIN})
|
@Secured({UserRoleConstants.ADMIN})
|
||||||
public String saveNews(@Valid @ModelAttribute Meeting meeting, BindingResult result) {
|
public String saveNews(@Valid @ModelAttribute Meeting meeting,
|
||||||
|
BindingResult result) {
|
||||||
if (result.hasErrors()) {
|
if (result.hasErrors()) {
|
||||||
return "editMeeting";
|
return "editMeeting";
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package ru.ulstu.news;
|
package ru.ulstu.news;
|
||||||
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import ru.ulstu.meeting.Meeting;
|
import ru.ulstu.meeting.Meeting;
|
||||||
import ru.ulstu.model.BaseEntity;
|
import ru.ulstu.model.BaseEntity;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Lob;
|
import javax.persistence.Lob;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Transient;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -24,6 +26,11 @@ public class News extends BaseEntity {
|
|||||||
@NotEmpty(message = "Текст новости не может быть пустым")
|
@NotEmpty(message = "Текст новости не может быть пустым")
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
|
private String imageFileName;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private MultipartFile imageFile;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "news")
|
@OneToOne(mappedBy = "news")
|
||||||
private Meeting meeting;
|
private Meeting meeting;
|
||||||
|
|
||||||
@ -60,6 +67,22 @@ public class News extends BaseEntity {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getImageFileName() {
|
||||||
|
return imageFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageFileName(String imageFileName) {
|
||||||
|
this.imageFileName = imageFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultipartFile getImageFile() {
|
||||||
|
return imageFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageFile(MultipartFile imageFile) {
|
||||||
|
this.imageFile = imageFile;
|
||||||
|
}
|
||||||
|
|
||||||
public Meeting getMeeting() {
|
public Meeting getMeeting() {
|
||||||
return meeting;
|
return meeting;
|
||||||
}
|
}
|
||||||
@ -67,4 +90,10 @@ public class News extends BaseEntity {
|
|||||||
public void setMeeting(Meeting meeting) {
|
public void setMeeting(Meeting meeting) {
|
||||||
this.meeting = meeting;
|
this.meeting = meeting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPreview() {
|
||||||
|
return text != null && text.length() > MAX_NEWS_TEXT_PREVIEW_LENGTH
|
||||||
|
? text.substring(0, MAX_NEWS_TEXT_PREVIEW_LENGTH) + "..."
|
||||||
|
: text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import ru.ulstu.model.OffsetablePageRequest;
|
|||||||
import ru.ulstu.model.UserRoleConstants;
|
import ru.ulstu.model.UserRoleConstants;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -70,7 +71,8 @@ public class NewsController {
|
|||||||
|
|
||||||
@PostMapping("saveNews")
|
@PostMapping("saveNews")
|
||||||
@Secured({UserRoleConstants.ADMIN})
|
@Secured({UserRoleConstants.ADMIN})
|
||||||
public String saveNews(@Valid @ModelAttribute News news, BindingResult result) {
|
public String saveNews(@Valid @ModelAttribute News news,
|
||||||
|
BindingResult result) throws IOException {
|
||||||
if (result.hasErrors()) {
|
if (result.hasErrors()) {
|
||||||
return "editNews";
|
return "editNews";
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,13 @@ package ru.ulstu.news;
|
|||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import ru.ulstu.files.FileSystemStorageService;
|
||||||
|
import ru.ulstu.files.FileUtil;
|
||||||
import ru.ulstu.meeting.Meeting;
|
import ru.ulstu.meeting.Meeting;
|
||||||
|
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -34,12 +37,17 @@ public class NewsService {
|
|||||||
return newsRepository.save(news);
|
return newsRepository.save(news);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save(News news) {
|
public void save(News news) throws IOException {
|
||||||
|
String fileName = System.currentTimeMillis() + "";
|
||||||
|
news.setImageFileName(fileName);
|
||||||
|
|
||||||
if (news.getId() != null && (news.getId() != 0)) {
|
if (news.getId() != null && (news.getId() != 0)) {
|
||||||
newsRepository.save(news);
|
newsRepository.save(news);
|
||||||
} else {
|
} else {
|
||||||
create(news);
|
create(news);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileUtil.saveFile(FileSystemStorageService.UPLOAD_DIR, fileName, news.getImageFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
public News getById(@NotNull Integer id) {
|
public News getById(@NotNull Integer id) {
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2021 Anton Romanov - All Rights Reserved
|
||||||
|
# You may use, distribute and modify this code, please write to: romanov73@gmail.com.
|
||||||
|
#
|
||||||
|
#
|
||||||
admin-password=admin
|
admin-password=admin
|
||||||
spring.main.banner-mode=off
|
spring.main.banner-mode=off
|
||||||
logging.level.tech.athene=DEBUG
|
logging.level.tech.athene=DEBUG
|
||||||
server.port=8080
|
server.port=8080
|
||||||
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
||||||
spring.servlet.multipart.max-file-size=2048MB
|
spring.servlet.multipart.max-file-size=100000000
|
||||||
spring.servlet.multipart.max-request-size=2048MB
|
spring.servlet.multipart.max-request-size=100000000
|
||||||
server.tomcat.max-http-form-post-size=2048MB
|
|
||||||
#server.tomcat.max-swallow-size=2048MB
|
|
||||||
#server.max-http-header-size=2048MB
|
|
||||||
# go to http://localhost:8080/h2-console
|
# go to http://localhost:8080/h2-console
|
||||||
spring.datasource.url=jdbc:h2:file:./data/db
|
spring.datasource.url=jdbc:h2:file:./data/db
|
||||||
spring.datasource.driverClassName=org.h2.Driver
|
spring.datasource.driverClassName=org.h2.Driver
|
||||||
|
@ -1,25 +1,7 @@
|
|||||||
html, body {
|
@media (min-width: 1200px) {
|
||||||
width: 100%;
|
.container {
|
||||||
height: 100%;
|
max-width: 970px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background {
|
|
||||||
background-image: url('/img/background.jpg');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
opacity: 0.1;
|
|
||||||
height: 100%;
|
|
||||||
max-height: 768px;
|
|
||||||
width: 100%;
|
|
||||||
z-index: -100;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body-container {
|
|
||||||
position: relative;
|
|
||||||
margin: 0 auto;
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.news {
|
.news {
|
||||||
@ -68,16 +50,6 @@ html, body {
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clearfloat {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty {
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
position: relative;
|
|
||||||
margin: -50px auto 0;
|
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 135 KiB |
@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!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}">
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
|
@ -7,14 +7,20 @@
|
|||||||
<title th:text="#{messages.app-name}">app-name</title>
|
<title th:text="#{messages.app-name}">app-name</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<script type="text/javascript" src="/webjars/jquery/3.6.0/jquery.min.js"></script>
|
<script type="text/javascript" src="/webjars/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/webjars/momentjs/2.24.0/moment.js"></script>
|
||||||
|
<script type="text/javascript" src="/webjars/momentjs/2.24.0/locale/ru.js"></script>
|
||||||
<script type="text/javascript" src="/webjars/bootstrap/4.3.0/js/bootstrap.bundle.min.js"></script>
|
<script type="text/javascript" src="/webjars/bootstrap/4.3.0/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/webjars/bootstrap-select/1.13.8/js/bootstrap-select.min.js"></script>
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="/webjars/bootstrap-datetimepicker/2.4.4/js/bootstrap-datetimepicker.js"></script>
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap/4.3.0/css/bootstrap.min.css"/>
|
<link rel="stylesheet" href="/webjars/bootstrap/4.3.0/css/bootstrap.min.css"/>
|
||||||
|
<link rel="stylesheet" href="/webjars/bootstrap-select/1.13.8/css/bootstrap-select.min.css"/>
|
||||||
<link rel="stylesheet" href="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
<link rel="stylesheet" href="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
||||||
|
<link rel="stylesheet" href="/webjars/bootstrap-glyphicons/bdd2cbfba0/css/bootstrap-glyphicons.css"/>
|
||||||
|
<link rel="stylesheet" href="/webjars/bootstrap-datetimepicker/2.4.4/css/bootstrap-datetimepicker.css"/>
|
||||||
<link rel="stylesheet" href="/css/main.css"/>
|
<link rel="stylesheet" href="/css/main.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="body-container">
|
|
||||||
<div class="background"></div>
|
|
||||||
<nav class="navbar navbar-expand-md navbar-light bg-white">
|
<nav class="navbar navbar-expand-md navbar-light bg-white">
|
||||||
<a class="navbar-brand" href="/">
|
<a class="navbar-brand" href="/">
|
||||||
<img src="/img/logo.svg" width="50px">
|
<img src="/img/logo.svg" width="50px">
|
||||||
@ -64,34 +70,7 @@
|
|||||||
<div layout:fragment="content">
|
<div layout:fragment="content">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
|
||||||
<div class="empty"></div>
|
|
||||||
</div>
|
|
||||||
<footer></footer>
|
<footer></footer>
|
||||||
<!-- Yandex.Metrika counter -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
|
|
||||||
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
|
||||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
|
||||||
|
|
||||||
ym(88139282, "init", {
|
|
||||||
clickmap:true,
|
|
||||||
trackLinks:true,
|
|
||||||
accurateTrackBounce:true,
|
|
||||||
webvisor:true
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<div><img src="https://mc.yandex.ru/watch/88139282" style="position:absolute; left:-9999px;" alt=""/></div>
|
|
||||||
</noscript>
|
|
||||||
<!-- /Yandex.Metrika counter -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
|
||||||
2022
|
|
||||||
</footer>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,14 +1,20 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!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}">
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<a class="link-dark" href="/docs/polozh.docx">
|
<a class="link-secondary" href="/docs/polozh.docx">
|
||||||
Положение
|
Положение
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<a class="link-dark" href="/docs/plan2022.docx">
|
<a class="link-secondary" href="/docs/plan2022.docx">
|
||||||
План заседаний на 2022 год.
|
План заседаний на 2022 год.
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -30,17 +30,6 @@
|
|||||||
<button type="submit" class="btn btn-outline-dark">Сохранить</button>
|
<button type="submit" class="btn btn-outline-dark">Сохранить</button>
|
||||||
<a href="javascript:history.back()" class="btn btn-outline-dark">Отмена</a>
|
<a href="javascript:history.back()" class="btn btn-outline-dark">Отмена</a>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript" src="/webjars/momentjs/2.24.0/moment.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/momentjs/2.24.0/locale/ru.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/bootstrap-select/1.13.8/js/bootstrap-select.min.js"></script>
|
|
||||||
<script type="text/javascript"
|
|
||||||
src="/webjars/bootstrap-datetimepicker/2.4.4/js/bootstrap-datetimepicker.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/summernote/0.8.10/summernote-bs4.js"></script>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-select/1.13.8/css/bootstrap-select.min.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-glyphicons/bdd2cbfba0/css/bootstrap-glyphicons.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-datetimepicker/2.4.4/css/bootstrap-datetimepicker.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/summernote/0.8.10/summernote-bs4.css"/>
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#date").datetimepicker({
|
$("#date").datetimepicker({
|
||||||
@ -48,9 +37,6 @@
|
|||||||
locale: 'ru'
|
locale: 'ru'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('#text').summernote({
|
|
||||||
height: 300
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||||
<html
|
<html
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||||||
@ -21,26 +27,16 @@
|
|||||||
<p th:if="${#fields.hasErrors('text')}" th:class="${#fields.hasErrors('text')}? error">
|
<p th:if="${#fields.hasErrors('text')}" th:class="${#fields.hasErrors('text')}? error">
|
||||||
Не может быть пустым</p>
|
Не может быть пустым</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="image">Изображение</label>
|
||||||
|
<input type="file" name="imageFile" class="form-control" th:field="*{imageFile}" id="image"
|
||||||
|
placeholder="Фото новости"/>
|
||||||
|
|
||||||
|
<p th:if="${#fields.hasErrors('imageFile')}" th:class="${#fields.hasErrors('imageFile')} ? error">
|
||||||
|
Ошибка</p>
|
||||||
|
</div>
|
||||||
<button type="submit" class="btn btn-outline-dark">Сохранить</button>
|
<button type="submit" class="btn btn-outline-dark">Сохранить</button>
|
||||||
<a href="javascript:history.back()" class="btn btn-outline-dark">Отмена</a>
|
<a href="javascript:history.back()" class="btn btn-outline-dark">Отмена</a>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript" src="/webjars/momentjs/2.24.0/moment.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/momentjs/2.24.0/locale/ru.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/bootstrap-select/1.13.8/js/bootstrap-select.min.js"></script>
|
|
||||||
<script type="text/javascript"
|
|
||||||
src="/webjars/bootstrap-datetimepicker/2.4.4/js/bootstrap-datetimepicker.js"></script>
|
|
||||||
<script type="text/javascript" src="/webjars/summernote/0.8.10/summernote-bs4.js"></script>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-select/1.13.8/css/bootstrap-select.min.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-glyphicons/bdd2cbfba0/css/bootstrap-glyphicons.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap-datetimepicker/2.4.4/css/bootstrap-datetimepicker.css"/>
|
|
||||||
<link rel="stylesheet" href="/webjars/summernote/0.8.10/summernote-bs4.css"/>
|
|
||||||
<script>
|
|
||||||
$('#text').summernote({
|
|
||||||
height: 300
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||||||
layout:decorate="~{default}">
|
layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<div th:each="n : ${news}" class="news">
|
<div th:each="n : ${news}" class="news">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
<img class="news-image" th:src="@{'/files/' + ${n.imageFileName}}"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<a th:if="${n.meeting == null}" th:href="@{'/news/news/' + ${n.id}}" class="link-dark"><h5
|
<a th:if="${n.meeting == null}" th:href="@{'/news/news/' + ${n.id}}" class="link-dark"><h5
|
||||||
@ -13,13 +22,13 @@
|
|||||||
class="link-dark"><h5 th:text="${n.title}"/></a>
|
class="link-dark"><h5 th:text="${n.title}"/></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:if="${n.meeting == null}" th:utext="${n.text}" class="news-item"></div>
|
<div th:if="${n.meeting == null}" th:text="${n.preview}" class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}" th:text="${'Тема заседания: ' + n.meeting.title}"
|
<div th:if="${n.meeting != null}" th:text="${'Тема заседания: ' + n.meeting.title}"
|
||||||
class="news-item"></div>
|
class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}"
|
<div th:if="${n.meeting != null}"
|
||||||
th:text="${'Дата: ' + #calendars.format(n.meeting.date, 'dd.MM.yyyy HH:mm')}"
|
th:text="${'Дата: ' + #calendars.format(n.meeting.date, 'dd.MM.yyyy HH:mm')}"
|
||||||
class="news-item"></div>
|
class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}" th:utext="${n.meeting.text}" class="news-item"></div>
|
<div th:if="${n.meeting != null}" th:text="${n.meeting.text}" class="news-item"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:text="${'Опубликовано: ' + #calendars.format(n.date, 'dd.MM.yyyy HH:mm')}"
|
<div th:text="${'Опубликовано: ' + #calendars.format(n.date, 'dd.MM.yyyy HH:mm')}"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<a th:href="@{'/meetings/meetings/' + ${m.id}}" class="link-dark"><h5 th:text="${m.title}"/></a>
|
<a th:href="@{'/meetings/meetings/' + ${m.id}}" class="link-dark"><h5 th:text="${m.title}"/></a>
|
||||||
<div th:text="${'Дата заседания: ' + #calendars.format(m.date, 'dd.MM.yyyy HH:mm')}"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div sec:authorize="hasRole('ROLE_ADMIN')" class="col-md-2" style="text-align: right">
|
<div sec:authorize="hasRole('ROLE_ADMIN')" class="col-md-2" style="text-align: right">
|
||||||
<a th:href="@{'/meetings/editMeeting/' + ${m.id}}" class="link-dark">
|
<a th:href="@{'/meetings/editMeeting/' + ${m.id}}" class="link-dark">
|
||||||
@ -30,5 +29,6 @@
|
|||||||
th:text=${pageNumber}
|
th:text=${pageNumber}
|
||||||
th:class="${pageNumber == meetings.number+1} ? active"></a>
|
th:class="${pageNumber == meetings.number+1} ? active"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||||
@ -5,7 +11,10 @@
|
|||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<div th:each="n : ${news}" class="news">
|
<div th:each="n : ${news}" class="news">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
<img class="news-image" th:src="@{'/files/' + ${n.imageFileName}}"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<a th:if="${n.meeting == null}" th:href="@{'/news/news/' + ${n.id}}" class="link-dark"><h5
|
<a th:if="${n.meeting == null}" th:href="@{'/news/news/' + ${n.id}}" class="link-dark"><h5
|
||||||
@ -23,13 +32,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:if="${n.meeting == null}" th:utext="${n.text}" class="news-item"></div>
|
<div th:if="${n.meeting == null}" th:text="${n.preview}" class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}" th:text="${'Тема заседания: ' + n.meeting.title}"
|
<div th:if="${n.meeting != null}" th:text="${'Тема заседания: ' + n.meeting.title}"
|
||||||
class="news-item"></div>
|
class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}"
|
<div th:if="${n.meeting != null}"
|
||||||
th:text="${'Дата: ' + #calendars.format(n.meeting.date, 'dd.MM.yyyy HH:mm')}"
|
th:text="${'Дата: ' + #calendars.format(n.meeting.date, 'dd.MM.yyyy HH:mm')}"
|
||||||
class="news-item"></div>
|
class="news-item"></div>
|
||||||
<div th:if="${n.meeting != null}" th:utext="${n.meeting.text}" class="news-item"></div>
|
<div th:if="${n.meeting != null}" th:text="${n.meeting.text}" class="news-item"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:text="${'Опубликовано: ' + #calendars.format(n.date, 'dd.MM.yyyy HH:mm')}"
|
<div th:text="${'Опубликовано: ' + #calendars.format(n.date, 'dd.MM.yyyy HH:mm')}"
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!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}">
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||||
<html
|
<html
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||||||
layout:decorate="~{default}">
|
layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
<img class="news-image" src="/img/logo.svg"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
<h5 th:text="${meeting.title}"/>
|
<h5 th:text="${meeting.title}"/>
|
||||||
<div th:utext="${meeting.text}" class="news-item"></div>
|
<div th:text="${meeting.text}" class="news-item"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:history.back()" class="btn btn-outline-dark" style="text-align: right">Назад</a>
|
<a href="javascript:history.back()" class="btn btn-outline-dark" style="text-align: right">Назад</a>
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
~ 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">
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||||
<html
|
<html
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||||||
layout:decorate="~{default}">
|
layout:decorate="~{default}">
|
||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
<img class="news-image" th:src="@{'/files/' + ${news.imageFileName}}"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
<h5 th:text="${news.title}"/>
|
<h5 th:text="${news.title}"/>
|
||||||
<div th:utext="${news.text}" class="news-item"></div>
|
<div th:text="${news.text}" class="news-item"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:text="${'Опубликовано: ' + #calendars.format(news.date, 'dd.MM.yyyy HH:mm')}"
|
<div th:text="${'Опубликовано: ' + #calendars.format(news.date, 'dd.MM.yyyy HH:mm')}"
|
||||||
|
Loading…
Reference in New Issue
Block a user