Exemple #1
0
/**
 * 
 * @param UserStateInterviewSlots[] $slotStatus
 * @param RegisterController $controller Description
 */
function renderInterviewSlotStatus($slotStatus, $controller)
{
    $formatter = O::app()->getLocale()->getDateFormatter();
    $ul = HtmlTag::tag('ul');
    foreach ($slotStatus as $status) {
        if ($status->time) {
            $utime = strtotime($status->time);
            $time = O::t('oprecx', '{date} at {time}', array('{date}' => $formatter->formatDateTime($utime, 'full', null), '{time}' => $formatter->formatDateTime($utime, null, 'medium')));
        } else {
            $time = O::t('oprecx', 'You have not choosen a slot');
        }
        $ul->appendLi('<strong>' . CHtml::link($status->slot_name, $controller->getURL('interview', array('edit' => 1, 'slotid' => $status->slot_id))) . '</strong>: ' . $time);
    }
    $ul->render(true);
}