Closed (fixed)
Project:
MultiBlock
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Jan 2009 at 17:52 UTC
Updated:
20 Jan 2009 at 07:40 UTC
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;
}
Comments
Comment #1
nancydruFix committed to DRUPAL-5 and DRUPAL-6--1 branches.
Comment #2
nancydruComment #3
andrewlevine commentedI 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.
Comment #4
nancydruHow about "Module enabled"?
Comment #5
andrewlevine commentedI'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"?
Comment #6
nancydruActually, 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.
Comment #7
nancydruFix committed on both branches. Plus the "yes/no" is changed to check mark or red X.
Comment #8
andrewlevine commentedI 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.
Comment #9
nancydruCommitted on both branches.