--- loncom/interface/lonindexer.pm 2009/03/17 23:11:20 1.192
+++ loncom/interface/lonindexer.pm 2009/07/17 15:42:07 1.199
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.192 2009/03/17 23:11:20 droeschl Exp $
+# $Id: lonindexer.pm,v 1.199 2009/07/17 15:42:07 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -184,7 +184,7 @@ ENDSUBM
$colspan=" colspan='2' ";
my $cl=&mt('Close');
$closebutton=<
+
END
}
elsif ($env{'form.catalogmode'} eq 'import') {
@@ -196,11 +196,11 @@ END
my $cl=&mt('Close');
my $gi=&mt('Import');
$closebutton=<
+
END
$groupimportbutton=<
+onclick="javascript:select_group()" />
END
}
# Additions made by Matthew to make the browser a little easier to deal
@@ -361,6 +361,7 @@ END
my $js = <<"ENDHEADER";
ENDHEADER
my ($headerdom)=($uri=~m{^/res/($match_domain)/});
- $r->print(&Apache::loncommon::start_page('Content Library',$js,
- {'domain' => $headerdom,}));
+
+ if ($env{'form.catalogmode'}) {
+ # "Popup mode"
+ $r->print(&Apache::loncommon::start_page('Browse published resources',$js,
+ {'only_body' => 1,
+ 'domain' => $headerdom,}));
+ } else {
+ # Only display page header and breadcrumbs in non-popup mode
+ &Apache::lonhtmlcommon::clear_breadcrumbs();
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ 'text' => 'Browse published resources',
+ 'href' => '/res/fhwfdev/?launch=1',
+ });
+ $r->print(&Apache::loncommon::start_page('Browse published resources',$js,
+ {'domain' => $headerdom,})
+ .&Apache::lonhtmlcommon::breadcrumbs()
+ );
+ }
+
# ---------------------------------- get state of file types to be showing
if ($env{'form.only'}) {
$typeselect = $env{'form.only'};
@@ -420,7 +439,7 @@ ENDHEADER
# ---------------------------------- get state of file attributes to be showing
if ($env{'form.attrs'}) {
- for (my $i=0; $i<=14; $i++) {
+ for (my $i=0; $i<=16; $i++) {
delete $hash{'display_attrs_'.$i};
if ($env{'form.attr'.$i} == 1) {
$attrchk[$i] = 'checked';
@@ -428,8 +447,8 @@ ENDHEADER
}
}
} else {
- for (my $i=0; $i<=14; $i++) {
- $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;
+ for (my $i=0; $i<=16; $i++) {
+ $attrchk[$i] = 'checked="checked"' if $hash{'display_attrs_'.$i} == 1;
}
}
@@ -448,6 +467,8 @@ ENDHEADER
'nt' => 'Notes',
'ab' => 'Abstract',
'ln' => 'Language',
+ 'gl' => 'Grade Level',
+ 'sd' => 'Standards',
'sa' => 'Source Available',
'sr' => 'Show resource',
'li' => 'Linked/Related Resources',
@@ -459,31 +480,33 @@ ENDHEADER
'hd' => 'Display Options'
);
$r->print(<
');
$r->print(<
$closebutton $groupimportbutton
@@ -541,8 +563,8 @@ END
&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
# -------------------------------------------------- Check All and Uncheck all
if ($env{'form.catalogmode'} eq 'import') {
- $r->print(' ');
- $r->print('');
+ $r->print(' ');
+ $r->print('');
}
# ----------------- output starting row to the indexed file/directory hierarchy
#$r->print(&initdebug());
@@ -581,6 +603,10 @@ END
if ($hash{'display_attrs_13'} == 1);
$r->print("
".&mt("Abstract")."
\n")
if ($hash{'display_attrs_14'} == 1);
+ $r->print("
".&mt("Grade Level")."
\n")
+ if ($hash{'display_attrs_15'} == 1);
+ $r->print("
".&mt("Standards")."
\n")
+ if ($hash{'display_attrs_16'} == 1);
$r->print(&Apache::loncommon::end_data_table_header_row());
@@ -850,7 +876,7 @@ sub display_line {
my $tabtag='';
my $i=0;
- while ($i<=14) {
+ while ($i<=16) {
$tabtag=join('',$tabtag,"
")
if ($i != 9 &&
$hash{'display_attrs_'.$i} == 1);
@@ -871,16 +897,16 @@ sub display_line {
$r->print("