diff src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java @ 93:3d1a00418b42 admin_ui_rel_links

starting web admin ui with relative links. doesn't fully work yet.
author casties
date Mon, 09 Feb 2015 12:55:51 +0100
parents e973cbf5d58f
children
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	Mon Feb 09 12:50:47 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	Mon Feb 09 12:55:51 2015 +0100
@@ -122,7 +122,7 @@
         } else {
             // output person content
             result = "<html><body>\n<h1>Annotation</h1>\n";
-            result += String.format("<p><a href=\"%s\">All annotations</a></p>", this.getReference().getParentRef());
+            result += "<p><a href=\"./\">All annotations</a></p>";
             result += "<table>";
             result += String.format("<tr><td><b>uri</b></td><td>%s</td></tr>\n", annotation.getUri());
             result += String.format("<tr><td><b>text</b></td><td>%s</td></tr>\n", annotation.getBodyText());
@@ -141,9 +141,7 @@
             result += "</table>\n";
             //result += "<p><a href=\"?form=edit\">Edit annotation</a></p>\n";
             // tunnel POST as DELETE
-            result += String.format(
-                    "<form method=\"post\" action=\"%s?method=DELETE\"><input type=\"submit\" value=\"Delete annotation\"/></form>\n",
-                    this.getReference().getHierarchicalPart());
+            result += "<form method=\"post\" action=\"?method=DELETE\"><input type=\"submit\" value=\"Delete annotation\"/></form>\n";
             result += "</body>\n</html>";
         }
         return new StringRepresentation(result, MediaType.TEXT_HTML);