function row_highlight($attendee, $prefix = "") { $age = $attendee->age() ?: 0; $class = ""; if ($attendee->blacklisted) { $type = BlacklistType::find_by_db_name($attendee->blacklist_type); $class = $type->alert_color; } if ($attendee->canceled) { $class .= " canceled"; } return $prefix ? "{$prefix}-{$class}" : $class; }
<?php if ($form->attendee->blacklisted) { $blacklist_type = BlacklistType::find_by_db_name($form->attendee->blacklist_type); $blacklist = $form->attendee->blacklist(); ?> <div class="alert <?php echo $blacklist_type->alert_color ? "alert-{$blacklist_type->alert_color}" : ""; ?> " role="alert"> <p class="lead"> <strong><?php echo $blacklist_type->alert_title; ?> :</strong> <?php echo nl2br($form->attendee->blacklist_message); ?> </p> <?php if ($blacklist) { ?> <p> Automatic match: <code><?php echo $blacklist->display_name(); ?> </code> <?php