--- loncom/interface/lonmenu.pm 2015/03/03 16:53:59 1.431.2.1
+++ loncom/interface/lonmenu.pm 2015/05/28 03:14:25 1.434
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.431.2.1 2015/03/03 16:53:59 musolffc Exp $
+# $Id: lonmenu.pm,v 1.434 2015/05/28 03:14:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -288,6 +288,11 @@ sub primary_menu {
push(@primsub,$item);
}
if (@primsub > 0) {
+ if ($title eq 'Personal' && $env{'user.name'} && $env{'user.domain'} ) {
+ $title = &Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'});
+ } else {
+ $title = &mt($title);
+ }
$menu{$position} .= &create_submenu($link,$target,$title,\@primsub,1);
} elsif ($link) {
$menu{$position} .= '
'.&mt($title).'';
@@ -510,19 +515,9 @@ sub create_submenu {
if ($target ne '') {
$disptarget = ' target="'.$target.'"';
}
- my $name;
- if ($title eq 'Personal') {
- if ($env{'user.name'} && $env{'user.domain'}) {
- $name = &Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'});
- } else {
- $name = &mt($title);
- }
- } else {
- $name = &mt($title);
- }
my $menu = ''.
''.
- ''.$name.
+ ''.$title.
''.
' ▼'.
'';
@@ -776,6 +771,9 @@ sub innerregister {
my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn;
if ($currdir =~ m-/$-) {
$is_const_dir = 1;
+ if ($thisdisfn eq '') {
+ $is_const_dir = 2;
+ }
} else {
$currdir =~ s|[^/]+$||;
my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
@@ -927,9 +925,18 @@ ENDMENUITEMS
&advtools_crumbs(@inlineremote);
}
}
-
+ my ($topic_help,$topic_help_text);
+ if ($is_const_dir == 2) {
+ if ((($ENV{'SERVER_PORT'} == 443) ||
+ ($Apache::lonnet::protocol{$Apache::lonnet::perlvar{'lonHostID'}} eq 'https')) &&
+ (&Apache::lonnet::usertools_access($env{'user.name'},$env{'user.domain'},'webdav'))) {
+ $topic_help = 'Authoring_WebDAV,Authoring_WebDAV_Mac_10v6,Authoring_WebDAV_Mac_10v10,'.
+ 'Authoring_WebDAV_Windows_v7,Authoring_WebDAV_Linux_Centos';
+ $topic_help_text = 'About WebDAV access';
+ }
+ }
return &Apache::lonhtmlcommon::scripttag('', 'start')
- . &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0)
+ . &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'','','','',$topic_help,$topic_help_text)
. &Apache::lonhtmlcommon::scripttag('', 'end');
}
@@ -1533,13 +1540,6 @@ function toggleCountdown() {
return;
}
-function zeroTimer() {
- if (confirm('Are you sure?')) {
- document.getElementsByName('done')[0].value = 'true';
- document.getElementsByName('doneButton')[0].submit();
- }
-}
-
END
}
@@ -1792,7 +1792,7 @@ sub roles_selector {
my $now = time;
my (%courseroles,%seccount,%courseprivs);
my $is_cc;
- my ($js,$form,$switcher,$switchtext);
+ my ($js,$form,$switcher);
my $ccrole;
if ($crstype eq 'Community') {
$ccrole = 'co';
@@ -1880,7 +1880,6 @@ sub roles_selector {
}
}
}
- $switchtext = 'Switch role'; # do not translate here
my @roles_order = ($ccrole,'in','ta','ep','ad','st');
my $numdiffsec;
if (keys(%seccount) == 1) {
@@ -1936,7 +1935,7 @@ sub roles_selector {
}
}
if (@submenu > 0) {
- $switcher = &create_submenu('','',$switchtext,\@submenu);
+ $switcher = &create_submenu('','',&mt('Switch role'),\@submenu);
}
}
return ($js,$form,$switcher);
@@ -2242,10 +2241,6 @@ $collapse
-
END
}
}