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); }
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() . ")"; } }
/** * 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; }
/** * 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 .= " " . $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; }
public function render(Varien_Object $row) { $value = (int) $this->_getValue($row); $style = ""; $bgColor = $this->_getBackgroundColorByPriorityId($value); if (null !== $bgColor) { $style .= "background-color:{$bgColor};"; } $textColor = $this->_getTextColorByPriorityId($value); if (null !== $textColor) { $style .= "color:{$textColor};"; } return "<span class='awhdu3-ticket-grid-priority-column-cell' style='{$style}'>" . parent::render($row) . "</span>"; }
/** * 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>"; }
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>"; }
/** * 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>'; }