This resulted in some text in the cell that would create a link you can click on..
Had issues mainly on related tables where the user wanted to edit a field in a certain column but there was no link there to take them to the correct related record entry for editing the field.
The field in question was on the join table, which I've usually hidden from view.
You could still do it by selecting the row and then hitting update, but you then have to select the correct field via a drop down etc.. easier via the link.
Not sure if there is a way to make the whole cell clickable in this case??
Please ignore the rev numbers I have a local svn copy to keep track of my changes..
- Code: Select all
Index: RelatedList.php
===================================================================
--- RelatedList.php (revision 882)
+++ RelatedList.php (working copy)
@@ -473,7 +473,10 @@
$cellClass .= ' '.$srcRecord->table()->getType($key);
$renderVal = $this->renderCell($srcRecord, $field['Field']);
if ( isset($renderVal) ) $val = $renderVal;
- else if ( $link and !@$field['noLinkFromListView'] and !$this->noLinks and $rrec->checkPermission('link', array('field'=>$key))) $val = "<a href=\"".htmlspecialchars($link)."\" title=\"". htmlspecialchars($title)."\" data-xf-related-record-id=\"".htmlspecialchars($srcRecordId)."\" class=\"xf-related-record-link\">".$val."</a>";
+ else if ( $link and !@$field['noLinkFromListView'] and !$this->noLinks and $rrec->checkPermission('link', array('field'=>$key))) {
+ if($val == "") $val = "_____";
+ $val = "<a href=\"".htmlspecialchars($link)."\" title=\"". htmlspecialchars($title)."\" data-xf-related-record-id=\"".htmlspecialchars($srcRecordId)."\" class=\"xf-related-record-link\">".$val."</a>";
+ }
echo "<td class=\"$cellClass $rowClass $accessClass\">$val</td>\n";
unset($srcRecord);
}