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

raeburn raeburn at source.lon-capa.org
Fri May 25 18:40:43 EDT 2012


raeburn		Fri May 25 22:40:43 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonsearchcat.pm 
  Log:
  - For 2.11.
    - Reverse changes in 1.331.4.1. Stored Links ('Wishlist') in 2.11. 
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.331.4.1 loncom/interface/lonsearchcat.pm:1.331.4.2
--- loncom/interface/lonsearchcat.pm:1.331.4.1	Thu May 10 18:34:18 2012
+++ loncom/interface/lonsearchcat.pm	Fri May 25 22:40:43 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.331.4.1 2012/05/10 18:34:18 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.331.4.2 2012/05/25 22:40:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -78,6 +78,7 @@
 use Parse::RecDescent;
 use Apache::lonnavmaps;
 use Apache::lonindexer();
+use Apache::lonwishlist();
 use LONCAPA;
 
 ######################################################################
@@ -3063,7 +3064,8 @@
 SCRIPT
 
     my $start_page  = &Apache::loncommon::start_page(undef,$js,
-						     {'only_body' =>1,});
+						     {'only_body' =>1,
+                                                      'add_wishlist' =>1});
     my $result=<<END;
 $start_page
 <form name="results" method="post" action="/adm/searchcat">
@@ -3182,7 +3184,11 @@
     $result .= '<b>'.$prefix.
         '<img src="'.&Apache::loncommon::icon($values{'url'}).'" alt="" />'.' '.
         '<a href="'.$jumpurl.'?inhibitmenu=yes" '.
-        'target="preview">'.$values{'title'}."</a></b>\n";
+        'target="preview">'.$values{'title'}."</a></b>\n".
+        '<a href="javascript:;" onclick="set_wishlistlink('."'$values{'title'}','$jumpurl'".')" '.
+        'title="'.&mt('Set link to wishlist').'">'.
+        '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
+        'alt="set wishlistlink" style="width:22px;"/></a>';
     $result .= "<p>\n";
     $result .= '<b>'.$values{'author'}.'</b>,'.
         ' <i>'.$values{'owner'}.'</i><br />';
@@ -3313,9 +3319,15 @@
     $jumpurl=~s|^/ext/|http://|;
     my $link = '<br />'.&display_url($jumpurl,1).'<br />';
 
+    my $titleWL = &mt('Set link to wishlist');
     $result.=<<END;
 <a href="$jumpurl?inhibitmenu=yes" 
    target="preview">$values{'title'}</a>
+<a href="javascript:;" onclick="set_wishlistlink('$values{'title'}','$jumpurl')" 
+   title="$titleWL">
+   <img class="LC_icon" src="/res/adm/pages/wishlist.png"
+        alt="set wishlistlink" style="width:22px;"/>
+</a>
 <br />
 $link<br />
 $values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}<br />
@@ -3362,6 +3374,11 @@
     $result.=' <span class="LC_nobreak">'.
 	'<a href="'.$jumpurl.'?inhibitmenu=yes" target="preview">'.
         &HTML::Entities::encode($values{'title'},'<>&"').'</a></span> '.
+        '<a href="javascript:;" onclick="set_wishlistlink('."'$values{'title'}','$jumpurl'".')" '.
+        'title="'.&mt('Set link to wishlist').'">'.
+        '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
+        'alt="set wishlistlink" style="width:22px;"/>'.
+        '</a>'.
 	$link.' <b>'.$values{'author'}.'</b> ('.$values{'domain'}.')';
     return $result;
 }
@@ -3403,12 +3420,18 @@
     my $jumpurl=$values{'url'};
     $jumpurl=~s|^/ext/|http://|;
 
+    my $titleWL = ('Set link to wishlist');
     my $result=<<END;
 $prefix <img src="$icon" alt="" />
 <dl>
 <dt>URL:</dt>
     <dd><a href="$jumpurl?inhibitmenu=yes" 
          target='preview'>$values{'url'}</a>
+         <a href="javascript:;" onclick="set_wishlistlink('$values{'title'}','$jumpurl')"
+            title="$titleWL">
+            <img class="LC_icon" src="/res/adm/pages/wishlist.png"
+            alt="set wishlistlink" style="width:22px;"/>
+         </a>
     </dd>
 END
     foreach my $field ('title','author','domain','subject','keywords','notes',




More information about the LON-CAPA-cvs mailing list