Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Commit

Permalink
Merge branch 'akrabat-add-hosts-to-pending-view'
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane committed Sep 20, 2014
2 parents e098a49 + d792ebe commit 047b02d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/system/application/controllers/event.php
Expand Up @@ -152,6 +152,10 @@ function _runList(
$e->user_attending = ($uid)
? $this->user_attend_model->chkAttend($uid, $e->ID)
: false;

if ($type == 'pending') {
$e->admins = $this->event_model->getEventAdmins($e->ID);
}
}

$reqkey = buildReqKey();
Expand Down
10 changes: 10 additions & 0 deletions src/system/application/views/event/_event-row.php
Expand Up @@ -49,6 +49,16 @@
<?php endif ?>
</div>
<?php if (isset($view_type) && $view_type=='pending'): ?>
<p class="info"><b>Host<?php echo (count($event->admins) == 1) ? '' : 's' ?>:</b>
<?php
foreach ($event->admins as $key => $admin_user) {
if ($key > 0) {
echo ", ";
}
echo '<a href="/user/view/'.$admin_user->ID.'">'.$admin_user->full_name.'</a>';
}
?>
</p>
<a style="color:#00C934;text-decoration:none;font-weight:bold;font-size:11px" href="/event/approve/<?php echo $event->ID ?>">APPROVE</a> -
<a style="color:#D6000E;text-decoration:none;font-weight:bold;font-size:11px" href="/event/delete/<?php echo $event->ID ?>">DENY</a>
<?php endif; ?>
Expand Down

0 comments on commit 047b02d

Please sign in to comment.