(koji-web) Markup scratch builds.

With this we can markup scratch builds, deemphasize them, etc.
This commit is contained in:
Ralph Bean 2015-04-27 14:20:31 -04:00 committed by Dennis Gilmore
parent e5466860ed
commit c738175d4a
2 changed files with 15 additions and 1 deletions

View file

@ -50,7 +50,8 @@
<th>State</th>
</tr>
#for $task in $tasks
<tr class="$util.rowToggle($self)">
#set $scratch = $util.taskScratchClass($task)
<tr class="$util.rowToggle($self) $scratch">
#set $state = $util.taskState($task.state)
<td>$task.id</td>
<td><a href="taskinfo?taskID=$task.id" class="task$state" title="$state">$koji.taskLabel($task)</a></td>

View file

@ -458,6 +458,19 @@ def rowToggle(template):
else:
return 'row-even'
def taskScratchClass(task_object):
""" Return a css class indicating whether or not this task is a scratch
build.
"""
request = task_object['request']
if len(request) >= 3:
opts = request[2]
if opts.get('scratch'):
return "scratch"
return ""
_fileFlags = {1: 'configuration',
2: 'documentation',
4: 'icon',