Bug 251418 - Add header and footer support to help.cgi
Add header and footer support to help.cgi
Product: 389
Classification: Community
Component: Admin (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Nathan Kinder
Viktor Ashirov
Depends On:
Blocks: 240316 FDS1.1.0
  Show dependency treegraph
Reported: 2007-08-08 17:16 EDT by Nathan Kinder
Modified: 2015-12-07 11:58 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 11:58:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
CVS Diffs (3.57 KB, patch)
2007-08-08 17:16 EDT, Nathan Kinder
no flags Details | Diff

  None (edit)
Description Nathan Kinder 2007-08-08 17:16:23 EDT
The current help.cgi in Admin Server simply looks up tokens in a map file and
returns the contents of the html file that the mapping points to.  This works
ok, but the online help for a product may have 100+ different help html files. 
Each of these files contains the same html header and footer (or at least they
should for a consistent look).  It would be much better to have separate header
and footer html files that are always prepended and appended to the help html
that the user requested.

The proposed fix expects the online help directory for each product to have a
header.htm and footer.htm alongside it's token.map file.  These files will be
combined with the requested help topic and returned to the client via the
help.cgi.  This will allow us to simplify our many online help html files so we
only have to worry about the actual content.
Comment 1 Nathan Kinder 2007-08-08 17:16:23 EDT
Created attachment 160940 [details]
CVS Diffs
Comment 2 Noriko Hosoi 2007-08-08 17:41:01 EDT
I really love this new design to have one header and footer!
If there's any difference, can we name them header.html and footer.html? ;)

 #define LIBRARY_FILE   "library.html"
+#define HEADER_FILE    "header.htm"
+#define FOOTER_FILE    "footer.htm"

It's just an issue of preference...
Comment 3 Nathan Kinder 2007-08-08 19:24:21 EDT
Checked into adminserver (HEAD).  Thanks to Rich for the review!

Checking in help.c;
/cvs/dirsec/adminserver/admserv/cgi-src40/help.c,v  <--  help.c
new revision: 1.10; previous revision: 1.9
Comment 4 Nathan Kinder 2007-08-08 19:36:20 EDT
Sorry Noriko, I didn't see your comment until after I commited my changes.  I
have no problem using the html extention instead (I prefer it as well).  I've
committed the following to adminserver (HEAD).

Index: help.c
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/help.c,v
retrieving revision 1.10
diff -u -2 -t -r1.10 help.c
--- help.c      8 Aug 2007 22:23:18 -0000       1.10
+++ help.c      8 Aug 2007 23:34:13 -0000
@@ -75,6 +75,6 @@
 #define HELPWIN_VAR    "HelpWindow"
 #define TOKEN_FILE     "index.map"
-#define HEADER_FILE    "header.htm"
-#define FOOTER_FILE    "footer.htm"
+#define HEADER_FILE    "header.html"
+#define FOOTER_FILE    "footer.html"
 #define HEAD_BLOCK     "<head>"
 #define FRAME_BLOCK    "<frame "

Enter passphrase for key '/home/nkinder/.ssh/id_rsa': 
Checking in help.c;
/cvs/dirsec/adminserver/admserv/cgi-src40/help.c,v  <--  help.c
new revision: 1.11; previous revision: 1.10

Note You need to log in before you can comment on or make changes to this bug.