Changeset 431 for trunk/gsdl/src/recpt/documentaction.cpp
- Timestamp:
- 1999-08-03T15:30:48+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/documentaction.cpp
r420 r431 12 12 /* 13 13 $Log$ 14 Revision 1.16 1999/08/03 03:30:47 sjboddie 15 a few small changes related to new format options 16 14 17 Revision 1.15 1999/07/30 02:18:49 sjboddie 15 18 -added collectinfo argument to some functions … … 284 287 } 285 288 286 bool showtoppage= true;287 text_tmap::const_iterator it = collectinfo.format.find(" showtoppage");288 if ((it != collectinfo.format.end()) && ((*it).second == "false")) showtoppage= false;289 bool ShowTopPages = true; 290 text_tmap::const_iterator it = collectinfo.format.find("ShowTopPages"); 291 if ((it != collectinfo.format.end()) && ((*it).second == "false")) ShowTopPages = false; 289 292 290 293 // do a call to translate OIDs if required 291 294 request.filterName = "NullFilter"; 292 295 request.filterResultOptions = FROID; 293 if ((!arg_d.empty()) && (needs_translating (arg_d) || ! showtoppage)) {296 if ((!arg_d.empty()) && (needs_translating (arg_d) || !ShowTopPages)) { 294 297 request.docSet.insert (arg_d); 295 298 request.fields.push_back ("classifytype"); … … 301 304 text_t &classifytype = response.docInfo[0].metadata[0].values[0]; 302 305 if (classifytype.empty() || classifytype == "book") 303 if (! showtoppage&& is_top (arg_d)) arg_d += ".fc";306 if (!ShowTopPages && is_top (arg_d)) arg_d += ".fc"; 304 307 305 308 request.clear(); … … 481 484 if (classifytype.empty()) classifytype = "Book"; // defaults to Book 482 485 if ((classifytype == "Book") || (classifytype == "Hierarchy")) { 483 bool showtoppage= true;484 text_tmap::const_iterator it = collectinfo.format.find(" showtoppage");485 if ((it != collectinfo.format.end()) && ((*it).second == "false")) showtoppage= false;486 set_arrow_macros (arg_d, classifytype, showtoppage, disp,486 bool ShowTopPages = true; 487 text_tmap::const_iterator it = collectinfo.format.find("ShowTopPages"); 488 if ((it != collectinfo.format.end()) && ((*it).second == "false")) ShowTopPages = false; 489 set_arrow_macros (arg_d, classifytype, ShowTopPages, disp, 487 490 collectproto, collection, logout); 488 491 } … … 611 614 FilterResponse_t response; 612 615 text_t toptitle, toptype, thistype, formatstring; 613 bool cover = false;614 616 615 617 text_t &collection = args["c"]; … … 638 640 } 639 641 640 text_tmap::const_iterator it = collectinfo.format.find(toptype + toptitle); 642 bool ShowCoverImages = false; 643 text_t formatkey = toptype + toptitle; 644 if (!arg_d.empty()) formatkey = toptype + "Document"; 645 646 text_tmap::const_iterator it = collectinfo.format.find(formatkey); 641 647 if (it != collectinfo.format.end()) formatstring = (*it).second; 642 it = collectinfo.format.find(" cover");643 if ( it != collectinfo.format.end()) cover= true;648 it = collectinfo.format.find("ShowCoverImages"); 649 if ((it != collectinfo.format.end()) && ((*it).second == "true")) ShowCoverImages = true; 644 650 645 651 // output the table of contents … … 647 653 648 654 if (toptype == "Hierarchy") 649 output_toc (thistype, formatstring, args, cover, collectproto,655 output_toc (thistype, formatstring, args, ShowCoverImages, collectproto, 650 656 disp, outconvert, textout, logout); 651 657 else … … 661 667 662 668 // output the document text 663 output_document (OID, args, collectproto, disp, outconvert, textout, logout); 669 output_document (OID, args, collectinfo, collectproto, disp, 670 outconvert, textout, logout); 664 671 665 672 textout << outconvert << disp << "_document:footer_\n"; … … 670 677 671 678 void documentaction::output_document (const text_t &OID, cgiargsclass &args, 679 const ColInfoResponse_t &collectinfo, 672 680 recptproto *collectproto, displayclass &disp, 673 681 outconvertclass &outconvert, ostream &textout, … … 692 700 } 693 701 702 bool ShowSectionTitles = true; 703 text_tmap::const_iterator it = collectinfo.format.find("ShowSectionTitles"); 704 if ((it != collectinfo.format.end()) && ((*it).second == "false")) ShowSectionTitles = false; 705 694 706 // get info on this document 695 707 metadata.push_back("Title"); … … 708 720 collectproto->get_document (collection, docrequest, docresponse, err, logout); 709 721 710 textout << outconvert << disp << "<p>\n<h3>" << title << "</h3>"; 711 if (highlight) 712 highlighttext(docresponse.doc, queryresponse.termInfo, disp, 713 outconvert, textout, logout); 714 else 715 textout << outconvert << disp << docresponse.doc; 722 if (ShowSectionTitles) 723 textout << outconvert << disp << "<p>\n<h3>" << title << "</h3>"; 724 if (highlight) 725 highlighttext(docresponse.doc, queryresponse.termInfo, disp, 726 outconvert, textout, logout); 727 else 728 textout << outconvert << disp << docresponse.doc; 716 729 } 717 730 } else { … … 751 764 collectproto->get_document (collection, docrequest, docresponse, err, logout); 752 765 753 textout << outconvert << disp << "<p>\n<h3>" << title << "</h3>"; 766 if (ShowSectionTitles) 767 textout << outconvert << disp << "<p>\n<h3>" << title << "</h3>"; 754 768 if (highlight) 755 769 highlighttext(docresponse.doc, queryresponse.termInfo, disp,
Note:
See TracChangeset
for help on using the changeset viewer.