Diff for /rat/lonratedt.pm between versions 1.101 and 1.105.2.3

version 1.101, 2010/08/24 09:11:40 version 1.105.2.3, 2012/12/16 16:02:15
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 72  ENDDOCUMENT Line 76  ENDDOCUMENT
   
 sub buttons {  sub buttons {
     my $adv=shift;      my $adv=shift;
     my $output='<form method="post">';           my $output='<form method="post" action="">';     
     if ($adv==1) {      if ($adv==1) {
         $output.=          $output.=
             '<input type="submit" name="forceadv"'              '<input type="submit" name="forceadv"'
Line 154  function idxopen(mode) { Line 158  function idxopen(mode) {
 function groupopen(url,recover) {  function groupopen(url,recover) {
    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,"idxout",options);  idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url,"idxout",options);
    idx.focus();     idx.focus();
 }  }
   
Line 491  sub smpedt { Line 495  sub smpedt {
       'nt' => 'New Title',        'nt' => 'New Title',
       'se' => 'Search',        'se' => 'Search',
       'im' => 'Import',        'im' => 'Import',
                                       'wl' => 'Import from Wishlist',                                        'wl' => 'Import from Stored Links',
       'vi' => 'View',        'vi' => 'View',
       'lm' => 'Load Map',        'lm' => 'Load Map',
       'ds' => 'Discard Selected',        'ds' => 'Discard Selected',
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 572  ENDJS Line 576  ENDJS
     $r->print(<<ENDSMPHEAD);      $r->print(<<ENDSMPHEAD);
 $start_page  $start_page
 <span class="LC_error">$errtext</span>  <span class="LC_error">$errtext</span>
 <form name="simpleedit" method="post">  <form name="simpleedit" method="post" action="">
 <input type="hidden" name="forcesmp" value="1" />  <input type="hidden" name="forcesmp" value="1" />
 <input type="hidden" name="renameres" value="0" />  <input type="hidden" name="renameres" value="0" />
 <input type="hidden" name="renametitle" value="" />  <input type="hidden" name="renametitle" value="" />
Line 582  $start_page Line 586  $start_page
 <th>&nbsp;</th>  <th>&nbsp;</th>
 <th width="40%">File: $url</th></tr>  <th width="40%">File: $url</th></tr>
 <tr><td bgcolor="#FFFFCC">  <tr><td bgcolor="#FFFFCC">
 <input type="button" onClick="javascript:groupsearch()" value="$lt{'se'}" />  <input type="button" onclick="javascript:groupsearch()" value="$lt{'se'}" />
 <input type="button" onClick="javascript:groupimport();" value="$lt{'im'}" />  <input type="button" onclick="javascript:groupimport();" value="$lt{'im'}" />
 $lt{'as'}  $lt{'as'}
 <hr />  <hr />
 <input type="text" size="20" name="importmap" />  <input type="text" size="20" name="importmap" />
 <input type="button"   <input type="button" 
 onClick="javascript:openbrowser('simpleedit','importmap','sequence,page','')"  onclick="javascript:openbrowser('simpleedit','importmap','sequence,page','')"
 value="Select Map" /><input type="submit" name="loadmap" value="$lt{'lm'}" /><hr />  value="Select Map" /><input type="submit" name="loadmap" value="$lt{'lm'}" /><hr />
 <input type="submit" name="discard" value="$lt{'ds'}" />  <input type="submit" name="discard" value="$lt{'ds'}" />
 <input type="submit" name="clear" value="$lt{'ca'}" />  <input type="submit" name="clear" value="$lt{'ca'}" />
 <input type="button" onClick="javascript:viewimport()" value="$lt{'vi'}" />  <input type="button" onclick="javascript:viewimport()" value="$lt{'vi'}" />
   
     </td><td>&nbsp;</td><td bgcolor="#FFFFCC">      </td><td>&nbsp;</td><td bgcolor="#FFFFCC">
   
 <input type="button" onClick=  <input type="button" onclick=
 "javascript:impfortarget.value=1;groupsearch()" value="$lt{'se'}" />  "javascript:impfortarget.value=1;groupsearch()" value="$lt{'se'}" />
 <input type="button" onClick=  <input type="button" onclick=
 "javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}" />  "javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}" />
 <input type="button" onClick=  <input type="button" onclick=
 "javascript:impfortarget.value=1;open_Wishlist_Import('simple');" value="$lt{'wl'}" />  "javascript:impfortarget.value=1;open_StoredLinks_Import('simple');" value="$lt{'wl'}" />
 <input type="button" onClick=  <input type="button" onclick=
 "javascript:impfortarget.value=1;groupopen('$url',1);" value="$lt{'reco'}" />  "javascript:impfortarget.value=1;groupopen('$url',1);" value="$lt{'reco'}" />
 $lt{'as'}  $lt{'as'}
 <hr />  <hr />
 <input type="submit" name="moveup" value="$lt{'mu'}" />  <input type="submit" name="moveup" value="$lt{'mu'}" />
 <input type="submit" name="movedown" value="$lt{'md'}" />  <input type="submit" name="movedown" value="$lt{'md'}" />
 <input type="button" onClick="javascript:renametarget()" value="$lt{'re'}" />  <input type="button" onclick="javascript:renametarget()" value="$lt{'re'}" />
 <hr />$targetmsg  <hr />$targetmsg
 <input type="submit" name="revert" value="$lt{'rv'}" />  <input type="submit" name="revert" value="$lt{'rv'}" />
 <input type="submit" name="save" value="$lt{'sa'}" />  <input type="submit" name="save" value="$lt{'sa'}" />
 <input type="button" onClick="javascript:viewtarget()" value="$lt{'vi'}" />  <input type="button" onclick="javascript:viewtarget()" value="$lt{'vi'}" />
 </td></tr>  </td></tr>
   
 <tr><td bgcolor="#FFFFCC"><select name="importsel" size="10" multiple="multiple">  <tr><td bgcolor="#FFFFCC"><select name="importsel" size="10" multiple="multiple">
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).'" alt="" />'
                      .'</td>'                       .'</td>'
                      .'<td>'                       .'<td>'
                      .&HTML::Entities::encode(&LONCAPA::map::qtescape($title))                       .&HTML::Entities::encode(&LONCAPA::map::qtescape($title))

Removed from v.1.101  
changed lines
  Added in v.1.105.2.3


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