Diff for /loncom/auth/lonroles.pm between versions 1.176 and 1.177

version 1.176, 2007/03/02 23:17:48 version 1.177, 2007/04/17 15:44:58
Line 438  ENDHEADER Line 438  ENDHEADER
     }      }
 # -------------------------------------------------------- Choice or no choice?  # -------------------------------------------------------- Choice or no choice?
     if ($nochoose) {      if ($nochoose) {
  $r->print("<h2>".&mt('Sorry ...')."</h2>\n".   $r->print("<h2>".&mt('Sorry ...')."</h2>\n<span class='LC_error'>".
   &mt('This action is currently not authorized.').    &mt('This action is currently not authorized.').'</span>'.
   &Apache::loncommon::end_page());    &Apache::loncommon::end_page());
  return OK;   return OK;
     } else {      } else {
         if ($advanced) {          if ($advanced) {
     $r->print(&mt("Your home server is ").      $r->print('<span class="LC_rolesinfo">'.&mt("Your home server is ").
       &Apache::lonnet::hostname(&Apache::lonnet::homeserver        &Apache::lonnet::hostname(&Apache::lonnet::homeserver
                       ($env{'user.name'},$env{'user.domain'})).                        ($env{'user.name'},$env{'user.domain'})).
       "<br />\n");        "<br />\n");
     $r->print(&mt(      $r->print(&mt(
       "Author and Co-Author roles are not available on servers other than their respective home servers."));        "Author and Co-Author roles are not available on servers other than their respective home servers.").'</span>');
         }          }
         if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) {          if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) {
        $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};         $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};
Line 461  ENDHEADER Line 461  ENDHEADER
     }      }
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
  $r->print(   $r->print(
       '<br /><label>'.&mt('Show all roles').': <input type="checkbox" name="showall"');        '<br /><span class="LC_rolesinfo"><label>'.&mt('Show all roles').': <input type="checkbox" name="showall"');
  if ($env{'form.showall'}) { $r->print(' checked="checked" '); }   if ($env{'form.showall'}) { $r->print(' checked="checked" '); }
  $r->print(' /></label><input type="submit" value="'.&mt('Display').'" />');   $r->print(' /></label><input type="submit" value="'.&mt('Display').'" /></span>');
     }      }
   
     my (%roletext,%sortrole,%roleclass);      my (%roletext,%sortrole,%roleclass);
Line 648  ENDHEADER Line 648  ENDHEADER
     unless (($advanced) || ($nochoose)) {      unless (($advanced) || ($nochoose)) {
  $r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");   $r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");
     }      }
     $r->print('<br /><table><tr>');      $r->print('<br /><table id="LC_rolesmenu"><tr>');
     unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }      unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }
     $r->print('<th>'.&mt('User Role').'</th><th>'.&mt('Extent').      $r->print('<th>'.&mt('User Role').'</th><th>'.&mt('Extent').
          '</th><th>'.&mt('Start').'</th><th>'.&mt('End').'</th></tr>'."\n");           '</th><th>'.&mt('Start').'</th><th>'.&mt('End').'</th></tr>'."\n");
Line 730  ENDHEADER Line 730  ENDHEADER
     $r->print('<td>&nbsp;</td>');      $r->print('<td>&nbsp;</td>');
  }   }
     }      }
     $r->print('<td colspan="3"><font color="'.$tfont.'">'.&mt('No role specified').      $r->print('<td colspan="3"><font color="'.$tfont.'"><span class="LC_rolesinfo">'.&mt('No role specified').
       '</font></td><td><font color="'.$tfont.'">'.$tremark.        '</font></span></td><td><font color="'.$tfont.'">'.$tremark.
       '&nbsp;</font></td></tr>'."\n");        '&nbsp;</font></td></tr>'."\n");
   
     $r->print('</table>');      $r->print('</table>');
Line 835  sub role_status { Line 835  sub role_status {
   
 sub build_roletext {  sub build_roletext {
     my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_;      my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_;
     my $roletext='<tr bgcolor="'.$tbg.'">';      my $roletext='<tr bgcolor="'.$tbg.'" class="LC_rolesmenu_'.$tstatus.'">';
     my $is_dc=($trolecode =~ m/^dc\./);      my $is_dc=($trolecode =~ m/^dc\./);
     my $rowspan=($is_dc) ? ''      my $rowspan=($is_dc) ? ''
                          : ' rowspan="2" ';                           : ' rowspan="2" ';
Line 845  sub build_roletext { Line 845  sub build_roletext {
         $buttonname=~s/\W//g;          $buttonname=~s/\W//g;
         if (!$button) {          if (!$button) {
             if ($switchserver) {              if ($switchserver) {
                 $roletext.='<td'.$rowspan.'><a href="/adm/switchserver?'.                  $roletext.='<td'.$rowspan.'><span class="LC_rolesinfo"><a href="/adm/switchserver?'.
                 $switchserver.'">'.&mt('Switch Server').'</a></td>';                  $switchserver.'">'.&mt('Switch Server').'</a></span></td>';
             } else {              } else {
                 $roletext.=('<td'.$rowspan.'>&nbsp;</td>');                  $roletext.=('<td'.$rowspan.'>&nbsp;</td>');
             }              }
Line 878  sub build_roletext { Line 878  sub build_roletext {
                '</font></td><td><font color="'.$tfont.'">'.$tpend.                 '</font></td><td><font color="'.$tfont.'">'.$tpend.
                '</font></td></tr>';                 '</font></td></tr>';
     if (!$is_dc) {      if (!$is_dc) {
  $roletext.='<tr bgcolor="'.$tbg.'"><td colspan="4"><font color="'.$tfont.'">'.$tremark.   $roletext.='<tr bgcolor="'.$tbg.'"><td colspan="4"><font color="'.$tfont.'"><span class="LC_rolesinfo">'.$tremark.
     '&nbsp;</font></td></tr><tr><td colspan="5" height="3"></td></tr>'."\n";      '</span>&nbsp;</font></td></tr><tr><td colspan="5" height="3"></td></tr>'."\n";
     }      }
     return $roletext;      return $roletext;
 }  }
Line 1032  sub allcourses_row { Line 1032  sub allcourses_row {
                  ' <td colspan="5">';                   ' <td colspan="5">';
     my $selectlink = &courselink($dcdom,$rowtype);      my $selectlink = &courselink($dcdom,$rowtype);
     my $ccrole = &Apache::lonnet::plaintext('cc');      my $ccrole = &Apache::lonnet::plaintext('cc');
     $output.= '<font color="#002200">'.$ccrole.'</font>'.      $output.= '<span class="LC_rolesinfo">'.
               ' <b>'.$selectlink.'</b>'.              &mt('[_1]: [_2] from domain [_3]',$ccrole,$selectlink,$dcdom).
               ' from '.&mt('Domain').' '.$dcdom.'<br />';              '</span><br /></tr><tr><td colspan="5" height="3"></td></tr>'."\n";
     $output .= '</tr><tr><td colspan="5" height="3"></td></tr>'."\n";  
     return $output;      return $output;
 }  }
   

Removed from v.1.176  
changed lines
  Added in v.1.177


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>