- allow filtering builds by the person who built them
- remove some code duplication
This commit is contained in:
parent
b851d939b6
commit
58be30345d
3 changed files with 36 additions and 11 deletions
|
|
@ -18,9 +18,9 @@
|
|||
<tr>
|
||||
<td colspan="6">
|
||||
#if $inherited
|
||||
<a href="builds?inherited=0$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix')">Hide inherited builds</a>
|
||||
<a href="builds?inherited=0$util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'state')">Hide inherited builds</a>
|
||||
#else
|
||||
<a href="builds?${util.passthrough($self, 'userID', 'tagID', 'order', 'prefix')[1:]}">Show inherited builds</a>
|
||||
<a href="builds?${util.passthrough($self, 'userID', 'tagID', 'order', 'prefix', 'state')[1:]}">Show inherited builds</a>
|
||||
#end if
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -34,6 +34,28 @@
|
|||
<option value="$koji.BUILD_STATES[$stateOpt]" #if $state == $koji.BUILD_STATES[$stateOpt] then 'selected="selected"' else ''#>$stateOpt.lower()</option>
|
||||
#end for
|
||||
</select>
|
||||
<br/>
|
||||
<strong>Built by</strong>:
|
||||
#if $user
|
||||
<a href="builds?${util.passthrough($self, 'tagID', 'order', 'prefix', 'inherited', 'state')[1:]}">everyone</a>
|
||||
#else
|
||||
<strong>everyone</strong>
|
||||
#end if
|
||||
#if $loggedInUser
|
||||
|
|
||||
#if $user and $user.id == $loggedInUser.id
|
||||
<strong>me</strong>
|
||||
#else
|
||||
<a href="builds?userID=$loggedInUser.name$util.passthrough($self, 'tagID', 'order', 'prefix', 'inherited', 'state')">me</a>
|
||||
#end if
|
||||
#end if
|
||||
|
|
||||
<select name="userID" class="filterlist" onchange="javascript: window.location = 'builds?userID=' + this.value + '$util.passthrough($self, 'tagID', 'order', 'prefix', 'inherited', 'state')';">
|
||||
<option value="">(select)</option>
|
||||
#for $userOption in $users
|
||||
<option value="$userOption.name" #if $userOption.name == ($user and $user.name or None) then 'selected="selected"' else ''#>$userOption.name</option>
|
||||
#end for
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -851,6 +851,11 @@ def builds(req, userID=None, tagID=None, state=None, order='-completion_time', s
|
|||
values['userID'] = userID
|
||||
values['user'] = user
|
||||
|
||||
loggedInUser = req.currentUser
|
||||
values['loggedInUser'] = loggedInUser
|
||||
|
||||
values['users'] = server.listUsers(queryOpts={'order': 'name'})
|
||||
|
||||
tag = None
|
||||
if tagID != None:
|
||||
if tagID.isdigit():
|
||||
|
|
|
|||
|
|
@ -78,17 +78,15 @@ All
|
|||
<strong>Owner</strong>:
|
||||
#if $ownerObj
|
||||
<a href="tasks?${util.passthrough($self, 'state', 'method', 'hostID', 'order')[1:]}">everyone</a>
|
||||
#if $loggedInUser
|
||||
#if $ownerObj.id == $loggedInUser.id
|
||||
| <strong>me</strong>
|
||||
#else
|
||||
| <a href="tasks?owner=$loggedInUser.name$util.passthrough($self, 'state', 'method', 'hostID', 'order')">me</a>
|
||||
#end if
|
||||
#end if
|
||||
#else
|
||||
<strong>everyone</strong>
|
||||
#if $loggedInUser
|
||||
| <a href="tasks?owner=$loggedInUser.name$util.passthrough($self, 'state', 'method', 'hostID', 'order')">me</a>
|
||||
#end if
|
||||
#if $loggedInUser
|
||||
|
|
||||
#if $ownerObj and $ownerObj.id == $loggedInUser.id
|
||||
<strong>me</strong>
|
||||
#else
|
||||
<a href="tasks?owner=$loggedInUser.name$util.passthrough($self, 'state', 'method', 'hostID', 'order')">me</a>
|
||||
#end if
|
||||
#end if
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue