You are here

function lingotek_grid_create_progress_bar in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_grid_create_progress_bar()
  2. 7.5 lingotek.bulk_grid.inc \lingotek_grid_create_progress_bar()
  3. 7.6 lingotek.bulk_grid.inc \lingotek_grid_create_progress_bar()

Helper function for creating the HTML for a progress bar

Parameters

int $progress: Percentage complete for the progress bar

Return value

string $html Raw HTML for a progress bar themed in style/base.css

1 call to lingotek_grid_create_progress_bar()
lingotek_download_translations_form in ./lingotek.page.inc
Download Translations Form.

File

./lingotek.bulk_grid.inc, line 1476
Bulk Grid form

Code

function lingotek_grid_create_progress_bar($progress) {
  $style = "width:" . round($progress) . "%;";
  $html = '<div class="lingotek-progress"><div class="bar" style="' . $style . '"></div><div class="percent">' . $progress . '%' . '</div></div>';
  return $html;
}