Changeset 1941 for trunk/gsdl/src/recpt/browsetools.cpp
- Timestamp:
- 2001-02-09T15:41:33+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/browsetools.cpp
r1860 r1941 121 121 } 122 122 123 //this function outputs the related documents in the format specified 124 //in the collection configuration file if the collection preferences 125 //indicate they wish related documents to be displayed. 126 void output_related_docs (cgiargsclass &args, recptproto *collectproto, 127 formatinfo_t &formatinfo, displayclass &disp, 128 outconvertclass &outconvert, ostream &textout, 129 ostream &logout) { 130 131 if (args["d"].empty()) return; //if no OID 132 if (args["rd"] != "1") return; //if preferences say no related documents 133 134 text_tset metadata; 135 bool getParents; 136 FilterResponse_t response; 137 138 //create new format pointer and parse the related doc format 139 //string specified in the collection config file 140 format_t *formatlistptr = new format_t(); 141 parse_formatstring (formatinfo.RelatedDocuments, formatlistptr, metadata, getParents); 142 143 if (!get_info (args["d"], args["c"], metadata, getParents, collectproto, response, logout)) 144 return; 145 146 //get the format string from formattools.cpp 147 text_t relateddocs = get_formatted_string (args["c"],collectproto, response.docInfo[0], 148 disp, formatlistptr, logout); 149 //output the related documents 150 textout << outconvert << disp << relateddocs; 151 } 152 153 123 154 124 155 static void recurse_contents (ResultDocInfo_t §ion, cgiargsclass &args, bool fulltoc, … … 542 573 output_controls (args, formatinfo.DocumentButtons, collectproto, disp, 543 574 outconvert, textout, logout); 544 textout << "</td><td valign=top>\n"; 575 textout << "</td><td valign=top>\n"; 545 576 havecontrols = true; 546 577 } … … 560 591 } 561 592 562 if (havecontrols) textout << "</td></tr></table></center>\n"; 563 } 593 if (havecontrols) textout << "</td></tr></table></center>\n"; 594 595 //if there is a format specified in the config file then 596 //try to display the related documents (may not be displayed 597 //if preference file does not indicate a wish to display 598 //related documents. 599 if (!formatinfo.RelatedDocuments.empty()) 600 output_related_docs(args, collectproto, formatinfo, disp, outconvert, textout, logout); 601 602 } 603 604
Note:
See TracChangeset
for help on using the changeset viewer.