Changeset 112 for trunk/lib/Node.cc


Ignore:
Timestamp:
Jun 29, 2006, 11:30:54 AM (15 years ago)
Author:
Peter Johansson
Message:

fixes #27 and added some beauty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Node.cc

    r102 r112  
    3434namespace svnstat{
    3535
    36   Node::Node(const std::string& path, const std::string& output="")
    37       : path_(path), stats_(path)
     36  Node::Node(const u_int level, const std::string& path,
     37             const std::string& output="")
     38    : level_(level), path_(path), stats_(path)
    3839  {
    3940    output_name_ = output+file_name(path_);
     
    4546  }
    4647
    47   std::string Node::html_tablerow(const std::string& color) const
     48  std::string Node::html_tablerow(const std::string& css_class) const
    4849  {
    4950    std::stringstream ss;
    50     ss << "<tr>\n<td bgcolor=" << color << ">" << html_link()
    51        << "</td>\n<td bgcolor=" << color << " align=right>"
    52        << stats_.rows() << "</td>\n</tr>\n";
     51    ss << "<tr class=\"" << css_class << "\">\n"
     52       << "<td" << html_link() << "</td>\n"
     53       << "<td>" << stats_.rows() << "</td>\n"
     54       << "<td>" << "---" << "</td>\n"
     55       << "<td>" << "---" << "</td>\n"
     56       << "<td>" << stats_.last_changed_rev() << "</td>\n"
     57       << "<td>" << author() << "</td>\n"
     58       << "</tr>\n";
    5359    return ss.str();
    5460  }
     
    7884       << "<title> svnstat " << name() << "</title>\n"
    7985       << "</head>\n"
    80        << "<body bgcolor=#ffffff vlink=#000000>\n";
     86       << "<link rel=\"stylesheet\" "
     87       << "href=\"";
     88    for (u_int i=0; i<level_; ++i)
     89      os << "../";
     90    os << "svnstat.css\" type=\"text/css\" />\n";
    8191  }
    8292
Note: See TracChangeset for help on using the changeset viewer.