diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-24 16:15:45 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-28 07:44:24 -0700 |
commit | 89dc215d9b00df49ba930acf47dc33c8acc8f909 (patch) | |
tree | b2f9f5004190e4655d8beab6cac0609ebacc25ee /plugins/YammerImport/actions | |
parent | 69cb47ccf445008bfb37d9a52f31da18dd5cdcaa (diff) |
Pretty up the Yammer import status display a bit
Diffstat (limited to 'plugins/YammerImport/actions')
-rw-r--r-- | plugins/YammerImport/actions/yammeradminpanel.php | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/plugins/YammerImport/actions/yammeradminpanel.php b/plugins/YammerImport/actions/yammeradminpanel.php index 2c9f412a2..12df3c202 100644 --- a/plugins/YammerImport/actions/yammeradminpanel.php +++ b/plugins/YammerImport/actions/yammeradminpanel.php @@ -175,32 +175,37 @@ class YammerAdminPanelForm extends AdminForm $steps = array_keys($labels); $currentStep = array_search($runner->state(), $steps); + $this->out->elementStart('div', array('class' => 'yammer-import')); foreach ($steps as $step => $state) { if ($step < $currentStep) { // This step is done - $this->progressBar($labels[$state]['label'], - $labels[$state]['complete'], - 'complete'); + $this->progressBar($state, + 'complete', + $labels[$state]['label'], + $labels[$state]['complete']); } else if ($step == $currentStep) { // This step is in progress - $this->progressBar($labels[$state]['label'], - $labels[$state]['progress'], - 'progress'); + $this->progressBar($state, + 'progress', + $labels[$state]['label'], + $labels[$state]['progress']); } else { // This step has not yet been done. - $this->progressBar($labels[$state]['label'], - _m("Waiting..."), - 'waiting'); + $this->progressBar($state, + 'waiting', + $labels[$state]['label'], + _m("Waiting...")); } } + $this->out->elementEnd('div'); } - private function progressBar($label, $status, $class) + private function progressBar($state, $class, $label, $status) { // @fixme prettify ;) - $this->out->elementStart('div', array('class' => $class)); - $this->out->element('p', array(), $label); - $this->out->element('p', array(), $status); + $this->out->elementStart('div', array('class' => "import-step import-step-$state $class")); + $this->out->element('div', array('class' => 'import-label'), $label); + $this->out->element('div', array('class' => 'import-status'), $status); $this->out->elementEnd('div'); } |