function theme_outline_designer_ui_prefix in Outline Designer 7.2
Same name and namespace in other branches
- 6.2 outline_designer.module \theme_outline_designer_ui_prefix()
Theme Callback: render the top buttons for outline designer ui.
1 theme call to theme_outline_designer_ui_prefix()
- _outline_designer_book_admin_form_alter in modules/
outline_designer_book/ outline_designer_book.module - Helper to allow other sub-sub projects to implement this
File
- ./
outline_designer.module, line 128 - API for implementation of the Outline Designer usability improvements.
Code
function theme_outline_designer_ui_prefix($variables) {
$node = $variables['node'];
$nid = $node->nid;
$icon_path = $variables['icon_path'];
$can_add = $variables['can_add'];
$output = '<fieldset class="collapsible"><div>';
// only append the add form if it is allowed
if ($can_add) {
$output .= '<div style="width:120px; float:left; height:30px; margin-right:6px;" class="context-menu context-menu-theme-' . variable_get('outline_designer_theme', 'vista') . '"><div title="Add Content" alt="Add Content" class="context-menu-item">
<div style="background-image: url(' . $icon_path . 'add_content.png);" class="context-menu-item-inner" onclick="Drupal.settings.outline_designer.activeNid=' . $nid . ';Drupal.outline_designer.form_render(' . "'add_content'" . ');">
' . t('Add content') . '
</div>
</div>
</div>';
}
// form a disable path
if ($node->book['bid'] == $node->nid) {
$disable_path = 'admin/content/book/' . $nid;
}
else {
$disable_path = 'node/' . $nid . '/outline/children';
}
$output .= '<div style="height:30px; float:left;">
<a href="#" onclick="Drupal.outline_designer.scale(-1);" class="od-operation-icons od-decrease">
<img alt="' . t('Decrease interface') . '" title="' . t('Decrease interface') . '" src="' . $icon_path . 'text-decrease.png" />
</a>
<a href="#" onclick="Drupal.outline_designer.scale(1);" class="od-operation-icons od-increase">
<img alt="' . t('Increase interface') . '" title="' . t('Increase interface') . '" src="' . $icon_path . 'text-increase.png" />
</a>
<a href="#" onclick="Drupal.outline_designer.scale(0);" class="od-operation-icons od-reset">
<img alt="' . t('Reset interface') . '" title="' . t('Reset interface') . '" src="' . $icon_path . 'text-reset.png" />
</a>
<a href="#" onclick="Drupal.outline_designer.openAll();" class="od-operation-icons od-open-all">
<img alt="' . t('Open all branches') . '" title="' . t('Open all branches') . '" src="' . $icon_path . 'open-all.png" />
</a>
<a href="#" onclick="Drupal.outline_designer.collapseAll();" class="od-operation-icons od-close-all">
<img alt="' . t('Close all branches') . '" title="' . t('Close all branches') . '" src="' . $icon_path . 'close-all.png" />
</a>
' . l(t('Disable auto-update'), $disable_path, array(
'query' => array(
'disable-outline-designer' => TRUE,
),
)) . '
</div>
</div>
</fieldset>';
return $output;
}