theme_update_version

Versions
6
theme_update_version($version, $tag, $class)
7
theme_update_version($variables)

Theme the version display of a project.

Related topics

Code

modules/update/update.report.inc, line 279

<?php
function theme_update_version($variables) {
  $version = $variables['version'];
  $tag = $variables['tag'];
  $class = $variables['class'];

  $output = '';
  $output .= '<table class="version ' . $class . '">';
  $output .= '<tr>';
  $output .= '<td class="version-title">' . $tag . "</td>\n";
  $output .= '<td class="version-details">';
  $output .= l($version['version'], $version['release_link']);
  $output .= ' <span class="version-date">(' . format_date($version['date'], 'custom', 'Y-M-d') . ')</span>';
  $output .= "</td>\n";
  $output .= '<td class="version-links">';
  $links = array();
  $links['update-download'] = array(
    'title' => t('Download'),
    'href' => $version['download_link'],
  );
  $links['update-release-notes'] = array(
    'title' => t('Release notes'),
    'href' => $version['release_link'],
  );
  $output .= theme('links', array('links' => $links));
  $output .= '</td>';
  $output .= '</tr>';
  $output .= "</table>\n";
  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.