Changeset 313 for trunk/lib/Directory.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/Directory.cc

    r303 r313  
    206206    }
    207207    else {
    208       os << "<td>" << stats_.lines(user) << "</td>\n";
    209       os << "<td>" << stats_.code(user) << "</td>\n";
    210       os << "<td>" << stats_.comments(user) << "</td>\n";
    211       os << "<td>" << stats_.empty(user) << "</td>\n";
     208      os << "<td>" << stats_.lines(user);
     209      if (stats_.lines(user))
     210        os << " (" << percent(stats_.lines(user),stats_.lines()) << "%)";
     211      os << "</td>\n";
     212      os << "<td>" << stats_.code(user);
     213      if (stats_.code(user))
     214        os << " (" << percent(stats_.code(user),stats_.code()) << "%)";
     215      os << "</td>\n";
     216      os << "<td>" << stats_.comments(user);
     217      if (stats_.comments(user))
     218        os << " (" << percent(stats_.comments(user),stats_.comments()) << "%)";
     219      os << "</td>\n";
     220      os << "<td>" << stats_.empty(user);
     221      if (stats_.empty(user))
     222        os << " (" << percent(stats_.empty(user),stats_.empty()) << "%)";
     223      os << "</td>\n";
    212224    }
    213225    os << "<td>" << trac_revision(stats_.last_changed_rev()) << "</td>\n";
Note: See TracChangeset for help on using the changeset viewer.