Changeset 10873
- Timestamp:
- 2005-11-08T17:30:57+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/documentaction.cpp
r9923 r10873 380 380 381 381 if (!use_pulldown) { 382 navigationbar += "<nobr>\n"; 382 383 navigationbar += "_navtabsearch_"; 383 384 if (has_search_button) { 384 385 if (args["a"] == "q") { 385 navigationbar += "_icontabsearchgreen_"; 386 } else { 387 navigationbar += "_imagesearch_"; 386 navigationbar += "(selected)"; 388 387 } 389 388 } 390 389 391 if (has_search_button || numc == 0) navigationbar += "_ imagespacer_";390 if (has_search_button || numc == 0) navigationbar += "_navbarspacer_"; 392 391 393 392 bool first = true; 394 393 while (dochere != docend) { 395 394 date_extra = g_EmptyText; 396 if (!first) navigationbar += "_ imagespacer_";395 if (!first) navigationbar += "_navbarspacer_"; 397 396 398 397 text_t title = (*dochere).metadata["Title"].values[0]; … … 402 401 date_meta = "Date"; 403 402 } 404 date_extra = "& dm="+date_meta;403 date_extra = "&dm="+date_meta; 405 404 } 406 405 bool unknown = false; 407 406 408 // test the _XXXwidth_ macro to see if image macros are 409 // defined for this type of classification - if not we'll 410 // just display the text 407 // test if the _tabtext$FIELD_ macro is defined, which means 408 // this is a "known" metadata type and we have a translation for it 411 409 text_t tmpwidth; 412 disp.expandstring ("document", "_" + title + "width_", tmpwidth); 413 if (tmpwidth == ("_" + title + "width_")) unknown = true; 410 text_t macroname="_tabtext" + title + "_"; 411 disp.expandstring ("document", macroname, tmpwidth); 412 if (tmpwidth == macroname) // it wasn't expanded 413 unknown = true; 414 414 415 415 // if we're inside a document all the classification buttons should be enabled 416 if (arg_d.empty() && ((*dochere).OID == topparent)) { 417 if (unknown) navigationbar += " " + title + " "; 418 else navigationbar += "_icontab" + title + "green_"; 419 } else { 420 421 // set the _httpbrowseXXX_ macro for this classification 422 if (unknown) navigationbar += " <a href=\"_httpdocument_&cl=" + 423 (*dochere).OID + date_extra+"\">" + title + "</a> "; 424 else { 425 navigationbar += "_image" + title + "_"; 426 disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&cl=" + (*dochere).OID+date_extra); 427 } 416 text_t this_tab; 417 bool is_top; 418 419 is_top = ((*dochere).OID == topparent); 420 421 // set default text fragment 422 this_tab = "_navtab_("; 423 424 if (unknown) { // just give the field name 425 if (!is_top) { 426 // work out the link for this classifier, as it isn't the 427 // current page 428 this_tab += "_httpdocument_&cl=" + (*dochere).OID 429 + date_extra; 430 } 431 this_tab += "," + title + ","; 432 } else { // use the macro for this field so we get translations 433 this_tab += "_httpbrowse" + title; 434 this_tab += "_,_tabtext" + title; 435 this_tab += "_,_textdescr" + title + "_"; 428 436 } 437 438 if (arg_d.empty() && is_top) { 439 // don't link to this classifier as it is the current one 440 this_tab += ",selected"; 441 } else if (!unknown) { 442 // set the _httpbrowseXXX_ macro for this classification 443 // set the correct url for this link 444 disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&cl=" + (*dochere).OID+date_extra); 445 } 446 447 this_tab += ")"; 448 449 navigationbar += this_tab; 450 429 451 ++dochere; 430 452 first = false; 431 453 } 432 454 433 if (!has_search_button && numc == 1) navigationbar += "_imagespacer_"; 434 435 navigationbar += "\n</nobr>\n"; 436 navigationbar += "<!-- End of Navigation Bar -->\n"; 455 if (!has_search_button && numc == 1) navigationbar += "_navbarspacer_"; 456 457 navigationbar += "\n<!-- End of Navigation Bar -->\n"; 437 458 438 459 } else { … … 451 472 navigationbar += " selected"; 452 473 } 453 navigationbar += ">_t exticontabsearchgreen_</option>\n";474 navigationbar += ">_tabtextsearch_</option>\n"; 454 475 } 455 476 … … 461 482 date_meta = "Date"; 462 483 } 463 date_extra = "& dm="+date_meta;484 date_extra = "&dm="+date_meta; 464 485 } 465 486 466 navigationbar += "<option value=\"_httpdocument_& cl=" + dochere->OID +date_extra+ "\"";487 navigationbar += "<option value=\"_httpdocument_&cl=" + dochere->OID +date_extra+ "\""; 467 488 if (topparent == dochere->OID) { 468 489 navigationbar += " selected"; … … 505 526 // _httppagehome_ overridden home url if html collections have own homepage 506 527 507 // _usability_ a macro for remote usability reporting508 528 509 529 // must have a valid collection server to continue … … 549 569 text_t httpdocument; 550 570 disp.expandstring (displayclass::defaultpackage, "_httpdocument_", httpdocument); 551 httpdocument += "& f=1";571 httpdocument += "&f=1"; 552 572 disp.setmacro ("httpdocument", displayclass::defaultpackage, httpdocument); 553 573 disp.setmacro ("gsdltop", displayclass::defaultpackage, "documenttop"); … … 592 612 } 593 613 } 594 text_tmap::iterator usability = cinfo.format.find("Usability");595 if(usability!=cinfo.format.end()){596 disp.setmacro("usability",displayclass::defaultpackage,"_imageusab_");597 disp.setmacro("usabinterface",displayclass::defaultpackage,("_usab"+(*usability).second+"_"));598 disp.setmacro("usabilityscript", displayclass::defaultpackage, "_usabshowscript_");599 }600 614 } 601 615 … … 612 626 if (get_info (inlink, args["c"], args["l"], metadata, false, collectproto, response, logout)) { 613 627 if (!response.docInfo[0].metadata["section"].values[0].empty()) { 614 outlink = "_httpdocument_& d=" + response.docInfo[0].metadata["section"].values[0];628 outlink = "_httpdocument_&d=" + response.docInfo[0].metadata["section"].values[0]; 615 629 return true; 616 630 } … … 635 649 if (get_info (inlink, *col_here, args["l"], metadata, false, collectproto, response, logout)) { 636 650 if (!response.docInfo[0].metadata["section"].values[0].empty()) { 637 outlink = "_httpdocument_& c=" + *col_here + "&d=" +651 outlink = "_httpdocument_&c=" + *col_here + "&d=" + 638 652 response.docInfo[0].metadata["section"].values[0]; 639 653 return true; … … 869 883 bool unknown = false; 870 884 871 // test the _ XXXwidth_ macro to see if image macros are885 // test the _iconXXXpage_ macro to see if image macros are 872 886 // defined for this type of classification - if not we'll 873 887 // just display the text 874 888 text_t tmp; 875 disp.expandstring ("document", "_" + title + "width_", tmp); 876 if (tmp == ("_" + title + "width_")) unknown = true; 889 text_t macroname="_icon" + title + "page_"; 890 disp.expandstring ("document", macroname, tmp); 891 if (tmp == macroname) unknown = true; // it wasn't expanded 877 892 878 893 if (unknown) { … … 1278 1293 // work out values for next link 1279 1294 if (haschildren) { 1280 disp.setmacro ("httpnextarrow", "document", "_httpdocument_& cl=" + args["cl"] +1281 "& d=" + arg_d + ".fc");1295 disp.setmacro ("httpnextarrow", "document", "_httpdocument_&cl=" + args["cl"] + 1296 "&d=" + arg_d + ".fc"); 1282 1297 } else { 1283 1298 text_tarray::const_iterator h = next_siblings.begin(); … … 1285 1300 while (h != e) { 1286 1301 if (!(*h).empty()) { 1287 disp.setmacro ("httpnextarrow", "document", "_httpdocument_& cl=" + args["cl"] +1288 "& d=" + *h);1302 disp.setmacro ("httpnextarrow", "document", "_httpdocument_&cl=" + args["cl"] + 1303 "&d=" + *h); 1289 1304 break; 1290 1305 } … … 1295 1310 // work out value for previous link 1296 1311 if (!previous_sibling.empty()) { 1297 disp.setmacro ("httpprevarrow", "document", "_httpdocument_& cl=" + args["cl"] +1298 "& d=" + previous_sibling);1312 disp.setmacro ("httpprevarrow", "document", "_httpdocument_&cl=" + args["cl"] + 1313 "&d=" + previous_sibling); 1299 1314 } else { 1300 1315 if (countchar(arg_d.begin(), arg_d.end(), '.')) { 1301 disp.setmacro ("httpprevarrow", "document", "_httpdocument_& cl=" + args["cl"] +1302 "& d=" + get_parent(arg_d));1316 disp.setmacro ("httpprevarrow", "document", "_httpdocument_&cl=" + args["cl"] + 1317 "&d=" + get_parent(arg_d)); 1303 1318 } 1304 1319 } -
trunk/gsdl/src/recpt/hlistbrowserclass.cpp
r9620 r10873 133 133 link = "<a href=\"_httpdocument_"; 134 134 if (doctype == "classify") 135 link += "& cl=" + (*tsibling).OID + "\">";135 link += "&cl=" + (*tsibling).OID + "\">"; 136 136 else { 137 link += "& cl=" + arg_cl + "&d=" + (*tsibling).OID;// + "\">";137 link += "&cl=" + arg_cl + "&d=" + (*tsibling).OID;// + "\">"; 138 138 // [modification to allow default document detach settings -- kjdon] 139 139 if (args["xx"]=="1") { 140 140 // documents should be detached 141 link += "& x=1\" target=\\_blank>";141 link += "&x=1\" target=\\_blank>"; 142 142 } else { 143 143 link += "\">"; -
trunk/gsdl/src/recpt/pageaction.cpp
r9931 r10873 177 177 if (cinfo->isPublic && (cinfo->buildDate > 0)) { 178 178 179 text_t coll_type = "& ct=";179 text_t coll_type = "&ct="; 180 180 if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) { 181 181 … … 187 187 } 188 188 189 coll_type += "& qto=";189 coll_type += "&qto="; 190 190 191 191 // now we also want to check search types to set the qto arg … … 210 210 type_here = cinfo->searchTypes.begin(); 211 211 if (*type_here == "form") { 212 coll_type += "& qt=1"; // set the default to form212 coll_type += "&qt=1"; // set the default to form 213 213 } 214 214 } … … 227 227 text_t optsite = g_EmptyText; 228 228 text_t site_name = (*rprotolist_here).p->get_site_name (err); 229 if (!site_name.empty()) { optsite = "site="+site_name+"& "; }230 231 text_t link = "_gwcgi_?"+optsite+"a=p& p=about&c=" + *collist_here + coll_type;232 link += "& l=" + args["l"] + "&w=" + args["w"];229 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 230 231 text_t link = "_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type; 232 link += "&l=" + args["l"] + "&w=" + args["w"]; 233 233 234 234 // We are "dynamically" overriding so to speak the … … 271 271 ostream &logout) { 272 272 273 text_t homeextra = "< center><table width=_pagewidth_><tr valign=top>\n";273 text_t homeextra = "<table class=\"collections\"><tr valign=\"top\">\n"; 274 274 bool found_valid_col = false; 275 275 recptprotolistclass::iterator rprotolist_here = protos->begin(); … … 293 293 if (cinfo->isPublic && (cinfo->buildDate > 0)) { 294 294 295 text_t coll_type = "& ct=";295 text_t coll_type = "&ct="; 296 296 if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) { 297 297 … … 303 303 } 304 304 305 coll_type += "& qto=";305 coll_type += "&qto="; 306 306 307 307 // now we also want to check search types to set the qto arg … … 326 326 type_here = cinfo->searchTypes.begin(); 327 327 if (*type_here == "form") { 328 coll_type += "& qt=1"; // set the default to form328 coll_type += "&qt=1"; // set the default to form 329 329 } 330 330 } … … 369 369 370 370 collectionname 371 = "<img width= 150 border=1src=\"" + iconurl + "\" alt=\"" + alt + "\">";371 = "<img width=\"150\" border=\"1\" src=\"" + iconurl + "\" alt=\"" + alt + "\">"; 372 372 } else { 373 373 collectionname = alt; … … 375 375 376 376 if ((count%configinfo.HomePageCols == 0) && (!first)) 377 homeextra += "</tr><tr valign= top>\n";377 homeextra += "</tr><tr valign=\"top\">\n"; 378 378 379 379 comerror_t err; 380 380 text_t optsite = g_EmptyText; 381 381 text_t site_name = (*rprotolist_here).p->get_site_name (err); 382 if (!site_name.empty()) { optsite = "site="+site_name+"& "; }383 384 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p& p=about&c=" + *collist_here + coll_type;385 link += "& l=" + args["l"] + "&w=" + args["w"] + "\">";382 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 383 384 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type; 385 link += "&l=" + args["l"] + "&w=" + args["w"] + "\">"; 386 386 387 387 if (!cinfo->receptionist.empty()) … … 400 400 } 401 401 } 402 homeextra += "</t d></tr>\n<tr>\n";402 homeextra += "</tr>\n<tr>\n"; 403 403 ++rprotolist_here; 404 404 } … … 407 407 homeextra += "<td>No valid (i.e. built and public) collections are available</td>\n"; 408 408 } 409 homeextra += "</tr></table> </center>\n";409 homeextra += "</tr></table>\n"; 410 410 disp.setmacro ("homeextra", "home", homeextra); 411 411 } … … 439 439 ++count; 440 440 441 text_t coll_type = "& ct=";441 text_t coll_type = "&ct="; 442 442 443 443 if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) { … … 450 450 } 451 451 452 coll_type += "& qto=";452 coll_type += "&qto="; 453 453 454 454 // now we also want to check search types to set the qto arg … … 474 474 type_here = cinfo->searchTypes.begin(); 475 475 if (*type_here == "form") { 476 coll_type += "& qt=1"; // set the default to form476 coll_type += "&qt=1"; // set the default to form 477 477 } 478 478 } … … 490 490 text_t optsite = g_EmptyText; 491 491 text_t site_name = (*rprotolist_here).p->get_site_name (err); 492 if (!site_name.empty()) { optsite = "site="+site_name+"& "; }492 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 493 493 494 494 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type+"\">"; -
trunk/gsdl/src/recpt/queryaction.cpp
r10789 r10873 1363 1363 text_t& arg_d = (*thissection).OID; 1364 1364 text_t doc_url = "_httpdocument_"; 1365 doc_url += "& c=" + collection;1366 doc_url += "& d=" + arg_d;1365 doc_url += "&c=" + collection; 1366 doc_url += "&d=" + arg_d; 1367 1367 1368 1368 // location response (url may contain macros!!) … … 1375 1375 text_t query_url = "_gwcgi_"; 1376 1376 query_url += "?e=" + args["e"]; 1377 query_url += "& h=" + args["h"];1378 query_url += "& q=" + args["q"];1379 query_url += "& r=" + args["r"];1380 query_url += "& t=" + args["t"];1381 query_url += "& hs=" + args["hs"];1377 query_url += "&h=" + args["h"]; 1378 query_url += "&q=" + args["q"]; 1379 query_url += "&r=" + args["r"]; 1380 query_url += "&t=" + args["t"]; 1381 query_url += "&hs=" + args["hs"]; 1382 1382 1383 1383 textout << outconvert << disp << "Location: " << query_url << "\n\n"; … … 1600 1600 } 1601 1601 query += "c="+args["c"]; 1602 query += "& h="+args["h"];1603 query += "& t="+args["t"];1604 query += "& b="+args["b"];1605 query += "& j="+args["j"];1606 query += "& n="+args["n"];1607 query += "& s="+args["s"];1608 query += "& k="+args["k"];1609 query += "& g="+args["g"];1602 query += "&h="+args["h"]; 1603 query += "&t="+args["t"]; 1604 query += "&b="+args["b"]; 1605 query += "&j="+args["j"]; 1606 query += "&n="+args["n"]; 1607 query += "&s="+args["s"]; 1608 query += "&k="+args["k"]; 1609 query += "&g="+args["g"]; 1610 1610 1611 1611 text_t qstring = args["q"]; 1612 1612 //text_t formattedquery =cgi_safe(qstring); 1613 //query += "& q="+formattedquery;1614 query += "& q="+qstring;1613 //query += "&q="+formattedquery; 1614 query += "&q="+qstring; 1615 1615 bool display=false; 1616 1616 int hd = args.getintarg("hd"); -
trunk/gsdl/src/recpt/statusaction.cpp
r9931 r10873 61 61 << "_status:infoheader_(_titlewelcome_)\n" 62 62 << "_status:welcome_" 63 << "< center><table width=_pagewidth_>\n"63 << "<table>\n" 64 64 << "<th align=left>abbrev.</th><th align=left>collection</th>" 65 65 << "<th align=left>public?</th><th align=left>running?</th></tr>\n"; … … 127 127 } 128 128 129 textout << "</table> </center>\n";129 textout << "</table>\n"; 130 130 textout << outconvert << disp << "_status:infofooter_\n"; 131 131 } -
trunk/gsdl/src/recpt/vlistbrowserclass.cpp
r9620 r10873 74 74 75 75 text_t collink = collection; 76 if (!collink.empty()) collink = "& c=" + collink;76 if (!collink.empty()) collink = "&c=" + collink; 77 77 78 78 get_link_icon (section, args, collink, link, icon); … … 124 124 125 125 text_t collink = collection; 126 if (!collink.empty()) collink = "& c=" + collink;126 if (!collink.empty()) collink = "&c=" + collink; 127 127 128 128 if (colnumber > 0) { … … 209 209 link = "<a href=\"_httpdocument_" + collink; 210 210 text_t link_end = "\">"; 211 text_t detach_link_end = "& x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page211 text_t detach_link_end = "&x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page 212 212 icon = "_document:icontext_"; 213 213 … … 225 225 if (args["a"] == "q") { 226 226 // query results list 227 link += "& cl=search&d=" + section.OID;227 link += "&cl=search&d=" + section.OID; 228 228 229 229 if (args["xx"] == "1") { … … 243 243 link = "<a href=\"_httpquery_\">"; 244 244 } 245 else link += "& cl=" + arg_cl + "\">";245 else link += "&cl=" + arg_cl + "\">"; 246 246 247 247 } else if (haschildren == 1) { … … 250 250 (section.OID == arg_d)) { 251 251 icon = "_document:iconopenfolder_"; 252 link += "& cl=" + arg_cl + "&d=" + section.OID + ".pr\">";252 link += "&cl=" + arg_cl + "&d=" + section.OID + ".pr\">"; 253 253 } else { 254 254 icon = "_document:iconclosedfolder_"; 255 link += "& cl=" + arg_cl + "&d=" + section.OID + "\">";255 link += "&cl=" + arg_cl + "&d=" + section.OID + "\">"; 256 256 } 257 257 } else { 258 258 if (args["gt"] == "0") { 259 link += "& cl=" + arg_cl + "&d=" + section.OID + "\">";259 link += "&cl=" + arg_cl + "&d=" + section.OID + "\">"; 260 260 } else { 261 link += "& cl=" + arg_cl + "&d=" + section.OID + "#" + section.OID + "\">";261 link += "&cl=" + arg_cl + "&d=" + section.OID + "#" + section.OID + "\">"; 262 262 } 263 263 } … … 271 271 (section.OID == arg_cl)) { 272 272 icon = "_document:iconopenbookshelf_"; 273 link += "& cl=" + section.OID + ".pr\">";273 link += "&cl=" + section.OID + ".pr\">"; 274 274 } else { 275 275 icon = "_document:iconclosedbookshelf_"; 276 link += "& cl=" + section.OID + "\">";276 link += "&cl=" + section.OID + "\">"; 277 277 } 278 278 } else { 279 279 280 280 icon = "_document:iconclosedbook_"; 281 link += "& cl=" + arg_cl + "&d=" + section.OID;281 link += "&cl=" + arg_cl + "&d=" + section.OID; 282 282 if (args["xx"] == "1") { 283 283 link += detach_link_end; … … 290 290 if (doctype == "classify") link = ""; 291 291 else { 292 link += "& cl=" + arg_cl + "&d=" + section.OID;292 link += "&cl=" + arg_cl + "&d=" + section.OID; 293 293 if (args["xx"] == "1") { 294 294 link += detach_link_end;
Note:
See TracChangeset
for help on using the changeset viewer.