This is kind of hacky, but if you need to display
PAID and
PENDING under the
_STATUS column on the directory of version 1.51.8, here's how to
do force it.
Keep in mind that an update will probably undo this. It is best practice to create the folder structure...
Templates/yourtemplate/html/com_rsform/views/directory/tmpl/
and drop a copy of
components/com_rsform/views/directory/tmpl/default_layout.php
into the 'tmpl' folder that you created under your Template directory.
This will prevent update overwrites of our customization.
Open up the default_layout.php that you copied into the new tmpl folder.
On or around line 30 you should find..
<?php foreach ($this->viewableFields as $field) { ?>
<td align="center" class="center directoryCol directoryCol<?php echo $this->getFilteredName($field->FieldName); ?>"><?php echo $this->getValue($item, $field); ?></td>
<?php } ?>
Replace that code with this...
<?php foreach ($this->viewableFields as $field) { ?>
<td align="center" class="center directoryCol directoryCol<?php echo $this->getFilteredName($field->FieldName); ?>">
<?php
if($field->FieldCaption == "_STATUS" && $this->getValue($item,$field) == 1) {
echo "<span style='color:green;'>PAID</span>";
}
elseif($field->FieldCaption == "_STATUS" && $this->getValue($item,$field) == 0) {
echo "<span style='color:red;'>PENDING</span>";
}else{
echo $this->getValue($item, $field);
}
?>
</td>
<?php } ?>
And you should get a result something like this...