--- loncom/interface/londocs.pm	2002/07/31 14:56:36	1.4
+++ loncom/interface/londocs.pm	2002/07/31 15:23:55	1.5
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.4 2002/07/31 14:56:36 www Exp $
+# $Id: londocs.pm,v 1.5 2002/07/31 15:23:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -90,8 +90,16 @@ ENDDOCUMENT
    foreach (sort keys (%currentdocs)) {
        if ($_=~/(\d+)\_(\w+)\_(\w+)\.url/) {
 	   $r->print('<hr>'.localtime($1).' '.$2.' '.$3.'<blockquote>'.
-		     $currentdocs{$1.'_'.$2.'_'.$3.'.comment'}.
-                     '</blockquote><a href="'.$currentdocs{$_}.'">View</a>');
+		     &Apache::lontexconvert::msgtexconverted(
+                                 $currentdocs{$1.'_'.$2.'_'.$3.'.comment'}
+                     ).
+                     '</blockquote><a href="'.
+               &Apache::lonnet::tokenwrapper($currentdocs{$_}).'">View</a>');
+	   if (($2 eq $ENV{'user.name'}) && ($3 eq $ENV{'user.domain'})
+               && ($allowed)) {
+              $r->print(' <a href="/adm/coursedocs?remove='.
+                        $1.'_'.$2.'_'.$3.'">Remove</a>');
+	   }
        }
    }
 # ----------------------------------------------------------------- Upload form