commit 1cf2eaf5d2b1200b5e2eacb4b8f89fc3ff0353b9 Author: Joel Pittet Date: Sun May 11 19:59:50 2014 -0700 no need for preprocess diff --git a/core/modules/update/templates/update-version.html.twig b/core/modules/update/templates/update-version.html.twig index cde77d2..e5e483d 100644 --- a/core/modules/update/templates/update-version.html.twig +++ b/core/modules/update/templates/update-version.html.twig @@ -4,13 +4,12 @@ * Default theme implementation for the version display of a project. * * Available variables: - * - table: The update version table. * - title: The title of the project. * - version: A list of data about the latest released version, containing: * - version: The version number. - * - release_link: The URL for the release notes. * - date: The date of the release. * - download_link: The URL for the downloadable file. + * - release_link: The URL for the release notes. * - attributes: HTML attributes for the update versions table. * * @see template_preprocess_update_version() @@ -18,4 +17,22 @@ * @ingroup themeable */ #} -{{ table }} + + + + + + +
{{ title }} + {{ version.version }} + ({{ version.date|date('Y-M-d') }}) +
diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 1257a58..ab8c462 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -335,65 +335,3 @@ function theme_update_status_label($variables) { } } - -/** - * Returns HTML for the version display of a project. - * - * @param array $variables - * An associative array containing: - * - version: An array of data about the latest released version, containing: - * - version: The version number. - * - release_link: The URL for the release notes. - * - date: The date of the release. - * - download_link: The URL for the downloadable file. - * - title: The title of the project. - * - attributes: An array containing attributes for the wrapping table. - * - * @ingroup themeable - */ -function template_preprocess_update_version(&$variables) { - $version = $variables['version']; - - $links['download'] = array( - 'title' => t('Download'), - 'href' => $version['download_link'], - ); - $links['release-notes'] = array( - 'title' => t('Release notes'), - 'href' => $version['release_link'], - ); - - // Add a class attribute to the table. - $variables['attributes']['class'][] = 'version'; - - $variables['table'] = array( - '#type' => 'table', - '#attributes' => $variables['attributes'], - ); - - // Build row. - $variables['table'][] = array( - 'title' => array( - '#wrapper_attributes' => array('class' => array('version-title')), - '#markup' => $variables['title'], - ), - 'details' => array( - '#wrapper_attributes' => array('class' => array('version-details')), - array( - array( - '#markup' => l($version['version'], $version['release_link']), - ), - array( - '#prefix' => ' ', - '#markup' => format_date($version['date'], 'custom', 'Y-M-d'), - '#suffix' => '', - ), - ), - ), - 'links' => array( - '#theme' => 'links__update_version', - '#links' => $links, - '#wrapper_attributes' => array('class' => array('version-links')), - ), - ); -}