Changeset 5124 for trunk/gsdl/src/recpt/vlistbrowserclass.cpp
- Timestamp:
- 2003-08-11T12:09:06+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/vlistbrowserclass.cpp
r4936 r5124 192 192 // get_link_icon attempts to work out what type of icon should be displayed for 193 193 // the given section and what it should link to. 194 // [modification to allow default document detach settings -- kjdon] 194 195 void vlistbrowserclass::get_link_icon (ResultDocInfo_t §ion, cgiargsclass &args, 195 196 const text_t &collink, text_t &link, text_t &icon) { 196 197 197 198 link = "<a href=\"_httpdocument_" + collink; 199 text_t link_end = "\">"; 200 text_t detach_link_end = "&x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page 198 201 icon = "_document:icontext_"; 202 203 text_t doctype; 199 204 int haschildren = 0; 200 205 201 206 if (section.metadata.count("haschildren")>0) 202 207 haschildren = section.metadata["haschildren"].values[0].getint(); 203 204 text_t doctype;205 208 if (section.metadata.count("doctype")>0) 206 209 doctype = section.metadata["doctype"].values[0]; … … 210 213 211 214 if (args["a"] == "q") { 212 // query results 215 // query results list 216 link += "&cl=search&d=" + section.OID; 217 218 if (args["xx"] == "1") { 219 link += detach_link_end; 220 } else { 221 link += link_end; 222 } 213 223 if ((is_top (section.OID)) && (haschildren == 1)) icon = "_document:iconclosedbook_"; 214 224 else if (haschildren == 1) icon = "_document:iconclosedfolder_"; 215 link += "&cl=search&d=" + section.OID + "\">"; 216 225 217 226 } else if (!arg_d.empty()) { 218 // document level227 // we are in a document - none of the links should be detach links 219 228 if (is_top(section.OID)) { 229 // we link back to the originating page eg search page or classifier page 220 230 icon = "_document:iconopenbook_"; 221 if (arg_cl == "search") link = "<a href=\"_httpquery_\">"; 231 if (arg_cl == "search") { 232 link = "<a href=\"_httpquery_\">"; 233 } 222 234 else link += "&cl=" + arg_cl + "\">"; 223 235 224 236 } else if (haschildren == 1) { 225 237 if ((args["gc"] == "1") || … … 239 251 } 240 252 } 241 253 242 254 } else { 243 // classification level 255 // classification level - links to docs may be detaching 244 256 if (haschildren == 1) { 245 257 if (doctype == "classify") { … … 254 266 } 255 267 } else { 268 256 269 icon = "_document:iconclosedbook_"; 257 link += "&cl=" + arg_cl + "&d=" + section.OID + "\">"; 270 link += "&cl=" + arg_cl + "&d=" + section.OID; 271 if (args["xx"] == "1") { 272 link += detach_link_end; 273 } else { 274 link += link_end; 275 } 276 258 277 } 259 278 } else { 260 279 if (doctype == "classify") link = ""; 261 else link += "&cl=" + arg_cl + "&d=" + section.OID + "\">"; 262 } 263 } 264 } 280 else { 281 link += "&cl=" + arg_cl + "&d=" + section.OID; 282 if (args["xx"] == "1") { 283 link += detach_link_end; 284 } else { 285 link += link_end; 286 } 287 } 288 } 289 } 290 291 }
Note:
See TracChangeset
for help on using the changeset viewer.