--- loncom/interface/loncommon.pm 2004/07/15 18:50:37 1.199 +++ loncom/interface/loncommon.pm 2004/09/24 20:52:32 1.205.2.1 @@ -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.205.2.1 2004/09/24 20:52:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -650,7 +650,7 @@ sub help_open_menu { $width = 620 if (not defined $width); $height = 600 if (not defined $height); my $link=''; - my $title = &mt('Choose your help'); + my $title = &mt('Get help'); my $origurl = $ENV{'REQUEST_URI'}; my $timestamp = time; foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) { @@ -688,8 +688,21 @@ function helpMenu(caller) { } } </script> - <a href="$link" title="$title"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(Help Menu)" /></a> + <a href="$link" title="$title"><image src="/adm/lonIcons/helpgateway.gif" border="0" alt="(Help Menu)" /></a> ENDTEMPLATE + if ($component_help) { + if (!$text) { + $template=&help_open_topic($component_help,undef,$stayOnPage, + $width,$height).' '.$template; + } else { + my $help_text; + $help_text=&Apache::lonnet::unescape($topic); + $template='<table><tr><td>'. + &help_open_topic($component_help,$help_text,$stayOnPage, + $width,$height).'</td><td>'.$template. + '</td></tr></table>'; + } + } if ($text ne '') { $template.='</td></tr></table>' }; return $template; } @@ -1787,9 +1800,11 @@ sub screenname { # ------------------------------------------------------------- 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 +1817,8 @@ sub noteswrapper { 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 @@ -2541,7 +2556,7 @@ $upperleft</td> </td></tr> <tr> <td bgcolor="$tabbg" align="right"><font size="2" face="Arial, Helvetica, sans-serif">$realm</font> </td></tr> -</table><br> +</table><br /> ENDBODY } @@ -3636,6 +3651,14 @@ sub icon { return $iconname; } +sub connection_aborted { + my ($r)=@_; + $r->print(" ");$r->rflush(); + my $c = $r->connection; + &Apache::lonnet::logthis("checking :".$c->aborted()); + return $c->aborted(); +} + =pod =back