Closed (fixed)
Project:
Panels
Version:
6.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2009 at 00:13 UTC
Updated:
4 Sep 2010 at 17:50 UTC
This is mostly an usability related request for the panels_common_settings form defined in panels/includes/common.inc. This form is specially annoying when you have a lot of CCK fields, Views, mini-panels, etc. The form is really endless and hard to manage.
Here's a few ideas to enhance this form:
When content type groups are not enabled in the "New content behavior" option, the corresponding sections in the form could be removed.
Here's a quick fix for this.
foreach ($available_content_types as $id => $types) {
foreach ($types as $type => $info) {
$key = $id . '-' . $type;
$checkboxes = empty($content_types[$id]['single']) ? $id : 'other';
+ if (in_array($checkboxes, $form['panels_common_default']['#default_value'])) {
$options[$checkboxes][$key] = $info['title'];
if (!isset($allowed_content_types[$key])) {
$allowed[$checkboxes][$key] = isset($default_types[$id]) ? $default_types[$id] : $default_types['other'];
}
else {
$allowed[$checkboxes][$key] = $allowed_content_types[$key];
}
+ }
}
}
$form['panels_common_default'] = array(
'#type' => 'checkboxes',
'#title' => t('New content behavior'),
+ '#checkall' => TRUE,
$form['content_types'][$id] = array(
'#prefix' => '<div class="panels-page-type-container">',
'#suffix' => '</div>',
'#type' => 'checkboxes',
+ '#checkall' => TRUE,
'#title' => t('Allowed @s content', array('@s' => $info['title'])),
'#options' => $options[$id],
'#default_value' => array_keys(array_filter($allowed[$id])),
);
$form['layouts'] = array(
'#type' => 'checkboxes',
'#title' => t('Select allowed layouts'),
+ '#checkall' => TRUE,
* The Checkall module adds quick links between the field label and the options to check all / toggle / uncheck all.
If the idea is ok, then I would be glad to provide a patch for these changes.
Comments
Comment #1
merlinofchaos commented#2 and #3 both sound reasonable, though I worry #3 actually will provide a usability barrier by obscuring where things are. Perhaps a tabbed interface would work better. (I'm anti-lots-of-fieldsets in general).
#1 I am concerned about, because just because you don't wnat new content to appear does not mean you do not want some existing content to be usable.
Comment #2
merlinofchaos commentedWere you going to work on this? =)
Comment #3
markus_petrux commentedI lack the time right now. :(
Comment #4
merlinofchaos commentedOk, #2 done. I am not doing #1 or #3.