# HG changeset patch
# User casties
# Date 1423482951 -3600
# Node ID 3d1a00418b42f03229a798c993436ad2e2190607
# Parent aadf8760216dfd9565e870337aaa19c8fd44b250
starting web admin ui with relative links. doesn't fully work yet.
diff -r aadf8760216d -r 3d1a00418b42 src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java
--- 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 = "
\nAnnotation
\n";
- result += String.format("All annotations
", this.getReference().getParentRef());
+ result += "All annotations
";
result += "";
result += String.format("uri | %s |
\n", annotation.getUri());
result += String.format("text | %s |
\n", annotation.getBodyText());
@@ -141,9 +141,7 @@
result += "
\n";
//result += "Edit annotation
\n";
// tunnel POST as DELETE
- result += String.format(
- "\n",
- this.getReference().getHierarchicalPart());
+ result += "\n";
result += "\n";
}
return new StringRepresentation(result, MediaType.TEXT_HTML);
diff -r aadf8760216d -r 3d1a00418b42 src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java Mon Feb 09 12:50:47 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java Mon Feb 09 12:55:51 2015 +0100
@@ -75,8 +75,7 @@
result += "uri | text | target | fragment | creator |
";
List annotations = store.getAnnotations("id", "*");
for (Annotation annotation : annotations) {
- Reference url = this.getReference().clone();
- url.addSegment(annotation.getUrlId());
+ String url = annotation.getUrlId();
result += String.format("%s | %s | %s | %s | %s |
\n", url,
annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(),
annotation.getCreatorName());
diff -r aadf8760216d -r 3d1a00418b42 src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java Mon Feb 09 12:50:47 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java Mon Feb 09 12:55:51 2015 +0100
@@ -1,6 +1,3 @@
-/**
- *
- */
package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
/*
@@ -41,7 +38,7 @@
*/
public class AnnotationsUiRestlet extends BaseRestlet {
- public final String version = "AnnotationManagerN4J/AnnotationsUI 0.3";
+ public final String version = "AnnotationManagerN4J/AnnotationsUI 0.4";
public static Logger logger = Logger.getLogger("de.mpiwg.itgroup.annotations.restlet.annotations_ui.AnnotationsUiRestlet");
@@ -83,7 +80,7 @@
logger.severe("Admin user and password missing in serverconfig!");
}
// Create a Guard
- ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "Tutorial");
+ ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "Annotation Server");
guard.setVerifier(verifier);
// put everything through guard
guard.setNext(router);
diff -r aadf8760216d -r 3d1a00418b42 src/main/webapp/index.html
--- a/src/main/webapp/index.html Mon Feb 09 12:50:47 2015 +0100
+++ b/src/main/webapp/index.html Mon Feb 09 12:55:51 2015 +0100
@@ -24,9 +24,9 @@
-->
Admin