Changeset 313 for trunk/lib/Node.cc


Ignore:
Timestamp:
May 17, 2007, 1:40:44 PM (14 years ago)
Author:
Peter Johansson
Message:

precentage in tables, fixes #194

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Node.cc

    r306 r313  
    8686    }
    8787    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";
     88      os << "<td>" << stats_.lines(user);
     89      if (stats_.lines(user))
     90        os << " (" << percent(stats_.lines(user),stats_.lines()) << "%)";
     91      os << "</td>\n";
     92      os << "<td>" << stats_.code(user);
     93      if (stats_.code(user))
     94        os << " (" << percent(stats_.code(user),stats_.code()) << "%)";
     95      os << "</td>\n";
     96      os << "<td>" << stats_.comments(user);
     97      if (stats_.comments(user))
     98        os << " (" << percent(stats_.comments(user),stats_.comments()) << "%)";
     99      os << "</td>\n";
     100      os << "<td>" << stats_.empty(user);
     101      if (stats_.empty(user))
     102        os << " (" << percent(stats_.empty(user),stats_.empty()) << "%)";
     103      os << "</td>\n";
     104
    92105    }
    93106    os << "<td>" << trac_revision(stats_.last_changed_rev()) << "</td>\n"
Note: See TracChangeset for help on using the changeset viewer.