From a71868622be6824dcb4cc1ce10bd0c1c473e9d5c Mon Sep 17 00:00:00 2001 From: Janis Streib Date: Sun, 24 Aug 2014 02:23:28 +0200 Subject: [PATCH] ADD: Assurances made display --- src/org/cacert/gigi/pages/wot/MyPoints.java | 12 +++++++++--- src/org/cacert/gigi/pages/wot/MyPoints.templ | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/org/cacert/gigi/pages/wot/MyPoints.java b/src/org/cacert/gigi/pages/wot/MyPoints.java index fc481437..cd8b732e 100644 --- a/src/org/cacert/gigi/pages/wot/MyPoints.java +++ b/src/org/cacert/gigi/pages/wot/MyPoints.java @@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.cacert.gigi.GigiApiException; +import org.cacert.gigi.User; import org.cacert.gigi.output.AssurancesDisplay; import org.cacert.gigi.pages.Page; @@ -15,7 +16,9 @@ public class MyPoints extends Page { public static final String PATH = "/wot/mypoints"; - private AssurancesDisplay display = new AssurancesDisplay("asArr"); + private AssurancesDisplay myDisplay = new AssurancesDisplay("asArr"); + + private AssurancesDisplay toOtherDisplay = new AssurancesDisplay("otherAsArr"); public MyPoints(String title) { super(title); @@ -24,9 +27,12 @@ public class MyPoints extends Page { @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { HashMap vars = new HashMap(); - vars.put("pointlist", display); + vars.put("pointlist", myDisplay); + vars.put("madelist", toOtherDisplay); try { - vars.put("asArr", getUser(req).getReceivedAssurances()); + User user = getUser(req); + vars.put("asArr", user.getReceivedAssurances()); + vars.put("otherAsArr", user.getMadeAssurances()); } catch (SQLException e) { new GigiApiException(e).format(resp.getWriter(), getLanguage(req)); return; diff --git a/src/org/cacert/gigi/pages/wot/MyPoints.templ b/src/org/cacert/gigi/pages/wot/MyPoints.templ index 7822e5f1..d4fb1123 100644 --- a/src/org/cacert/gigi/pages/wot/MyPoints.templ +++ b/src/org/cacert/gigi/pages/wot/MyPoints.templ @@ -1 +1,3 @@ - \ No newline at end of file + +

+ \ No newline at end of file -- 2.39.2