Changeset 15002 for gsdl/trunk/src/recpt/pageaction.cpp
- Timestamp:
- 2008-02-22T11:25:40+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/recpt/pageaction.cpp
r13982 r15002 180 180 bool first = true; 181 181 while (collist_here != collist_end) { 182 182 183 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 183 184 … … 253 254 int count = 0; 254 255 while (collist_here != collist_end) { 256 255 257 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 258 259 text_t arg_g = args["g"]; 260 text_t colname_dir = *collist_here; 256 261 262 if (arg_g.empty()) { 263 // normal top-level home page 264 text_t::const_iterator begin = colname_dir.begin(); 265 text_t::const_iterator end = colname_dir.end(); 266 267 if (findchar(begin,end,'/')!=end) { 268 // no g argument, so generating top level home page 269 // => if colname_dir has "/" in collection name, filter it out 270 271 ++collist_here; 272 continue; 273 } 274 } 275 else { 276 // show only collections in the named group 277 278 279 if (colname_dir == arg_g) { 280 // display about this collect text 281 282 text_t collectionextra = cinfo->get_collectionmeta("collectionextra", args["l"]); 283 if (!collectionextra.empty()) { 284 // prepend text on at start 285 homeextra = "<p>" + collectionextra + "</p>" + homeextra; 286 } 287 288 ++collist_here; 289 continue; 290 } 291 292 293 // => filter out anything that does not start with the group prefix 294 295 if (!starts_with(colname_dir,arg_g + "/")) { 296 ++collist_here; 297 continue; 298 } 299 } 300 301 257 302 if (cinfo != NULL) { 258 if (cinfo->isPublic && ( cinfo->buildDate > 0)) {303 if (cinfo->isPublic && ((cinfo->buildDate > 0)) || (cinfo->isCollectGroup)) { 259 304 260 305 found_valid_col = true; … … 264 309 alt = collectionname; 265 310 } 311 312 313 comerror_t err; 314 text_t optsite = g_EmptyText; 315 text_t site_name = (*rprotolist_here).p->get_site_name (err); 316 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 317 318 text_t link; 319 320 if (cinfo->isCollectGroup) { 321 link = "<a class=\"collectiontitle\" href=\"_gwcgi_?"+optsite+"a=p&p=home&g=" + *collist_here; 322 link += "&l=" + args["l"] + "&w=" + args["w"] + "\">"; 323 } 324 else { 325 link = "<a class=\"collectiontitle\"href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here; 326 link += "&l=" + args["l"] + "&w=" + args["w"] + "\">"; 327 } 328 329 if (!cinfo->receptionist.empty()) 330 link = "<a class=\"collectiontitle\"href=\"" + cinfo->receptionist + "\">"; 331 266 332 267 333 // url to image: try iconcollectionsmall, then iconcollection … … 291 357 292 358 collectionname 293 = "<img width=\"150\" src=\"" + iconurl + "\" alt=\"" + alt + "\">"; 294 } else { 295 collectionname = alt; 359 = link + "<img width=\"150\" src=\"" + iconurl + "\" alt=\"" + alt + "\">" + "</a>"; 360 } else { 361 362 collectionname = "<div class=\"collecttitle\" style=\"width: 150px; border: 1px solid; \"><p class=\"collectiontitle\" style=\"font-size: 18px; width: 150px; white-space:normal; \">"; 363 collectionname += alt + "</p></div>"; 364 365 collectionname = link + collectionname + "</a>"; 366 296 367 } 297 368 298 369 if (count%configinfo.HomePageCols == 0) 299 homeextra += "<tr valign=\"top\">\n"; 300 301 comerror_t err; 302 text_t optsite = g_EmptyText; 303 text_t site_name = (*rprotolist_here).p->get_site_name (err); 304 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 305 306 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here; 307 link += "&l=" + args["l"] + "&w=" + args["w"] + "\">"; 308 309 if (!cinfo->receptionist.empty()) 310 link = "<a href=\"" + cinfo->receptionist + "\">"; 311 312 homeextra += "<td>" + link + collectionname + "</a></td>\n"; 370 homeextra += "<tr valign=\"top\">\n"; 371 372 homeextra += "<td align=\"center\">" + collectionname + "</td>\n"; 313 373 314 374 ++count;
Note:
See TracChangeset
for help on using the changeset viewer.