Added support for source URLs
authorJoey Schulze <joey@infodrom.org>
Wed, 10 Dec 2003 08:16:34 +0000 (08:16 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 10 Dec 2003 08:16:34 +0000 (08:16 +0000)
Styles/LUGO.style

index fea7f48..5a0680e 100644 (file)
@@ -89,6 +89,7 @@
 <line color=008dfd height=1 align=center>
 
 <address>&#169 <a href="<: print $root_prefix :>impressum.html">LUGO</a>, <:
+$cvsurl = "http://cvs.infodrom.org/oldenburg.linux.de/%s%s?cvsroot=LUGO";
 @months =
 #    ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
     ("Dummy", "Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
 #    = localtime(); $date_year += 1900;
 #printf "%d %s %d", $date_mday, $months[$date_mon], $date_year;
 
+if (length ("<get-var source>")) {
+    if ("<get-var source>" ne ".") {
+        $url = "<get-var source>";
+    } else {
+        $url = '';
+    }
+} else {
+    "<get-var WML_SRC_DIRNAME>/" =~ /.*\/(src\/.*)$/;
+    $url = sprintf ($cvsurl, $1, "<get-var WML_SRC_FILENAME>");
+}
+
 "<get-var WML_SRC_ISOTIME>" =~ /^(\d+)-(\d+)-(\d+)\s/;
+if (length ($url)) {
+    printf "Letzte Änderung am <a href=\"%s\">Quellcode</a>: %d. %s %d", $url, $3, $months[$2], $1;
+} else {
+    printf "Letzte Änderung: %d. %s %d", $3, $months[$2], $1;
+}
 
-printf "Letzte Änderung: %d. %s %d", $3, $months[$2], $1;
 :></address>
 </font>
 </body>