version 1.393, 2012/11/27 23:45:08
|
version 1.395, 2012/12/06 13:38:25
|
Line 485 sub innerregister {
|
Line 485 sub innerregister {
|
if ($env{'form.title'}) { |
if ($env{'form.title'}) { |
$title = $env{'form.title'}; |
$title = $env{'form.title'}; |
} |
} |
|
my $trail; |
if ($env{'form.folderpath'}) { |
if ($env{'form.folderpath'}) { |
my $editbutton = |
my $editbutton = |
&prepare_functions($resurl,$forcereg,$group,undef,undef,1); |
&prepare_functions($resurl,$forcereg,$group,undef,undef,1); |
my ($trail) = |
($trail) = |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
return $trail; |
|
} else { |
} else { |
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{text => "Supplemental $crstype Content", |
{text => "Supplemental $crstype Content", |
href => "javascript:gopost('/adm/supplemental','')"}); |
href => "javascript:gopost('/adm/supplemental','')"}); |
$title = &mt('View Resource'); |
$title = &mt('View Resource'); |
return &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
($trail) = |
|
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
} |
} |
|
return $trail; |
|
} |
|
unless ($env{'request.state'} eq 'construct') { |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'}); |
} |
} |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'}); |
|
} |
} |
} elsif (! $const_space){ |
} elsif (! $const_space){ |
#a situation when we're looking at a resource outside of context of a |
#a situation when we're looking at a resource outside of context of a |
Line 572 sub innerregister {
|
Line 576 sub innerregister {
|
# |
# |
if (($env{'request.symb'}=~/^uploaded/) && ($perms{'mdc'})) { |
if (($env{'request.symb'}=~/^uploaded/) && ($perms{'mdc'})) { |
my $text = 'Edit Folder'; |
my $text = 'Edit Folder'; |
if ($mapurl =~ /\.page$/) { |
if (($mapurl =~ /\.page$/) || |
|
($env{'request.symb'}=~ |
|
/^uploaded/$cdom/$cnum/default_\d+\.page$/)) { |
$text = 'Edit Page'; |
$text = 'Edit Page'; |
} |
} |
&switch('','',7,4,'docs-22x22.png',$text,'parms[_2]', |
&switch('','',7,4,'docs-22x22.png',$text,'parms[_2]', |
Line 911 sub prepare_functions {
|
Line 917 sub prepare_functions {
|
($resurl =~ m{^/uploaded/$cdom/$cnum/supplemental/}) || |
($resurl =~ m{^/uploaded/$cdom/$cnum/supplemental/}) || |
($resurl eq '/adm/supplemental'))) { |
($resurl eq '/adm/supplemental'))) { |
my @folders=split('&',$env{'form.folderpath'}); |
my @folders=split('&',$env{'form.folderpath'}); |
if (@folders > 2) { |
if ((@folders > 2) || ($resurl ne '/adm/supplemental')) { |
my $esc_path=&escape(&HTML::Entities::encode(&escape($env{'form.folderpath'}),'<>&"')); |
my $esc_path=&escape(&HTML::Entities::encode(&escape($env{'form.folderpath'}),'<>&"')); |
&switch('','',7,4,'docs-22x22.png','Edit Folder','parms[_2]', |
&switch('','',7,4,'docs-22x22.png','Edit Folder','parms[_2]', |
"location.href='/adm/coursedocs?command=direct&forcesupplement=1&supppath=$esc_path'", |
"location.href='/adm/coursedocs?command=direct&forcesupplement=1&supppath=$esc_path'", |