--- loncom/publisher/lonunauthorized.pm 2006/12/06 22:22:39 1.6 +++ loncom/publisher/lonunauthorized.pm 2009/05/14 15:36:29 1.9 @@ -1,7 +1,7 @@ # The LearningOnline Network # Unauthorized to access construction space # -# $Id: lonunauthorized.pm,v 1.6 2006/12/06 22:22:39 albertel Exp $ +# $Id: lonunauthorized.pm,v 1.9 2009/05/14 15:36:29 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,33 +54,38 @@ sub handler { # figure out what went wrong if ($ownerdomain) { - $r->print('
'. -&mt('The constuction space for this resource is located on another server.'). -'
'); + $r->print('' + .&mt('The construction space for this resource is located on another server.') + .'
' + .'' + .&mt('Choose another server.') + .'
'); my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); unless ($ownerhome eq 'no_host') { - $r->print( - "".&mt('Please log into')." ".$Apache::lonnet::hostname{$ownerhome}. - " ".&mt('to edit.')."
"); + $r->print('' + .&mt('Please log into [_1] to edit.' + ,''.&Apache::lonnet::hostname($ownerhome).'') + .'
'); } } else { - $r->print( - "' + .&mt('You do not have authoring privileges for this resource') + .'
'); my ($realownername)= ($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)}); my $realownerhome= &Apache::lonnet::homeserver($realownername, $r->dir_config('lonDefDomain')); unless ($realownerhome eq 'no_host') { - $r->print("".&mt('Contact')." ". - &Apache::loncommon::aboutmewrapper( - &Apache::loncommon::plainname($realownername, - $r->dir_config('lonDefDomain')).' ('. - $realownername.&mt(' at '). - $r->dir_config('lonDefDomain').')', - $realownername,$r->dir_config('lonDefDomain')). - ' for access.
'); + my $plainname=&Apache::loncommon::plainname($realownername,$r->dir_config('lonDefDomain')); + my $user=$realownername.':'.$r->dir_config('lonDefDomain'); + my $userlink=&Apache::loncommon::aboutmewrapper( + $plainname.' ('.$user.')' + ,$realownername + ,$r->dir_config('lonDefDomain')); + $r->print('' + .&mt('Contact [_1] for access.',$userlink) + .'
'); } }