/********************************************************************** * * niupepahlistbrowserclass.cpp -- * Copyright (C) 1999 The New Zealand Digital Library Project * * A component of the Greenstone digital library software * from the New Zealand Digital Library Project at the * University of Waikato, New Zealand. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: niupepahlistbrowserclass.cpp 1389 2000-08-10 00:25:26Z None $ * *********************************************************************/ /* $Log$ Revision 1.2 2000/03/22 02:00:13 nzdl updated niupepa collection Revision 1.1.1.1 2000/03/08 20:44:50 sjboddie added niupepa to CVS */ #include "niupepahlistbrowserclass.h" #include #include "OIDtools.h" niupepahlistbrowserclass::niupepahlistbrowserclass () { } niupepahlistbrowserclass::~niupepahlistbrowserclass () { } // overridden for niupepa so CL2 (date classification) wraps in the correct place // should probably do this in a more general way some time int niupepahlistbrowserclass::output_section_group (ResultDocInfo_t §ion, cgiargsclass &args, const text_t &/*collection*/, int colnumber, format_t *formatlistptr, bool use_table, text_tset &metadata, bool &getParents, recptproto *collectproto, displayclass &disp, outconvertclass &outconvert, ostream &textout, ostream &logout) { // expanded contents are going to cause some nasty recursions // so we'll only continue if being passed the current section if ((args["gc"] == 1) && (section.OID != args["d"])) return 0; // get all siblings FilterResponse_t response; text_t &arg_cl = args["cl"]; get_children (section.OID + ".pr", args["c"], metadata, getParents, collectproto, response, logout); if (use_table || colnumber > 0) { textout << "\n"; } textout << "
"; // get tab size text_t tab; int itab; disp.expandstring ("Global", "_tabwidth_", tab); itab = tab.getint(); if (colnumber > 0) textout << outconvert << disp << ""; textout << "
\n"; ResultDocInfo_tarray::iterator tsibling = response.docInfo.begin(); ResultDocInfo_tarray::iterator esibling = response.docInfo.end(); text_t icon, link; int scount = 1; while (tsibling != esibling) { bool highlight = false; textout << ""; text_t &doctype = (*tsibling).metadata["doctype"].values[0]; if ((*tsibling).OID == section.OID) { link.clear(); highlight = true; } else { link = ""; else link += "&cl=" + arg_cl + "&d=" + (*tsibling).OID + "\">"; } textout << outconvert << disp << get_formatted_string (*tsibling, formatlistptr, link, icon, highlight); textout << "\n"; if (scount == 10 || scount == 18) textout << "\n"; tsibling ++; scount ++; } textout << "
\n"; if (use_table || colnumber > 0) textout << "\n"; return 0; }