builds.chtml: convert to using passthrough_except()
This commit is contained in:
parent
f2b833fb6d
commit
daa685b80d
1 changed files with 24 additions and 32 deletions
|
|
@ -1,14 +1,6 @@
|
|||
#import koji
|
||||
#from kojiweb import util
|
||||
|
||||
#def toggleLink($comp, $label, $link)
|
||||
#if $comp
|
||||
<strong>$label</strong>#slurp
|
||||
#else
|
||||
<a href="$link">$label</a>#slurp
|
||||
#end if
|
||||
#end def
|
||||
|
||||
#attr _PASSTHROUGH = ['userID', 'tagID', 'packageID', 'order', 'prefix', 'state', 'inherited']
|
||||
|
||||
#include "includes/header.chtml"
|
||||
|
|
@ -19,20 +11,20 @@
|
|||
<tr>
|
||||
<td colspan="#if $tag then '6' else '5'#">
|
||||
<table class="nested">
|
||||
#if $tag
|
||||
#if $tag
|
||||
<tr><td>
|
||||
<strong>Inherited</strong>:
|
||||
<strong>Inherited</strong>:
|
||||
</td><td>
|
||||
<select name="inherited" class="filterlist" onchange="javascript: window.location = 'builds?inherited=' + this.value + '$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'state')';">
|
||||
<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>
|
||||
#end if
|
||||
<select name="inherited" class="filterlist" onchange="javascript: window.location = 'builds?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>
|
||||
#end if
|
||||
<tr><td>
|
||||
<strong>State</strong>:
|
||||
</td><td>
|
||||
<select name="state" class="filterlist" onchange="javascript: window.location = 'builds?state=' + this.value + '$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited')';">
|
||||
<select name="state" class="filterlist" onchange="javascript: window.location = 'builds?state=' + this.value + '$util.passthrough_except($self, 'state')';">
|
||||
<option value="all">all</option>
|
||||
#for $stateOpt in ['BUILDING', 'COMPLETE', 'FAILED', 'CANCELED']
|
||||
<option value="$koji.BUILD_STATES[$stateOpt]" #if $state == $koji.BUILD_STATES[$stateOpt] then 'selected="selected"' else ''#>$stateOpt.lower()</option>
|
||||
|
|
@ -42,7 +34,7 @@
|
|||
<tr><td>
|
||||
<strong>Built by</strong>:
|
||||
</td><td>
|
||||
<select name="userID" class="filterlist" onchange="javascript: window.location = 'builds?userID=' + this.value + '$util.passthrough($self, 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')';">
|
||||
<select name="userID" class="filterlist" onchange="javascript: window.location = 'builds?userID=' + this.value + '$util.passthrough_except($self, 'userID')';">
|
||||
<option value="" #if not $user then 'selected="selected"' else ''#>everyone</option>
|
||||
#if $loggedInUser
|
||||
<option value="$loggedInUser.name">me</option>
|
||||
|
|
@ -61,12 +53,12 @@
|
|||
#if $prefix == $char
|
||||
<strong>$char</strong>
|
||||
#else
|
||||
<a href="builds?prefix=$char$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'inherited', 'state')">$char</a>
|
||||
<a href="builds?prefix=$char$util.passthrough_except($self, 'prefix')">$char</a>
|
||||
#end if
|
||||
|
|
||||
#end for
|
||||
#if $prefix
|
||||
<a href="builds?${util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'inherited', 'state')[1:]}">all</a>
|
||||
<a href="builds?${util.passthrough_except($self, 'prefix')[1:]}">all</a>
|
||||
#else
|
||||
<strong>all</strong>
|
||||
#end if
|
||||
|
|
@ -77,7 +69,7 @@
|
|||
#if $len($buildPages) > 1
|
||||
<form class="pageJump">
|
||||
Page:
|
||||
<select onchange="javascript: window.location = 'builds?start=' + this.value * $buildRange + '$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')';">
|
||||
<select onchange="javascript: window.location = 'builds?start=' + this.value * $buildRange + '$util.passthrough_except($self)';">
|
||||
#for $pageNum in $buildPages
|
||||
<option value="$pageNum"#if $pageNum == $buildCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
|
||||
#end for
|
||||
|
|
@ -85,25 +77,25 @@
|
|||
</form>
|
||||
#end if
|
||||
#if $buildStart > 0
|
||||
<a href="builds?start=#echo $buildStart - $buildRange #$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')"><<<</a>
|
||||
<a href="builds?start=#echo $buildStart - $buildRange #$util.passthrough_except($self)"><<<</a>
|
||||
#end if
|
||||
#if $totalBuilds != 0
|
||||
<strong>Builds #echo $buildStart + 1 # through #echo $buildStart + $buildCount # of $totalBuilds</strong>
|
||||
#end if
|
||||
#if $buildStart + $buildCount < $totalBuilds
|
||||
<a href="builds?start=#echo $buildStart + $buildRange#$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')">>>></a>
|
||||
<a href="builds?start=#echo $buildStart + $buildRange#$util.passthrough_except($self)">>>></a>
|
||||
#end if
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="list-header">
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'build_id')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">ID</a> $util.sortImage($self, 'build_id')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'nvr')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">NVR</a> $util.sortImage($self, 'nvr')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'build_id')$util.passthrough_except($self, 'order')">ID</a> $util.sortImage($self, 'build_id')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'nvr')$util.passthrough_except($self, 'order')">NVR</a> $util.sortImage($self, 'nvr')</th>
|
||||
#if $tag
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'tag_name')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">Tag</a> $util.sortImage($self, 'tag_name')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'tag_name')$util.passthrough_except($self, 'order')">Tag</a> $util.sortImage($self, 'tag_name')</th>
|
||||
#end if
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'owner_name')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">Built by</a> $util.sortImage($self, 'owner_name')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'completion_time')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">Finished</a> $util.sortImage($self, 'completion_time')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'state')$util.passthrough($self, 'userID', 'tagID', 'packageID', 'prefix', 'inherited', 'state')">State</a> $util.sortImage($self, 'state')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'owner_name')$util.passthrough_except($self, 'order')">Built by</a> $util.sortImage($self, 'owner_name')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'completion_time')$util.passthrough_except($self, 'order')">Finished</a> $util.sortImage($self, 'completion_time')</th>
|
||||
<th><a href="builds?order=$util.toggleOrder($self, 'state')$util.passthrough_except($self, 'order')">State</a> $util.sortImage($self, 'state')</th>
|
||||
</tr>
|
||||
#if $len($builds) > 0
|
||||
#for $build in $builds
|
||||
|
|
@ -129,7 +121,7 @@
|
|||
#if $len($buildPages) > 1
|
||||
<form class="pageJump">
|
||||
Page:
|
||||
<select onchange="javascript: window.location = 'builds?start=' + this.value * $buildRange + '$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')';">
|
||||
<select onchange="javascript: window.location = 'builds?start=' + this.value * $buildRange + '$util.passthrough_except($self)';">
|
||||
#for $pageNum in $buildPages
|
||||
<option value="$pageNum"#if $pageNum == $buildCurrentPage then ' selected' else ''#>#echo $pageNum + 1#</option>
|
||||
#end for
|
||||
|
|
@ -137,13 +129,13 @@
|
|||
</form>
|
||||
#end if
|
||||
#if $buildStart > 0
|
||||
<a href="builds?start=#echo $buildStart - $buildRange #$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')"><<<</a>
|
||||
<a href="builds?start=#echo $buildStart - $buildRange #$util.passthrough_except($self)"><<<</a>
|
||||
#end if
|
||||
#if $totalBuilds != 0
|
||||
<strong>Builds #echo $buildStart + 1 # through #echo $buildStart + $buildCount # of $totalBuilds</strong>
|
||||
#end if
|
||||
#if $buildStart + $buildCount < $totalBuilds
|
||||
<a href="builds?start=#echo $buildStart + $buildRange#$util.passthrough($self, 'userID', 'tagID', 'packageID', 'order', 'prefix', 'inherited', 'state')">>>></a>
|
||||
<a href="builds?start=#echo $buildStart + $buildRange#$util.passthrough_except($self)">>>></a>
|
||||
#end if
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue