Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.61 and 1.64

version 1.61, 2004/03/09 15:06:48 version 1.64, 2004/04/12 20:03:31
Line 392  sub get_date_from_form { Line 392  sub get_date_from_form {
         if (($tmpsec =~ /^\d+$/) && ($tmpsec >= 0) && ($tmpsec < 60)) {          if (($tmpsec =~ /^\d+$/) && ($tmpsec >= 0) && ($tmpsec < 60)) {
             $sec = $tmpsec;              $sec = $tmpsec;
         }          }
    if (!defined($tmpsec) || $tmpsec eq '') { $sec = 0; }
     }      }
     if (defined($ENV{'form.'.$dname.'_minute'})) {      if (defined($ENV{'form.'.$dname.'_minute'})) {
         my $tmpmin = $ENV{'form.'.$dname.'_minute'};          my $tmpmin = $ENV{'form.'.$dname.'_minute'};
         if (($tmpmin =~ /^\d+$/) && ($tmpmin >= 0) && ($tmpmin < 60)) {          if (($tmpmin =~ /^\d+$/) && ($tmpmin >= 0) && ($tmpmin < 60)) {
             $min = $tmpmin;              $min = $tmpmin;
         }          }
    if (!defined($tmpmin) || $tmpmin eq '') { $min = 0; }
     }      }
     if (defined($ENV{'form.'.$dname.'_hour'})) {      if (defined($ENV{'form.'.$dname.'_hour'})) {
         my $tmphour = $ENV{'form.'.$dname.'_hour'};          my $tmphour = $ENV{'form.'.$dname.'_hour'};
Line 814  sub r_print { Line 816  sub r_print {
 # ------------------------------------------------------- Puts directory header  # ------------------------------------------------------- Puts directory header
   
 sub crumbs {  sub crumbs {
     my ($uri,$target,$prefix,$form)=@_;      my ($uri,$target,$prefix,$form,$size)=@_;
     my $output='<br /><tt><b><font size="+2">'.$prefix.'/';      if (! defined($size)) {
           $size = '+2';
       }
       my $output='<br /><tt><b><font size="'.$size.'">'.$prefix.'/';
     if ($ENV{'user.adv'}) {      if ($ENV{'user.adv'}) {
  my $path=$prefix.'/';   my $path=$prefix.'/';
  foreach (split('/',$uri)) {   foreach (split('/',$uri)) {
Line 896  All inputs can be undef without problems Line 901  All inputs can be undef without problems
 Inputs: $color (the background color of the table returned),  Inputs: $color (the background color of the table returned),
         $component (the large text on the right side of the table),          $component (the large text on the right side of the table),
         $component_help          $component_help
           $function (role to get colors from)
           $domain   (domian of role)
           $menulink (boolean, controls whether to include a link to /adm/menu)
   
 Returns a string containing breadcrumbs for the current page.  Returns a string containing breadcrumbs for the current page.
   
Line 921  returns: nothing Line 929  returns: nothing
     my @Crumbs;      my @Crumbs;
           
     sub breadcrumbs {      sub breadcrumbs {
         my ($color,$component,$component_help,$function,$domain) = @_;          my ($color,$component,$component_help,$function,$domain,$menulink) =
       @_;
         if (! defined($color)) {          if (! defined($color)) {
             if (! defined($function)) {              if (! defined($function)) {
                 $function = &Apache::loncommon::get_users_function();                  $function = &Apache::loncommon::get_users_function();
Line 942  returns: nothing Line 951  returns: nothing
         my $last = pop(@Crumbs);          my $last = pop(@Crumbs);
         #          #
         # The first one should be the course, I guess.          # The first one should be the course, I guess.
         if (exists($ENV{'request.course.id'})) {   if (!defined($menulink)) { $menulink=1; }
           if ($menulink && exists($ENV{'request.course.id'})) {
             my $cid = $ENV{'request.course.id'};              my $cid = $ENV{'request.course.id'};
             unshift(@Crumbs,{              unshift(@Crumbs,{
                              href=>'/adm/menu',                               href=>'/adm/menu',

Removed from v.1.61  
changed lines
  Added in v.1.64


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