You are here

function theme_rate_ui_buttons in Rate 7.2

Theme function for rate ui buttons.

1 theme call to theme_rate_ui_buttons()
rate_ui_widget_form_step_buttons in ui/rate_ui.form.inc
Generate form fields for the second step in the rate widget form.

File

ui/rate_ui.module, line 75
Main module file for the Rate UI module.

Code

function theme_rate_ui_buttons($element) {
  $header = array(
    t('Label'),
    t('Value'),
    t('Description'),
  );
  $rows = array();
  foreach ($element['element'] as $name => $button) {
    if (is_numeric($name)) {
      $button["button{$name}_label"]['#title'] = '';
      $button["button{$name}_value"]['#title'] = '';
      $button["button{$name}_description"]['#title'] = '';
      $rows[] = array(
        drupal_render($button["button{$name}_label"]),
        drupal_render($button["button{$name}_value"]),
        drupal_render($button["button{$name}_description"]),
      );
    }
  }
  $table_variables = array(
    'header' => $header,
    'rows' => $rows,
  );
  return theme('table', $table_variables);
}