Changeset 259 for trunk/lib/Node.cc


Ignore:
Timestamp:
Apr 30, 2007, 3:18:51 PM (16 years ago)
Author:
Peter Johansson
Message:

fixed author table fixes #163

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Node.cc

    r258 r259  
    149149                                  const SVNlog& log) const
    150150  {
     151    os << "<h4>Author Summary</h4>";
    151152    os << "<table class=\"listings\">\n";
    152153    os << "<thead>";
     
    162163    os << "<tbody>";
    163164
    164     os << "<tr class=\"light\">\n";
    165     os << "<td class=\"directory\" colspan=\"5\">";
    166     if (!dir())
     165    std::string color("light");
     166    if (!dir()) {
     167      os << "<tr class=\"" << color << "\">\n";
     168      os << "<td class=\"directory\" colspan=\"5\">";
    167169      os << anchor("index.html", "../");
    168     os << "</td>\n</tr>\n";
    169        
     170      os << "</td>\n</tr>\n";
     171    }
     172
    170173    // print authors
    171     std::string color("dark");
     174    const std::string timefmt("%e/%m/%y %H:%M:%S");
    172175    for (std::set<std::string>::const_iterator i=stats_.authors().begin();
    173176         i!=stats_.authors().end(); ++i){
     177      if (color=="dark")
     178        color="light";
     179      else
     180        color="dark";
    174181      os << "<tr class=\"" << color << "\"><td>";
    175182      if (dir())
     
    186193         << "</td><td>" << stats_.code(*i)
    187194         << "</td><td>" << stats_.comments(*i)
    188          << "</td><td>" << stats_.empty(*i)
    189          << "</td><td>"
    190          << "</td><td>"
     195         << "</td><td>" << stats_.empty(*i);
     196      Commitment lc(log.latest_commit(*i));
     197      os << "</td>" << "<td>" << lc.revision()
     198         << "</td>" << "<td>" << lc.date()(timefmt)
    191199         << "</td></tr>\n";
    192       if (color=="dark")
    193         color="light";
    194       else
    195         color="dark";
    196200    }
    197201
     
    209213    os << "<td>" << stats_.comments() << "</td>\n";
    210214    os << "<td>" << stats_.empty() << "</td>\n";
    211     os << "<td>" << "" << "</td>\n";
    212     os << "<td>" << "" << "</td>\n";
     215    Commitment lc(log.latest_commit());
     216    os << "<td>" << lc.revision() << "</td>\n";
     217    os << "<td>" << lc.date()(timefmt)<< "</td>\n";
    213218    os << "</tr>\n";
    214219    os << "</table>\n";
Note: See TracChangeset for help on using the changeset viewer.