[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jul 2004 17:50:54 -0000


matthew		Mon Jul 19 13:50:54 2004 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  &messagewrapper and &aboutmewrapper both now emit proper xhtml and
  provide a (translated) link title describing what the links allow 
  one to do.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.199 loncom/interface/loncommon.pm:1.200
--- loncom/interface/loncommon.pm:1.199	Thu Jul 15 14:50:37 2004
+++ loncom/interface/loncommon.pm	Mon Jul 19 13:50:53 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.199 2004/07/15 18:50:37 albertel Exp $
+# $Id: loncommon.pm,v 1.200 2004/07/19 17:50:53 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1787,9 +1787,11 @@
 # ------------------------------------------------------------- Message Wrapper
 
 sub messagewrapper {
-    my ($link,$un,$do)=@_;
+    my ($link,$username,$domain)=@_;
     return 
-"<a href='/adm/email?compose=individual&recname=$un&recdom=$do'>$link</a>";
+        '<a href="/adm/email?compose=individual&'.
+        'recname='.$username.'&recdom='.$domain.'" '.
+        'title="'.&mt('Send message').'">'.$link.'</a>';
 }
 # --------------------------------------------------------------- Notes Wrapper
 
@@ -1802,8 +1804,8 @@
 
 sub aboutmewrapper {
     my ($link,$username,$domain,$target)=@_;
-    return "<a href='/adm/$domain/$username/aboutme'".
-	($target?" target='$target'":'').">$link</a>";
+    return '<a href="/adm/$domain/$username/aboutme"'.
+	($target?' target="$target"':'').' title="'.&mt('View this users personal page').'">'.$link.'</a>';
 }
 
 # ------------------------------------------------------------ Syllabus Wrapper