function theme_party_settings_label_plugins_form in Party 8.2
Themes the label plugin overview form as a sortable list of plugins.
Parameters
$variables: An associative array containing:
- form: A render element representing the form.
See also
party_settings_label_plugins_form()
File
- ./
party.admin.inc, line 146 - Admin page callback file for the party module.
Code
function theme_party_settings_label_plugins_form($variables) {
$form = $variables['form'];
$rows = array();
foreach (element_children($form['label_plugins']) as $key) {
$label_plugin =& $form['label_plugins'][$key];
$row = array();
$row[] = drupal_render($label_plugin['name']);
$row[] = drupal_render($label_plugin['edit_link']);
if (isset($label_plugin['weight'])) {
$label_plugin['weight']['#attributes']['class'] = array(
'label-plugin-weight',
);
$row[] = drupal_render($label_plugin['weight']);
}
$rows[] = array(
'data' => $row,
'class' => array(
'draggable',
),
);
}
$header = array(
t('Label Plugins'),
t(''),
);
if (isset($form['actions'])) {
$header[] = t('Weight');
drupal_add_tabledrag('crm-party-label-plugins', 'order', 'sibling', 'label-plugin-weight');
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'crm-party-label-plugins',
),
)) . drupal_render_children($form);
return $output;
}