You are here

function theme_l10n_update_available_release in Localization update 7

Format current translation version.

Parameters

object $release: Update file data.

Return value

string HTML output.

1 theme call to theme_l10n_update_available_release()
theme_l10n_update_single_project_wrapper in ./l10n_update.admin.inc
Format project translation state with states per language.

File

./l10n_update.admin.inc, line 503
Admin settings and update page.

Code

function theme_l10n_update_available_release($variables) {
  $date = $variables['release']->timestamp;
  $version = $variables['release']->version;
  if (!empty($variables['release']->fileurl)) {

    // Remote file, straight link
    $link = l(t('Download'), $variables['release']->fileurl);
  }
  elseif (!empty($variables['release']->uri)) {

    // Local file, try something
    $link = l(t('Download'), $variables['release']->uri, array(
      'absolute' => TRUE,
    ));
  }
  $output = '<div class="version version-recommended">';
  $output .= t('Recommended version: @version (!date)', array(
    '@version' => $version,
    '!date' => format_date($date, 'custom', 'Y-M-d'),
  ));
  $output .= '<span class="version-links">' . $link . '</span>';
  $output .= "</div>\n";
  return $output;
}