124 lines
6.5 KiB
Text
124 lines
6.5 KiB
Text
#from kojiweb import util
|
|
|
|
#attr _PASSTHROUGH = ['userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked']
|
|
|
|
#include "includes/header.chtml"
|
|
|
|
<h4>Packages#if $prefix then ' starting with "%s"' % $prefix else ''##if $tag then ' in tag <a href="taginfo?tagID=%i">%s</a>' % ($tag.id, $util.escapeHTML($tag.name)) else ''##if $user then ' owned by <a href="userinfo?userID=%i">%s</a>' % ($user.id, $util.escapeHTML($user.name)) else ''#</h4>
|
|
|
|
<table class="data-list">
|
|
#if $tag
|
|
<tr>
|
|
<td colspan="5">
|
|
<table class="nested">
|
|
<tr><td>
|
|
<strong>Inherited</strong>:
|
|
</td><td>
|
|
<select name="inherited" class="filterlist" onchange="javascript: window.location = 'packages?inherited=' + this.value + '$util.passthrough_except($self, 'inherited')';">
|
|
<option value="1" #if $inherited then 'selected="selected"' else ''#>yes</option>
|
|
<option value="0" #if not $inherited then 'selected="selected"' else ''#>no</option>
|
|
</select>
|
|
</td></tr>
|
|
<tr><td>
|
|
<strong>With blocked</strong>:
|
|
</td><td>
|
|
<select name="blocked" class="filterlist" onchange="javascript: window.location = 'packages?blocked=' + this.value + '$util.passthrough_except($self, 'blocked')';">
|
|
<option value="1" #if $blocked then 'selected="selected"' else ''#>yes</option>
|
|
<option value="0" #if not $blocked then 'selected="selected"' else ''#>no</option>
|
|
</select>
|
|
</td></tr>
|
|
</table>
|
|
</tr>
|
|
#end if
|
|
<tr>
|
|
<td class="charlist" colspan="#if $tag or $user then '5' else '2'#">
|
|
#for $char in $chars
|
|
#if $prefix == $char
|
|
<strong>$char</strong>
|
|
#else
|
|
<a href="packages?prefix=$char$util.passthrough($self, 'userID', 'tagID', 'order', 'inherited', 'blocked')">$char</a>
|
|
#end if
|
|
|
|
|
#end for
|
|
#if $prefix
|
|
<a href="packages?${util.passthrough($self, 'userID', 'tagID', 'order', 'inherited', 'blocked')[1:]}">all</a>
|
|
#else
|
|
<strong>all</strong>
|
|
#end if
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paginate" colspan="#if $tag or $user then '5' else '2'#">
|
|
#if $len($packagePages) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'packages?start=' + this.value * $packageRange + '$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')';">
|
|
#for $pageNum in $packagePages
|
|
<option value="$pageNum"#if $pageNum == $packageCurrentPage then ' selected="selected"' else ''#>#echo $pageNum + 1#</option>
|
|
#end for
|
|
</select>
|
|
</form>
|
|
#end if
|
|
#if $packageStart > 0
|
|
<a href="packages?start=#echo $packageStart - $packageRange #$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')"><<<</a>
|
|
#end if
|
|
#if $totalPackages != 0
|
|
<strong>Packages #echo $packageStart + 1 # through #echo $packageStart + $packageCount # of $totalPackages</strong>
|
|
#end if
|
|
#if $packageStart + $packageCount < $totalPackages
|
|
<a href="packages?start=#echo $packageStart + $packageRange#$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')">>>></a>
|
|
#end if
|
|
</td>
|
|
</tr>
|
|
<tr class="list-header">
|
|
<th><a href="packages?order=$util.toggleOrder($self, 'package_id')$util.passthrough($self, 'userID', 'tagID', 'prefix', 'inherited', 'blocked')">ID</a> $util.sortImage($self, 'package_id')</th>
|
|
<th><a href="packages?order=$util.toggleOrder($self, 'package_name')$util.passthrough($self, 'userID', 'tagID', 'prefix', 'inherited', 'blocked')">Name</a> $util.sortImage($self, 'package_name')</th>
|
|
#if $tag or $user
|
|
<th><a href="packages?order=$util.toggleOrder($self, 'tag_name')$util.passthrough($self, 'userID', 'tagID', 'prefix', 'inherited', 'blocked')">Tag</a> $util.sortImage($self, 'tag_name')</th>
|
|
<th><a href="packages?order=$util.toggleOrder($self, 'owner_name')$util.passthrough($self, 'userID', 'tagID', 'prefix', 'inherited', 'blocked')">Owner</a> $util.sortImage($self, 'owner_name')</th>
|
|
<th><a href="packages?order=$util.toggleOrder($self, 'blocked')$util.passthrough($self, 'userID', 'tagID', 'prefix', 'inherited', 'blocked')">Included?</a> $util.sortImage($self, 'blocked')</th>
|
|
#end if
|
|
</tr>
|
|
#if $len($packages) > 0
|
|
#for $package in $packages
|
|
<tr class="$util.rowToggle($self)">
|
|
<td>$package.package_id</td>
|
|
<td><a href="packageinfo?packageID=$package.package_id">$util.escapeHTML($package.package_name)</a></td>
|
|
#if $tag or $user
|
|
<td><a href="taginfo?tagID=$package.tag_id">$util.escapeHTML($package.tag_name)</a></td>
|
|
<td class="user-$package.owner_name"><a href="userinfo?userID=$package.owner_id">$util.escapeHTML($package.owner_name)</a></td>
|
|
<td class="$str(not $package.blocked).lower()">#if $package.blocked then $util.imageTag('no') else $util.imageTag('yes')#</td>
|
|
#end if
|
|
</tr>
|
|
#end for
|
|
#else
|
|
<tr class="row-odd">
|
|
<td colspan="#if $tag or $user then '5' else '2'#">No packages</td>
|
|
</tr>
|
|
#end if
|
|
<tr>
|
|
<td class="paginate" colspan="#if $tag or $user then '5' else '2'#">
|
|
#if $len($packagePages) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'packages?start=' + this.value * $packageRange + '$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')';">
|
|
#for $pageNum in $packagePages
|
|
<option value="$pageNum"#if $pageNum == $packageCurrentPage then ' selected="selected"' else ''#>#echo $pageNum + 1#</option>
|
|
#end for
|
|
</select>
|
|
</form>
|
|
#end if
|
|
#if $packageStart > 0
|
|
<a href="packages?start=#echo $packageStart - $packageRange #$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')"><<<</a>
|
|
#end if
|
|
#if $totalPackages != 0
|
|
<strong>Packages #echo $packageStart + 1 # through #echo $packageStart + $packageCount # of $totalPackages</strong>
|
|
#end if
|
|
#if $packageStart + $packageCount < $totalPackages
|
|
<a href="packages?start=#echo $packageStart + $packageRange#$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'inherited', 'blocked')">>>></a>
|
|
#end if
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
#include "includes/footer.chtml"
|