function theme_rrssb_config_buttons in Ridiculously Responsive Social Sharing Buttons 7.2
Same name and namespace in other branches
- 7 rrssb.module \theme_rrssb_config_buttons()
Theme function for rrssb_config_buttons. Prints the table for the buttons config in the settings form.
1 theme call to theme_rrssb_config_buttons()
- rrssb_form in ./
rrssb.module - Implements hook_form().
File
- ./
rrssb.module, line 104
Code
function theme_rrssb_config_buttons($variables) {
$elements = $variables['element'];
// Allow dragging of rows to set the weights, handled by javascript.
drupal_add_tabledrag('rrssb_config_buttons', 'order', 'sibling', 'item-row-weight');
$header = array(
'label' => t('Button'),
'enabled' => t('Enabled'),
// @@TODO Not sure if there is anywhere we can write a description '#description' => t('Username for your page/channel/profile.'),
'username' => t('Username'),
'weight' => t('Weight'),
);
$rows = array();
foreach (element_children($elements) as $name) {
$row = array(
'class' => array(
'draggable',
),
);
foreach ($header as $fieldname => $title) {
$row['data'][] = drupal_render($elements[$name][$fieldname]);
}
$rows[] = $row;
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'rrssb_config_buttons',
),
));
}