Changeset 12549 for trunk/gsdl


Ignore:
Timestamp:
2006-08-25T10:02:55+12:00 (18 years ago)
Author:
mdewsnip
Message:

Fixed up the creation of the _homeextra_ table so it is HTML 4 compliant.

File:
1 edited

Legend:

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

    r12503 r12549  
    228228                 ostream &logout) {
    229229 
    230   text_t homeextra = "<table class=\"collections\"><tr valign=\"top\">\n";
     230  text_t homeextra = "<table class=\"collections\">\n";
    231231  bool found_valid_col = false;
    232232  recptprotolistclass::iterator rprotolist_here = protos->begin();
     
    243243
    244244    int count = 0;
    245     bool first = true;
    246245    while (collist_here != collist_end) {
    247246      ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout);
     
    288287          }
    289288         
    290           if ((count%configinfo.HomePageCols == 0) && (!first))
    291         homeextra += "</tr><tr valign=\"top\">\n";
     289          if (count%configinfo.HomePageCols == 0)
     290        homeextra += "<tr valign=\"top\">\n";
    292291         
    293292          comerror_t err;
     
    305304         
    306305          ++count;
    307           first = false;
     306          if (count%configinfo.HomePageCols == 0)
     307        homeextra += "</tr>\n";
    308308        }
    309309      }
     
    311311    }
    312312
    313     for (; count%configinfo.HomePageCols != 0; ++count) homeextra += "<td></td>\n";
    314       }
    315     }
    316     homeextra += "</tr>\n<tr>\n";
     313    // Finish off the last row, if necessary
     314    if (count%configinfo.HomePageCols != 0) {
     315      while (count%configinfo.HomePageCols != 0) {
     316        homeextra += "<td></td>\n";
     317        ++count;
     318      }
     319      homeextra += "</tr>\n";
     320    }
     321      }
     322    }
    317323    ++rprotolist_here;
    318324  }
    319325
    320326  if (!found_valid_col) {
    321     homeextra += "<td>No valid (i.e. built and public) collections are available</td>\n";
    322   }
    323   homeextra += "</tr></table>\n";
     327    homeextra += "<tr><td>No valid (i.e. built and public) collections are available</td></tr>\n";
     328  }
     329  homeextra += "</table>\n";
    324330  disp.setmacro ("homeextra", "home", homeextra);
    325331}
Note: See TracChangeset for help on using the changeset viewer.