Changeset 11771


Ignore:
Timestamp:
2006-05-04T16:05:00+12:00 (18 years ago)
Author:
kjdon
Message:

removed the dm arg from the date list classifier in navigation bar link. now we work it out when we are displaying a datelist

File:
1 edited

Legend:

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

    r11539 r11771  
    373373   text_t navigationbar = "<!-- Navigation Bar -->\n";
    374374
    375    text_t date_extra = g_EmptyText;
    376375   get_top (args["cl"], topparent);
    377376   int numc = response.docInfo.size();
     
    391390      bool first = true;
    392391      while (dochere != docend) {
    393     date_extra = g_EmptyText;
    394392     if (!first) navigationbar += "_navbarspacer_";
    395393     
    396      // are we a datelist?? - need to set dm arg
    397      text_t childtype = (*dochere).metadata["childtype"].values[0];
    398      if (childtype == "DateList") {
    399        text_t date_meta = (*dochere).metadata["mdtype"].values[0];
    400        if (date_meta == g_EmptyText) {
    401          date_meta = "Date";
    402        }
    403        date_extra = "&amp;dm="+date_meta;
    404      }
    405394     bool unknown = false;
    406395     
     
    426415         // work out the link for this classifier, as it isn't the
    427416         // current page
    428          this_tab += "_httpdocument_&amp;cl=" + (*dochere).OID
    429            + date_extra;
     417         this_tab += "_httpdocument_&amp;cl=" + (*dochere).OID;
    430418       }
    431419       this_tab += "," + title + "," + title;
     
    443431     // set the _httpbrowseXXX_ macro for this classification
    444432     // set the correct url for this link
    445      disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&amp;cl=" + (*dochere).OID+date_extra);
     433     disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&amp;cl=" + (*dochere).OID);
    446434     
    447435
     
    478466      while (dochere != docend) {
    479467     text_t title = dochere->metadata["Title"].values[0];   
    480      if (title == "Date") { // a date list
    481        text_t date_meta = (*dochere).metadata["mdtype"].values[0];
    482        if (date_meta == "") {
    483          date_meta = "Date";
    484        }
    485        date_extra = "&amp;dm="+date_meta;
    486      }
    487 
    488      navigationbar += "<option value=\"_httpdocument_&amp;cl=" + dochere->OID +date_extra+ "\"";
     468
     469     navigationbar += "<option value=\"_httpdocument_&amp;cl=" + dochere->OID + "\"";
    489470     if (topparent == dochere->OID) {
    490471        navigationbar += " selected";
     
    595576   
    596577    metadata.insert ("Title");
    597     metadata.insert ("mdtype"); // in case there is a datelist
    598     metadata.insert ("childtype"); // in case there is a datelist
    599578    bool getParents = false;
    600579    get_children ("", collection, args["l"], metadata, getParents, collectproto, response, logout);
Note: See TracChangeset for help on using the changeset viewer.