From 9bd954ea9b16904a183747d5b286be76072b9501 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 20 Mar 2019 20:31:46 +0400 Subject: [PATCH] #73 fix new thymeleaf syntax --- .../configuration/MailTemplateConfiguration.java | 15 +-------------- src/main/resources/templates/activate.html | 2 +- src/main/resources/templates/admin/commits.html | 2 +- src/main/resources/templates/admin/userList.html | 2 +- .../resources/templates/admin/userSessions.html | 2 +- .../templates/conferences/conference.html | 2 +- .../templates/conferences/conferences.html | 2 +- src/main/resources/templates/error/403.html | 2 +- src/main/resources/templates/error/404.html | 2 +- src/main/resources/templates/error/500.html | 2 +- .../resources/templates/grants/dashboard.html | 2 +- src/main/resources/templates/grants/grant.html | 5 ++--- src/main/resources/templates/grants/grants.html | 2 +- src/main/resources/templates/index.html | 2 +- src/main/resources/templates/load.html | 2 +- src/main/resources/templates/login.html | 2 +- .../resources/templates/papers/dashboard.html | 2 +- src/main/resources/templates/papers/paper.html | 4 ++-- src/main/resources/templates/papers/papers.html | 2 +- src/main/resources/templates/reset.html | 2 +- src/main/resources/templates/resetRequest.html | 2 +- src/main/resources/templates/timeline.html | 2 +- 22 files changed, 24 insertions(+), 38 deletions(-) diff --git a/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java b/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java index e212e5b..31de65c 100644 --- a/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java @@ -17,7 +17,6 @@ public class MailTemplateConfiguration { final SpringTemplateEngine templateEngine = new SpringTemplateEngine(); templateEngine.addTemplateResolver(templateResolver); templateEngine.addTemplateResolver(emailTemplateResolver()); - templateEngine.addTemplateResolver(mvcTemplateResolver()); templateEngine.addDialect(new LayoutDialect()); templateEngine.addDialect(sec); return templateEngine; @@ -25,22 +24,10 @@ public class MailTemplateConfiguration { public ClassLoaderTemplateResolver emailTemplateResolver() { ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver(); - emailTemplateResolver.setPrefix("mail_templates/"); + emailTemplateResolver.setPrefix("/mail_templates/"); emailTemplateResolver.setTemplateMode("HTML"); emailTemplateResolver.setSuffix(".html"); - emailTemplateResolver.setOrder(2); emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name()); return emailTemplateResolver; } - - public ClassLoaderTemplateResolver mvcTemplateResolver() { - ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver(); - emailTemplateResolver.setPrefix("templates/"); - emailTemplateResolver.setTemplateMode("HTML"); - emailTemplateResolver.setSuffix(".html"); - emailTemplateResolver.setOrder(1); - emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name()); - return emailTemplateResolver; - } - } diff --git a/src/main/resources/templates/activate.html b/src/main/resources/templates/activate.html index b20a284..d06cdc8 100644 --- a/src/main/resources/templates/activate.html +++ b/src/main/resources/templates/activate.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/admin/commits.html b/src/main/resources/templates/admin/commits.html index a8b8e85..9b2f115 100644 --- a/src/main/resources/templates/admin/commits.html +++ b/src/main/resources/templates/admin/commits.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/admin/userList.html b/src/main/resources/templates/admin/userList.html index b47f720..911601f 100644 --- a/src/main/resources/templates/admin/userList.html +++ b/src/main/resources/templates/admin/userList.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/admin/userSessions.html b/src/main/resources/templates/admin/userSessions.html index 2c3405a..12d3a61 100644 --- a/src/main/resources/templates/admin/userSessions.html +++ b/src/main/resources/templates/admin/userSessions.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/conferences/conference.html b/src/main/resources/templates/conferences/conference.html index 078e697..713c533 100644 --- a/src/main/resources/templates/conferences/conference.html +++ b/src/main/resources/templates/conferences/conference.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index ab9fd31..b81d33c 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/error/403.html b/src/main/resources/templates/error/403.html index d850fa9..a80b444 100644 --- a/src/main/resources/templates/error/403.html +++ b/src/main/resources/templates/error/403.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html index 7233d72..8f1d80b 100644 --- a/src/main/resources/templates/error/404.html +++ b/src/main/resources/templates/error/404.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html index d42e7b4..f89b83a 100644 --- a/src/main/resources/templates/error/500.html +++ b/src/main/resources/templates/error/500.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/grants/dashboard.html b/src/main/resources/templates/grants/dashboard.html index b469875..12079d4 100644 --- a/src/main/resources/templates/grants/dashboard.html +++ b/src/main/resources/templates/grants/dashboard.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml"> diff --git a/src/main/resources/templates/grants/grant.html b/src/main/resources/templates/grants/grant.html index fc2878d..fe4d755 100644 --- a/src/main/resources/templates/grants/grant.html +++ b/src/main/resources/templates/grants/grant.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html"> @@ -63,8 +63,7 @@ + $('#addDeadline').click();|"> diff --git a/src/main/resources/templates/grants/grants.html b/src/main/resources/templates/grants/grants.html index 83083a0..627d589 100644 --- a/src/main/resources/templates/grants/grants.html +++ b/src/main/resources/templates/grants/grants.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th=""> diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 40a1281..a4dbe74 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/load.html b/src/main/resources/templates/load.html index 70c6314..dbd991a 100644 --- a/src/main/resources/templates/load.html +++ b/src/main/resources/templates/load.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 9d87073..48e325e 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml"> diff --git a/src/main/resources/templates/papers/dashboard.html b/src/main/resources/templates/papers/dashboard.html index b7849f7..b677c84 100644 --- a/src/main/resources/templates/papers/dashboard.html +++ b/src/main/resources/templates/papers/dashboard.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml"> diff --git a/src/main/resources/templates/papers/paper.html b/src/main/resources/templates/papers/paper.html index 6792be2..14befa7 100644 --- a/src/main/resources/templates/papers/paper.html +++ b/src/main/resources/templates/papers/paper.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html"> @@ -67,7 +67,7 @@ th:onclick="|$('#deadlines${rowStat.index}\\.description').val(''); $('#deadlines${rowStat.index}\\.date').val(''); $('#addDeadline').click();|"> + aria-hidden="true"> diff --git a/src/main/resources/templates/papers/papers.html b/src/main/resources/templates/papers/papers.html index a797d26..d07ca07 100644 --- a/src/main/resources/templates/papers/papers.html +++ b/src/main/resources/templates/papers/papers.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}" xmlns:th=""> diff --git a/src/main/resources/templates/reset.html b/src/main/resources/templates/reset.html index 232e260..c2dd78f 100644 --- a/src/main/resources/templates/reset.html +++ b/src/main/resources/templates/reset.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/resetRequest.html b/src/main/resources/templates/resetRequest.html index 2adab37..ef960f4 100644 --- a/src/main/resources/templates/resetRequest.html +++ b/src/main/resources/templates/resetRequest.html @@ -2,7 +2,7 @@ + layout:decorate="~{default}"> diff --git a/src/main/resources/templates/timeline.html b/src/main/resources/templates/timeline.html index 5eda9f3..0fdaddd 100644 --- a/src/main/resources/templates/timeline.html +++ b/src/main/resources/templates/timeline.html @@ -1,7 +1,7 @@ + layout:decorate="~{default}">