[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonindexer.pm

raeburn raeburn at source.lon-capa.org
Fri May 25 19:21:44 EDT 2012


raeburn		Fri May 25 23:21:44 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonindexer.pm 
  Log:
  - For 2.11
    - Reverse 1.213.4.1.  Stored Links ("Wishlist") in 2.11.
    - Backport 1.214. 
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.213.4.1 loncom/interface/lonindexer.pm:1.213.4.2
--- loncom/interface/lonindexer.pm:1.213.4.1	Mon May  7 05:15:00 2012
+++ loncom/interface/lonindexer.pm	Fri May 25 23:21:44 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.213.4.1 2012/05/07 05:15:00 raeburn Exp $
+# $Id: lonindexer.pm,v 1.213.4.2 2012/05/25 23:21:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -166,6 +166,7 @@
        $r->print(&Apache::loncommon::start_page(undef,$js,
 						{'only_body'   =>1,
                                                  'add_modal' => 1,
+                                                 'add_wishlist' => 1,
 						 'add_entries' =>
 						     {'onload' => "load();"},}
 						).
@@ -416,7 +417,7 @@
         if ($env{'form.catalogmode'}) {
             # "Popup mode"
             $r->print(&Apache::loncommon::start_page('Browse published resources',$js,
-                                                     {'only_body' => 1, 'add_modal' =>1, 
+                                                     {'only_body' => 1, 'add_wishlist'=>1, 'add_modal' =>1, 
                                                       'domain' => $headerdom,}));
         } else {
             # Only display page header and breadcrumbs in non-popup mode
@@ -591,6 +592,7 @@
         $r->print(&Apache::loncommon::start_data_table("LC_tableBrowseRes")
                  .&Apache::loncommon::start_data_table_header_row());
 	$r->print("<th $colspan>".&mt('Name')."</th>\n");
+	$r->print("<th></th>\n");
 	$r->print("<th>".&mt('Title')."</th>\n") 
 	    if ($hash{'display_attrs_0'} == 1);
 	$r->print('<th class="LC_right">'.&mt("Size")." (".&mt("bytes").") ".
@@ -937,7 +939,7 @@
 	$r->print ('<a href="#" onclick="document.dirpathUP.submit()"><img src="'.$iconpath.'arrow.up.gif"');
 	$r->print (' alt="'.$msg.'" class="LC_fileicon" />'.
 		   "\n");
-	$r->print(&mt("Up")."</a></form>$tabtag");
+	$r->print(&mt("Up")."</a></form></td><td>$tabtag");
         $r->print(&Apache::loncommon::end_data_table_row());
 	return OK;
     }
@@ -972,7 +974,7 @@
 	    $r->print("<br />(".&Apache::lonnet::domain($listname,'description').
 		      ")");
 	}
-	$r->print("</form>$tabtag");
+	$r->print("</form></td><td>$tabtag");
          $r->print(&Apache::loncommon::end_data_table_row());
 	return OK;
 
@@ -1004,7 +1006,12 @@
         $r->print ($listname.'</a>');
 
         if (defined($plainname) && $plainname) { $r->print(" ($plainname) "); }
-        $r->print('</form></td>');
+# Wishlistlink
+        $r->print('</form></td><td><a href="javascript:;" '.
+                  'title="'.&mt('Save a link for this folder in your personal Stored Links repository').'" '.
+                  'onclick="set_wishlistlink('."'$plainname','$startdir$listname'".')">'.
+                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
+                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a>'.$tabtag);
         $r->print(&Apache::loncommon::end_data_table_row());
         return OK;
     }
@@ -1095,6 +1102,12 @@
 	    $r->print('</form>');
 	}
 	$r->print("</td>\n");
+# Wishlistlink
+        $r->print('<td><a href="javascript:;" title="'.&mt('Save a link for this resource in your personal Stored Links repository').'" '.
+                  'onclick="set_wishlistlink('."'".&Apache::lonnet::gettitle($filelink).
+                  "','$startdir$listname'".')">'.
+                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
+                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a></td>');
 	if ($hash{'display_attrs_0'} == 1) {
 	    $r->print('<td> '.($title eq '' ? ' ' : $title).
 		      ' </td>'."\n");
@@ -1243,7 +1256,12 @@
                   .$location.'/'.$icon.'" />'
                   ."\n");
 	$r->print ("$listname</a></form>");
-        $r->print('</td>');
+# Wishlistlink
+        $r->print('</td><td><a href="javascript:;" '.
+                  'title="'.&mt('Save a link for this folder in Stored Links').'" '.
+                  'onclick="set_wishlistlink('."'$listname','$startdir$listname'".')">'.
+                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
+                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a></td>');
 # Attributes
 	my $filelink = $startdir.$filecom[0].'/default';
 




More information about the LON-CAPA-cvs mailing list