Changeset 13366 for trunk/gsdl/src/recpt/vlistbrowserclass.cpp
- Timestamp:
- 2006-11-29T14:18:56+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/vlistbrowserclass.cpp
r12488 r13366 61 61 "<td valign=\"top\">[highlight]{Or}{[dls.Title],[dc.Title],[Title],Untitled}[/highlight]" 62 62 "{If}{[Source],<br><i>([Source])</i>}</td>"; 63 } 64 65 bool vlistbrowserclass::show_search_result_links(recptproto * collectproto,const text_t &collection,ostream& logout){ 66 ColInfoResponse_t cinfo; 67 comerror_t err; 68 collectproto->get_collectinfo (collection, cinfo, err, logout); 69 bool show_links = false; 70 71 text_tmap::const_iterator format_here = cinfo.format.begin(); 72 text_tmap::const_iterator format_end = cinfo.format.end(); 73 74 while (format_here != format_end) { 75 if (((*format_here).first == "DocumentSearchResultLinks") && 76 ((*format_here).second == "true")){ 77 show_links = true; 78 break; 79 } 80 ++format_here; 81 } 82 83 return show_links; 63 84 } 64 85 … … 74 95 text_t link, icon; 75 96 text_t collink = collection; 97 bool show_links = show_search_result_links(collectproto,collection,logout); 98 76 99 77 100 #ifndef DOCHANDLE … … 79 102 #endif 80 103 81 get_link_icon (section, args, collink, link, icon); 104 get_link_icon (section, args, collink, link, icon, show_links); 105 106 //get_link_icon (section, args, collink, link, icon); 107 82 108 bool highlight = false; 83 109 if (!args["d"].empty()) { … … 133 159 text_t &arg_d = args["d"]; 134 160 text_t &arg_cl = args["cl"]; 135 161 136 162 text_t collink = collection; 163 bool show_links = show_search_result_links(collectproto,collection,logout); 164 137 165 #ifndef DOCHANDLE 138 166 if (!collink.empty()) collink = "&c=" + collink; … … 183 211 } 184 212 213 int count = 0; 214 185 215 while (thissection != endsection) { 186 216 ++item; 187 get_link_icon (*thissection, args, collink, link, icon); 217 get_link_icon (*thissection, args, collink, link, icon,show_links); 218 //get_link_icon (*thissection, args, collink, link, icon); 188 219 bool highlight = false; 189 220 if (!arg_d.empty()) { … … 227 258 // [modification to allow default document detach settings -- kjdon] 228 259 void vlistbrowserclass::get_link_icon (ResultDocInfo_t §ion, cgiargsclass &args, 229 const text_t &collink, text_t &link, text_t &icon) { 260 const text_t &collink, text_t &link, text_t &icon, bool showresultlinks) { 261 262 230 263 231 264 #ifndef DOCHANDLE … … 236 269 237 270 text_t link_end = "\">"; 271 238 272 #ifndef DOCHANDLE 239 273 text_t detach_link_end = "&x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page … … 252 286 doctype = section.metadata["doctype"].values[0]; 253 287 288 254 289 text_t &arg_d = args["d"]; 255 290 text_t &arg_cl = args["cl"]; 256 291 292 257 293 if (args["a"] == "q") { 258 294 // query results list 259 295 #ifndef DOCHANDLE 260 link += "&cl=search&d=" + section.OID; 296 int result_num = section.result_num; 297 int num_docs = args["nmd"].getint(); 298 int srn = 0; 299 int srp = 0; 300 if (showresultlinks && result_num < num_docs) { 301 srn = result_num + 1; 302 } 303 if (showresultlinks && result_num > 1 ) { 304 srp = result_num - 1; 305 } 306 307 text_t srp_t = srp; 308 text_t srn_t = srn; 309 link +="&srp="+srp_t; 310 link +="&srn="+srn_t; 311 link +="&cl=search&d=" + section.OID; 261 312 #else 262 313 link += "," + section.OID+")"; 263 314 #endif 315 316 264 317 if (args["xx"] == "1") { 265 318 link += detach_link_end;
Note:
See TracChangeset
for help on using the changeset viewer.