Changeset 346 for trunk/gsdl/src
- Timestamp:
- 1999-07-07T17:47:41+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/OIDtools.cpp
r280 r346 12 12 /* 13 13 $Log$ 14 Revision 1.10 1999/07/07 05:47:41 sjboddie 15 changed around the way browsetools works 16 14 17 Revision 1.9 1999/06/16 23:51:53 sjboddie 15 18 added a strip_suffix function … … 302 305 metadata, collectproto, response, logout); 303 306 } 307 308 // is_child_of returns true if OID2 is a child of OID1 309 bool is_child_of(const text_t &OID1, const text_t &OID2) { 310 311 text_t parent = get_parent(OID2); 312 313 while (!parent.empty()) { 314 if (parent == OID1) return true; 315 parent = get_parent(parent); 316 } 317 return false; 318 } -
trunk/gsdl/src/recpt/OIDtools.h
r280 r346 74 74 FilterResponse_t &response, ostream &logout); 75 75 76 // is_child_of returns true if OID2 is a child of OID1 77 bool is_child_of(const text_t &OID1, const text_t &OID2); 78 79 76 80 #endif -
trunk/gsdl/src/recpt/documentaction.cpp
r309 r346 12 12 /* 13 13 $Log$ 14 Revision 1.11 1999/07/07 05:47:41 sjboddie 15 changed around the way browsetools works 16 14 17 Revision 1.10 1999/06/29 01:46:44 sjboddie 15 18 now sets a _navigationbar_ macro even if there aren't any … … 509 512 while (sechere != secend) { 510 513 if ((*sechere).metadata[1].values[0] == "classify") { 511 if (( *sechere).OID == arg_cl) {514 if (((*sechere).OID == arg_cl) || is_child_of((*sechere).OID, arg_cl)) { 512 515 513 516 // set the _httpprevarrow_, _httpnextarrow_ macros while we're here … … 552 555 text_tarray metadata; 553 556 FilterResponse_t response; 554 text_t top parent, classifytype, classifytitle;557 text_t toptitle, toptype, thistype; 555 558 556 559 text_t &arg_d = args["d"]; … … 568 571 } 569 572 570 // get the classifytitle and classifytype 571 get_top (OID, topparent);573 // get the classifytitle and classifytype for both the top level 574 // and the current level (using getParent=true) 572 575 metadata.push_back ("Title"); 573 576 metadata.push_back ("classifytype"); 574 if (get_info (topparent, args["c"], metadata, false, collectproto, response, logout)) { 575 classifytitle = response.docInfo[0].metadata[0].values[0]; 576 classifytype = response.docInfo[0].metadata[1].values[0]; 577 if (get_info (OID, args["c"], metadata, true, collectproto, response, logout)) { 578 toptitle = response.docInfo[0].metadata[0].values[0]; 579 toptype = response.docInfo[0].metadata[1].values[0]; 580 thistype = response.docInfo[0].metadata[1].values.back(); 577 581 } 578 582 … … 580 584 if (!arg_d.empty()) { 581 585 582 if ( classifytype == "Hierarchy")583 output_hierarchy_toc (classifytitle, args, collectproto, disp,584 586 if (toptype == "Hierarchy") 587 hierarchy_toc (thistype, toptitle, args, collectproto, 588 disp, outconvert, textout, logout); 585 589 else 586 590 // Book is the default for a document level toc - AZList, List and 587 591 // Datelist don't make sense for document level 588 output_book_toc (classifytitle, args, collectproto, disp,589 592 book_toc (toptitle, args, collectproto, disp, 593 outconvert, textout, logout); 590 594 } else { 591 595 592 if ( classifytype == "Hierarchy")593 output_hierarchy_toc (classifytitle, args, collectproto, disp,594 595 else if ( classifytype == "Datelist")596 output_datelist_toc (classifytitle, args, collectproto, disp,597 598 else if ( classifytype == "List")599 output_list_toc (classifytitle, args, collectproto, disp,600 596 if (toptype == "Hierarchy") 597 hierarchy_toc (thistype, toptitle, args, collectproto, 598 disp, outconvert, textout, logout); 599 else if (toptype == "Datelist") 600 datelist_toc (thistype, toptitle, args, collectproto, 601 disp, outconvert, textout, logout); 602 else if (toptype == "AZList") 603 azlist_toc (thistype, toptitle, args, collectproto, 604 disp, outconvert, textout, logout); 601 605 else 602 // AZList is the default for a classification level toc - Book doesn't make606 // List is the default for a classification level toc - Book doesn't make 603 607 // sense for classification level 604 output_azlist_toc (classifytitle, args, collectproto, disp,605 608 list_toc (thistype, toptitle, args, collectproto, 609 disp, outconvert, textout, logout); 606 610 } 607 611
Note:
See TracChangeset
for help on using the changeset viewer.