]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Layout/ActionBar/ComboBox.pm
ActionBar: ComboBox mit nur einem Eintrag wie Eintrag rendern
[mfinanz.git] / SL / Layout / ActionBar / ComboBox.pm
index 9a545392f37cdd33e69995d4944a47d9735fb6ed..555ae69b2f0810d6f8600e826e4d1c4caad06c3d 100644 (file)
@@ -20,6 +20,9 @@ sub from_params {
 
 sub render {
   my ($first, @rest) = @{ $_[0]->actions };
+
+  return $first->render if !@rest;
+
   $_[0]->p->html_tag('div',
     $_[0]->p->html_tag('div', $first->render . $_[0]->p->html_tag('span'), class => 'layout-actionbar-combobox-head') .
     $_[0]->p->html_tag('div', join('', map { $_->render } @rest), class => 'layout-actionbar-combobox-list'),