Diff for /rat/lonratedt.pm between versions 1.99 and 1.105.2.1

version 1.99, 2010/03/10 21:26:15 version 1.105.2.1, 2012/05/01 23:00:29
Line 43  use HTML::Entities(); Line 43  use HTML::Entities();
 # --------------------------------------------------------- Build up RAT screen  # --------------------------------------------------------- Build up RAT screen
 sub ratedt {  sub ratedt {
   my ($r,$url)=@_;    my ($r,$url)=@_;
   my %layout = ('border' => "0",    my %layout = ('border' => "0");
                 'rows'   => "1,250,*");    if ($env{'environment.remote'} eq 'off') {
         $layout{'rows'} = "1,250,*";
     } else {
         $layout{'rows'} = "1,70,*";
     }
   my $js ='    my $js ='
 <script type="text/javascript">  <script type="text/javascript">
     var flag=0;      var flag=0;
Line 154  function idxopen(mode) { Line 158  function idxopen(mode) {
 function groupopen(url,recover,bookmarks) {  function groupopen(url,recover,bookmarks) {
    var options="scrollbars=1,resizable=1,menubar=0";     var options="scrollbars=1,resizable=1,menubar=0";
    idxflag=1;     idxflag=1;
    idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);  idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);
    idx.focus();     idx.focus();
 }  }
   
Line 549  ENDJS Line 553  ENDJS
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({      &Apache::lonhtmlcommon::add_breadcrumb({
         text  => 'Construction Space',          text  => 'Construction Space',
         href  => &Apache::loncommon::authorspace(),          href  => &Apache::loncommon::authorspace($url),
         faq   => 6,          faq   => 6,
         bug   => 'RAT',          bug   => 'RAT',
         help  => 'Sequence_Simple_Editor_Creation',});          help  => 'Sequence_Simple_Editor_Creation',});
Line 645  ENDSMPHEAD Line 649  ENDSMPHEAD
 # ----------------------------------------------------------------- No such dir  # ----------------------------------------------------------------- No such dir
 sub nodir {  sub nodir {
    my ($r,$dir)=@_;     my ($r,$dir)=@_;
    $dir=~s{^/home/$LONCAPA::username_re/public_html}{};     my $londocroot = $r->dir_config('lonDocRoot');
    my $brcrum = [{'href' => &Apache::loncommon::authorspace(),     my ($path) = ($dir =~ m{^\Q$londocroot\E?(/priv/[^/]+/[^/]+/)});
      $dir=~s{^\Q$londocroot/priv/\E[^/]+/[^/]+}{};
      my $brcrum = [{'href' => &Apache::loncommon::authorspace($path),
                   'text' => 'Construction Space'}];                    'text' => 'Construction Space'}];
 #                 {'href' => '',  #                 {'href' => '',
 #                  'text' => 'No such directory'}];  #                  'text' => 'No such directory'}];
Line 670  sub viewmap { Line 676  sub viewmap {
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({      &Apache::lonhtmlcommon::add_breadcrumb({
         text  => 'Construction Space',          text  => 'Construction Space',
         href  => &Apache::loncommon::authorspace(),          href  => &Apache::loncommon::authorspace($url),
         faq   => 6,          faq   => 6,
         bug   => 'RAT',          bug   => 'RAT',
         help  => 'Sequence_Simple_Editor_Creation',});          help  => 'Sequence_Simple_Editor_Creation',});
Line 725  sub viewmap { Line 731  sub viewmap {
                 $filename = $1;                  $filename = $1;
             }              }
             my $cstrurl = $resurl;              my $cstrurl = $resurl;
             $cstrurl =~ s#^/res/[^/]+/([^/]+)/#/priv/$1/#;              $cstrurl =~ s{^/res/}{/priv/};
             $r->print(&Apache::loncommon::start_data_table_row()              $r->print(&Apache::loncommon::start_data_table_row()
                      .'<td>'                       .'<td>'
                      .'<img src="'.&Apache::loncommon::icon($resfilepath).'" />'                       .'<img src="'.&Apache::loncommon::icon($resfilepath).'" />'

Removed from v.1.99  
changed lines
  Added in v.1.105.2.1


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