Changeset 668


Ignore:
Timestamp:
1999-10-15T11:59:35+13:00 (25 years ago)
Author:
sjboddie
Message:

finished off browser classes

Location:
trunk/gsdl/src/recpt
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/browserclass.cpp

    r649 r668  
    2828/*
    2929   $Log$
     30   Revision 1.2  1999/10/14 22:59:33  sjboddie
     31   finished off browser classes
     32
    3033   Revision 1.1  1999/10/10 08:14:03  sjboddie
    3134   - metadata now returns mp rather than array
     
    6265}
    6366
    64 void browserclass::processOID (cgiargsclass &/*args*/) {
     67void browserclass::processOID (cgiargsclass &/*args*/, recptproto */*collectproto*/, ostream &/*logout*/) {
    6568}
    6669
    67 void browserclass::load_metadata_defaults (text_tset &metadata) {
     70void browserclass::load_metadata_defaults (text_tset &/*metadata*/) {
    6871}
    6972
    7073text_t browserclass::get_default_formatstring () {
    71   return "<td>[link][icon][/link]</td><td>{Or}{[Title],Untitled}</td>";
     74  return "<td>[link][icon][/link]</td><td>[highlight]{Or}{[Title],Untitled}[/highlight]</td>";
    7275}
    7376
    7477int browserclass::output_section_group (ResultDocInfo_t &/*section*/, cgiargsclass &/*args*/,
    75                      const int &/*colnumber*/, format_t */*formatlistptr*/,
    76                      const bool &/*use_table*/, displayclass &/*disp*/,
    77                      outconvertclass &/*outconvert*/, ostream &/*textout*/,
    78                      ostream &/*logout*/) {
     78                    int /*colnumber*/, format_t */*formatlistptr*/,
     79                    bool /*use_table*/, text_tset &/*metadata*/, bool &/*getParents*/,
     80                    recptproto */*collectproto*/, displayclass &/*disp*/,
     81                    outconvertclass &/*outconvert*/, ostream &/*textout*/, ostream &/*logout*/) {
     82  return 0;
     83}
     84
     85int browserclass::output_section_group (FilterResponse_t &/*sections*/, cgiargsclass &/*args*/,
     86                    int /*colnumber*/, format_t */*formatlistptr*/,
     87                    bool /*use_table*/, text_tset &/*metadata*/, bool &/*getParents*/,
     88                    recptproto */*collectproto*/, displayclass &/*disp*/,
     89                    outconvertclass &/*outconvert*/, ostream &/*textout*/, ostream &/*logout*/) {
    7990  return 0;
    8091}
  • trunk/gsdl/src/recpt/browserclass.h

    r649 r668  
    6363  virtual text_t get_browser_name ();
    6464 
    65   virtual void processOID (cgiargsclass &args);
     65  virtual void processOID (cgiargsclass &args, recptproto *collectproto, ostream &logout);
    6666 
    6767  // load_metadata_defaults should be called before
     
    7777  // next section group
    7878  virtual int output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
    79                     const int &colnumber, format_t *formatlistptr,
    80                     const bool &use_table, displayclass &disp,
     79                    int colnumber, format_t *formatlistptr,
     80                    bool use_table, text_tset &metadata, bool &getParents,
     81                    recptproto *collectproto, displayclass &disp,
     82                    outconvertclass &outconvert, ostream &textout, ostream &logout);
     83
     84  virtual int output_section_group (FilterResponse_t &sections, cgiargsclass &args,
     85                    int colnumber, format_t *formatlistptr,
     86                    bool use_table, text_tset &metadata, bool &getParents,
     87                    recptproto *collectproto, displayclass &disp,
    8188                    outconvertclass &outconvert, ostream &textout,
    8289                    ostream &logout);
  • trunk/gsdl/src/recpt/datelistbrowserclass.cpp

    r649 r668  
    2828/*
    2929   $Log$
     30   Revision 1.2  1999/10/14 22:59:33  sjboddie
     31   finished off browser classes
     32
    3033   Revision 1.1  1999/10/10 08:14:05  sjboddie
    3134   - metadata now returns mp rather than array
     
    4649}
    4750
    48 // configure should be called once for each configuration line
    49 // the default version does nothing
    50 void datelistbrowserclass::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
    51 }
    52 
    53 // init should be called after all the configuration is done but
    54 // before any other methods are called
    55 bool datelistbrowserclass::init (ostream &/*logout*/) {
    56   return true;
    57 }
    58 
    59 // returns the name that specifies the browserclass type
    6051text_t datelistbrowserclass::get_browser_name () {
    6152  return "DateList";
    6253}
    6354
     55void datelistbrowserclass::load_metadata_defaults (text_tset &metadata) {
     56  metadata.insert ("Date");
     57  metadata.insert ("doctype");
     58}
     59
     60text_t datelistbrowserclass::get_default_formatstring () {
     61  return "<td>[link][icon][/link]</td><td>[highlight]{Or}{[Title],Untitled}[/highlight]</td><td>[Date]</td>";
     62}
     63
     64
     65int datelistbrowserclass::output_section_group (FilterResponse_t &sections, cgiargsclass &args,
     66                        int colnumber, format_t *formatlistptr,
     67                        bool use_table, text_tset &/*metadata*/, bool &/*getParents*/,
     68                        recptproto */*collectproto*/, displayclass &disp,
     69                        outconvertclass &outconvert, ostream &textout, ostream &/*logout*/) {
     70
     71  text_t lastyear = "0000";
     72  text_t lastmonth = "00";
     73  text_t tabbing, endtabbing;
     74
     75  if (use_table || colnumber > 0) {
     76    textout << "<table><tr><td>";
     77    // get tab size
     78    text_t tab; int itab;
     79    disp.expandstring ("Global", "_tabwidth_", tab);
     80    itab = tab.getint();
     81    if (colnumber > 0)
     82      textout << "<img src=\"_httpimg_/space.gif\" width=" << (itab*colnumber) << ">";
     83    textout<< "</td><td>";
     84  }
     85
     86  textout << "<table>\n";
     87
     88  ResultDocInfo_tarray::iterator thissection = sections.docInfo.begin();
     89  ResultDocInfo_tarray::iterator endsection = sections.docInfo.end();
     90
     91  while (thissection != endsection) {
     92
     93    text_t &doctype = (*thissection).metadata["doctype"].values[0];
     94    text_t &date = (*thissection).metadata["Date"].values[0];
     95
     96    // bail on this document if it has no date
     97    if (date.empty()) continue;
     98
     99    text_t::const_iterator datebegin = date.begin();
     100    int datesize = date.size();
     101   
     102    if (datesize < 4) continue;
     103    text_t thisyear = substr (datebegin, datebegin+4);
     104    text_t thismonth = "00";
     105    if (datesize >= 6)
     106      thismonth = substr (datebegin+4, datebegin+6);
     107
     108    text_t link = "<a href=\"_httpdocument_&cl=";
     109    text_t icon = "_document:iconclosedbook_";
     110     
     111    if (doctype == "classify") {
     112      icon = "_document:iconclosedbookshelf_";
     113      link += (*thissection).OID + "\">";
     114    } else link += args["cl"] + "&d=" + (*thissection).OID + "\">";
     115
     116    textout << "<tr valign=top>";
     117
     118    if (thisyear != lastyear) {
     119      textout << outconvert << "<td><b>" << thisyear << "</b></td>";
     120      lastyear = thisyear;
     121    } else
     122      textout << "<td></td>";
     123   
     124    if (thismonth != lastmonth) {
     125      textout << outconvert << disp << ("<td><b>_textmonth" + thismonth + "_</b></td>");
     126      lastmonth = thismonth;
     127    } else
     128      textout << "<td></td>";
     129   
     130    if (!use_table) textout << "<td>\n";
     131   
     132    textout << outconvert << disp
     133            << get_formatted_string (*thissection, formatlistptr, link, icon) << "\n";
     134   
     135    if (!use_table) textout << "</td>";
     136   
     137    textout << "</tr>\n";
     138   
     139    thissection ++;
     140  }
     141
     142  textout << "</table>\n";
     143
     144  if (use_table  || colnumber > 0) textout << "</td></tr></table>\n";
     145  return 1;
     146}
     147
  • trunk/gsdl/src/recpt/datelistbrowserclass.h

    r649 r668  
    3939  virtual ~datelistbrowserclass ();
    4040
    41   // configure should be called once for each configuration line
    42   virtual void configure (const text_t &key, const text_tarray &cfgline);
     41  text_t get_browser_name ();
    4342
    44   // init should be called after all the configuration is done but
    45   // before any other methods are called
    46   virtual bool init (ostream &logout);
     43  void load_metadata_defaults (text_tset &metadata);
    4744
    48   // returns the name that specifies the browserclass type
    49   virtual text_t get_browser_name ();
     45  text_t get_default_formatstring ();
     46 
     47  int output_section_group (FilterResponse_t &sections, cgiargsclass &args,
     48                int colnumber, format_t *formatlistptr,
     49                bool use_table, text_tset &metadata, bool &getParents,
     50                recptproto *collectproto, displayclass &disp,
     51                outconvertclass &outconvert, ostream &textout, ostream &logout);
    5052};
    5153
  • trunk/gsdl/src/recpt/hlistbrowserclass.cpp

    r649 r668  
    2828/*
    2929   $Log$
     30   Revision 1.2  1999/10/14 22:59:34  sjboddie
     31   finished off browser classes
     32
    3033   Revision 1.1  1999/10/10 08:14:08  sjboddie
    3134   - metadata now returns mp rather than array
     
    3841#include "hlistbrowserclass.h"
    3942#include <assert.h>
    40 
     43#include "OIDtools.h"
    4144
    4245hlistbrowserclass::hlistbrowserclass () {
     
    4649}
    4750
    48 // configure should be called once for each configuration line
    49 // the default version does nothing
    50 void hlistbrowserclass::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
    51 }
    52 
    53 // init should be called after all the configuration is done but
    54 // before any other methods are called
    55 bool hlistbrowserclass::init (ostream &/*logout*/) {
    56   return true;
    57 }
    58 
    5951// returns the name that specifies the browserclass type
    6052text_t hlistbrowserclass::get_browser_name () {
     
    6254}
    6355
     56text_t hlistbrowserclass::get_default_formatstring () {
     57  return "[link][highlight][Title][/highlight][/link]";
     58}
     59
     60// need to change OID to it's child
     61void hlistbrowserclass::processOID (cgiargsclass &args, recptproto *collectproto,
     62                    ostream &logout) {
     63
     64  text_t OID = args["d"];
     65  bool is_classify = false;
     66  if (OID.empty()) {
     67    is_classify = true;
     68    OID = args["cl"];
     69  }
     70
     71  FilterResponse_t response;
     72  text_tset metadata;
     73  metadata.insert ("childtype");
     74  text_t classifytype = "Invisible";
     75  text_t child_doctype;
     76
     77  text_tarray OIDs;
     78
     79  while (classifytype == "Invisible") {
     80    OIDs.erase (OIDs.begin(), OIDs.end());
     81   
     82    OIDs.push_back (OID);
     83    OIDs.push_back (OID + ".fc");
     84
     85    get_info (OIDs, args["c"], metadata, false, collectproto, response, logout);
     86
     87    OID = response.docInfo[1].OID;
     88    classifytype = response.docInfo[0].metadata["childtype"].values[0];
     89  }
     90  if (is_classify) args["cl"] = OID;
     91  else args["d"] = OID;
     92}
     93
     94int hlistbrowserclass::output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
     95                         int colnumber, format_t *formatlistptr,
     96                         bool use_table, text_tset &metadata, bool &getParents,
     97                         recptproto *collectproto, displayclass &disp,
     98                         outconvertclass &outconvert, ostream &textout, ostream &logout) {
     99
     100  // get all siblings
     101  FilterResponse_t response;
     102  text_t &arg_d = args["d"];
     103  text_t &arg_cl = args["cl"];
     104  get_children (section.OID + ".pr", args["c"], metadata, getParents,
     105        collectproto, response, logout);
     106
     107                   
     108  if (use_table || colnumber > 0) {
     109    textout << "<table><tr><td>";
     110    // get tab size
     111    text_t tab; int itab;
     112    disp.expandstring ("Global", "_tabwidth_", tab);
     113    itab = tab.getint();
     114    if (colnumber > 0) textout << outconvert << disp
     115                   << "<img src=\"_httpimg_/space.gif\" width="
     116                   << (itab*colnumber) << ">";
     117    textout << "</td>\n";
     118  }
     119
     120  textout << "<table><tr>\n";
     121
     122  ResultDocInfo_tarray::iterator tsibling = response.docInfo.begin();
     123  ResultDocInfo_tarray::iterator esibling = response.docInfo.end();
     124
     125  text_t icon, link;
     126  while (tsibling != esibling) {
     127
     128    bool highlight = false;
     129    textout << "<td>";
     130
     131    if ((*tsibling).OID == section.OID) {
     132      link.clear();
     133      highlight = true;
     134    } else {
     135      link = "<a href=\"_httpdocument_";
     136      if (!arg_d.empty())
     137    link += "&cl=" + arg_cl + "&d=" + (*tsibling).OID + "\">";
     138      else
     139    link += "&cl=" + (*tsibling).OID + "\">";
     140    }
     141
     142    textout << outconvert << disp << get_formatted_string (*tsibling, formatlistptr, link, icon, highlight);
     143
     144    textout << "</td>\n";
     145    tsibling ++;
     146  }
     147
     148  textout << "</tr></table>\n";
     149  if (use_table  || colnumber > 0) textout << "</tr></table>\n";
     150  return 0;
     151}
     152
  • trunk/gsdl/src/recpt/hlistbrowserclass.h

    r649 r668  
    3939  virtual ~hlistbrowserclass ();
    4040
    41   // configure should be called once for each configuration line
    42   virtual void configure (const text_t &key, const text_tarray &cfgline);
    43 
    44   // init should be called after all the configuration is done but
    45   // before any other methods are called
    46   virtual bool init (ostream &logout);
    47 
    4841  // returns the name that specifies the browserclass type
    4942  virtual text_t get_browser_name ();
     43
     44  text_t get_default_formatstring ();
     45 
     46  void processOID (cgiargsclass &args, recptproto *collectproto,
     47           ostream &logout);
     48
     49  int output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
     50                int colnumber, format_t *formatlistptr,
     51                bool use_table, text_tset &metadata, bool &getParents,
     52                recptproto *collectproto, displayclass &disp,
     53                outconvertclass &outconvert, ostream &textout,
     54                ostream &logout);
     55
    5056};
    5157
    5258#endif
     59
  • trunk/gsdl/src/recpt/invbrowserclass.cpp

    r653 r668  
    2828/*
    2929   $Log$
     30   Revision 1.2  1999/10/14 22:59:34  sjboddie
     31   finished off browser classes
     32
    3033   Revision 1.1  1999/10/10 08:28:06  sjboddie
    3134   - metadata now returns map rather than array
     
    4548}
    4649
    47 
    48 
    49 // configure should be called once for each configuration line
    50 // the default version does nothing
    51 void invbrowserclass::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
    52 }
    53 
    54 // init should be called after all the configuration is done but
    55 // before any other methods are called
    56 bool invbrowserclass::init (ostream &/*logout*/) {
    57   return true;
    58 }
    59 
    6050// returns the name that specifies the browserclass type
    6151text_t invbrowserclass::get_browser_name () {
    6252  return "Invisible";
    6353}
    64 
    65 // this browser class does nothing by default - it should
    66 // be overridden for receptionists wanting to display
    67 // 'Invisible' classifications in some way
    68 int invbrowserclass::output_section_group (const ResultDocInfo_t &/*section*/, cgiargsclass &/*args*/,
    69                        const int &/*colnumber*/, format_t */*formatlistptr*/,
    70                        const bool &/*use_table*/, displayclass &/*disp*/,
    71                        outconvertclass &/*outconvert*/, ostream &/*textout*/,
    72                        ostream &/*logout*/) {
    73   return 0;
    74 }
  • trunk/gsdl/src/recpt/invbrowserclass.h

    r653 r668  
    3636
    3737public:
     38
     39  // this browser class does nothing by default - it should
     40  // be overridden for receptionists wanting to display
     41  // 'Invisible' classifications in some way
     42
    3843  invbrowserclass ();
    3944  virtual ~invbrowserclass ();
    40 
    41   // configure should be called once for each configuration line
    42   virtual void configure (const text_t &key, const text_tarray &cfgline);
    43 
    44   // init should be called after all the configuration is done but
    45   // before any other methods are called
    46   virtual bool init (ostream &logout);
    4745
    4846  // returns the name that specifies the browserclass type
    4947  virtual text_t get_browser_name ();
    5048
    51   int output_section_group (const ResultDocInfo_t &section, cgiargsclass &args,
    52                 const int &colnumber, format_t *formatlistptr,
    53                 const bool &use_table, displayclass &disp,
    54                 outconvertclass &outconvert, ostream &textout,
    55                 ostream &logout);
    5649};
    5750
  • trunk/gsdl/src/recpt/vlistbrowserclass.cpp

    r649 r668  
    2828/*
    2929   $Log$
     30   Revision 1.2  1999/10/14 22:59:34  sjboddie
     31   finished off browser classes
     32
    3033   Revision 1.1  1999/10/10 08:14:11  sjboddie
    3134   - metadata now returns mp rather than array
     
    4649}
    4750
    48 
    49 
    50 // configure should be called once for each configuration line
    51 // the default version does nothing
    52 void vlistbrowserclass::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
    53 }
    54 
    55 // init should be called after all the configuration is done but
    56 // before any other methods are called
    57 bool vlistbrowserclass::init (ostream &/*logout*/) {
    58   return true;
    59 }
    60 
    6151// returns the name that specifies the browserclass type
    6252text_t vlistbrowserclass::get_browser_name () {
     
    6454}
    6555
    66 void vlistbrowserclass::processOID (cgiargsclass &/*args*/) {
    67 }
    68 
    6956void vlistbrowserclass::load_metadata_defaults (text_tset &metadata) {
    7057  metadata.insert ("haschildren");
    7158  metadata.insert ("doctype");
    72   metadata.insert ("classifytype");
     59}
     60
     61text_t vlistbrowserclass::get_default_formatstring () {
     62  return "<td>[link][icon][/link]</td><td>[highlight]{Or}{[Title],Untitled}[/highlight]</td>";
    7363}
    7464
    7565int vlistbrowserclass::output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
    76                          const int &colnumber, format_t *formatlistptr,
    77                          const bool &use_table, displayclass &disp,
    78                          outconvertclass &outconvert, ostream &textout,
    79                          ostream &logout) {
     66                         int colnumber, format_t *formatlistptr,
     67                         bool use_table, text_tset &/*metadata*/, bool &/*getParents*/,
     68                         recptproto */*collectproto*/, displayclass &disp,
     69                         outconvertclass &outconvert, ostream &textout, ostream &/*logout*/) {
    8070
    8171  text_t link, icon;
    8272  get_link_icon (section, args, link, icon);
    83 
    84   output_section (section, colnumber, formatlistptr, use_table,
    85           link, icon, disp, outconvert, textout, logout);
    86  
    87   return 1;
    88 }
    89 
    90 void vlistbrowserclass::output_section (ResultDocInfo_t &section, const int &colnumber,
    91                     format_t *formatlistptr, const bool &use_table,
    92                     const text_t &link, const text_t &icon,
    93                     displayclass &disp, outconvertclass &outconvert,
    94                     ostream &textout, ostream &logout) {
    95                    
     73  bool highlight = false;
     74  if (!args["d"].empty()) {
     75    if (args["d"] == section.OID) highlight = true;
     76  } else
     77    if (args["cl"] == section.OID) highlight = true;
     78
     79
    9680  if (use_table || colnumber > 0) {
    97     textout << "<table><tr><td>";
     81    textout << "<table><tr>";
    9882    // get tab size
    9983    text_t tab; int itab;
     
    10185    itab = tab.getint();
    10286    if (colnumber > 0) textout << outconvert << disp
    103                    << "<img src=\"_httpimg_/space.gif\" width="
    104                    << (itab*colnumber) << ">";
    105     textout << "</td>";
    106   }
    107 
    108   textout << outconvert << disp << get_formatted_string (section, formatlistptr, link, icon);
    109 
     87                   << "<td><img src=\"_httpimg_/space.gif\" width="
     88                   << (itab*colnumber) << "></td>";
     89  }
     90
     91  textout << outconvert << disp << get_formatted_string (section, formatlistptr,
     92                             link, icon, highlight);
     93 
    11094  if (use_table  || colnumber > 0) textout << "</tr></table>\n";
     95
     96  return 1;
     97}
     98
     99int vlistbrowserclass::output_section_group (FilterResponse_t &sections, cgiargsclass &args,
     100                         int colnumber, format_t *formatlistptr,
     101                         bool use_table, text_tset &/*metadata*/, bool &/*getParents*/,
     102                         recptproto */*collectproto*/, displayclass &disp,
     103                         outconvertclass &outconvert, ostream &textout, ostream &/*logout*/) {
     104
     105  text_t link, icon;
     106  text_t &arg_d = args["d"];
     107  text_t &arg_cl = args["cl"];
     108
     109  if (colnumber > 0) {
     110    textout << "<table><tr>";
     111    // get tab size
     112    text_t tab; int itab;
     113    disp.expandstring ("Global", "_tabwidth_", tab);
     114    itab = tab.getint();
     115    if (colnumber > 0) textout << outconvert << disp
     116                   << "<td><img src=\"_httpimg_/space.gif\" width="
     117                   << (itab*colnumber) << "></td>";
     118    textout << "<td>";
     119  }
     120  if (use_table) textout << "<table>\n";
     121
     122  ResultDocInfo_tarray::iterator thissection = sections.docInfo.begin();
     123  ResultDocInfo_tarray::iterator endsection = sections.docInfo.end();
     124
     125  while (thissection != endsection) {
     126
     127    get_link_icon (*thissection, args, link, icon);
     128    bool highlight = false;
     129    if (!arg_d.empty()) {
     130      if (arg_d == (*thissection).OID) highlight = true;
     131    } else
     132      if (arg_cl == (*thissection).OID) highlight = true;
     133
     134    if (use_table || colnumber > 0) textout << "<tr>";
     135    textout << outconvert << disp << get_formatted_string (*thissection, formatlistptr,
     136                               link, icon, highlight);
     137    if (use_table || colnumber > 0) textout << "</tr>";
     138    textout << "\n";
     139    thissection ++;
     140  }
     141
     142  if (use_table) textout << "</table>\n";
     143  if (colnumber > 0) textout << "</table></td></tr></table>\n";
     144
     145  return 1;
    111146}
    112147
     
    119154  link = "<a href=\"_httpdocument_";
    120155  icon = "_document:icontext_";
    121   int haschildren = section.metadata["haschildren"].values.back().getint();
    122   const text_t doctype = section.metadata["doctype"].values.back();
     156  int haschildren = section.metadata["haschildren"].values[0].getint();
     157  const text_t doctype = section.metadata["doctype"].values[0];
     158
     159  text_t &arg_d = args["d"];
     160  text_t &arg_cl = args["cl"];
    123161
    124162  if (args["a"] == "q") {
     
    128166    link += "&cl=search&d=" + section.OID + "\">";
    129167
    130   } else if (!args["d"].empty()) {
     168  } else if (!arg_d.empty()) {
    131169    // document level
    132170    if (is_top(section.OID)) {
    133171      icon = "_document:iconopenbook_";
    134       if (args["cl"] == "search") link = "<a href=\"_httpquery_\">";
    135       else link += "&cl=" + args["cl"] + "&d=" + section.OID + ".pr\">";
     172      if (arg_cl == "search") link = "<a href=\"_httpquery_\">";
     173      else link += "&cl=" + arg_cl + "\">";
    136174   
    137175    } else if (haschildren == 1) {
    138       if ((args["gc"] == "1") || (is_child_of (section.OID, args["d"]))) {
     176      if ((args["gc"] == "1") ||
     177      (is_child_of (section.OID, arg_d)) ||
     178      (section.OID == arg_d)) {
    139179    icon = "_document:iconopenfolder_";
    140     link += "&cl=" + args["cl"] + "&d=" + section.OID + ".pr\">";
     180    link += "&cl=" + arg_cl + "&d=" + section.OID + ".pr\">";
    141181      } else {
    142182    icon = "_document:iconclosedfolder_";
    143     link += "&cl=" + args["cl"] + "&d=" + section.OID + "\">";
     183    link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
    144184      }
    145     } else link += "&cl=" + args["cl"] + "&d=" + section.OID + "\">";
     185    } else link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
    146186
    147187  } else {
     
    149189    if (haschildren == 1) {
    150190      if (doctype == "classify") {
    151     if ((args["gc"] == "1") || (is_child_of (section.OID, args["cl"]))) {
     191    if ((args["gc"] == "1") ||
     192        (is_child_of (section.OID, arg_cl)) ||
     193        (section.OID == arg_cl)) {
    152194      icon = "_document:iconopenbookshelf_";
    153195      link += "&cl=" + section.OID + ".pr\">";
     
    158200      } else {
    159201    icon = "_document:iconclosedbook_";
    160     link += "&cl=" + args["cl"] + "&d=" + section.OID + "\">";
     202    link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
    161203      }
    162204    } else {
    163205      if (doctype == "classify") link = "";
    164       else link += "&cl=" + args["cl"] + "&d=" + section.OID + "\">";
     206      else link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
    165207    }
    166208  }
  • trunk/gsdl/src/recpt/vlistbrowserclass.h

    r649 r668  
    3939  virtual ~vlistbrowserclass ();
    4040
    41   // configure should be called once for each configuration line
    42   virtual void configure (const text_t &key, const text_tarray &cfgline);
    43 
    44   // init should be called after all the configuration is done but
    45   // before any other methods are called
    46   virtual bool init (ostream &logout);
    47 
    48   // returns the name that specifies the browserclass type
    4941  virtual text_t get_browser_name ();
    50 
    51   void processOID (cgiargsclass &/*args*/);
    5242
    5343  void load_metadata_defaults (text_tset &metadata);
    5444
     45  text_t get_default_formatstring ();
     46
    5547  int output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
    56                 const int &colnumber, format_t *formatlistptr,
    57                 const bool &use_table, displayclass &disp,
    58                 outconvertclass &outconvert, ostream &textout,
    59                 ostream &logout);
     48                int colnumber, format_t *formatlistptr,
     49                bool use_table, text_tset &metadata, bool &getParents,
     50                recptproto *collectproto, displayclass &disp,
     51                outconvertclass &outconvert, ostream &textout, ostream &logout);
     52
     53  int output_section_group (FilterResponse_t &sections, cgiargsclass &args,
     54                int colnumber, format_t *formatlistptr,
     55                bool use_table, text_tset &metadata, bool &getParents,
     56                recptproto *collectproto, displayclass &disp,
     57                outconvertclass &outconvert, ostream &textout, ostream &logout);
    6058
    6159protected:
    62   void output_section (ResultDocInfo_t &section, const int &colnumber,
    63                format_t *formatlistptr, const bool &use_table,
    64                const text_t &link, const text_t &icon,
    65                displayclass &disp, outconvertclass &outconvert,
    66                ostream &textout, ostream &logout);
    6760
    6861  void get_link_icon (ResultDocInfo_t &section, cgiargsclass &args,
Note: See TracChangeset for help on using the changeset viewer.