/** * Render text that says when action was taken and by who * * @param ApplicationLog $application_log_entry * @return string */ function render_action_taken_on_by(ApplicationLog $application_log_entry) { if ($application_log_entry->isToday()) { $result = lang('today') . ' ' . clean(format_time($application_log_entry->getCreatedOn())); } elseif ($application_log_entry->isYesterday()) { $result = lang('yesterday') . ' ' . clean(format_time($application_log_entry->getCreatedOn())); } else { $result = clean(format_date($application_log_entry->getCreatedOn())); } // if $result = "<span class=\"logTakenOn\">{$result}</span></td><td><span class=\"logBy\">"; $taken_by = $application_log_entry->getTakenBy(); return $taken_by instanceof User ? $result . '<a href="' . $taken_by->getCardUrl() . '">' . clean($taken_by->getDisplayName()) . '</a></span>' : $result . '</span>'; }
/** * Render text that says when action was tacken and by who * * @param ApplicationLog $application_log_entry * @return string */ function render_action_taken_on_by(ApplicationLog $application_log_entry) { if ($application_log_entry->isToday()) { $result = '<span class="desc">' . lang('today') . ' ' . clean(format_time($application_log_entry->getCreatedOn())); } elseif ($application_log_entry->isYesterday()) { //return '<span class="desc">' . lang('yesterday') . ' ' . clean(format_time($application_log_entry->getCreatedOn())); $result = '<span class="desc">' . lang('yesterday'); } else { $result = '<span class="desc">' . clean(format_date($application_log_entry->getCreatedOn())); } // if $result .= '</span>'; $taken_by = $application_log_entry->getTakenBy(); return $taken_by instanceof User ? $result . ', <a href="' . $taken_by->getCardUrl() . '">' . clean($taken_by->getDisplayName()) . '</a>' : $result; }