--- loncom/interface/londocs.pm 2003/10/22 19:47:52 1.87 +++ loncom/interface/londocs.pm 2004/02/05 15:19:41 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.87 2003/10/22 19:47:52 www Exp $ +# $Id: londocs.pm,v 1.103 2004/02/05 15:19:41 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -402,33 +402,34 @@ sub entryline { $renametitle=~s/\"\;/\\\"/g; my $line='
-![]() |
-![]() |
$lt{'fi'} | $lt{'md'} | $lt{'mr'} | -$lt{'ve'} | $lt{'vu'} | $lt{'di'} |
---|
'.$linkurl. - ' | '. - &Apache::lonlocal::locallocaltime($changes{$_}).' | '. - $currentversion.' | '); + foreach (sort keys %changes) { + if ($changes{$_}>$starttime) { + my ($root,$extension)=($_=~/^(.*)\.(\w+)$/); + my $currentversion=&Apache::lonnet::getversion($_); + if ($currentversion<0) { + $currentversion=&mt('Could not be determined.'); + } + my $linkurl=&Apache::lonnet::clutter($_); + $r->print( + ' | |||
'. + &Apache::lonnet::gettitle($linkurl). + ' | ||||||
'. + ' | '. + ''.$linkurl. + ' | |||||
'. + ' | '. + &Apache::lonlocal::locallocaltime( + &Apache::lonnet::metadata($root.'.'.$extension, + 'lastrevisiondate') + ). + ' | '. + ''); + my $usedversion=$hash{'version_'.$linkurl}; + if (($usedversion) && ($usedversion ne 'mostrecent')) { + $r->print($usedversion); + } else { + $r->print($currentversion); + } + $r->print(' | '.
+ ' | '); - my $lastold=1; - for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { - my $url=$root.'.'.$prevvers.'.'.$extension; - if (&Apache::lonnet::metadata($url,'lastrevisiondate')< - $starttime) { - $lastold=$prevvers; - } - } + $r->print(&Apache::loncommon::select_form($setversions{$linkurl}, + 'set_version_'.$linkurl, + ('' => '', + 'mostrecent' => 'most recent', + map {$_,$_} (1..$currentversion)))); + $r->print(' | ||
'); + my $lastold=1; + for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { + my $url=$root.'.'.$prevvers.'.'.$extension; + if (&Apache::lonnet::metadata($url,'lastrevisiondate')< + $starttime) { + $lastold=$prevvers; + } + } + # + # Code to figure out how many version entries should go in + # each of the four columns + my $entries_per_col = 0; + my $num_entries = ($currentversion-$lastold); + if ($num_entries % 4 == 0) { + $entries_per_col = $num_entries/4; + } else { + $entries_per_col = $num_entries/4 + 1; + } + my $entries_count = 0; + $r->print(' | ');
+ my $cols_output = 1;
for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
- my $url=$root.'.'.$prevvers.'.'.$extension;
- $r->print(''.&mt('Version').' '.$prevvers.' ('.
- &Apache::lonlocal::locallocaltime(&Apache::lonnet::metadata($url,'lastrevisiondate')).
- ')');
- if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ $r->print(' '); - } - $r->print(' |
'.&mt('No content modifications yet.').'
'); - } - &untiehash(); + &Apache::lonnet::clutter($root.'.'.$extension). + '&versionone='.$prevvers. + '">'.&mt('Diffs').''); + } + $r->print('$lt{'spec'} |
---|
-File: +$lt{'file'}: + |