Add enabled setting display in list
NancyDru - January 3, 2009 - 17:52
| Project: | MultiBlock |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | NancyDru |
| Status: | closed |
Jump to:
Description
To make sure MB knows I enabled my module, I modified "theme_multiblock_general" to show the enabled status. This might be useful information for other developers.
function theme_multiblock_general($add_block_form, $multiblocks) {
$output = '';
$noyes = array('No', 'Yes');
$output .= '<p><h3>'. t('Add Instance') .'</h3>'. $add_block_form .'</p>';
$header = array(t('Title'), t('Original Block Title'), t('Original Module'), t('Enabled'), t('Original Delta'), t('Action'));
foreach ($multiblocks as $row) {
$delete_link = l(t('Delete'), 'admin/build/block/instances/delete/'. $row->delta);
$title = multiblock_get_block_title($row->module, $row->orig_delta);
$mb_enabled = $noyes[$row->multi_settings];
$rows[] = array(check_plain($row->title), $title, $row->module, $mb_enabled, $row->orig_delta, $delete_link);
}
$output .= '<p><h3>'. t('Manage Instances') .'</h3>'. theme('table', $header, $rows) .'</p>';
return $output;
}
#1
Fix committed to DRUPAL-5 and DRUPAL-6--1 branches.
#2
#3
I think the title "Enabled" might be a little confusing, maybe "MultiBlock Enabled" is a little better? That still is even a little confusing because my guess is 80% of users won't know what that means. Let me know what you think. Useful feature anyways though, thanks for adding it.
#4
How about "Module enabled"?
#5
I'm not sure that would be accurate because it doesn't have to do with whether the module is enabled or not. How about "Saves Per-block Settings"?
#6
Actually, I've come back to your original suggestion because it pretty much says what the README and handbook page says. It will go in with the title editing fix tomorrow.
#7
Fix committed on both branches. Plus the "yes/no" is changed to check mark or red X.
#8
I think we need to run the check/X images through theme_image so it corrects the path in the case that the Drupal site isn't at the root.
#9
Committed on both branches.
#10
Automatically closed -- issue fixed for two weeks with no activity.