Пример #1
0
 public function render(Varien_Object $row)
 {
     if ($row->getProcessingStatus() == '_DONE_') {
         return '<span style="font-weight:bold;color:#009900;">' . parent::render($row) . '</span>';
     }
     return parent::render($row);
 }
Пример #2
0
 public function render(Varien_Object $row)
 {
     if ($row->getExportType() != Xtento_OrderExport_Model_Export::EXPORT_TYPE_EVENT) {
         return parent::render($row);
     } else {
         return parent::render($row) . " (" . Mage::helper('xtento_orderexport')->__('Event') . ": " . $row->getExportEvent() . ")";
     }
 }
Пример #3
0
 /**
  * Render a grid cell as options
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $html = parent::render($row);
     $id = $row->getCampaignId();
     if ($id) {
         $url = $this->getUrl('*/campaign/edit', array('id' => $id));
         return sprintf('<a href="%s">%s</a>', $url, $html);
     }
     return $html;
 }
Пример #4
0
 /**
  * Return the Order Id Link
  *
  */
 public function render(Varien_Object $row)
 {
     $html = parent::render($row);
     if ($row->getVendorId() != '') {
         if ($row->canPay()) {
             $url = $this->getUrl('*/adminhtml_vpayments/new/', array('vendor_id' => $row->getVendorId(), 'order_ids' => $row->getId(), 'type' => Ced_CsMarketplace_Model_Vpayment::TRANSACTION_TYPE_CREDIT));
             $html .= "&nbsp;" . $this->getPayNowButtonHtml($url);
         } elseif ($row->canRefund()) {
             $url = $this->getUrl('*/adminhtml_vpayments/new/', array('vendor_id' => $row->getVendorId(), 'order_ids' => $row->getId(), 'type' => Ced_CsMarketplace_Model_Vpayment::TRANSACTION_TYPE_DEBIT));
             $html = $this->getRefundButtonHtml($url, $html);
         }
     }
     return $html;
 }
Пример #5
0
 /**
  * Render a grid cell as options
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $html = parent::render($row);
     $value = $row->getData($this->getColumn()->getIndex());
     switch ($value) {
         case AW_Helpdeskultimate_Model_Source_Ticket_Priority::URGENT:
             $color = '#f00';
             break;
         case AW_Helpdeskultimate_Model_Source_Ticket_Priority::ASAP:
             $color = '#900';
             break;
         default:
             $color = '#000';
     }
     return "<span style=\"color:{$color}\">" . $html . "</span>";
 }
Пример #6
0
 public function render(Varien_Object $row)
 {
     $this->_value = $this->_getValue($row);
     $this->_text = parent::render($row);
     if ($this->getColumn()->getIndex() == 'color') {
         //we are in the list of statuses or priorities
         $color = $this->_value;
     } else {
         $code = str_replace('_id', '', $this->getColumn()->getIndex()) . '_color';
         $color = '';
         if (isset($row[$code])) {
             $color = $row[$code];
         }
     }
     return "<span class='{$color}'>{$this->_text}</span>";
 }
Пример #7
0
 /**
  * render the column
  *
  * @access public
  * @param Varien_Object $row
  * @return string
  * @author Ultimate Module Creator
  */
 public function render(Varien_Object $row)
 {
     $base = $this->getColumn()->getBaseLink();
     if (!$base) {
         return parent::render($row);
     }
     $paramsData = $this->getColumn()->getData('params');
     $params = array();
     if (is_array($paramsData)) {
         foreach ($paramsData as $name => $getter) {
             if (is_callable(array($row, $getter))) {
                 $params[$name] = call_user_func(array($row, $getter));
             }
         }
     }
     $staticParamsData = $this->getColumn()->getData('static');
     if (is_array($staticParamsData)) {
         foreach ($staticParamsData as $key => $value) {
             $params[$key] = $value;
         }
     }
     $options = $this->getColumn()->getOptions();
     $showMissingOptionValues = (bool) $this->getColumn()->getShowMissingOptionValues();
     if (!empty($options) && is_array($options)) {
         $value = $row->getData($this->getColumn()->getIndex());
         if (is_array($value)) {
             $res = array();
             foreach ($value as $item) {
                 if (isset($options[$item])) {
                     $res[] = '<a href="' . $this->getUrl($base, $params) . '" target="_blank">' . $this->escapeHtml($options[$item]) . '</a>';
                 } elseif ($showMissingOptionValues) {
                     $res[] = '<a href="' . $this->getUrl($base, $params) . '" target="_blank">' . $this->escapeHtml($item) . '</a>';
                 }
             }
             return implode('<br />', $res);
         } elseif (isset($options[$value])) {
             return '<a href="' . $this->getUrl($base, $params) . '" target="_blank">' . $this->escapeHtml($options[$value]) . '</a>';
         } elseif (in_array($value, $options)) {
             return '<a href="' . $this->getUrl($base, $params) . '" target="_blank">' . $this->escapeHtml($value) . '</a>';
         }
     }
 }
 /**
  * Render a link to staging log entry
  *
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $result = parent::render($row);
     return '<a href="' . $this->getUrl('*/staging_log/view', array('id' => $row->getLogId())) . '">' . $this->escapeHtml($result) . '</a>';
 }
Пример #9
0
 /**
  * Render column for export
  *
  * @param Varien_Object $row
  * @return string
  */
 public function renderExport(Varien_Object $row)
 {
     $result = parent::renderExport($row);
     return strip_tags($result);
 }