Changeset 15835

Show
Ignore:
Timestamp:
30.05.2008 14:43:13 (11 years ago)
Author:
mdewsnip
Message:

(Adding dynamic classifiers) Improved get_link_icon() for dynamic classifiers so both open and closed nodes are dealt with.

Files:
1 modified

Legend:

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

    r15810 r15835  
    386386    if (haschildren == 1) { 
    387387      if (doctype == "classify") { 
    388     if ((args["gc"] == "1") ||  
     388    // Dynamic classifier nodes 
     389    if (args["a"] == "dc") 
     390    { 
     391      // Open node 
     392      if (section.OID == args["dcn"]) 
     393      { 
     394        icon = "_document:iconopenbookshelf_"; 
     395        link = "<a href=\"_gwcgi_?c=" + args["c"] + "&amp;a=dc&amp;dcl=" + args["dcl"] + "&amp;dcn=\">"; 
     396      } 
     397      // Closed node 
     398      else 
     399      { 
     400        icon = "_document:iconclosedbookshelf_"; 
     401 
     402        // The node label is going into the URL, so make it CGI-safe 
     403        text_t classifier_node_cgi_safe = cgi_safe_utf8(section.OID); 
     404        link = "<a href=\"_gwcgi_?c=" + args["c"] + "&amp;a=dc&amp;dcl=" + args["dcl"] + "&amp;dcn=" + classifier_node_cgi_safe + "\">"; 
     405      } 
     406    } 
     407    // Static classifier nodes 
     408    else if ((args["gc"] == "1") ||  
    389409        (is_child_of (section.OID, arg_cl)) ||  
    390410        (section.OID == arg_cl)) { 
     
    401421 
    402422#ifndef DOCHANDLE 
    403       if (args["a"] == "dc") 
    404       { 
    405         // This is a dynamic classifier node, and the node label is going into the URL, so make it CGI-safe 
    406         text_t classifier_node_cgi_safe = cgi_safe_utf8(section.OID); 
    407         link = "<a href=\"_gwcgi_?c=" + args["c"] + "&amp;a=dc&amp;dcl=" + args["dcl"] + "&amp;dcn=" + classifier_node_cgi_safe + "\">"; 
    408       } 
    409       else 
    410       { 
    411         link += "&amp;cl=" + section.OID + "\">"; 
    412       } 
     423      link += "&amp;cl=" + section.OID + "\">"; 
    413424#else 
    414425      link += ","+section.OID + ")\">";