Esempio n. 1
0
 static function toHTML($profile, $question, $answer)
 {
     $notice = $question->getNotice();
     $out = new XMLStringer();
     $cls = array('qna_answer');
     if (!empty($answer->best)) {
         $cls[] = 'best';
     }
     $out->elementStart('p', array('class' => implode(' ', $cls)));
     $out->elementStart('span', 'answer-content');
     $out->raw(common_render_text($answer->content));
     $out->elementEnd('span');
     if (!empty($answer->revisions)) {
         $out->elementstart('span', 'answer-revisions');
         $out->text(htmlspecialchars(sprintf(_m('%s revision', '%s revisions', $answer->revisions), $answer->revisions)));
         $out->elementEnd('span');
     }
     $out->elementEnd('p');
     return $out->getString();
 }