You are here

function theme_acquia_purge_status_bar_widget in Acquia Purge 6

Same name and namespace in other branches
  1. 7 acquia_purge.admin.inc \theme_acquia_purge_status_bar_widget()

Returns HTML for the Acquia Purge progress bar widget.

Parameters

array $variables: An associative array containing:

  • total: Total amount of actions initially queued for purging.
  • remaining: Remaining number of purge actions still to be processed.
  • processed: Number of purge actions that have already taken place.
  • percent: Value between 0-100 representing the progress percentage.
  • running: Whether URLs are being purged or not.
  • purgehistory: Array with recently purged URL's.
3 theme calls to theme_acquia_purge_status_bar_widget()
acquia_purge_ajax_processor in ./acquia_purge.admin.inc
Menu callback; process a chunk of purge items via AJAX.
theme_acquia_purge_status_widget in ./acquia_purge.admin.inc
Returns HTML for the Acquia Purge status widget.
_acquia_purge_get_diagnosis_status in ./acquia_purge.diagnostics.inc
Report on the current status of the system.

File

./acquia_purge.admin.inc, line 215
Admin page callbacks and theme functions for the Acquia Purge module.

Code

function theme_acquia_purge_status_bar_widget($variables) {

  // Determine status messages based on what the statistics tells us.
  if ($variables['running']) {
    $message = t("Site content is being refreshed, please wait a moment...\n    %remaining items to go...", array(
      '%remaining' => $variables['remaining'],
    ));
  }
  else {
    $message = t("Content changes are now visible for everybody!");
  }
  return theme('progress_bar', $variables['percent'], $message);
}