display an Origin column indicating the external repo on the rpmlist page

This commit is contained in:
Mike Bonnet 2009-02-08 14:21:37 -05:00
parent 6877749c32
commit 15ad2a4cae
2 changed files with 10 additions and 4 deletions

View file

@ -2380,7 +2380,7 @@ def get_external_repos(info=None, url=None, event=None, queryOpts=None):
tables = ['external_repo']
joins = ['external_repo_config ON external_repo_id = id']
clauses = [eventCondition(event)]
if info:
if info is not None:
if isinstance(info, str):
clauses.append('name = %(info)s')
elif isinstance(info, (int, long)):

View file

@ -10,7 +10,7 @@
<table class="data-list">
<tr>
<td class="paginate" colspan="#if $type == 'component' then '2' else '1'#">
<td class="paginate" colspan="#if $type == 'component' then '3' else '1'#">
#if $len($rpmPages) > 1
<form class="pageJump" action="">
Page:
@ -35,6 +35,7 @@
<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, 'external_repo_name')$util.passthrough($self, 'type')">Origin</a> $util.sortImage($self, 'external_repo_name')</th>
<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>
@ -43,6 +44,11 @@
<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 $rpm.external_repo_id == 0
<td>internal</td>
#else
<td><a href="externalrepoinfo?extrepoID=$rpm.external_repo_id">$rpm.external_repo_name</a></td>
#end if
#if $type == 'component'
#set $update = $rpm.is_update and 'yes' or 'no'
<td class="$update">$util.imageTag($update)</td>
@ -51,11 +57,11 @@
#end for
#else
<tr class="row-odd">
<td colspan="#if $type == 'component' then '2' else '1'#">No RPMs</td>
<td colspan="#if $type == 'component' then '3' else '1'#">No RPMs</td>
</tr>
#end if
<tr>
<td class="paginate" colspan="#if $type == 'component' then '2' else '1'#">
<td class="paginate" colspan="#if $type == 'component' then '3' else '1'#">
#if $len($rpmPages) > 1
<form class="pageJump" action="">
Page: