Changeset 5225


Ignore:
Timestamp:
2003-08-20T15:54:46+12:00 (21 years ago)
Author:
sjboddie
Message:

Fixed a couple of bugs in recent changes for building/displaying
collections that have no searchable indexes.

Location:
trunk/gsdl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/mgbuilder.pm

    r4743 r5225  
    9191    $self->{'collect_cfg'} = &colcfg::read_collect_cfg ($colcfgname);
    9292
     93    if (!defined($self->{'collect_cfg'}->{'indexes'})) {
     94    $self->{'collect_cfg'}->{'indexes'} = [];
     95    }
     96
    9397    # sort out subcollection indexes
    9498    if (defined $self->{'collect_cfg'}->{'indexsubcollections'}) {
  • trunk/gsdl/src/recpt/documentaction.cpp

    r5179 r5225  
    412412     first = false;
    413413      }
     414
     415      if (numc == 1) navigationbar += "_imagespacer_";
     416
    414417      navigationbar += "\n</nobr>\n";
    415418      navigationbar += "<!-- End of Navigation Bar -->\n";
  • trunk/gsdl/src/recpt/pageaction.cpp

    r4905 r5225  
    842842  } else if (arg_p == "about" || arg_p == "help") {
    843843    if (collectproto == NULL) return;
     844
     845    comerror_t err;
     846    bool has_search_button = true;
     847    collectproto->is_searchable(args["c"], has_search_button, err, logout);
     848    if (err != noError) has_search_button = true;
    844849   
    845850    // _textbrowseoptions_ and _numbrowseoptions_
     
    851856    get_children ("", args["c"], metadata, getParents, collectproto, response, logout);
    852857
    853     disp.setmacro ("numbrowseoptions", "help", response.docInfo.size()+1);
     858    int numbrowseoptions = response.docInfo.size();
     859    if (has_search_button) numbrowseoptions += 1;
     860    disp.setmacro ("numbrowseoptions", "help", numbrowseoptions);
    854861
    855862    ResultDocInfo_tarray::iterator here = response.docInfo.begin();
    856863    ResultDocInfo_tarray::iterator end = response.docInfo.end();
    857864
    858     // we're assuming that we've always got a search button
    859     text_t shorttext = "<ul><li>_textSearchshort_\n";
    860     text_t longtext = "_textSearchlong_";
     865    text_t shorttext;
     866    text_t longtext;
     867    if (has_search_button) {
     868      shorttext = "<ul><li>_textSearchshort_\n";
     869      longtext = "_textSearchlong_";
     870    }
    861871
    862872    while (here != end) {
Note: See TracChangeset for help on using the changeset viewer.