--- loncom/publisher/lonpubdir.pm 2005/01/24 21:55:20 1.76 +++ loncom/publisher/lonpubdir.pm 2005/02/28 08:22:09 1.77 @@ -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 @@ sub startpage { 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 @@ sub startpage { $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 @@ sub putdirectory { '<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 @@ sub putresource { # $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 @@ sub putresource { &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>'; + '&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 @@ sub create_pubselect { $$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 ++; }