from daklib import utils
from daklib.queue import Upload
-from daklib.dbconn import DBConn, has_new_comment, DBChange, get_uid_from_fingerprint
+from daklib.dbconn import DBConn, has_new_comment, DBChange, DBSource, get_uid_from_fingerprint
from daklib.textutils import fix_maintainer
from daklib.dak_exceptions import *
<title>
Debian NEW and BYHAND Packages
</title>
+ <script type="text/javascript">
+ function togglePkg() {
+ var children = document.getElementsByTagName("*");
+ for (var i = 0; i < children.length; i++) {
+ if(!children[i].hasAttribute("class"))
+ continue;
+ c = children[i].getAttribute("class").split(" ");
+ for(var j = 0; j < c.length; j++) {
+ if(c[j] == "binNEW") {
+ if (children[i].style.display == '')
+ children[i].style.display = 'none';
+ else children[i].style.display = '';
+ }
+ }
+ }
+ }
+ </script>
</head>
<body id="NEW">
<div id="logo">
print "<h1>Summary for: %s</h1>" % (type)
print """
<table class="NEW">
+ <p class="togglepkg" onclick="togglePkg()">Click to toggle all/binary-NEW packages</p>
<caption>
"""
print "Package count in <strong>%s</strong>: <em>%s</em> | Total Package count: <em>%s</em>" % (type, source_count, total_count)
global row_number
trclass = "sid"
+ session = DBConn().session()
for dist in distribution:
if dist == "experimental":
trclass = "exp"
+ if not len(session.query(DBSource).filter_by(source = source).all()):
+ trclass += " binNEW"
+ session.commit()
+
if row_number % 2 != 0:
print "<tr class=\"%s even\">" % (trclass)
else: