'menu_local_tasks',
'#secondary' => isset($variables['tabs']['#secondary']) ? $variables['tabs']['#secondary'] : '',
);
}
/**
* Displays the list of available node types for node creation.
*/
function seven_node_add_list($variables) {
$content = $variables['content'];
if ($content) {
$output = '
';
}
else {
$output = '' . t('You have not created any content types yet. Go to the content type creation page to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '
';
}
return $output;
}
/**
* Overrides theme_custom_block_add_list().
*
* Displays the list of available custom block types for creation.
*/
function seven_custom_block_add_list($variables) {
$content = $variables['content'];
$output = '';
if ($content) {
$output = '';
}
return $output;
}
/**
* Overrides theme_admin_block_content().
*
* Uses an unordered list markup in both compact and extended mode.
*/
function seven_admin_block_content($variables) {
$content = $variables['content'];
$output = '';
if (!empty($content)) {
$output = system_admin_compact_mode() ? '' : '';
}
return $output;
}
/**
* Overrides theme_tablesort_indicator().
*
* Uses Seven's image versions, so the arrows show up as black and not gray on
* gray.
*/
function seven_tablesort_indicator($variables) {
$theme_path = drupal_get_path('theme', 'seven');
if($variables['style'] == 'asc') {
$image_uri = $theme_path . '/images/arrow-asc.png';
$text = t('Sort ascending');
}
else {
$image_uri = $theme_path . '/images/arrow-desc.png';
$text = t('Sort descending');
}
$image = array(
'#theme' => 'image',
'#uri' => $image_uri,
'#alt' => $text,
'#width' => 9,
'#height' => 5,
'#title' => $text,
);
return drupal_render($image);
}
/**
* Implements hook_preprocess_install_page().
*/
function seven_preprocess_install_page(&$variables) {
drupal_add_js(drupal_get_path('theme', 'seven') . '/js/mobile.install.js');
drupal_add_css(drupal_get_path('theme', 'seven') . '/install-page.css', array('group' => CSS_AGGREGATE_THEME));
$variables['styles'] = new RenderWrapper('drupal_get_css');
$variables['scripts'] = new RenderWrapper('drupal_get_js');
}
/**
* Implements hook_form_BASE_FORM_ID_alter().
*
* Changes vertical tabs to container and adds meta information.
*/
function seven_form_node_form_alter(&$form, &$form_state) {
$node = $form_state['controller']->getEntity();
$form['#theme'] = array('node_edit_form');
$form['#attached'] = array(
'css' => array(drupal_get_path('module', 'node') . '/css/node.module.css'),
);
$form['advanced']['#type'] = 'container';
$form['meta'] = array (
'#type' => 'fieldset',
'#attributes' => array('class' => array('entity-meta-header')),
'#type' => 'container',
'#group' => 'advanced',
'#weight' => -100,
'published' => array(
'#type' => 'item',
'#wrapper_attributes' => array('class' => array('published')),
'#markup' => $node->isPublished() ? t('Published') : t('Not published'),
'#access' => !$node->isNew(),
),
'changed' => array(
'#type' => 'item',
'#wrapper_attributes' => array('class' => array('changed', 'container-inline')),
'#title' => t('Last saved'),
'#markup' => !$node->isNew() ? format_date($node->getChangedTime(), 'short') : t('Not saved yet'),
),
'author' => array(
'#type' => 'item',
'#wrapper_attributes' => array('class' => array('author', 'container-inline')),
'#title' => t('Author'),
'#markup' => $node->getAuthor()->getUsername(),
),
);
$form['revision_information']['#type'] = 'container';
$form['revision_information']['#group'] = 'meta';
}