Révision 136a805a
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/ctools/page_manager/page_manager.admin.inc | ||
---|---|---|
1542 | 1542 |
* Rearrange the order of variants. |
1543 | 1543 |
*/ |
1544 | 1544 |
function page_manager_handler_rearrange($form, &$form_state) { |
1545 |
ctools_include('context-task-handler'); |
|
1545 | 1546 |
$page = $form_state['page']; |
1546 | 1547 |
|
1547 | 1548 |
$form['handlers'] = array('#tree' => TRUE); |
... | ... | |
1552 | 1553 |
} |
1553 | 1554 |
$handler = $page->handlers[$id]; |
1554 | 1555 |
$plugin = page_manager_get_task_handler($handler->handler); |
1555 |
|
|
1556 |
$object = ctools_context_handler_get_task_object($page->task, $page->subtask, $handler); |
|
1557 |
$display = new stdClass(); |
|
1558 |
$display->context = ctools_context_load_contexts($object, TRUE); |
|
1559 |
$content = page_manager_get_handler_title($plugin, $handler, $page->task, $page->subtask_id); |
|
1560 |
$access = ctools_access_group_summary(!empty($handler->conf['access']) ? $handler->conf['access'] : array(), $display->context); |
|
1561 |
if ($access) { |
|
1562 |
$access = t('This panel will be selected if @conditions.', array('@conditions' => $access)); |
|
1563 |
} |
|
1564 |
else { |
|
1565 |
$access = t('This panel will always be selected.'); |
|
1566 |
} |
|
1567 |
$content .= '<div>' . $access . '</div>'; |
|
1556 | 1568 |
$form['handlers'][$id]['title'] = array( |
1557 |
'#markup' => page_manager_get_handler_title($plugin, $handler, $page->task, $page->subtask_id),
|
|
1569 |
'#markup' => $content,
|
|
1558 | 1570 |
); |
1559 | 1571 |
|
1560 | 1572 |
$form['handlers'][$id]['weight'] = array( |
Formats disponibles : Unified diff
Weekly update of contrib modules