[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm

bisitz bisitz@source.lon-capa.org
Tue, 06 Oct 2009 10:31:41 -0000


bisitz		Tue Oct  6 10:31:41 2009 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  - Header:
      - Added breadcrumbs to Unactionable Search Query for standard (non-popup) mode
      - Corrected heading typo
  - Close button:
      - XHTML: <input> closure
      - Only show <hr> when close button is shown
      - Wrapped close button in <p>
  - Added missing <form> closure
  - Import button: XHTML: <input> closure
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.314 loncom/interface/lonsearchcat.pm:1.315
--- loncom/interface/lonsearchcat.pm:1.314	Fri Jul 31 17:58:16 2009
+++ loncom/interface/lonsearchcat.pm	Tue Oct  6 10:31:41 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.314 2009/07/31 17:58:16 bisitz Exp $
+# $Id: lonsearchcat.pm,v 1.315 2009/10/06 10:31:41 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -268,23 +268,23 @@
     if ($env{'form.catalogmode'} eq 'interactive') {
         $closebutton="<input type='button' name='close' value='".&mt('Close')."' ";
         if ($env{'form.phase'} =~ /(results|run_search)/) {
-	    $closebutton .="onclick='parent.close()'";
+            $closebutton .="onclick='parent.close()'";
         } else {
             $closebutton .="onclick='self.close()'";
         }
-        $closebutton .=">\n";
+        $closebutton .=" />\n";
     } elsif ($env{'form.catalogmode'} eq 'import') {
         $closebutton="<input type='button' name='close' value='".&mt('Close')."' ";
         if ($env{'form.phase'} =~ /(results|run_search)/) {
-	    $closebutton .="onclick='parent.close()'";
+            $closebutton .="onclick='parent.close()'";
         } else {
             $closebutton .="onclick='self.close()'";
         }
-        $closebutton .= ">";
+        $closebutton .= " />";
         my $txt_import = &mt('IMPORT');
         $importbutton=<<END;
 <input type='button' name='import' value='$txt_import'
-onclick='javascript:select_group()'>
+onclick='javascript:select_group()' />
 END
     } else {
         $closebutton = '';
@@ -3884,21 +3884,30 @@
     my ($r,$closebutton,$parms,$hidden_fields)=@_;
     my $errormsg = &mt('You did not fill in enough information for the search to be started. You need to fill in relevant fields on the search page in order for a query to be processed.');
     my $revise = &mt('Revise Search Request');
-    my $heading = &mt('Unactionable Search Queary');
+    my $heading = &mt('Unactionable Search Query');
     my $start_page = &Apache::loncommon::start_page('Search');
     my $end_page   = &Apache::loncommon::end_page();
+    if ($closebutton) {
+        $closebutton = '<p>'.$closebutton.'</p><hr />';
+    } else {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'',
+              text=>$heading,});
+        $start_page .= &Apache::lonhtmlcommon::breadcrumbs();
+    }
+
     $r->print(<<ENDPAGE);
 $start_page
 <form method="post" action="/adm/searchcat">
 $hidden_fields
 $closebutton
-<hr />
+</form>
 <h2>$heading</h2>
 <p class="LC_warning">
 $errormsg
 </p>
 <p>
-<a href="/adm/searchcat?$parms&amp;persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>&nbsp;
+<a href="/adm/searchcat?$parms&amp;persistent_db_id=$env{'form.persistent_db_id'}">$revise</a>
 </p>
 $end_page
 ENDPAGE