Ignore:
Timestamp:
2005-05-23T16:36:40+12:00 (19 years ago)
Author:
kjdon
Message:

getting collectionmeta from teh colinforesponse now, not using a get_info via the protocol. this means that collmeta will be read from the config file not from the database - it will not require rebuilding for changes to take effect.

File:
1 edited

Legend:

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

    r9620 r9931  
    5252}
    5353
    54 void statusaction::output_welcome (cgiargsclass &/*args*/, recptprotolistclass *protos,
     54void statusaction::output_welcome (cgiargsclass &args, recptprotolistclass *protos,
    5555                   displayclass &disp, outconvertclass &outconvert,
    5656                   ostream &textout, ostream &logout) {
     
    9090      ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout);
    9191      if (cinfo != NULL) {
    92         text_t collname = *collist_here;
    93         text_tmap::iterator it = cinfo->collectionmeta.find("collectionname");
    94         if (it != cinfo->collectionmeta.end()) collname = (*it).second;
     92        text_t collname = cinfo->get_collectionmeta("collectionname", args["l"]);
     93        if (collname.empty()) {
     94          collname = *collist_here;
     95        }
    9596
    9697        textout << "<td>";
     
    594595
    595596      textout << "<tr><th valign=top>collection metadata</th><td><table>\n";
    596       text_tmap::iterator meta_here = collectinfo->collectionmeta.begin();
    597       text_tmap::iterator meta_end = collectinfo->collectionmeta.end();
     597      collectionmeta_map::iterator meta_here = collectinfo->collectionmeta.begin();
     598      collectionmeta_map::iterator meta_end = collectinfo->collectionmeta.end();
     599     
    598600      while (meta_here != meta_end) {
    599     textout << outconvert << "<tr><td>" << (*meta_here).first
    600         << "</td><td>" << (*meta_here).second << "</td></tr>\n";
     601    textout << outconvert << "<tr><td valign=top>" << (*meta_here).first
     602        << "</td><td><table>" ;
     603        text_tmap lang_map = (*meta_here).second;
     604    text_tmap::iterator lang_here = lang_map.begin();
     605    text_tmap::iterator lang_end = lang_map.end();
     606    while (lang_here != lang_end) {
     607      textout << outconvert << "<tr><td>" << (*lang_here).first
     608            << "</td><td>" << (*lang_here).second << "</td></tr>\n";
     609     
     610      ++lang_here;
     611    }
     612    textout << outconvert << "</table></td></tr>\n";
    601613    ++meta_here;
    602614      }
     
    607619      text_tmap::iterator format_end = collectinfo->format.end();
    608620      while (format_here != format_end) {
    609     textout << outconvert << "<tr><td>" << (*format_here).first
     621    textout << outconvert << "<tr><td valign=top>" << (*format_here).first
    610622        << "</td><td>" << html_safe((*format_here).second) << "</td></tr>\n";
    611623    ++format_here;
Note: See TracChangeset for help on using the changeset viewer.