debian-koji/www/kojiweb/rpmlist.chtml
2007-02-14 11:25:01 -05:00

82 lines
3.6 KiB
Text

#from kojiweb import util
#include "includes/header.chtml"
#if $type == 'component'
<h4>Component RPMs of buildroot $buildroot.tag_name-$buildroot.id-$buildroot.repo_id</h4>
#else
<h4>RPMs built in buildroot $buildroot.tag_name-$buildroot.id-$buildroot.repo_id</h4>
#end if
<table class="data-list">
<tr>
<td class="paginate" colspan="#if $type == 'component' then '2' else '1'#">
#if $len($rpmPages) > 1
<form class="pageJump">
Page:
<select onchange="javascript: window.location = 'rpmlist?buildrootID=$buildroot.id&start=' + this.value * $rpmRange + '$util.passthrough($self, 'order', 'type')';">
#for $pageNum in $rpmPages
<option value="$pageNum"#if $pageNum == $rpmCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
#end for
</select>
</form>
#end if
#if $rpmStart > 0
<a href="rpmlist?buildrootID=$buildroot.id&start=#echo $rpmStart - $rpmRange #$util.passthrough($self, 'order', 'type')">&lt;&lt;&lt;</a>
#end if
#if $totalRpms != 0
<strong>RPMs #echo $rpmStart + 1 # through #echo $rpmStart + $rpmCount # of $totalRpms</strong>
#end if
#if $rpmStart + $rpmCount < $totalRpms
<a href="rpmlist?buildrootID=$buildroot.id&start=#echo $rpmStart + $rpmRange#$util.passthrough($self, 'order', 'type')">&gt;&gt;&gt;</a>
#end if
</td>
</tr>
<tr class="list-header">
<th><a href="rpmlist?buildrootID=$buildroot.id&order=$util.toggleOrder($self, 'nvr')$util.passthrough($self, 'type')">NVR</a> $util.sortImage($self, 'nvr')</th>
#if $type == 'component'
<th><a href="rpmlist?buildrootID=$buildroot.id&order=$util.toggleOrder($self, 'is_update')$util.passthrough($self, 'type')">Update?</a> $util.sortImage($self, 'is_update')</th>
#end if
</tr>
#if $len($rpms) > 0
#for $rpm in $rpms
<tr class="$util.rowToggle($self)">
#set $epoch = ($rpm.epoch != None and $str($rpm.epoch) + ':' or '')
<td><a href="rpminfo?rpmID=$rpm.id">$rpm.name-$epoch$rpm.version-$rpm.release.${rpm.arch}.rpm</a></td>
#if $type == 'component'
#set $update = $rpm.is_update and 'yes' or 'no'
<td class="$update">$util.imageTag($update)</td>
#end if
</tr>
#end for
#else
<tr class="row-odd">
<td colspan="#if $type == 'component' then '2' else '1'#">No RPMs</td>
</tr>
#end if
<tr>
<td class="paginate" colspan="#if $type == 'component' then '2' else '1'#">
#if $len($rpmPages) > 1
<form class="pageJump">
Page:
<select onchange="javascript: window.location = 'rpmlist?buildrootID=$buildroot.id&start=' + this.value * $rpmRange + '$util.passthrough($self, 'order', 'type')';">
#for $pageNum in $rpmPages
<option value="$pageNum"#if $pageNum == $rpmCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
#end for
</select>
</form>
#end if
#if $rpmStart > 0
<a href="rpmlist?buildrootID=$buildroot.id&start=#echo $rpmStart - $rpmRange #$util.passthrough($self, 'order', 'type')">&lt;&lt;&lt;</a>
#end if
#if $totalRpms != 0
<strong>RPMs #echo $rpmStart + 1 # through #echo $rpmStart + $rpmCount # of $totalRpms</strong>
#end if
#if $rpmStart + $rpmCount < $totalRpms
<a href="rpmlist?buildrootID=$buildroot.id&start=#echo $rpmStart + $rpmRange#$util.passthrough($self, 'order', 'type')">&gt;&gt;&gt;</a>
#end if
</td>
</tr>
</table>
#include "includes/footer.chtml"