--- loncom/interface/lonmenu.pm 2012/05/24 23:36:17 1.369.2.6
+++ loncom/interface/lonmenu.pm 2012/05/25 23:47:16 1.369.2.8
@@ -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.8 2012/05/25 23:47:16 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'}) {
@@ -433,7 +434,7 @@ sub create_submenu {
return unless (ref($submenu) eq 'ARRAY');
my $menu = ''.
''.
- ''.$title.
+ ''.&mt($title).
''.
' ▼'.
'';
}
}
$menu .= '';
@@ -736,9 +737,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 .= (< 1});
- my $start_page_bookmark =
- &Apache::loncommon::start_page('Bookmarks',undef,
- {'only_body' => 1,
- 'js_ready' => 1,
- 'bgcolor' => '#BBBBBB',});
-
- my $end_page_bookmark =
- &Apache::loncommon::end_page({'js_ready' => 1});
-
my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.
&mt('Switch server?');
@@ -1531,13 +1534,6 @@ function group_chat(group) {
grpchat=window.open(url,winName,'height=320,width=280,resizable=yes,location=no,menubar=no,toolbar=no');
}
-function edit_bookmarks() {
- go('');
- w_BookmarkPal_flag=1;
- bookmarkpal=window.open("/adm/bookmarks",
- "BookmarkPal", "width=500,height=505,scrollbars=0");
-}
-
function annotate() {
w_Annotator_flag=1;
annotator=window.open('','Annotator','width=365,height=265,scrollbars=0');
@@ -1551,6 +1547,19 @@ function annotate() {
annotator.document.close();
}
+function open_StoredLinks_Import(rat) {
+ var newWin;
+ if (rat) {
+ newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import&rat='+rat,
+ 'wishlistImport','scrollbars=1,resizable=1,menubar=0');
+ }
+ else {
+ newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import',
+ 'wishlistImport','scrollbars=1,resizable=1,menubar=0');
+ }
+ newWin.focus();
+}
+
(function (\$) {
\$(document).ready(function () {
\$.single=function(a){return function(b){a[0]=b;return a}}(\$([1]));
@@ -1565,28 +1574,6 @@ function annotate() {
});
}(jQuery));
-function set_bookmark() {
- go('');
- clienttitle=document.title;
- clienthref=location.pathname;
- w_bmquery_flag=1;
- bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0');
- bmquery.document.write(
- '$start_page_bookmark'
- +''
- +'$end_page_bookmark' );
- bmquery.document.close();
-}
-
ENDUTILITY
}