110 lines
4.3 KiB
Django/Jinja
110 lines
4.3 KiB
Django/Jinja
|
|
#include "header.html.j2"
|
|
# from "macros.html.j2" import rowToggle
|
|
|
|
#macro getID()
|
|
#if type == 'image'
|
|
imageID={{ image.id }}
|
|
#else
|
|
buildrootID={{ buildroot.id }}
|
|
#endif
|
|
#endmacro
|
|
|
|
#macro getColspan()
|
|
#if type == 'component'
|
|
colspan="3"
|
|
#elif type == 'image'
|
|
colspan="2"
|
|
#endif
|
|
#endmacro
|
|
|
|
#if type == 'component'
|
|
<h4>Component RPMs of buildroot <a href="buildrootinfo?buildrootID={{ buildroot.id }}">{{ util.brLabel(buildroot) }}</a></h4>
|
|
#elif type == 'image'
|
|
<h4>RPMs installed in <a href="archiveinfo?archiveID={{ image.id }}">{{ image.filename }}</a></h4>
|
|
#else
|
|
<h4>RPMs built in buildroot <a href="buildrootinfo?buildrootID={{ buildroot.id }}">{{ util.brLabel(buildroot) }}</a></h4>
|
|
#endif
|
|
|
|
<table class="data-list">
|
|
<tr>
|
|
<td class="paginate" {{ getColspan()|trim }}>
|
|
#if (rpmPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'rpmlist?{{ getID()|trim }}&start=' + this.value * {{ rpmRange }} + '{{ util.passthrough('order', 'type') }}';">
|
|
#for pageNum in rpmPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == rpmCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if rpmStart > 0
|
|
<a href="rpmlist?{{ getID()|trim }}&start={{ rpmStart - rpmRange }}{{ util.passthrough('order', 'type') }}"><<<</a>
|
|
#endif
|
|
#if totalRpms != 0
|
|
<strong>RPMs {{ rpmStart + 1 }} through {{ rpmStart + rpmCount }} of {{ totalRpms }}</strong>
|
|
#endif
|
|
#if rpmStart + rpmCount < totalRpms
|
|
<a href="rpmlist?{{ getID()|trim }}&start={{ rpmStart + rpmRange }}{{ util.passthrough('order', 'type') }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
<tr class="list-header">
|
|
<th><a href="rpmlist?{{ getID()|trim }}&order={{ util.toggleOrder('nvr') }}{{ util.passthrough('type') }}">NVR</a> {{ util.sortImage('nvr') }}</th>
|
|
#if type in ['component', 'image']
|
|
<th><a href="rpmlist?{{ getID()|trim }}&order={{ util.toggleOrder('external_repo_name') }}{{ util.passthrough('type') }}">Origin</a> {{ util.sortImage('external_repo_name') }}</th>
|
|
#endif
|
|
#if type == 'component'
|
|
<th><a href="rpmlist?{{ getID()|trim }}&order={{ util.toggleOrder('is_update') }}{{ util.passthrough('type') }}">Update?</a> {{ util.sortImage('is_update') }}</th>
|
|
#endif
|
|
</tr>
|
|
#if (rpms |length) > 0
|
|
#for rpm in rpms
|
|
<tr class="{{ rowToggle(loop) }}">
|
|
#set epoch = (rpm.epoch|string + ':' if rpm.epoch != None else '')
|
|
<td>{{ util.formatRPM(rpm) }}</td>
|
|
#if type in ['component', 'image']
|
|
#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>
|
|
#endif
|
|
#endif
|
|
#if type == 'component'
|
|
#set update = rpm.is_update and 'yes' or 'no'
|
|
<td class="{{ update }}">{{ util.imageTag(update) }}</td>
|
|
#endif
|
|
</tr>
|
|
#endfor
|
|
#else
|
|
<tr class="row-odd">
|
|
<td {{ getColspan()|trim }}>No RPMs</td>
|
|
</tr>
|
|
#endif
|
|
<tr>
|
|
<td class="paginate" {{ getColspan()|trim }}>
|
|
#if (rpmPages |length) > 1
|
|
<form class="pageJump" action="">
|
|
Page:
|
|
<select onchange="javascript: window.location = 'rpmlist?{{ getID()|trim }}&start=' + this.value * {{ rpmRange }} + '{{ util.passthrough('order', 'type') }}';">
|
|
#for pageNum in rpmPages
|
|
<option value="{{ pageNum }}"{{ ' selected' if pageNum == rpmCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
|
#endfor
|
|
</select>
|
|
</form>
|
|
#endif
|
|
#if rpmStart > 0
|
|
<a href="rpmlist?{{ getID()|trim }}&start={{ rpmStart - rpmRange }}{{ util.passthrough('order', 'type') }}"><<<</a>
|
|
#endif
|
|
#if totalRpms != 0
|
|
<strong>RPMs {{ rpmStart + 1 }} through {{ rpmStart + rpmCount }} of {{ totalRpms }}</strong>
|
|
#endif
|
|
#if rpmStart + rpmCount < totalRpms
|
|
<a href="rpmlist?{{ getID()|trim }}&start={{ rpmStart + rpmRange }}{{ util.passthrough('order', 'type') }}">>>></a>
|
|
#endif
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
#include "footer.html.j2"
|