<?php require(CONTENT_APPLICATION_ROOT . CONTENT_ADMIN_TEMPLATE);?>
<?php $template = simple_template::extendTemplate(basename(CONTENT_ADMIN_TEMPLATE)); ?>
<?php $template->startBlock("additional_css");?>
<link rel="stylesheet" type="text/css" href="css/quick_plugin.css" media="screen" />
<?php $template->endBlock();?>
<?php $template->startBlock("content");?>
<br />
<a style="float:right" href="<?php echo content::getURLForContentUIDData(array('CONTENT_ID' => $this->getID(),'RECORD_ID'=>null));?>">New Record</a>
<h2>Editing Content Marker: <?php echo $this->getID();?></h2>
<br />
<table>
<thead>
<tr>
<th>Created On</th>
<th>Modified On</th>
<?php
foreach($this->getDataFields() as $field_name)
{
?>
<th><?php echo $field_name;?></th>
<?php
}
?>
<th style="width:50px;">Edit</th>
<th style="width:50px;">Delete</th>
</tr>
</thead>
<tbody>
<?php
foreach($this->getData() as $record_key => $record)
{
?>
<tr>
<td><?php echo $record->getCreated();?></td>
<td><?php echo $record->getModified();?></td>
<?php
foreach($this->getDataFields() as $field_name)
{
if(array_key_exists($field_name, $record->getFields()))
{
if(is_array($record->getField($field_name)))
{
?>
<td><?php echo implode(",",$record->getField($field_name));?></td>
<?php
}
else
{
?>
<td><?php echo $record->getField($field_name);?></td>
<?php
}
}
else
{
?>
<td></td>
<?php
}
}
?>
<td><a href="<?php echo content::getURLForContentUIDData(array('CONTENT_ID' => $this->getID(),'RECORD_ID'=>$record_key));?>">Edit</a></td>
<td><a href="<?php echo content::getURLForContentUIDData(array('CONTENT_ID' => $this->getID(),'ADMIN' => true,'RECORD_ID'=>$record_key,'ACTION'=>'DELETE','RETURN_URL' => simple_url::getCurrentURL()),CONTENT_URL_BASE);?>">Delete</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php $template->endBlock();?>