public function fetch_headline_value($value, $document_id) { if (empty($value)) { return parent::fetch_headline_value($value, $document_id); } $header = DataSource_Hybrid_Field_Utils::get_document_header($this->from_ds, $value); if (!empty($header)) { return HTML::anchor(Route::get('datasources')->uri(array('directory' => 'hybrid', 'controller' => 'document', 'action' => 'view')) . URL::query(array('ds_id' => $this->from_ds, 'id' => $value), FALSE), $header, array('class' => ' popup fancybox.iframe')); } return parent::fetch_headline_value($value, $document_id); }
public function fetch_headline_value($value, $document_id) { if (empty($value)) { return parent::fetch_headline_value($value, $document_id); } $user = ORM::factory('user', (int) $value); if (!$user->loaded()) { return parent::fetch_headline_value($value, $document_id); } $header = DataSource_Hybrid_Field_Utils::get_document_header($this->from_ds, $value); return HTML::anchor(Route::get('backend')->uri(array('controller' => 'users', 'action' => 'profile', 'id' => $user->id)), $user->username, array('class' => ' popup fancybox.iframe')); }
public function fetch_headline_value($value, $document_id) { if (!empty($value)) { $docs = $this->get_related_docs($document_id); foreach ($docs as $i => $id) { $header = DataSource_Hybrid_Field_Utils::get_document_header($this->from_ds, $id); $docs[$i] = HTML::anchor(Route::get('datasources')->uri(array('controller' => 'document', 'directory' => 'hybrid', 'action' => 'view')) . URL::query(array('ds_id' => $this->from_ds, 'id' => $id)), $header, array('target' => 'blank')); } return implode(', ', $docs); } return parent::fetch_headline_value($value, $document_id); }