version 1.176, 2007/08/17 18:14:37
|
version 1.181, 2008/08/01 14:53:42
|
Line 477 ENDHEADER
|
Line 477 ENDHEADER
|
</tr> |
</tr> |
</table> |
</table> |
<input type="hidden" name="attrs" value="1" /> |
<input type="hidden" name="attrs" value="1" /> |
<label> |
|
END |
END |
$r->print(&Apache::loncommon::filecategoryselect('only',$typeselect)); |
my @file_categories = &Apache::loncommon::filecategories(); |
$r->print(<<END); |
my %select_file_categories; |
File Type Displayed</label> |
my @select_form_order = (''); |
|
$select_file_categories{''} = &mt('All file types'); |
|
foreach my $cat (@file_categories) { |
|
my $types = join(",",&Apache::loncommon::filecategorytypes($cat)); |
|
$select_file_categories{$types} = $cat; |
|
push(@select_form_order,$types); |
|
} |
|
$select_file_categories{'select_form_order'} = \@select_form_order; |
|
my $type_element= |
|
&Apache::loncommon::select_form($typeselect,'only', |
|
%select_file_categories); |
|
$type_element = '<label>'.&mt('File Type Displayed: [_1]', |
|
$type_element).'</label>'; |
|
$r->print(<<END); |
|
$type_element |
<br /> |
<br /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="hidden" name="acts" value="" /> |
<input type="hidden" name="acts" value="" /> |
$closebutton $groupimportbutton |
$closebutton $groupimportbutton |
END |
END |
$r->print(&Apache::loncommon::inhibit_menu_check('input')); |
$r->print(&Apache::loncommon::inhibit_menu_check('input')); |
|
|
# -------------- Filter out sequence containment in crumbs and "recent folders" |
# -------------- Filter out sequence containment in crumbs and "recent folders" |
my $storeuri=$uri; |
my $storeuri=$uri; |
$storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1]; |
$storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1]; |
Line 643 sub scanDir {
|
Line 657 sub scanDir {
|
next if($strip =~ /.*\.meta$/ | $obs eq '1'); |
next if($strip =~ /.*\.meta$/ | $obs eq '1'); |
my (@fileparts) = split(/\./,$strip); |
my (@fileparts) = split(/\./,$strip); |
if ($hash{'display_attrs_9'} != 1) { |
if ($hash{'display_attrs_9'} != 1) { |
# if not all versions to be shown |
# if not all versions to be shown |
if (scalar(@fileparts) >= 3) { |
if (scalar(@fileparts) >= 3) { |
my $fext = pop @fileparts; |
my $fext = pop @fileparts; |
my $ov = pop @fileparts; |
my $ov = pop @fileparts; |
Line 921 sub display_line {
|
Line 935 sub display_line {
|
my @file_ext = split (/\./,$listname); |
my @file_ext = split (/\./,$listname); |
my $curfext = $file_ext[-1]; |
my $curfext = $file_ext[-1]; |
if (@Omit) { |
if (@Omit) { |
foreach (@Omit) { return OK if ($curfext eq $_); } |
foreach (@Omit) { return OK if (lc($curfext) eq $_); } |
} |
} |
if (@Only) { |
if (@Only) { |
my $skip = 1; |
my $skip = 1; |
foreach (@Only) { $skip = 0 if ($curfext eq $_); } |
foreach (@Only) { $skip = 0 if (lc($curfext) eq $_); } |
return OK if ($skip > 0); |
return OK if ($skip > 0); |
} |
} |
# Set the icon for the file |
# Set the icon for the file |
Line 1000 sub display_line {
|
Line 1014 sub display_line {
|
&Apache::loncommon::inhibit_menu_check(\$quotable_filelink); |
&Apache::loncommon::inhibit_menu_check(\$quotable_filelink); |
$r->print (" (<a href=\"javascript:openWindow('".$quotable_filelink. |
$r->print (" (<a href=\"javascript:openWindow('".$quotable_filelink. |
"?inhibitmenu=yes','metadatafile','500','550','no','yes','no');\" ". |
"?inhibitmenu=yes','metadatafile','500','550','no','yes','no');\" ". |
" target=\"_self\">metadata</a>) "); |
" target=\"_self\">".&mt('metadata')."</a>) "); |
# Close form to open/close sequence |
# Close form to open/close sequence |
if ($filelink=~/\.(page|sequence)$/) { |
if ($filelink=~/\.(page|sequence)$/) { |
$r->print('</form>'); |
$r->print('</form>'); |
Line 1014 sub display_line {
|
Line 1028 sub display_line {
|
$filecom[8]," </td>\n") |
$filecom[8]," </td>\n") |
if $hash{'display_attrs_1'} == 1; |
if $hash{'display_attrs_1'} == 1; |
$r->print('<td> '. |
$r->print('<td> '. |
(localtime($filecom[9]))." </td>\n") |
(&Apache::lonlocal::locallocaltime($filecom[9]))." </td>\n") |
if $hash{'display_attrs_2'} == 1; |
if $hash{'display_attrs_2'} == 1; |
$r->print('<td> '. |
$r->print('<td> '. |
(localtime($filecom[10]))." </td>\n") |
(&Apache::lonlocal::locallocaltime($filecom[10]))." </td>\n") |
if $hash{'display_attrs_3'} == 1; |
if $hash{'display_attrs_3'} == 1; |
|
|
if ($hash{'display_attrs_4'} == 1) { |
if ($hash{'display_attrs_4'} == 1) { |
Line 1066 sub display_line {
|
Line 1080 sub display_line {
|
$r->print('<td>'."<a href=\"javascript:openWindow('" |
$r->print('<td>'."<a href=\"javascript:openWindow('" |
.$quotable_sourcelink. |
.$quotable_sourcelink. |
"', 'previewsource', '700', '700', 'no', 'yes','yes');\"". |
"', 'previewsource', '700', '700', 'no', 'yes','yes');\"". |
" target=\"_self\">Yes</a> "."</td>\n"); |
" target=\"_self\">".&mt('Source Code')."</a> "."</td>\n"); |
} else { #A cuddled else. :P |
} else { #A cuddled else. :P |
$r->print("<td> </td>\n"); |
$r->print("<td> </td>\n"); |
} |
} |
Line 1139 sub display_line {
|
Line 1153 sub display_line {
|
$filecom[8]," </td>\n") |
$filecom[8]," </td>\n") |
if $hash{'display_attrs_1'} == 1; |
if $hash{'display_attrs_1'} == 1; |
$r->print('<td> '. |
$r->print('<td> '. |
(localtime($filecom[9]))." </td>\n") |
(&Apache::lonlocal::locallocaltime($filecom[9]))." </td>\n") |
if $hash{'display_attrs_2'} == 1; |
if $hash{'display_attrs_2'} == 1; |
$r->print('<td> '. |
$r->print('<td> '. |
(localtime($filecom[10]))." </td>\n") |
(&Apache::lonlocal::locallocaltime($filecom[10]))." </td>\n") |
if $hash{'display_attrs_3'} == 1; |
if $hash{'display_attrs_3'} == 1; |
|
|
if ($hash{'display_attrs_4'} == 1) { |
if ($hash{'display_attrs_4'} == 1) { |