Changeset 235 for trunk/lib/Node.cc


Ignore:
Timestamp:
Apr 21, 2007, 3:39:50 PM (14 years ago)
Author:
Peter Johansson
Message:

added Date class
changed date format on first page
fixed plotting only once (fixes #113)
changed interface to anchor class
more anchors to users
removed anchor to '../' in author summary in dirs
anchors are filtered through HtmlStream?
log messages are truncated and newlines are replaced with spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Node.cc

    r234 r235  
    7474        words.push_back(word);
    7575    if (words.size()==1)
    76       anchor(os, "index.html", Node::project_,0, "View " + Node::project_);
     76      os << anchor("index.html", Node::project_,0, "View " + Node::project_);
    7777    else {
    7878      for (size_t i=0; i<words.size()-1; ++i){
    79         anchor(os,"index.html", words[i], level_-i, "View " + words[i]);
     79        os << anchor("index.html", words[i], level_-i, "View " + words[i]);
    8080        os << "<span class=\"sep\">/</span>\n";
    8181      }
    82       anchor(os,href(), words.back(), level_+2-words.size(),
     82      os << anchor(href(), words.back(), level_+2-words.size(),
    8383             "View " + words.back());
    8484    }
     
    101101      os << name();
    102102    else
    103       anchor(os,href(), name());
     103      os << anchor(href(), name());
    104104    os << "</td>\n";
    105105    if (user=="all") {
     
    121121
    122122
    123   void Node::print_author_summary(std::ostream& os) const
     123  void Node::print_author_summary(std::ostream& os, std::string line_type) const
    124124  {
    125125    os << "<table class=\"listings\">\n";
     
    135135    os << "<tr class=\"light\">\n";
    136136    os << "<td class=\"directory\" colspan=\"5\">";
    137     anchor(os, "index.html", "../");
     137    if (!dir())
     138      os << anchor("index.html", "../");
    138139    os << "</td>\n</tr>\n";
    139140       
     
    142143    for (std::set<std::string>::const_iterator i=stats_.authors().begin();
    143144         i!=stats_.authors().end(); ++i){
    144       os << "<tr class=\"" << color << "\"><td>" << *i
    145          << "</td><td>" << stats_.lines(*i)
     145      os << "<tr class=\"" << color << "\"><td>";
     146      if (dir())
     147        os << anchor(*i+"/"+line_type+"/"+local_path()+"/index.html"
     148                     ,*i, level_+2, "View statistics for "+*i);
     149      else
     150        os << anchor(*i+"/"+line_type+"/"+local_path()+".html"
     151                     ,*i, level_+2, "View statistics for "+*i);
     152      os << "</td><td>" << stats_.lines(*i)
    146153         << "</td><td>" << stats_.code(*i)
    147154         << "</td><td>" << stats_.comments(*i)
     
    154161
    155162    os << "<tr class=\"" << color << "\">\n";
    156     os << "<td>Total</td>\n";
     163    os << "<td>";
     164    if (dir())
     165      os << anchor("all/"+line_type+"/"+local_path()+"/index.html"
     166                   ,"Total", level_+2, "View statistics for all");
     167    else
     168      os << anchor("all/"+line_type+"/"+local_path()+".html"
     169                   ,"Total", level_+2, "View statistics for all");
     170    os << "</td>\n";
    157171    os << "<td>" << stats_.lines() << "</td>\n";
    158172    os << "<td>" << stats_.code() << "</td>\n";
Note: See TracChangeset for help on using the changeset viewer.