Example #1
0
 public function render(Varien_Object $feed)
 {
     $html = '';
     $state = $feed->getGenerator()->getState();
     if ($feed->getIsActive()) {
         if ($state->isReady()) {
             if ($feed->getUrl()) {
                 $html = $this->getStatusHtml('notice', 'Ready');
             } else {
                 $html = $this->getStatusHtml('critical', 'Not generated');
             }
         } elseif ($state->isError()) {
             $html = $this->getStatusHtml('critical', 'Error');
         } elseif ($state->isProcessing()) {
             $html = $this->getStatusHtml('major', 'Processing', $state->toHtml());
         }
     } else {
         $html = $this->getStatusHtml('minor', 'Disabled');
     }
     return $html;
 }