Ignore:
Timestamp:
2008-05-29T16:38:55+12:00 (16 years ago)
Author:
mdewsnip
Message:

Fixed up some nasty formatting problems in get_link_icon().

File:
1 edited

Legend:

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

    r13451 r15808  
    292292    doctype = section.metadata["doctype"].values[0];
    293293
    294 
    295294  text_t &arg_d = args["d"];
    296295  text_t &arg_cl = args["cl"];
    297  
    298  
    299   if (args["a"] == "q") {
     296
     297  if (args["a"] == "q")
     298  {
    300299    // query results list
    301300#ifndef DOCHANDLE
     
    319318    link += "," + section.OID+")";
    320319#endif
    321 
    322320 
    323321    if (args["xx"] == "1") {
    324322      link += detach_link_end;
    325     } else {
     323    }
     324    else {
    326325      link += link_end;
    327326    }
    328327    if ((is_top (section.OID)) && (haschildren == 1)) icon = "_document:iconclosedbook_";
    329     else if (haschildren == 1) icon = "_document:iconclosedfolder_";
    330    
    331   } else if (!arg_d.empty()) {
     328    else if (haschildren == 1) icon = "_document:iconclosedfolder_"; 
     329  }
     330  else if (!arg_d.empty()) {
    332331    // we are in a document - none of the links should be detach links
    333332    if (is_top(section.OID)) {
     
    343342    link += ","+arg_cl + ")\">";
    344343#endif
    345       }   
    346      
    347     } else if (haschildren == 1) {
     344      }
     345    }
     346    else if (haschildren == 1) {
    348347      if ((args["gc"] == "1") ||
    349348      (is_child_of (section.OID, arg_d)) ||
     
    355354    link += ","+section.OID + ".pr)\">";
    356355#endif
    357       } else {
     356      }
     357      else {
    358358    icon = "_document:iconclosedfolder_";
    359359#ifndef DOCHANDLE
     
    363363#endif
    364364      }
    365     } else {
     365    }
     366    else {
    366367      if (args["gt"] == "0") {
    367368#ifndef DOCHANDLE
     
    370371    link += ","+section.OID + ")\">";
    371372#endif
    372       } else {
     373      }
     374      else {
    373375#ifndef DOCHANDLE
    374376    link += "&cl=" + arg_cl + "&d=" + section.OID + "#" + section.OID + "\">";
     
    378380      }
    379381    }
    380    
    381   } else {
     382  }
     383  else {
    382384    // classification level - links to docs may be detaching
    383385    if (haschildren == 1) {
     
    393395      link += ","+section.OID + ".pr)\">";
    394396#endif
    395 
    396 
    397     } else {
     397    }
     398    else {
    398399      icon = "_document:iconclosedbookshelf_";
    399400
     
    403404      link += ","+section.OID + ")\">";
    404405#endif
    405 
    406     }
    407       } else {
    408    
     406    }
     407      }
     408      else {
    409409    icon = "_document:iconclosedbook_";
    410410#ifndef DOCHANDLE
     
    415415    if (args["xx"] == "1") {
    416416      link +=  detach_link_end;
    417     } else {
     417    }
     418    else {
    418419      link += link_end;
    419420    }
    420    
    421       }
    422     } else {
     421      }
     422    }
     423    else {
    423424      if (doctype == "classify") link = "";
    424425      else {
     
    430431    if (args["xx"] == "1") {
    431432      link +=  detach_link_end;
    432     } else {
     433    }
     434    else {
    433435      link += link_end;
    434436    }
     
    436438    }
    437439  }
    438  
    439 }
     440}
Note: See TracChangeset for help on using the changeset viewer.