Probably the easiest way to do this is to override the copy_replace.html template. You can find this template in Dataface/templates. Just copy it into your application's templates directory and make customizations as necessary.
In particular, you'll notice a section like:
- Code: Select all
<table>
<thead>
<tr>
<th>Title</th>
{foreach from=$columns item="column"}
<th>{$column.widget.label}</th>
{/foreach}
</tr>
</thead>
<tbody>
{foreach from=$records item=record}
<tr><td>{$record->getTitle()}</td>
{foreach from=$columns item="column"}
<td>{$record->preview($column.name)}</td>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
This is just set to show the title and primary keys of each record. You could also add a "description" column to show you the record description with some more specific information:
- Code: Select all
<table>
<thead>
<tr>
<th>Title</th>
<th>Description</th>
{foreach from=$columns item="column"}
<th>{$column.widget.label}</th>
{/foreach}
</tr>
</thead>
<tbody>
{foreach from=$records item=record}
<tr><td>{$record->getTitle()}</td>
<td>{$record->getDescription()}</td>
{foreach from=$columns item="column"}
<td>{$record->preview($column.name)}</td>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
You can override record descriptions in your delegate class with the getDescription() method:
- Code: Select all
function getDescription(&$record){
return "A unique description for this record: ". $record->val('id').' : '.$record->val('name');
}
Or something along those lines.
-Steve