You are here

function theme_outline_designer_ui_prefix in Outline Designer 6.2

Same name and namespace in other branches
  1. 7.2 outline_designer.module \theme_outline_designer_ui_prefix()

Theme Callback: render the top buttons for outline designer ui.

2 theme calls 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
_outline_designer_menu_admin_form_alter in modules/outline_designer_menu/outline_designer_menu.module
Helper to allow other sub-sub projects to implement this

File

./outline_designer.module, line 106
API for implementation of the Outline Designer usability improvements.

Code

function theme_outline_designer_ui_prefix($nid, $icon_path, $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>';
  }
  $output .= '<div style="height:30px; float:left;">
        <a href="#" onclick="Drupal.outline_designer.scale(-1);" class="od-operation-icons">
          <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">
          <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">
          <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">
          <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">
          <img alt="' . t('Close all branches') . '" title="' . t('Close all branches') . '" src="' . $icon_path . 'close-all.png" />
        </a>
      </div>
    </div>
  </fieldset>';
  return $output;
}