Changeset 911 for trunk/cstr/src/recpt/cstrdocaction.cpp
- Timestamp:
- 2000-02-07T10:27:04+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cstr/src/recpt/cstrdocaction.cpp
r891 r911 28 28 /* 29 29 $Log$ 30 Revision 1. 1 2000/02/01 22:32:37sjboddie31 Initial revision30 Revision 1.2 2000/02/06 21:25:21 sjboddie 31 updated cstr 32 32 33 33 Revision 1.1 1999/09/07 21:49:42 sjboddie … … 40 40 #include "cstrdocaction.h" 41 41 #include "cstrbrowsetools.h" 42 #include "browsetools.h" 42 43 #include "OIDtools.h" 43 44 #include "querytools.h" … … 92 93 void cstrdocaction::set_java_macros (cgiargsclass &args, displayclass &disp) { 93 94 94 text_t javaimagescontent = " _javaextras__javapostscript_";95 text_t javaimagescontent = "<!----java images content------->\n_javaextras__javapostscript_"; 95 96 96 97 text_t &arg_gg = args["gg"]; … … 134 135 button_here ++; 135 136 } 137 javaimagescontent += "<!--end java img content--->\n"; 136 138 disp.setmacro ("javaimagescontent", "document", javaimagescontent); 137 139 } … … 205 207 disp.setmacro ("header", "document", "_textheader_"); 206 208 207 disp.setmacro ("thisOID", "Global", response.docInfo[0].metadata[ 2].values[0]);208 209 text_t &classifytype = response.docInfo[0].metadata[ 1].values[0];209 disp.setmacro ("thisOID", "Global", response.docInfo[0].metadata["archivedir"].values[0]); 210 211 text_t &classifytype = response.docInfo[0].metadata["classifytype"].values[0]; 210 212 if (classifytype.empty()) classifytype = "Book"; // defaults to Book 211 213 … … 228 230 if (get_info (classtop, collection, metadata, false, collectproto, response, logout)) { 229 231 230 text_t &title = response.docInfo[0].metadata[ 0].values[0];231 text_t &classifytype = response.docInfo[0].metadata[ 1].values[0];232 text_t &title = response.docInfo[0].metadata["Title"].values[0]; 233 text_t &classifytype = response.docInfo[0].metadata["classifytype"].values[0]; 232 234 233 235 disp.setmacro ("pagetitle", "document", "_text" + title + "page_"); … … 284 286 while (this_figure != end_figure) { 285 287 textout << outconvert << disp 286 << "<p><center><img border=1 src=\"_httpcoll ection_/archives/_thisOID_/"288 << "<p><center><img border=1 src=\"_httpcollimg_/_thisOID_/" 287 289 << *this_figure << "\"></center>\n"; 288 290 this_figure ++; … … 306 308 while (this_facs != end_facs) { 307 309 textout << outconvert << disp 308 << "<p><center><img border=1 src=\"_httpcoll ection_/archives/_thisOID_/"310 << "<p><center><img border=1 src=\"_httpcollimg_/_thisOID_/" 309 311 << *this_facs << "\"></center>\n"; 310 312 this_facs ++; … … 359 361 } 360 362 361 int metasize = metadata.size();362 363 363 if (get_info (OID, collection, metadata, getParents, collectproto, inforesponse, logout)) { 364 364 int hastxt = inforesponse.docInfo[0].metadata["hastxt"].values[0].getint(); … … 438 438 } 439 439 } 440 441 442 bool cstrdocaction::do_action (cgiargsclass &args, recptprotolistclass *protos, 443 browsermapclass *browsers, displayclass &disp, 444 outconvertclass &outconvert, ostream &textout, 445 ostream &logout) { 446 447 448 // must have a valid collection server 449 recptproto *collectproto = protos->getrecptproto (args["c"], logout); 450 if (collectproto == NULL) { 451 logout << "cstrdocaction::do_action called with NULL collectproto\n"; 452 textout << outconvert << disp << "_document:header_\n" 453 << "Error: Attempt to get document without setting collection\n" 454 << "_document:footer_\n"; 455 } else { 456 457 text_t OID = args["d"]; 458 if (OID.empty()) OID = args["cl"]; 459 if (OID.empty()) { 460 textout << outconvert << disp << "Document contains no data_document:footer_\n"; 461 return true; 462 } 463 464 textout << outconvert << disp << "_document:header_\n" 465 << "_document:content_\n"; 466 467 if (args["d"].empty()) { 468 output_toc (args, browsers, formatinfo, collectproto, 469 disp, outconvert, textout, logout); 470 } else { 471 output_cstr_toc (args, browsers, formatinfo, collectproto, 472 disp, outconvert, textout, logout); 473 474 textout << "<p>\n"; 475 output_document (OID, args, collectproto, disp, outconvert, textout, logout); 476 } 477 478 textout << outconvert << disp << "_document:footer_\n"; 479 } 480 return true; 481 } 482 483 484 485 486 487 488 489 490 491 492 493
Note:
See TracChangeset
for help on using the changeset viewer.