Changeset 279 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-06-16T16:03:48+12:00 (25 years ago)
Author:
sjboddie
Message:

Now sets "cl" arg to "search" when going to a document from a search
results page. This allows the close book icon (in hierarchy toc) to
take you back to the results page if that's where you came from.
If you got to the document page somehow other than from a
classification or a search (i.e. if "cl" isn't set) then the close
book icon is disabled

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

Legend:

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

    r278 r279  
    1212/*
    1313   $Log$
     14   Revision 1.6  1999/06/16 04:03:47  sjboddie
     15   Now sets "cl" arg to "search" when going to a document from a search
     16   results page. This allows the close book icon (in hierarchy toc) to
     17   take you back to the results page if that's where you came from.
     18   If you got to the document page somehow other than from a
     19   classification or a search (i.e. if "cl" isn't set) then the close
     20   book icon is disabled
     21
    1422   Revision 1.5  1999/06/16 03:11:25  sjboddie
    1523   get_info() now takes a getParents argument
     
    378386  text_t doclink = "<a href=\"_httpdocument_&cl=";
    379387
    380   if (args["d"].empty()) {
    381     if (args["cl"].empty()) return;
    382     OID = args["cl"];
     388  text_t &arg_d = args["d"];
     389  text_t &arg_cl = args["cl"];
     390
     391  if (arg_d.empty()) {
     392    if (arg_cl.empty()) return;
     393    OID = arg_cl;
    383394    topOID = OID; // don't always want to expand from top if expanding classifications
    384395    classifytype = "classify";
    385396  } else {
    386     OID = args["d"];
    387     get_top (args["d"], topOID);
     397    OID = arg_d;
     398    get_top (arg_d, topOID);
    388399    classifytype = "Document";
    389400  }
     
    454465    if ((classifytype == "Document") && (is_top((*thissection).OID)) &&
    455466    (args.getintarg("x")))
    456       textout << "<a href=\"\" onClick = \"close_detach()";
     467      textout << "<a href=\"\" onClick = \"close_detach();\">";
    457468    else {
    458469      if (!gt) {
     
    461472    if (is_top (thisOID))
    462473      if (classifytype == "classify")
    463         link = args["cl"] + "&d=" + thisOID;
     474        link = doclink + arg_cl + "&d=" + thisOID + "\">";
    464475      else
    465         link = args["cl"];
     476        if (arg_cl.empty())
     477          link.clear();
     478        else if (arg_cl == "search")
     479          link = "<a href=\"_httpquery_\">";
     480        else
     481          link = doclink + arg_cl + "\">";
    466482    else
    467483      if (haschildren)
    468484        if (classifytype == "classify")
    469           link = thisOID + ".pr";
     485          link = doclink + thisOID + ".pr\">";
    470486        else
    471           link = args["cl"] + "&d=" + thisOID + ".pr";
     487          link = doclink + arg_cl + "&d=" + thisOID + ".pr\">";
    472488      else
    473489        if (classifytype == "classify")
    474           link = thisOID;
     490          link = doclink + thisOID + "\">";
    475491        else
    476           link = args["cl"] + "&d=" + thisOID;
     492          link = doclink + arg_cl + "&d=" + thisOID + "\">";
    477493   
    478     textout << outconvert << disp << doclink << link;
     494    textout << outconvert << disp << link;
    479495      } else {
    480     textout << "<a href=\"#" << count;
     496    textout << "<a href=\"#" << count << "\">";
    481497    count ++;
    482498      }
    483499    }
    484500   
    485     textout << outconvert << disp << "\">" << icon << "</a></td><td";
     501    textout << outconvert << disp << icon << "</a></td><td";
    486502    if (colsremaining > 1) textout << " colspan=" << colsremaining;
    487503    textout << outconvert << disp << ">" << title << "</td></tr>\n";
     
    502518  FilterResponse_t response;
    503519  text_t doclink = "<a href=\"_httpdocument_";
     520
     521  text_t &arg_cl = args["cl"];
    504522
    505523  metadata.push_back ("doctype");
     
    547565      } else {
    548566    text_t link;
    549     if (doctype == "classify") link = "&cl=" + *thisparent + ".pr";
     567    if (doctype == "classify") link = doclink + "&cl=" + *thisparent + ".pr";
    550568    else
    551       if (is_top (*thisparent)) link = "&cl=" + args["cl"];
    552       else link = "&cl=" + args["cl"] + "&d=" + *thisparent + ".pr";
     569      if (is_top (*thisparent))
     570        if (arg_cl.empty())
     571          link.clear();
     572        else if (arg_cl == "search")
     573          link = "<a href=\"_httpquery_\">";
     574        else
     575          link = doclink + "&cl=" + arg_cl + "\">";
     576      else link = doclink + "&cl=" + arg_cl + "&d=" + *thisparent + ".pr\">";
    553577
    554578    textout << outconvert << disp << "<tr>" << tab << "<td valign=top>"
    555         << doclink << link << "\">" << icon << "</a></td>";
     579        << link << icon << "</a></td>";
    556580      }
    557581      textout << "<td";
  • trunk/gsdl/src/recpt/queryaction.cpp

    r275 r279  
    1212/*
    1313   $Log$
     14   Revision 1.5  1999/06/16 04:03:48  sjboddie
     15   Now sets "cl" arg to "search" when going to a document from a search
     16   results page. This allows the close book icon (in hierarchy toc) to
     17   take you back to the results page if that's where you came from.
     18   If you got to the document page somehow other than from a
     19   classification or a search (i.e. if "cl" isn't set) then the close
     20   book icon is disabled
     21
    1422   Revision 1.4  1999/06/16 02:08:38  sjboddie
    1523   got queryaction working
     
    321329    while (this_doc != end_doc) {
    322330
    323       text_t link = "<a href=\"_httpdocument_&d=" + (*this_doc).OID + "\">";
     331      text_t link = "<a href=\"_httpdocument_&cl=search&d=" + (*this_doc).OID + "\">";
    324332
    325333      text_t title;
Note: See TracChangeset for help on using the changeset viewer.