1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.contract.model.util;
17
18 import java.io.PrintStream;
19
20 import org.kuali.student.contract.writer.HtmlWriter;
21
22
23
24
25
26 public class VersionLinesUtility {
27
28
29
30
31 public VersionLinesUtility() {
32
33 }
34
35 public static void writeVersionTag(HtmlWriter writer, String homeLink, String otherHomeLink, String projectVersion, String formattedDate) {
36 writeVersionTag(writer.getOut(), homeLink, otherHomeLink, projectVersion, formattedDate);
37
38 }
39
40 public static void writeVersionTag(PrintStream writer, String homeLink, String otherHomeLink, String projectVersion, String formattedDate) {
41
42 StringBuilder builder = new StringBuilder();
43
44 builder.append("<style type=\"text/css\">");
45
46 builder.append("ul.horizontal-list { display: inline; list-style-type: none; margin: 0; }");
47 builder.append("ul.horizontal-list li { display: inline; list-style-type: none; padding-right: 1em; }");
48
49
50 builder.append("</style>");
51
52 builder.append("<ul class=\"horizontal-list\">");
53
54 builder.append("<li>");
55 builder.append(homeLink);
56 builder.append("</li>");
57
58 builder.append("<li>");
59 builder.append(otherHomeLink);
60 builder.append("</li>");
61
62 builder.append("<li><b>Maven Release: </b>");
63 builder.append(projectVersion);
64
65 builder.append("</li><li><b>Page Generated: </b>");
66 builder.append(formattedDate);
67
68 builder.append("</li></ul>");
69
70 writer.println(builder.toString());
71 }
72 }