product-list: Handle channel along with "file".

We want to have contents and detauls of channel expressions as well and
we already have that in product.type == file, so why not reuse the same
for the channel expression?

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2015-04-26 18:01:02 +02:00
parent c9aadd8b7d
commit d1de12cac1
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -117,19 +117,7 @@
</tr> </tr>
[% END %] [% END %]
[% CASE "channel" %] [% CASE ["file", "channel"] %]
<tr class="product">
<td>
<a href="[% uri %]">
<img src="[% c.uri_for("/static/images/channel.png") %]" alt="Channel" />
Channel expression tarball <tt>[% product.name %]</tt>
[% IF product.subtype != "-" %]for <tt>[% product.subtype %]</tt>[% END %]
</a>
</td>
</tr>
[% CASE "file" %]
<tr class="product"> <tr class="product">
<td> <td>
@ -148,8 +136,14 @@
[% CASE "binary-dist" %] [% CASE "binary-dist" %]
<img src="[% c.uri_for("/static/images/binary-dist.png") %]" alt="Binary distribution" /> Binary distribution <tt>[% product.name %]</tt> <img src="[% c.uri_for("/static/images/binary-dist.png") %]" alt="Binary distribution" /> Binary distribution <tt>[% product.name %]</tt>
[% CASE DEFAULT %] [% CASE DEFAULT %]
[% IF product.type == "channel" %]
<img src="[% c.uri_for("/static/images/channel.png") %]" alt="Channel" />
Channel expression tarball <tt>[% product.name %]</tt>
[% IF product.subtype != "-" %]for <tt>[% product.subtype %]</tt>[% END %]
[% ELSE %]
File <tt>[% product.name %]</tt> of type <tt>[% product.subtype %]</tt> File <tt>[% product.name %]</tt> of type <tt>[% product.subtype %]</tt>
[% END %] [% END %]
[% END %]
</a> </a>
[% WRAPPER makePopover title="Details" classes="btn-mini" %] [% WRAPPER makePopover title="Details" classes="btn-mini" %]
<table class="info-table"> <table class="info-table">