I was able to do this by creating an override to the default template and adding the "cancel" link directly - this way you don't have to show anyone else's information.
I used the Joomla override to create a new default.php for the details view.
To the original I added just below the line that reads:
| Code: |
echo $this->tags->ReplaceTags($this->row->datdescription);
|
The following code:
| Code: |
?>
<div class="register">
<ul class="user floattext">
<?php
//loop through attendees
foreach ($this->registers as $key => $register)
{
if ($register->submitter->waitinglist == 0)
{
if ($this->unreg_check && $register->submitter->uid == $this->user->get('id')) {
echo '<li><ul class="attendee myreg">';
}
else {
echo '<li><ul class="attendee">';
}
foreach ($register->answers as $k => $name) {
if (stristr($name, '~~~')) $name = str_replace('~~~', '<br />', $name).'<br />';
}
if ($this->unreg_check && $register->submitter->uid == $this->user->get('id')) {
$unreg_url = JRoute::_(RedeventHelperRoute::getDetailsRoute($this->row->slug, $this->row->xref). '&task=delreguser&sid=' .$register->id);
echo '<li><u>'. JHTML::link($unreg_url, JText::_('Click here to cancel your registration'), array('class' => 'unreglink')) .'</u></li>';
}
echo '</ul></li>';
}
} ?>
</ul>
</div>
<?php
|
Admittedly, this is not my code, but taken from the attendee list where the cancel button shows up! Also, I'm pretty sure this will only work for a single registered user...