Changeset 259


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

fixed author table fixes #163

Location:
trunk/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r258 r259  
    133133                             const SVNlog& log) const
    134134  {
     135
    135136    std::string outdir = user+"/"+line_type+"/"+local_path_;
    136137    if (local_path_=="")
     
    160161      os << imagedir << "/index.png";
    161162    os << "' alt='[plot]' border=0><br>\n";
     163    os << "<h3>File Summary";
     164    if (user!="all")
     165      os << " for " << user;
     166    os << "</h3>";     
    162167    os << "<table class=\"listings\">\n";
    163168    os << "<thead>";
  • trunk/lib/File.h

    r258 r259  
    6262
    6363    ///
    64     /// printing all pages related to this file
    65     ///
    66     void print(const bool verbose=false) const;
    67 
    68     ///
    6964    /// print blame output
    7065    ///
  • 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";
  • trunk/lib/SVNlog.cc

    r256 r259  
    5151
    5252 
     53  Commitment SVNlog::latest_commit(void) const
     54  {
     55    return Commitment(author().back(), Date(date().back()),
     56                      message().back(), revision().back());
     57                                             
     58  }
     59
     60
    5361  Commitment SVNlog::latest_commit(std::string name) const
    5462  {
     
    5866    if (!dist) {
    5967      Commitment c;
     68      assert(false);
    6069      return c;
    6170    }
  • trunk/lib/SVNlog.h

    r256 r259  
    7979
    8080    /**
     81       \return Latest commit
     82    */
     83    Commitment latest_commit(void) const;
     84
     85    /**
    8186       \return Latest commit \a author did. If no author is found an
    8287       empty Commitment (default constructor) is returned.
Note: See TracChangeset for help on using the changeset viewer.