summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-11-07 12:12:58 +0100
committerRemi Collet <fedora@famillecollet.com>2010-11-07 12:12:58 +0100
commitb4dcfb1a6c5b242e09cbd3bffdc43e7a62a30e45 (patch)
treefb42e0254ace7a5c296a98eb2f54d8fadf54afdd
parentb72ffbce60aa1d90e09eb7f6153078a406626cee (diff)
improved filter menu (thanks trashy)
-rw-r--r--smarty/templates/rpmphp/rpm.tpl14
1 files changed, 8 insertions, 6 deletions
diff --git a/smarty/templates/rpmphp/rpm.tpl b/smarty/templates/rpmphp/rpm.tpl
index 742b07d..b2a4f50 100644
--- a/smarty/templates/rpmphp/rpm.tpl
+++ b/smarty/templates/rpmphp/rpm.tpl
@@ -32,18 +32,20 @@
<option value="%stable"{if $what eq '%stable'} selected="selected"{/if}>All stable</option>
<option value="%all"{if $what eq '%all'} selected="selected"{/if}>All</option>
</optgroup>
+{if $channels|@count gt 1}
<optgroup label="Channel">
-{foreach from=$channels item=o}
+ {foreach from=$channels item=o}
<option value="#{$o}"{if $what eq "#$o"} selected="selected"{/if}>{$o}</option>
-{/foreach}
+ {/foreach}
</optgroup>
+{/if}
+{if $owners|@count gt 1}
<optgroup label="Owner">
-{foreach from=$owners item=o}
+ {foreach from=$owners item=o}
<option value="{$o}"{if $what eq $o} selected="selected"{/if}>{$o}</option>
-{foreachelse}
- <option value="remi">remi</option>
-{/foreach}
+ {/foreach}
</optgroup>
+{/if}
</select>
<input type="submit" value="Filter" />
</fieldset>