version 1.315.2.6, 2010/12/30 21:36:50
|
version 1.315.2.11, 2011/05/27 19:33:45
|
Line 205 sub prep_menuitem {
|
Line 205 sub prep_menuitem {
|
} else { # textual Link |
} else { # textual Link |
$link = &mt($$menuitem[3]); |
$link = &mt($$menuitem[3]); |
} |
} |
if($$menuitem[4] eq 'newmsg'){ #special style for New Messages |
return '<li><a' |
return '<li><a href="'.$$menuitem[0].'"><span class="LC_new_message">'.$link.'</span></a></li>'; |
# highlighting for new messages |
} |
. ( $$menuitem[4] eq 'newmsg' ? ' class="LC_new_message"' : '') |
return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>'; |
. qq| href="$$menuitem[0]" target="_top">$link</a></li>|; |
} |
} |
|
|
# primary_menu() evaluates @primary_menu and returns XHTML for the menu |
# primary_menu() evaluates @primary_menu and returns XHTML for the menu |
Line 258 sub primary_menu {
|
Line 258 sub primary_menu {
|
$menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>'; |
$menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>'; |
} |
} |
} else { |
} else { |
my @items = @{$menuitem}; |
$menu .= &prep_menuitem($menuitem); |
$items[0] = 'javascript:'.$menuitem->[0].';'; |
|
$menu .= &prep_menuitem(\@items); |
|
} |
} |
} |
} |
|
|
Line 455 sub innerregister {
|
Line 453 sub innerregister {
|
$newmail= 'swmenu.setstatus("you have","messages");'; |
$newmail= 'swmenu.setstatus("you have","messages");'; |
} |
} |
|
|
my ($breadcrumb,$separator); |
my ($breadcrumb,$separator,$resurl); |
if ($noremote |
if ($noremote |
&& ($env{'request.symb'}) |
&& ($env{'request.symb'}) |
&& ($env{'request.course.id'})) { |
&& ($env{'request.course.id'})) { |
|
|
my ($mapurl,$rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread()); |
(my $mapurl, my $rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread()); |
my $coursetitle = $env{'course.'.$env{'request.course.id'}.'.description'}; |
my $coursetitle = $env{'course.'.$env{'request.course.id'}.'.description'}; |
|
|
my $maptitle = &Apache::lonnet::gettitle($mapurl); |
my $maptitle = &Apache::lonnet::gettitle($mapurl); |
Line 672 sub innerregister {
|
Line 670 sub innerregister {
|
} |
} |
} |
} |
} |
} |
|
if ($env{'request.course.id'}) { |
|
if ($resurl eq "public/$cdom/$cnum/syllabus") { |
|
if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ /\w/) { |
|
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
$editbutton=&switch('','',6,1,'pcstr.png','Edit', |
|
'resource[_2]', |
|
"go('/adm/courseprefs?phase=display&actions=courseinfo')", |
|
'Edit this resource'); |
|
} |
|
} |
|
} |
|
} |
### |
### |
### |
### |
# Prepare the rest of the buttons |
# Prepare the rest of the buttons |
Line 714 ENDMENUITEMS
|
Line 724 ENDMENUITEMS
|
# We are in a course and looking at a registred URL |
# We are in a course and looking at a registred URL |
# Should probably be in mydesk.tab |
# Should probably be in mydesk.tab |
# |
# |
|
|
|
my %icon_text; |
|
if ($noremote) { |
|
%icon_text = ( |
|
annotate => 'Notes', |
|
bookmark => 'Bookmark', |
|
catalog => 'Info', |
|
evaluate => 'Evaluate', |
|
feedback => 'Communicate', |
|
printout => 'Print', |
|
); |
|
} |
$menuitems=(<<ENDMENUITEMS); |
$menuitems=(<<ENDMENUITEMS); |
c&3&1 |
c&3&1 |
s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&&1 |
s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&&1 |
Line 721 s&2&3&forw.gif&forward[_1]&&gopost('/adm
|
Line 743 s&2&3&forw.gif&forward[_1]&&gopost('/adm
|
c&6&3 |
c&6&3 |
c&8&1 |
c&8&1 |
c&8&2 |
c&8&2 |
s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document |
s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document&&&$icon_text{'printout'} |
s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1 |
s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1&$icon_text{'bookmark'} |
ENDMENUITEMS |
ENDMENUITEMS |
|
|
my $currentURL = &Apache::loncommon::get_symb(); |
my $currentURL = &Apache::loncommon::get_symb(); |
Line 735 if(length($annotation) > 0){
|
Line 757 if(length($annotation) > 0){
|
$menuitems.="anot.gif"; |
$menuitems.="anot.gif"; |
} |
} |
$menuitems.="&anno-[_1]&tations[_1]&annotate()&"; |
$menuitems.="&anno-[_1]&tations[_1]&annotate()&"; |
$menuitems.="Make notes and annotations about this resource&&1\n"; |
$menuitems.="Make notes and annotations about this resource&&1&$icon_text{'annotate'}\n"; |
|
|
unless ($noremote) { |
unless ($noremote) { |
my $showreqcrs = &check_for_rcrs(); |
my $showreqcrs = &check_for_rcrs(); |
Line 746 $menuitems.="Make notes and annotations
|
Line 768 $menuitems.="Make notes and annotations
|
} |
} |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) { |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) { |
|
my $tail; |
|
unless ($env{'request.state'} eq 'construct') { |
|
$tail = '&&&'.$icon_text{'catalog'}; |
|
} |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
s&6&3&catalog.gif&catalog[_2]&info[_1]&catalog_info()&Show Metadata |
s&6&3&catalog.gif&catalog[_2]&info[_1]&catalog_info()&Show Metadata$tail |
ENDREALRES |
ENDREALRES |
} |
} |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
s&8&1&eval.gif&evaluate[_1]&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource |
s&8&1&eval.gif&evaluate[_1]&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource&&&$icon_text{'evaluate'} |
s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource |
s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource&&&$icon_text{'feedback'} |
ENDREALRES |
ENDREALRES |
} |
} |
} |
} |
if ($env{'request.uri'} =~ /^\/res/) { |
if ($env{'request.uri'} =~ /^\/res/) { |
$menuitems .= (<<ENDMENUITEMS); |
$menuitems .= (<<ENDMENUITEMS); |
s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document |
s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document&&&Print |
ENDMENUITEMS |
ENDMENUITEMS |
} |
} |
my $buttons=''; |
my $buttons=''; |
Line 798 ENDMENUITEMS
|
Line 824 ENDMENUITEMS
|
#publish button in construction space |
#publish button in construction space |
if ($env{'request.state'} eq 'construct'){ |
if ($env{'request.state'} eq 'construct'){ |
Apache::lonhtmlcommon::add_breadcrumb_tool( |
Apache::lonhtmlcommon::add_breadcrumb_tool( |
'advtools', @inlineremote[63]); |
'advtools', $inlineremote[63]); |
}else{ |
}else{ |
Apache::lonhtmlcommon::add_breadcrumb_tool( |
Apache::lonhtmlcommon::add_breadcrumb_tool( |
'tools', @inlineremote[63]); |
'tools', $inlineremote[63]); |
} |
} |
|
|
unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { |
unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { |
Line 1184 sub clear {
|
Line 1210 sub clear {
|
# The javascript is usually similar to "go('/adm/roles')" or "cstrgo(..)". |
# The javascript is usually similar to "go('/adm/roles')" or "cstrgo(..)". |
|
|
sub switch { |
sub switch { |
my ($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat,$nobreak)=@_; |
my ($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat,$nobreak,$inlinetools)=@_; |
$act=~s/\$uname/$uname/g; |
$act=~s/\$uname/$uname/g; |
$act=~s/\$udom/$udom/g; |
$act=~s/\$udom/$udom/g; |
$top=&mt($top); |
$top=&mt($top); |
Line 1194 sub switch {
|
Line 1220 sub switch {
|
$img=&mt($img); |
$img=&mt($img); |
} |
} |
my $idx=10*$row+$col; |
my $idx=10*$row+$col; |
$category_members{$cat}.=':'.$idx; |
if ($cat ne '') { |
|
$category_members{$cat}.=':'.$idx; |
|
} |
|
|
unless ($env{'environment.remote'} eq 'off') { |
unless ($env{'environment.remote'} eq 'off') { |
if (($row<1) || ($row>13)) { return ''; } |
if (($row<1) || ($row>13)) { return ''; } |
Line 1238 sub switch {
|
Line 1266 sub switch {
|
if ($env{'environment.icons'} eq 'iconsonly') { |
if ($env{'environment.icons'} eq 'iconsonly') { |
$inlineremote[$idx]='<a title="'.$desc.'" href="javascript:'.$act.';">'.$pic.'</a>'; |
$inlineremote[$idx]='<a title="'.$desc.'" href="javascript:'.$act.';">'.$pic.'</a>'; |
} else { |
} else { |
|
my $icon_text = $desc; |
|
if ($inlinetools) { |
|
$icon_text = $inlinetools.' '; |
|
} |
$inlineremote[$idx]= |
$inlineremote[$idx]= |
'<a title="'.$desc.'" class="LC_menubuttons_link" href="javascript:'.$act.';">'.$pic. |
'<a title="'.$desc.'" class="LC_menubuttons_link" href="javascript:'.$act.';">'.$pic. |
'<span class="LC_menubuttons_inline_text">'.$desc.'</span></a>'; |
'<span class="LC_menubuttons_inline_text">'.$icon_text.' </span></a>'; |
} |
} |
} |
} |
} |
} |
Line 1663 function go(url) {
|
Line 1695 function go(url) {
|
} |
} |
} |
} |
|
|
function gotop(url) { |
|
if (url!='' && url!= null) { |
|
top.location.href = url; |
|
} |
|
} |
|
|
|
function need_switchserver(url) { |
function need_switchserver(url) { |
if (url!='' && url!= null) { |
if (url!='' && url!= null) { |
if (confirm("$confirm_switch")) { |
if (confirm("$confirm_switch")) { |