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">
"""
def table_header(type, source_count, total_count):
- print "<h1>Summary for: %s</h1>" % (type)
+ print "<h1 class='binNEW'>Summary for: %s</h1>" % (type)
+ print "<h1 class='binNEW' style='display: none'>Summary for: binary-%s only</h1>" % (type)
print """
<table class="NEW">
- <caption>
+ <p class="togglepkg" onclick="togglePkg()">Click to toggle all/binary-NEW packages</p>
+ <caption class="binNEW">
"""
print "Package count in <strong>%s</strong>: <em>%s</em> | Total Package count: <em>%s</em>" % (type, source_count, total_count)
print """
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:
print "<td class=\"package\">%s</td>" % (source)
print "<td class=\"version\">"
for vers in version.split():
- print "<a href=\"/new/%s_%s.html\">%s</a><br/>" % (source, utils.html_escape(vers), utils.html_escape(vers))
+ print "<a href=\"new/%s_%s.html\">%s</a><br/>" % (source, utils.html_escape(vers), utils.html_escape(vers))
print "</td>"
print "<td class=\"arch\">%s</td>" % (arch)
print "<td class=\"distribution\">"