function theme_sharebar_buttons_table in ShareBar 6
Same name and namespace in other branches
- 7.2 sharebar.admin.inc \theme_sharebar_buttons_table()
- 7 sharebar.admin.inc \theme_sharebar_buttons_table()
Theme the administer buttons page.
1 theme call to theme_sharebar_buttons_table()
- sharebar_settings in ./
sharebar.admin.inc - Form builder: Configure the sharebar system.
File
- ./
sharebar.admin.inc, line 13 - Admin page callbacks for the block module.
Code
function theme_sharebar_buttons_table($variables) {
$out = '';
$out .= '<div>' . l('Add New Button', 'admin/settings/sharebar/add') . '</div>';
$buttons = unserialize(variable_get('sharebar_buttons', sharebar_buttons_def()));
if (is_array($buttons) && count($buttons)) {
usort($buttons, "sharebar_cmp_up");
foreach ($buttons as $key => $value) {
$row = array();
$row[] = array(
'data' => $value->enabled ? t('Yes') : t('No'),
);
$row[] = array(
'data' => $value->name,
);
$row[] = array(
'data' => $value->big_button,
);
$row[] = array(
'data' => $value->small_button,
);
$row[] = array(
'data' => $value->weight,
);
$row[] = array(
'data' => l('Edit', 'admin/settings/sharebar/edit/' . $value->machine_name) . ' | ' . l('Delete', 'admin/settings/sharebar/del/' . $value->machine_name),
);
$rows[] = $row;
}
}
if (count($rows)) {
$header = array(
t('Enabled'),
t('Name'),
t('Big button'),
t('Small button'),
t('Weight'),
t('Actions'),
);
$out .= theme('table', $header, $rows);
}
else {
$out .= '<b>' . t('No data') . '</b>';
}
return $out;
}