You are here

function theme_smiley_overview_form in Smiley 7

Returns HTML for the smiley overview form into a table.

File

./smiley.admin.inc, line 166
Smileys administrative pages.

Code

function theme_smiley_overview_form($vars) {
  $form = $vars['form'];
  foreach (element_children($form) as $smid) {
    $element =& $form[$smid];
    if (empty($element['#smiley'])) {
      continue;
    }
    $row = array();
    foreach ($element as $k => $v) {
      if ($k[0] != '#') {
        $row[] = array(
          'data' => drupal_render($element[$k]),
          'style' => 'text-align: center',
        );
      }
    }
    $row = array_merge(array(
      'data' => $row,
    ), $element['#attributes']);
    $rows[] = $row;
  }
  $output = theme('table', array(
    'header' => $form['#header'],
    'rows' => $rows,
    'attributes' => array(
      'id' => 'smiley-overview',
    ),
  ));
  $output .= drupal_render_children($form);
  return $output;
}