[LON-CAPA-cvs] cvs: loncom /publisher lonconstruct.pm lonpubdir.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 28 Feb 2005 08:22:09 -0000


albertel		Mon Feb 28 03:22:09 2005 EDT

  Modified files:              
    /loncom/publisher	lonconstruct.pm lonpubdir.pm 
  Log:
  - yeah! well formed xml for directory listings
  
  
Index: loncom/publisher/lonconstruct.pm
diff -u loncom/publisher/lonconstruct.pm:1.28 loncom/publisher/lonconstruct.pm:1.29
--- loncom/publisher/lonconstruct.pm:1.28	Thu Feb 17 04:01:04 2005
+++ loncom/publisher/lonconstruct.pm	Mon Feb 28 03:22:09 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Page Wrapper for Construction
 #
-# $Id: lonconstruct.pm,v 1.28 2005/02/17 09:01:04 albertel Exp $
+# $Id: lonconstruct.pm,v 1.29 2005/02/28 08:22:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -127,16 +127,17 @@
        $toprows = '110';
        $topsrc = '/adm/localize/adm/publisher.html';
    }
+   my $html=&Apache::lonxml::xmlbegin();
    $r->print(<<ENDPAGE);
-<html>
+$html
 <head><title>LON-CAPA Construction Space</title>
-<script language="JavaScript">
+<script type="text/javascript">
 var lastknownpriv="$lowerframe";
 </script>
 </head>
 <frameset rows="$toprows,*" border="0">
-<frame src='$topsrc'>
-<frame src="$lowerframe" name="LONCAPAToBePublished">
+<frame src='$topsrc' />
+<frame src="$lowerframe" name="LONCAPAToBePublished" />
 </frameset>
 </html>
 ENDPAGE
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.76 loncom/publisher/lonpubdir.pm:1.77
--- loncom/publisher/lonpubdir.pm:1.76	Mon Jan 24 16:55:20 2005
+++ loncom/publisher/lonpubdir.pm	Mon Feb 28 03:22:09 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.76 2005/01/24 21:55:20 albertel Exp $
+# $Id: lonpubdir.pm,v 1.77 2005/02/28 08:22:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -191,8 +191,8 @@
     my $currdir = '/priv/'.$uname.$thisdisfn;
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
-
-    $r->print('<html><head><title>LON-CAPA Construction Space</title></head>');
+    my $html=&Apache::lonxml::xmlbegin();
+    $r->print($html.'<head><title>LON-CAPA Construction Space</title></head>');
 
     my $pagetitle;
     my $formaction='/priv/'.$uname.$thisdisfn.'/';
@@ -213,7 +213,7 @@
 	$r->print($pagetitle);
     }
     my $pubdirscript=(<<ENDPUBDIRSCRIPT);
-<script>
+<script type="text/javascript">
 top.document.title = '$thisdisfn/ - LON-CAPA Construction Space';
 // Store directory location for menu bar to find
 
@@ -514,7 +514,7 @@
                       '<option value="publish">'.&mt('Publish').'</option>'.
                       '<option value="publishsub">'.&mt('Publish with subdirectories').'</option>'.
                       '<option value="editcat">'.&mt('Edit catalog information').'</option>'.
-                      '<option value="printdir">'.&mt('Print directory').
+                      '<option value="printdir">'.&mt('Print directory').'</option>'.
                     '</select>'.
                      '<input type="hidden" name="filename" value="'.$dirpath.'/'.$dirname.'/" />'.
                      '<input type="hidden" name="openname" value="'.$here.'/'.$dirname.'/" />'.
@@ -575,7 +575,7 @@
 #		$action_buttons='';
 #	    }
 	    $title='<a href="/res/'.$targetdir.'/'.$filename.
-		'.meta" target=cat>'.
+		'.meta" target="cat">'.
 		&getTitleString($targetdir.'/'.$filename).'</a>';
 	} else {
             $pubstatus = 'modified';
@@ -584,17 +584,17 @@
 		&mt(&getSourceRightString($targetdir.'/'.$filename));
             $bgcolor='#FFFF77';
 #	    $action_buttons='';
-	    $title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target=cat>'.
+	    $title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target="cat">'.
 		&getTitleString($targetdir.'/'.$filename).'</a>';
 	    if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
 		$status.='<br /><a href="/adm/diff?filename=/~'.$uname.
 		    $thisdisfn.'/'.$filename.
-		    '&versiontwo=priv" target=cat>'.&mt('Diffs').'</a>';
+		    '&amp;versiontwo=priv" target="cat">'.&mt('Diffs').'</a>';
 	    }
 	}
-	$title.='<br /><a href="/~'.$uname.$thisdisfn.'/'.$filename.'.meta">'. 
+	$title.="\n".'<br /><a href="/~'.$uname.$thisdisfn.'/'.$filename.'.meta">'. 
 	    ($$bombs{$targetdir.'/'.$filename}?'<img src="/adm/lonMisc/bomb.gif" border="0" />':'Edit Metadata').'</a>';
-	$status.='<br><a href="/adm/retrieve?filename=/~'.$uname.
+	$status.="\n".'<br /><a href="/adm/retrieve?filename=/~'.$uname.
 	    $thisdisfn.'/'.$filename.'" target="_parent">'.&mt('Retrieve').'</a>';
     }
     my $editlink='';
@@ -632,29 +632,29 @@
     $$pub_select = '
 <form name="resselect_'.$$numres.'" action="">
 <select name="reschoice"  onChange="SetResChoice(this.form)">
-<option>'.&mt('Select action').
-'<option value="copy"/>'.&mt('Copy');
+<option>'.&mt('Select action').'</option>'.
+'<option value="copy">'.&mt('Copy').'</option>';
     if ($pubstatus eq 'obsolete' || $pubstatus eq 'unpublished') {
         $$pub_select .= 
-'<option value="rename"/>'.&mt('Rename').
-'<option value="move"/>'.&mt('Move').
-'<option value="delete"/>'.&mt('Delete');
+'<option value="rename">'.&mt('Rename').'</option>'.
+'<option value="move">'.&mt('Move').'</option>'.
+'<option value="delete">'.&mt('Delete').'</option>';
     } else {
         $$pub_select .= '
-<option value="obsolete"/>'.&mt('Mark obsolete');
+<option value="obsolete">'.&mt('Mark obsolete').'</option>';
     }
 # check for versions
     my $versions = &check_for_versions($r,'/'.$filename,$udom,$uname);
     if ($versions > 0) {
         $$pub_select .='
-<option value="retrieve"/>'.&mt('Retrieve old version');
+<option value="retrieve">'.&mt('Retrieve old version').'</option>';
     }
     $$pub_select .= '
-<option value="publish"/>'.$publish_button.
-'<option value="print"/>'.&mt('Print').
+<option value="publish">'.$publish_button.'</option>'.
+'<option value="print">'.&mt('Print').'</option>'.
 '</select>
 <input type="hidden" name="filename" value="/~'.
- $uname.$thisdisfn.'/'.$filename.'"></form>';
+ $uname.$thisdisfn.'/'.$filename.'" /></form>';
     $$numres ++;
 }