[LON-CAPA-cvs] cvs: loncom /html/adm/help nohelptopic.html /html/adm/lonIcons closepage.gif /interface loncommon.pm lonhelpmenu.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Mon, 12 Jul 2004 17:02:08 -0000
This is a MIME encoded message
--raeburn1089651728
Content-Type: text/plain
raeburn Mon Jul 12 13:02:08 2004 EDT
Added files:
/loncom/html/adm/help nohelptopic.html
/loncom/html/adm/lonIcons closepage.gif
Modified files:
/loncom/interface loncommon.pm lonhelpmenu.pm
Log:
Fix bug #3170
--raeburn1089651728
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20040712130208.txt"
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.197 loncom/interface/loncommon.pm:1.198
--- loncom/interface/loncommon.pm:1.197 Tue Jul 6 11:48:30 2004
+++ loncom/interface/loncommon.pm Mon Jul 12 13:02:07 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.197 2004/07/06 15:48:30 matthew Exp $
+# $Id: loncommon.pm,v 1.198 2004/07/12 17:02:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -660,7 +660,7 @@
} else {
$link = "javascript:helpMenu('display')";
}
- my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
+ my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage";
my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
my $template;
if ($text ne "") {
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.7 loncom/interface/lonhelpmenu.pm:1.8
--- loncom/interface/lonhelpmenu.pm:1.7 Sat Jul 3 16:45:23 2004
+++ loncom/interface/lonhelpmenu.pm Mon Jul 12 13:02:07 2004
@@ -33,7 +33,7 @@
sub handler {
my ($r) = @_;
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','color','function','faq','bug','topic','component_help','origurl']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','color','function','faq','bug','topic','component_help','origurl','stayonpage']);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -47,6 +47,7 @@
my $function = $ENV{'form.function'};
my $component_help = $ENV{'form.component_help'};
my $origurl = $ENV{'form.origurl'};
+ my $stayOnPage = $ENV{'form.stayonpage'};
my $component_url = $component_help;
if ($component_url) {
$component_url = '/adm/help/'.$component_url.'.hlp';
@@ -59,7 +60,7 @@
my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
if ($ENV{'form.page'} eq 'banner') {
- &display_help_banner($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+ &display_help_banner($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
} elsif ($ENV{'form.page'} eq 'body') {
&display_help_mainpage($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
}
@@ -67,7 +68,7 @@
}
sub display_help_banner {
- my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
+ my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
my $bodytag = &Apache::loncommon::bodytag('',$function,'rightmargin="0" leftmargin="0" marginwidth="0" topmargin="1" marginheight="1"',1);
$bodytag=~s/[\n\r]/ /g;
my $fontcolor = &Apache::loncommon::designparm($function.'.font');
@@ -76,6 +77,10 @@
my $pagecolor = &Apache::loncommon::designparm($function.'.pgbg');
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
+ if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
+ $tablecolor = '#CCCCFF';
+ }
+
$r->print(<<END);
<html>
<head>
@@ -88,18 +93,15 @@
a:hover {text-decoration: underline; color: $vlinkcolor; }
-->
</style>
-<script type="text/javascript">
-function noTopic () {
- bodyframe.document.write("<html><head><title>Topic Page</title></head>")
- bodyframe.document.write('$bodytag')
- bodyframe.document.write("The LON-CAPA help system does not currently include a specific pop-up help item for this topic. You may wish to consult the LON-CAPA <a href='/adm/help/author.manual.pdf'>Authoring Manual</a> or the <a href='/adm/help/course.manual.pdf'>Course Coordinator Manual</a>.")
- bodyframe.document.write("</body></html>")
- body.document.close()
-}
-</script>
</head>
$bodytag
- <table width="600" border="0" cellspacing="0" cellpadding="0" height="55">
+END
+ if ($stayOnPage) {
+ $r->print('<table width="700" border="0" cellspacing="0" cellpadding="0" height="55">');
+ } else {
+ $r->print('<table width="600" border="0" cellspacing="0" cellpadding="0" height="55">');
+ }
+ $r->print(<<END);
<tr height="50">
<td width='5'> </td>
<td>
@@ -120,12 +122,11 @@
if ($component_url) {
$r->print("
<td align=\"center\"> <b><a href=\"$component_url\" target=\"bodyframe\">");
- $r->print('
- <image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Topic help)" valign="middle" /> Topic help</a></b> </td>');
- } elsif (0 && $ENV{'user.adv'}) {
- #FIXME doing this in JS is problematic since JS can't control frames that go to outside sites
- $r->print('<td align="center"> <b><a href="javascript:noTopic()" target="bodyframe">');
+ } elsif ($ENV{'user.adv'}) {
+ $r->print('<td align="center"> <b><a href="/adm/help/nohelptopic.html" target="bodyframe">');
}
+ $r->print('
+ <image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Topic help)" valign="middle" /> Topic help</a></b> </td>');
}
if ($requestmail) {
$r->print('
@@ -143,8 +144,16 @@
<td align="center"> <b><a href="$bugurl" target="bodyframe"><image src="/adm/lonMisc/smallBug.gif" border="0" alt="(Report a bug)" valign="middle" /> Report a bug</a> </b></td>
END
}
+ if ($stayOnPage) {
+ $r->print(<<END);
+ <td align="center"> <b><a href="$origurl" target="_top"><image src="/adm/lonIcons/move_up.gif" border="0" alt="(Return to last location)" valign="middle" /> Return to last location</a></b> </td>
+END
+ } else {
+ $r->print(<<END);
+ <td align="center"> <b><a href="javascript:window.close()" target="_top"><image src="/adm/lonIcons/closepage.gif" border="0" alt="(Close window)" valign="bottom" /> Close</a></b> </td>
+END
+ }
$r->print(<<END);
- <td align="center"> <b><a href="javascript:window.close()" target="_top"><image src="/adm/lonIcons/move_up.gif" border="0" alt="(Close window)" valign="middle" />Close</a></b> </td>
</tr>
</table>
</td>
@@ -173,24 +182,35 @@
my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);
$bodytag=~s/[\n\r]/ /g;
+ my %lt =&Apache::lonlocal::texthash(
+ 'heco' => 'Help Content',
+ 'topp' => 'Topic Page',
+ 'chen' => 'Choose an entry below to go directly to a relevant help page',
+ 'orto' => 'or to submit a help request to the LON-CAPA support staff at your institution.',
+ 'vthp' => 'Visit the help page for ',
+ 'disp' => 'Display the page in the inline help system that covers this topic.',
+ 'crac' => 'Create an account for yourself in the LON-CAPA Bugzilla tracking system, if you wish to report bugs you have encountered in the LON-CAPA software, or if you have suggestions for improvements in LON-CAPA.',
+ 'inhs' => 'Inline help system for',
+ 'coth' => 'Consult the inline help system for this topic.',
+ 'cont' => 'Contact the LON-CAPA support team',
+ 'suhr' => 'Submit a help request to the team responsible for LON-CAPA support at this institution.',
+ 'faqo' => 'FAQ-O-Matic Help system',
+ 'tfaq' => 'The FAQ-O-Matic is a compendium of answers provided to common questions asked by users of LON-CAPA over the past couple of years.',
+ 'lbug' => 'LON-CAPA Bugzilla bug/feature request tracking system',
+ 'crea' => 'Create an account for yourself in the LON-CAPA Bugzilla tracking system, if you wish to report bugs you have encountered in the LON-CAPA software,or if you have suggestions for improvements in LON-CAPA.',
+ 'suim' => ' Suggested improvements may include additional functionality, improved usability, or changes to wording used in LON-CAPA pages, including the embedded help system.'
+ );
+
$r->print(<<END);
<html>
<head>
- <title>Help Content</title>
- <script type="text/javascript">
-function noTopic() {
- bodyframe.document.write('<html><head><title>Topic Page</title></head>$bodytag')
- bodyframe.document.write("The LON-CAPA help system does not currently include a specific pop-up help item for this topic. You may wish to consult the LON-CAPA <a href='/adm/help/author.manual.pdf'>Authoring Manual</a> or the <a href='/adm/help/course.manual.pdf'>Course Coordinator Manual</a>.")
- bodyframe.document.write("</body></html>")
- body.document.close()
-}
- </script>
+ <title>$lt{'heco'}</title>
</head>
$bodytag
-Choose an entry below to go directly to a relevant help page
END
+ $r->print($lt{'chen'});
if ($requestmail) {
- $r->print(", or to submit a help request to the LON-CAPA support staff at you institution.");
+ $r->print(', '.$lt{'orto'});
} else {
$r->print(".");
}
@@ -199,24 +219,24 @@
if ($component_url) {
$r->print("
<ul>
- <li><a href=\"$component_url\">Visit the help page for $topic</a></li>
+ <li><a href=\"$component_url\">$lt{'vthp'} $topic</a></li>
</ul>
- <p>Display the page in the inline help system that covers this topic.</p>
+ <p>$lt{'disp'}</p>
");
} elsif ($ENV{'user.adv'}) {
$r->print("
<ul>
- <li><td align=\"center\"> <a href=\"javascript:noTopic()\">Inline help system for $topic</a></li></ul>
- <p>Consult the inline help system for this topic.</p>");
+ <li><td align=\"center\"> <a href=\"/adm/help/nohelptopic.html\">$lt{'inhs'} $topic</a></li></ul>
+ <p>$lt{'coth'}</p>");
}
}
}
if ($requestmail) {
$r->print("
<ul>
- <li><a href=\"/adm/support?origurl=$origurl&function=$function\" target=\"bodyframe\">Contact the LON-CAPA support team</a></li>
+ <li><a href=\"/adm/support?origurl=$origurl&function=$function\">$lt{'cont'}</a></li>
</ul>
- <p>Submit a help request to the team responsible for LON-CAPA support at this institution.</p>
+ <p>$lt{'suhr'}</p>
<ul>
");
}
@@ -225,20 +245,18 @@
$faq = '1';
}
$r->print("
- <li><a href=\"$faqbaseurl/fom/cache/$faq.html\">FAQ-O-Matic Help system</a></li>
+ <li><a href=\"$faqbaseurl/fom/cache/$faq.html\">$lt{'faqo'}</a></li>
</ul>
- <p>The FAQ-O-Matic is a compendium of answers provided to common questions asked by users of LON-CAPA over the past couple of years.</p>
+ <p>$lt{'tfaq'}</p>
");
}
if ($bugurl && $ENV{'user.adv'}) {
$bugurl .= '?'.$bug;
$r->print("
<ul>
- <li><a href=\"$bugurl\">LON-CAPA Bugzilla bug/feature request tracking
-system</a></li>
+ <li><a href=\"$bugurl\">$lt{'lbug'}</a></li>
</ul>
- <p>Create an account for yourself in the LON-CAPA Bugzilla tracking system, if you wish to report bugs you have encountered in the LON-CAPA software,
-or if you have suggestions for improvements in LON-CAPA. Suggested improvements may include additional functionality, improved usability, or changes to wording used in LON-CAPA pages, including the embedded help system.</p>
+ <p>$lt{'crea'} $lt{'suim'}</p>
");
}
$r->print(<<END);
Index: loncom/html/adm/help/nohelptopic.html
+++ loncom/html/adm/help/nohelptopic.html
<html>
<head>
<title>Help Topic Page</title>
</head>
<body bgcolor="#FFFFFF">
<h3 style="font: sans-serif"><img align="right"
src="/adm/help/gif/lonhelpheader.gif"/>LON-CAPA Help<hr /><a href="javascript:void(open('http://bugs.lon-capa.org/enter_bug.cgi?product=LON-CAPA&bug_file_loc=%2fadm%2fhelp%2fnohelptopic%2ehtml&component=Documentation', 'Bugzilla', 'menubar=0,toolbar=1,scrollbars=1,width=600,height=600,resizable=yes'))" title="Report a Bug"><image src="/adm/lonMisc/smallBug.gif" border="0" alt="(Bug: Documentation)" /></a>
</h3>
<h4>Missing help item for this topic</h4>
The inline LON-CAPA help system does not currently include a specific
pop-up help item for this topic. <br />You may instead want to consult one
of the LON-CAPA manuals.<br /><br />
You can download printable versions of these manuals or view them online:</p>
<dl>
<dt>Author's Manual: Focuses on authoring problems and maps</dt>
<dd><a href="/adm/help/author.manual.ps">printable PostScript</a><br />
<a href="/adm/help/author.manual.pdf">printable Adobe PDF</a><br />
<a href="/adm/help/author.manual.access.hlp">viewable online</a>
<br /> </dd>
<dt>Course Administrator's Manual: Focuses on creating,
administering, and running courses</dt>
<dd><a href="/adm/help/course.manual.ps">printable PostScript</a><br />
<a href="/adm/help/course.manual.pdf">printable Adobe PDF</a><br />
<a href="/adm/help/course.manual.access.hlp">viewable online</a></dd>
</dl>
</body></html>
--raeburn1089651728--