WIP: Dummy mail overview
authorJanis Streib <janis@dogcraft.de>
Fri, 27 Jun 2014 00:28:45 +0000 (02:28 +0200)
committerJanis Streib <janis@dogcraft.de>
Fri, 27 Jun 2014 00:28:45 +0000 (02:28 +0200)
src/org/cacert/gigi/output/MailTable.java [new file with mode: 0644]
src/org/cacert/gigi/pages/account/MailOverview.java [new file with mode: 0644]

diff --git a/src/org/cacert/gigi/output/MailTable.java b/src/org/cacert/gigi/output/MailTable.java
new file mode 100644 (file)
index 0000000..2eed4af
--- /dev/null
@@ -0,0 +1,27 @@
+package org.cacert.gigi.output;
+
+import java.io.PrintWriter;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.cacert.gigi.Language;
+import org.cacert.gigi.output.DataTable.Cell;
+
+public class MailTable implements Outputable {
+
+       @Override
+       public void output(PrintWriter out, Language l, Map<String, Object> vars) {
+               LinkedList<Cell> cells = new LinkedList<>();
+               cells.add(new Cell("Email Accounts", true, 4, "class=\"title\""));
+               cells.add(new Cell("Default", true));
+               cells.add(new Cell("Delete", true));
+               cells.add(new Cell("Status", true));
+               cells.add(new Cell("Address", true));
+
+               DataTable t = new DataTable(4, cells);
+               t.output(out, l, vars);
+       }
+
+
+
+}
diff --git a/src/org/cacert/gigi/pages/account/MailOverview.java b/src/org/cacert/gigi/pages/account/MailOverview.java
new file mode 100644 (file)
index 0000000..f165cc1
--- /dev/null
@@ -0,0 +1,28 @@
+package org.cacert.gigi.pages.account;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.cacert.gigi.output.MailTable;
+import org.cacert.gigi.pages.Page;
+
+public class MailOverview extends Page {
+       public static final String DEFAULT_PATH = "/account/mails";
+
+       public MailOverview(String title) {
+               super(title);
+       }
+
+       @Override
+       public void doGet(HttpServletRequest req, HttpServletResponse resp)
+                       throws IOException {
+               HashMap<String, Object> vars = new HashMap<String, Object>();
+
+               new MailTable().output(resp.getWriter(), getLanguage(req), vars);
+
+       }
+
+}