Changeset 1282


Ignore:
Timestamp:
2000-07-13T14:51:10+12:00 (24 years ago)
Author:
sjboddie
Message:

got DocumentArrowsBottom working for collections using "paged" browsers
(like gberg). The whole idea of arrows as used both in the query results
page and document pages needs to be revisited to get things working in
all situations

File:
1 edited

Legend:

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

    r1254 r1282  
    2828/*
    2929   $Log$
     30   Revision 1.11  2000/07/13 02:51:10  sjboddie
     31   got DocumentArrowsBottom working for collections using "paged" browsers
     32   (like gberg). The whole idea of arrows as used both in the query results
     33   page and document pages needs to be revisited to get things working in
     34   all situations
     35
    3036   Revision 1.10  2000/06/29 02:47:20  sjboddie
    3137   added browser info (i.e VList, HList etc.) to status pages
     
    136142
    137143  if (section.OID != args["d"]) {
    138     // set the _parentarrow_ macro
    139     text_t parentarrow = "<a href=\"_httpdocument_&cl=" + args["cl"] +
    140       "&d=" + section.OID + "\">_iconprev_</a>\n";
     144    text_t httpprevarrow = "_httpdocument_&cl=" + args["cl"] + "&d=" + section.OID;
     145    text_t parentarrow = "<a href=\"" + httpprevarrow + "\">_iconprev_</a>\n";
     146    disp.setmacro ("httpprevarrow", "document", httpprevarrow);
    141147    disp.setmacro ("parentarrow", "document", parentarrow);
    142148    return 0;
     
    164170
    165171  text_t previousOID, previoustitle, nextOID, nexttitle;
    166   text_t previousarrow, nextarrow;
     172  text_t previousarrow, nextarrow, httpprevarrow, httpnextarrow;
    167173  bool found = false;
    168174
     
    181187    previousOID = (*(thissection-1)).OID;
    182188    previoustitle = (*(thissection-1)).metadata["Title"].values[0];
    183       } else
     189      } else {
    184190    previousarrow = "_document:parentarrow_";
     191      }
    185192
    186193      if ((thissection+1) != endsection) {
     
    201208      << ("_document:textnumpages_(" + text_t(numpages) + ")</center></td></tr>\n");
    202209
    203   if (!found)
    204     nextarrow = "<a href=\"_httpdocument_&cl=" + args["cl"] + "&d=" + sections.docInfo[0].OID +
    205       "\">" + sections.docInfo[0].metadata["Title"].values[0] + "_iconnext_</a>\n";
    206   else {
    207     if (!previousOID.empty())
    208       previousarrow = "<a href=\"_httpdocument_&cl=" + args["cl"] + "&d=" +
    209     previousOID + "\">_iconprev_" + previoustitle + "</a>\n";
    210     if (!nextOID.empty())
    211       nextarrow = "<a href=\"_httpdocument_&cl=" + args["cl"] + "&d=" +
    212     nextOID + "\">" + nexttitle + "_iconnext_</a>\n";
    213   }
     210  if (!found) {
     211    httpnextarrow = "_httpdocument_&cl=" + args["cl"] + "&d=" + sections.docInfo[0].OID;
     212    nextarrow = "<a href=\"" + httpnextarrow + "\">" +
     213      sections.docInfo[0].metadata["Title"].values[0] + "_iconnext_</a>\n";
     214
     215  } else {
     216    if (!previousOID.empty()) {
     217      httpprevarrow = "_httpdocument_&cl=" + args["cl"] + "&d=" + previousOID;
     218      previousarrow = "<a href=\"" + httpprevarrow + "\">_iconprev_" + previoustitle + "</a>\n";
     219    }
     220    if (!nextOID.empty()) {
     221      httpnextarrow = "_httpdocument_&cl=" + args["cl"] + "&d=" + nextOID;
     222      nextarrow = "<a href=\"" + httpnextarrow + "\">" + nexttitle + "_iconnext_</a>\n";
     223    }
     224  }
     225
     226  if (!httpprevarrow.empty()) disp.setmacro ("httpprevarrow", "document", httpprevarrow);
     227  if (!httpnextarrow.empty()) disp.setmacro ("httpnextarrow", "document", httpnextarrow);
    214228
    215229  textout << outconvert << disp << "<tr valign=middle>\n"
Note: See TracChangeset for help on using the changeset viewer.