[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm
banghart
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 01 Aug 2007 21:12:14 -0000
banghart Wed Aug 1 17:12:14 2007 EDT
Modified files:
/loncom/interface lonindexer.pm
Log:
Start of filtering by file type. Works, but needs better
interface. Bug 2633
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.173 loncom/interface/lonindexer.pm:1.174
--- loncom/interface/lonindexer.pm:1.173 Wed Jul 18 09:39:31 2007
+++ loncom/interface/lonindexer.pm Wed Aug 1 17:12:12 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.173 2007/07/18 13:39:31 banghart Exp $
+# $Id: lonindexer.pm,v 1.174 2007/08/01 21:12:12 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -135,6 +135,11 @@
untie(%dbfile);
}
}
+# - Evaluate actions from previous page (both cumulatively and chronologically)
+ if ($env{'form.catalogmode'} eq 'import' || $hash{'form.catalogmode'} eq 'import') {
+ &Apache::groupsort::update_actions_hash(\%hash);
+ }
+
{
#Hijack lonindexer to verify a title and be close down.
if ($env{'form.launch'} eq '2') {
@@ -401,11 +406,6 @@
my ($headerdom)=($uri=~m{^/res/($match_domain)/});
$r->print(&Apache::loncommon::start_page('Browse Resources',$js,
{'domain' => $headerdom,}));
-# - Evaluate actions from previous page (both cumulatively and chronologically)
- if ($env{'form.catalogmode'} eq 'import') {
- &Apache::groupsort::update_actions_hash(\%hash);
- }
-
# ---------------------------------- get state of file attributes to be showing
if ($env{'form.attrs'}) {
for (my $i=0; $i<=11; $i++) {
@@ -437,7 +437,10 @@
'sr' => 'Show resource',
'li' => 'Linked/Related Resources',
'av' => 'All versions',
- 'ud' => 'Update Display'
+ 'ud' => 'Update Display',
+ 'pr' => 'Problems',
+ 'gr' => 'Graphics',
+ 'at' => 'All types'
);
$r->print(<<END);
<form method="post" name="fileattr" action="$uri"
@@ -464,6 +467,12 @@
</tr>
</table>
<input type="hidden" name="attrs" value="1" />
+<input type="hidden" name="only" value="" />
+<label><input type="checkbox" name="problem" value="problem" onClick="this.form.only.value += 'problem';this.form.submit();" />$lt{'pr'}</label>
+<label><input type="checkbox" name="graphic" value="gif,jpg,jpeg" onClick="this.form.only.value += ',gif,jpg,jpg';this.form.submit();" />$lt{'gr'}</label>
+<label><input type="checkbox" name="all" value="" onClick="this.form.only.value = '';this.form.submit();" />$lt{'at'}</label>
+
+<br />
<input type="submit" name="updatedisplay" value="$lt{'ud'}" />
<input type="hidden" name="acts" value="" />
$closebutton $groupimportbutton