#674394 by David_Rothstein: Move add/remove shortcut buttons to a theme setting, so that it does not appear on themes where it makes no sense.

merge-requests/26/head
Angie Byron 2010-01-14 06:47:54 +00:00
parent 6e4c7ffe51
commit fafabc7e2a
2 changed files with 12 additions and 9 deletions

View File

@ -558,15 +558,17 @@ function shortcut_preprocess_page(&$variables) {
$link_path = 'admin/config/system/shortcut/link/' . $mlid . '/delete';
}
$variables['title_suffix']['add_or_remove_shortcut'] = array(
'#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')),
'#prefix' => '<div class="add-or-remove-shortcuts ' . $link_mode . '-shortcut">',
'#type' => 'link',
'#title' => '<span class="icon"></span><span class="text">' . $link_text . '</span>',
'#href' => $link_path,
'#options' => array('query' => $query, 'html' => TRUE),
'#suffix' => '</div>',
);
if (theme_get_setting('shortcut_module_link')) {
$variables['title_suffix']['add_or_remove_shortcut'] = array(
'#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')),
'#prefix' => '<div class="add-or-remove-shortcuts ' . $link_mode . '-shortcut">',
'#type' => 'link',
'#title' => '<span class="icon"></span><span class="text">' . $link_text . '</span>',
'#href' => $link_path,
'#options' => array('query' => $query, 'html' => TRUE),
'#suffix' => '</div>',
);
}
}
}

View File

@ -7,6 +7,7 @@ core = 7.x
engine = phptemplate
stylesheets[screen][] = reset.css
stylesheets[screen][] = style.css
settings[shortcut_module_link] = 1
regions[content] = Content
regions[help] = Help
regions[page_top] = Page top