Changeset 306 for trunk


Ignore:
Timestamp:
May 12, 2007, 9:04:13 AM (14 years ago)
Author:
Peter Johansson
Message:

resorting functions and corrected includes

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.h

    r304 r306  
    2828
    2929#include <iostream>
    30 #include <vector>
     30#include <map>
    3131#include <string>
    3232#include <utility>
  • trunk/lib/Node.cc

    r285 r306  
    6060  {
    6161    return false;
     62  }
     63
     64
     65  void Node::html_tablerow(std::ostream& os,
     66                           const std::string& css_class,
     67                           const std::string& user) const
     68  {
     69    os << "<tr class=\"" << css_class << "\">\n"
     70       << "<td class=\"" << node_type() << "\">";
     71    if (svndigest_ignore())
     72      os << name() << " (<i>svndigest:ignore</i>)";
     73    else if (binary())
     74      os << name() << " (<i>binary</i>)";
     75    // there is no output for nodes when user has zero contribution
     76    else if (user!="all" && !stats_.lines(user))
     77      os << name();
     78    else
     79      os << anchor(href(), name());
     80    os << "</td>\n";
     81    if (user=="all") {
     82      os << "<td>" << stats_.lines() << "</td>\n"
     83         << "<td>" << stats_.code() << "</td>\n"
     84         << "<td>" << stats_.comments() << "</td>\n"
     85         << "<td>" << stats_.empty() << "</td>\n";
     86    }
     87    else {
     88      os << "<td>" << stats_.lines(user) << "</td>\n"
     89         << "<td>" << stats_.code(user) << "</td>\n"
     90         << "<td>" << stats_.comments(user) << "</td>\n"
     91         << "<td>" << stats_.empty(user) << "</td>\n";
     92    }
     93    os << "<td>" << trac_revision(stats_.last_changed_rev()) << "</td>\n"
     94       << "<td>" << author() << "</td>\n"
     95       << "</tr>\n";
    6296  }
    6397
     
    86120    }
    87121    os << "\n</h2>\n";
    88   }
    89 
    90 
    91   void Node::html_tablerow(std::ostream& os,
    92                            const std::string& css_class,
    93                            const std::string& user) const
    94   {
    95     os << "<tr class=\"" << css_class << "\">\n"
    96        << "<td class=\"" << node_type() << "\">";
    97     if (svndigest_ignore())
    98       os << name() << " (<i>svndigest:ignore</i>)";
    99     else if (binary())
    100       os << name() << " (<i>binary</i>)";
    101     // there is no output for nodes when user has zero contribution
    102     else if (user!="all" && !stats_.lines(user))
    103       os << name();
    104     else
    105       os << anchor(href(), name());
    106     os << "</td>\n";
    107     if (user=="all") {
    108       os << "<td>" << stats_.lines() << "</td>\n"
    109          << "<td>" << stats_.code() << "</td>\n"
    110          << "<td>" << stats_.comments() << "</td>\n"
    111          << "<td>" << stats_.empty() << "</td>\n";
    112     }
    113     else {
    114       os << "<td>" << stats_.lines(user) << "</td>\n"
    115          << "<td>" << stats_.code(user) << "</td>\n"
    116          << "<td>" << stats_.comments(user) << "</td>\n"
    117          << "<td>" << stats_.empty(user) << "</td>\n";
    118     }
    119     os << "<td>" << trac_revision(stats_.last_changed_rev()) << "</td>\n"
    120        << "<td>" << author() << "</td>\n"
    121        << "</tr>\n";
    122122  }
    123123
Note: See TracChangeset for help on using the changeset viewer.