Changeset 411


Ignore:
Timestamp:
1999-07-21T17:01:09+12:00 (25 years ago)
Author:
sjboddie
Message:

fixed up wrapping of classificationlinks

File:
1 edited

Legend:

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

    r405 r411  
    1212/*
    1313   $Log$
     14   Revision 1.14  1999/07/21 05:01:09  sjboddie
     15   fixed up wrapping of classificationlinks
     16
    1417   Revision 1.13  1999/07/20 02:59:54  sjboddie
    1518   List and AZList classifications now use format strings
     
    364367        // set the _httpbrowseXXX_ macro for this classification
    365368        text_t link = (*dochere).OID;
    366         if (classifytype == "AZList" || classifytype == "Datelist") link += ".fc";
     369        if (classifytype == "AZList" || classifytype == "DateList") link += ".fc";
    367370        disp.setmacro ("httpbrowse" + title, "Global",
    368371               "_httpdocument_&cl=" + link);
     
    404407
    405408  // _httpprevarrow_        these are set if next or previous arrows
    406   // _httpnextarrow_        are to be used - (i.e. if it's an AZList or a Datelist
     409  // _httpnextarrow_        are to be used - (i.e. if it's an AZList or a DateList
    407410  //                        classifytype at a top level or if it's a Book or a
    408411  //                        Hierarchy classifytype at document level
     
    498501    // (if they're required by the current classification type)
    499502   
    500     if ((classifytype == "AZList") || (classifytype == "Datelist")) {
     503    if ((classifytype == "AZList") || (classifytype == "DateList")) {
    501504     
    502505      text_t classificationlinks, navarrows;
     
    519522          ResultDocInfo_tarray::const_iterator secend = response.docInfo.end();
    520523         
     524          int lenlinks = 0;
    521525          while (sechere != secend) {
    522526        if ((*sechere).metadata[1].values[0] == "classify") {
     527          const text_t &sectionheading = (*sechere).metadata[0].values[0];
     528
    523529          if (((*sechere).OID == arg_cl) || is_child_of((*sechere).OID, arg_cl)) {
    524530           
     
    529535              disp.setmacro ("httpnextarrow", "document", "_httpdocument_&cl=" + (*(sechere+1)).OID);
    530536
    531             classificationlinks += "\n<b>" + (*sechere).metadata[0].values[0] + "</b>&nbsp;&nbsp;&nbsp;";
     537            lenlinks += sectionheading.size();
     538            classificationlinks += "<b>" + sectionheading + "</b>";
     539            if (lenlinks > 50) {
     540              classificationlinks += "<br>\n";
     541              lenlinks = 0;
     542            } else {
     543              if (sechere+1 != secend) classificationlinks += "&nbsp;&nbsp;&nbsp;\n";
     544              lenlinks += 3;
     545            }
    532546          } else {
     547            lenlinks += sectionheading.size();
    533548            classificationlinks += link + (*sechere).OID + "\">";
    534             classificationlinks += (*sechere).metadata[0].values[0] + "</a>";
    535             if ((sechere + 1) != secend) classificationlinks += "&nbsp;&nbsp;&nbsp;";
     549            classificationlinks += sectionheading + "</a>";
     550            if (lenlinks > 50) {
     551              classificationlinks += "<br>\n";
     552              lenlinks = 0;
     553            } else {
     554              if (sechere+1 != secend) classificationlinks += "&nbsp;&nbsp;&nbsp;\n";
     555              lenlinks += 3;
     556            }
    536557          }
    537558        }
     
    599620      else
    600621    // Book is the default for a document level toc - AZList, List and
    601     // Datelist don't make sense for document level
     622    // DateList don't make sense for document level
    602623    book_toc (args, collectproto, disp,
    603624          outconvert, textout, logout);
     
    616637    hierarchy_toc (thistype, args, collectproto,
    617638               disp, outconvert, textout, logout);
    618       else if (toptype == "Datelist")
    619     datelist_toc (thistype, toptitle, formatstring, args, collectproto,
     639      else if (toptype == "DateList")
     640    datelist_toc (thistype, formatstring, args, collectproto,
    620641              disp, outconvert, textout, logout);
    621642      else
Note: See TracChangeset for help on using the changeset viewer.