From d9c0037041b598b9bc3bf22a8d84f723eed13f1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr>
Date: Mon, 12 Feb 2007 20:32:29 +0000
Subject: [PATCH] - put the "About..." panel as root

---
 .../exmo/align/service/HTMLAServProfile.java     | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/fr/inrialpes/exmo/align/service/HTMLAServProfile.java b/src/fr/inrialpes/exmo/align/service/HTMLAServProfile.java
index 660dd103..f3fe68a9 100644
--- a/src/fr/inrialpes/exmo/align/service/HTMLAServProfile.java
+++ b/src/fr/inrialpes/exmo/align/service/HTMLAServProfile.java
@@ -214,10 +214,17 @@ public class HTMLAServProfile implements AlignmentServiceProfile {
 	    return htmlAnswer( uri, uri.substring(start), header, params );
 	} else {
 	    //return serveFile( uri, header, new File("."), true );
-	    return new Response( HTTP_OK, MIME_HTML, "<html><head></head><body><h1>Unkown commad</h1><hr /><center><small><a href=\".\">Alignment server administration</a></small></center></body></html>" );
+	    return new Response( HTTP_OK, MIME_HTML, "<html><head></head><body>"+about()+"</body></html>" );
 	}
     }
 
+    protected String about() {
+	return "<h1>Alignment Server</h1><center>$Id$<br />"
+	    + "(C) INRIA Rh&ocirc;ne-Alpes, 2007<br />"
+	    + "<a href=\"http://alignapi.gforge.inria.fr\">http://alignapi.gforge.inria.fr</a>"
+	    + "</center>";
+    }
+
     /**
      * HTTP administration interface
      * Allows some limited administration of the server through HTTP
@@ -255,10 +262,7 @@ public class HTMLAServProfile implements AlignmentServiceProfile {
 	} else if ( perf.equals("sqlquery") ){
 	    msg = "Not available yet";
 	} else if ( perf.equals("about") ){
-	    msg = "<h1>Alignment Server</h1><center>$Id$<br />";
-	    msg += "(C) INRIA Rh&ocirc;ne-Alpes, 2007<br />";
-	    msg += "<a href=\"http://alignapi.gforge.inria.fr\">http://alignapi.gforge.inria.fr</a>";
-	    msg += "</center>";
+	    msg = about();
 	} else if ( perf.equals("shutdown") ){
 	    manager.close();
 	    msg = "Server shut down";
@@ -281,7 +285,7 @@ public class HTMLAServProfile implements AlignmentServiceProfile {
 	    msg += "<li><form action=\"prmsqlquery\"><input type=\"submit\" value=\"SQL Query\"/></form></li>";
 	    msg += "<li><form action=\"prmreset\"><input type=\"submit\" value=\"Reset server\"/></form></li>";
 	    msg += "<li><form action=\"shutdown\"><input type=\"submit\" value=\"Shutdown\"/></form></li>";
-	    msg += "<li><form action=\"about\"><input type=\"submit\" value=\"About\"/></form></li>";
+	    msg += "<li><form action=\"..\"><input type=\"submit\" value=\"About\"/></form></li>";
 	    msg += "<li><form action=\"../html/\"><input type=\"submit\" value=\"User interface\"/></form></li>";
 	    msg += "</ul>";
 	} else {
-- 
GitLab