Skip to content

Commit c5324b6

Browse files
committed
Updates to acceptor template on 2024.
1 parent 0b2247b commit c5324b6

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
13-
<kotlin.version>1.3.60</kotlin.version>
13+
<kotlin.version>1.8.0</kotlin.version>
1414
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
1515
</properties>
1616

src/main/java/no/javazone/cake/redux/AcceptorSetter.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public String accept(JsonArray talks,UserWithAccess userWithAccess) {
2929
String template = loadTemplate();
3030
String tagToAdd = "accepted";
3131
String tagExistsErrormessage = "Talk is already accepted";
32-
String subjectTemplate = "JavaZone 2023 #talkType# accepted";
32+
String subjectTemplate = "JavaZone 2024 #talkType# accepted";
3333

3434
return doUpdates(talks, template, subjectTemplate, tagToAdd, tagExistsErrormessage,userWithAccess,false);
3535
}
@@ -168,14 +168,25 @@ private String replaceAll(String s, String code,String replacement) {
168168
}
169169

170170
protected String generateMessage(String template, String title, String talkType, String speakerName, String submitLink, String confirmLocation, JsonObject jsonTalk, String encodedTalkRef) {
171+
String length = jsonTalk.stringValue("length").orElse("NA");
172+
String language;
173+
switch (jsonTalk.stringValue("language").orElse("x")) {
174+
case "en": language = "English";
175+
case "no": language = "Norwegian";
176+
default:
177+
language = "English";
178+
break;
179+
}
180+
171181
String message = template;
172182
message = replaceAll(message,"#title#", title);
173183
message = replaceAll(message,"#speakername#", speakerName);
174184
message = replaceAll(message,"#talkType#", talkType);
175185
message = replaceAll(message,"#submititLink#", submitLink);
176186
message = replaceAll(message,"#confirmLink#", confirmLocation);
177187
message = replaceAll(message,"#talkid#", encodedTalkRef);
178-
188+
message = replaceAll(message,"#length#", length);
189+
message = replaceAll(message,"#language#", language);
179190

180191
for (int pos=message.indexOf("#");pos!=-1;pos=message.indexOf("#",pos+1)) {
181192
if (pos == message.length()-1) {

src/main/resources/acceptanceTemplate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<p><b>Dear #speakername#</b></p>
55

6-
<p>We are pleased to inform you that your #talkType#, "#title#", has been accepted for JavaZone 2023!</p>
6+
<p>We are pleased to inform you that your #talkType#, "#title#", has been accepted for JavaZone 2024! (Duration is registered as #length# minutes, and registered language is #language#</p>
77

88

99
<h2>CONFIRM YOUR TALK</h2>

src/main/resources/webapp/confirm.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html ng-app="cakeOpen">
33
<head>
4-
<title>JavaZone 2023 speaker confirmation</title>
4+
<title>JavaZone 2024 speaker confirmation</title>
55
<script src="scripts/ext/jquery-2.1.0.min.js"></script>
66
<script src="scripts/ext/underscore-min.js"></script>
77
<!-- Latest compiled and minified CSS -->
@@ -21,8 +21,8 @@
2121
<body ng-controller="ConfirmCtrl">
2222
<h1 class="col-xs-offset-1">JavaZone speaker confirmation</h1>
2323
<div class="col-xs-offset-1 col-md-9 row" ng-show="showMain">
24-
<p>By pressing the button below you confirm that you will be speaking at JavaZone 2023.</p>
25-
<p>We would also like to know if you are planning on attending the speakers dinner. The speakers dinner will be at 19:00 on September 5th.</p>
24+
<p>By pressing the button below you confirm that you will be speaking at JavaZone 2024.</p>
25+
<p>We would also like to know if you are planning on attending the speakers dinner. The speakers dinner will be at 19:00 on September 3rd.</p>
2626
<p>
2727
<div class="radio">
2828
<label>

0 commit comments

Comments
 (0)