Bug 251418

Summary: Add header and footer support to help.cgi
Product: [Retired] 389 Reporter: Nathan Kinder <nkinder>
Component: AdminAssignee: Nathan Kinder <nkinder>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:58:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 240316, 427409    
Attachments:
Description Flags
CVS Diffs none

Description Nathan Kinder 2007-08-08 21:16:23 UTC
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 21:16:23 UTC
Created attachment 160940 [details]
CVS Diffs

Comment 2 Noriko Hosoi 2007-08-08 21:41:01 UTC
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 23:24:21 UTC
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
done

Comment 4 Nathan Kinder 2007-08-08 23:36:20 UTC
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
done