Exemplo n.º 1
0
 function getUndoButton($ids)
 {
     if (count($ids) == 1) {
         $t = Threads::withId($ids[0]);
         if (!$t) {
             return;
         }
         // empty or just bogus operand.
         $msg = wfMessage('lqt-marked-read', LqtView::formatSubject($t->subject()))->parse();
     } else {
         $msg = wfMessage('lqt-count-marked-read')->numParams(count($ids))->parse();
     }
     $operand = implode(',', $ids);
     $html = '';
     $html .= $msg;
     $html .= Html::hidden('lqt_method', 'mark_as_unread');
     $html .= Html::hidden('lqt_operand', $operand);
     $html .= ' ' . Xml::submitButton(wfMessage('lqt-email-undo')->text(), array('name' => 'lqt_read_button', 'title' => wfMessage('lqt-email-info-undo')->text()));
     $html = Xml::tags('form', array('method' => 'post', 'class' => 'lqt_undo_mark_as_read'), $html);
     return $html;
 }
Exemplo n.º 2
0
 function formattedSubject()
 {
     return LqtView::formatSubject($this->subject());
 }