changeset 99:199143c669e4

added links to admin interface.
author casties
date Wed, 11 Feb 2015 19:09:17 +0100
parents 5a764c625290
children f9ee715ee9e9
files src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	Wed Feb 11 19:04:14 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	Wed Feb 11 19:09:17 2015 +0100
@@ -53,7 +53,7 @@
  */
 public class AnnotationResource extends ServerResource {
 
-    public static Logger logger = Logger.getLogger("de.mpiwg.itgroup.annotations.restlet.annotations_ui.AnnotationResource");
+    public static Logger logger = Logger.getLogger(AnnotationResource.class.getCanonicalName());
 
     protected AnnotationStore store;
 
@@ -126,7 +126,7 @@
             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());
-            result += String.format("<tr><td><b>target</b></td><td>%s</td></tr>\n", annotation.getTargetBaseUri());
+            result += String.format("<tr><td><b>target</b></td><td><a href=\"%s\" target=\"_blank\">%s</a></td></tr>\n", annotation.getTargetBaseUri(), annotation.getTargetBaseUri());
             result += String.format("<tr><td><b>fragment</b></td><td>%s</td></tr>\n", annotation.getTargetFragment());
             result += String.format("<tr><td><b>quote</b></td><td>%s</td></tr>\n", annotation.getQuote());
             result += String.format("<tr><td><b>resource</b></td><td>%s</td></tr>\n", annotation.getResourceUri());
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java	Wed Feb 11 19:04:14 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java	Wed Feb 11 19:09:17 2015 +0100
@@ -77,9 +77,9 @@
         for (Annotation annotation : annotations) {
             Reference url = this.getReference().clone();
             url.addSegment(annotation.getUrlId());
-            result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", url,
-                    annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(),
-                    annotation.getCreatorName());
+            result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", url,
+                    annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetBaseUri(), 
+                    annotation.getTargetFragment(), annotation.getCreatorName());
         }
         result += "</table>\n";
         result += "</body>\n</html>";