HTMLArea.replaceAll();
@@ -828,6 +896,13 @@ sub htmlareaactive {
ENDSCRIPT
}
+# --------------------------------------------------------------------- Blocked
+
+sub htmlareablocked {
+ unless (&htmlareabrowser()) { return 1; }
+ return 0;
+}
+
# ---------------------------------------- Browser capable of running HTMLArea?
sub htmlareabrowser {
@@ -853,6 +928,9 @@ All inputs can be undef without problems
Inputs: $color (the background color of the table returned),
$component (the large text on the right side of the table),
$component_help
+ $function (role to get colors from)
+ $domain (domian of role)
+ $menulink (boolean, controls whether to include a link to /adm/menu)
Returns a string containing breadcrumbs for the current page.
@@ -878,7 +956,8 @@ returns: nothing
my @Crumbs;
sub breadcrumbs {
- my ($color,$component,$component_help,$function,$domain) = @_;
+ my ($color,$component,$component_help,$function,$domain,$menulink) =
+ @_;
if (! defined($color)) {
if (! defined($function)) {
$function = &Apache::loncommon::get_users_function();
@@ -895,25 +974,37 @@ returns: nothing
# Make the faq and bug data cascade
my $faq = '';
my $bug = '';
- # The last breadcrumb does not have a link, so handle it seperately.
+ # The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
#
- # The first one should be the course, I guess.
- if (exists($ENV{'request.course.id'})) {
- my $cid = $ENV{'request.course.id'};
+ # The first one should be the course or a menu link
+ if (!defined($menulink)) { $menulink=1; }
+ if ($menulink) {
+ my $description = 'Menu';
+ if (exists($ENV{'request.course.id'}) &&
+ $ENV{'request.course.id'} ne '') {
+ $description =
+ $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+ }
unshift(@Crumbs,{
- href=>'/adm/menu',
- title=>'Go to main menu',
- text=>$ENV{'course.'.$cid.'.description'},
- });
+ href =>'/adm/menu',
+ title =>'Go to main menu',
+ target =>'_top',
+ text =>$description,
+ });
}
my $links .=
join('->',
map {
$faq = $_->{'faq'} if (exists($_->{'faq'}));
$bug = $_->{'bug'} if (exists($_->{'bug'}));
- ''.
- $_->{'text'}.''
+ my $result = '{'target'}) && $_->{'target'} ne '') {
+ $result .= 'target="'.$_->{'target'}.'" ';
+ }
+ $result .='title="'.&mt($_->{'title'}).'">'.
+ &mt($_->{'text'}).'';
+ $result;
} @Crumbs
);
$links .= '->' if ($links ne '');
@@ -936,7 +1027,7 @@ returns: nothing
#
if (defined($component)) {
$Str .= ''.
- ''.$component.'';
+ ''.&mt($component).'';
if (defined($component_help)) {
$Str .=
&Apache::loncommon::help_open_topic($component_help);
|