From ff4409c745ee9a48e1fd105eff2095df1d9abe95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Wed, 5 Nov 2014 10:38:36 +0100 Subject: [PATCH] UPD: Fill up index pages with old descriptive text. --- src/org/cacert/gigi/pages/MainPage.java | 11 +++++++++- src/org/cacert/gigi/pages/MainPage.templ | 14 +++++++++++++ .../cacert/gigi/pages/MainPageNotLogin.templ | 21 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/org/cacert/gigi/pages/MainPage.templ create mode 100644 src/org/cacert/gigi/pages/MainPageNotLogin.templ diff --git a/src/org/cacert/gigi/pages/MainPage.java b/src/org/cacert/gigi/pages/MainPage.java index bb9c71c3..6e4d8ea2 100644 --- a/src/org/cacert/gigi/pages/MainPage.java +++ b/src/org/cacert/gigi/pages/MainPage.java @@ -1,19 +1,28 @@ package org.cacert.gigi.pages; import java.io.IOException; +import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.cacert.gigi.output.template.Template; + public class MainPage extends Page { + Template notLog = new Template(MainPage.class.getResource("MainPageNotLogin.templ")); + public MainPage(String title) { super(title); } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - resp.getWriter().println("Access granted."); + if (LoginPage.getUser(req) != null) { + getDefaultTemplate().output(resp.getWriter(), getLanguage(req), new HashMap()); + } else { + notLog.output(resp.getWriter(), getLanguage(req), new HashMap()); + } } @Override diff --git a/src/org/cacert/gigi/pages/MainPage.templ b/src/org/cacert/gigi/pages/MainPage.templ new file mode 100644 index 00000000..5dfe0a9f --- /dev/null +++ b/src/org/cacert/gigi/pages/MainPage.templ @@ -0,0 +1,14 @@ +

+

+

+

+

+

+

+

+

+

+

+

+

+

https://wiki.cacert.org/TTP/TTPuser",!"https://wiki.cacert.org/TTP/TTPAL",For information about the TTP-assisted-assurance program please read %s and %s.?>

diff --git a/src/org/cacert/gigi/pages/MainPageNotLogin.templ b/src/org/cacert/gigi/pages/MainPageNotLogin.templ new file mode 100644 index 00000000..80c5d2bf --- /dev/null +++ b/src/org/cacert/gigi/pages/MainPageNotLogin.templ @@ -0,0 +1,21 @@ +

+ +

+ +

+ +

",!"",If you want to have free certificates issued to you, %s join the CAcert Community %s.?>

+ +

",!"",If you want to use certificates issued by CAcert, read the CAcert %s Root Distribution License %s.?> +",!"",This license applies to using the CAcert %s root keys %s.?>

+ +
+ +

+ +

",!"",Have you passed the CAcert %s Assurer Challenge %s yet??>

+ +

",!"",Have you read the CAcert %sCommunity Agreement%s yet??>

+ +

",!"",For general documentation and help, please visit the CAcert %sWiki Documentation site %s.?> +",!"",For specific policies, see the CAcert %sApproved Policies page%s.?>

-- 2.39.2