--- loncom/interface/lonmenu.pm 2012/05/24 23:36:17 1.369.2.6
+++ loncom/interface/lonmenu.pm 2012/08/01 12:30:39 1.369.2.14
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.6 2012/05/24 23:36:17 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.14 2012/08/01 12:30:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -179,6 +179,7 @@ use Apache::lonlocal;
use Apache::lonmsg();
use LONCAPA qw(:DEFAULT :match);
use HTML::Entities();
+use Apache::lonwishlist();
use vars qw(@desklines %category_names %category_members %category_positions
$readdesk @primary_menu %primary_submenu @secondary_menu %secondary_submenu);
@@ -259,7 +260,7 @@ sub primary_menu {
if (@primsub > 0) {
$menu .= &create_submenu($link,$target,$title,\@primsub);
} elsif ($link) {
- $menu .= '
'.$title.'';
+ $menu .= ''.&mt($title).'';
}
}
} elsif ($$menuitem[3] eq 'Help') { # special treatment for helplink
@@ -389,7 +390,7 @@ sub secondary_menu {
if (@scndsub > 0) {
$menu .= &create_submenu($link,$target,$title,\@scndsub);
} elsif ($link) {
- $menu .= ''.$title.'';
+ $menu .= ''.&mt($title).'';
}
}
} elsif ($$menuitem[3] eq 'Roles' && $env{'request.course.id'}) {
@@ -431,9 +432,13 @@ sub secondary_menu {
sub create_submenu {
my ($link,$target,$title,$submenu) = @_;
return unless (ref($submenu) eq 'ARRAY');
+ my $disptarget;
+ if ($target ne '') {
+ $disptarget = ' target="'.$target.'"';
+ }
my $menu = ''.
- ''.
- ''.$title.
+ ''.
+ ''.&mt($title).
''.
' ▼'.
'';
}
}
$menu .= '';
@@ -736,9 +740,14 @@ c&6&3
c&8&1
c&8&2
s&8&3&prt.png&Print&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document
-s&9&1&sbkm.png&Bookmark&set[_1]bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1
-
ENDMENUITEMS
+ if (&Apache::lonnet::allowed('bre', $env{'request.course.id'}) eq 'F' && $env{'request.uri'} =~ /^\/res/) {
+ # wishlist is only available for users with access to resource-pool
+ # and links can only be set for resources within the resource-pool
+ $menuitems .= (<