]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
QnA - Better ajax response when making a new answer. Still not right. Needs to use...
authorZach Copley <zach@status.net>
Tue, 5 Apr 2011 07:27:51 +0000 (00:27 -0700)
committerZach Copley <zach@status.net>
Tue, 5 Apr 2011 07:27:51 +0000 (00:27 -0700)
plugins/QnA/actions/qnanewanswer.php
plugins/QnA/lib/qnashowanswerform.php

index 94bfc09a39903da7d699ffe2b8a841870a25b0c1..0c4938e6a9b2b0de77c32402e3e2a0328277d338 100644 (file)
@@ -155,13 +155,39 @@ class QnanewanswerAction extends Action
             $answer = $this->question->getAnswer($profile);
             header('Content-Type: text/xml;charset=utf-8');
             $this->xw->startDocument('1.0', 'UTF-8');
+
             $this->elementStart('html');
             $this->elementStart('head');
             // TRANS: Page title after sending an answer.
             $this->element('title', null, _m('Answers'));
             $this->elementEnd('head');
+
             $this->elementStart('body');
-            $this->raw($answer->asHTML());
+
+            $nli = new NoticeListItem($notice, $this);
+            $nli->show();
+            //$this->raw($answer->asHTML());
+
+            /*
+            $question = $this->question;
+
+            $nli = new NoticeListItem($notice, $this);
+            $nli->showNotice();
+
+            $this->elementStart('div', array('class' => 'entry-content answer-content'));
+
+            if (!empty($answer)) {
+                $form = new QnashowanswerForm($this, $answer);
+                $form->show();
+            } else {
+                $this->text(_m('Answer data is missing.'));
+            }
+
+            $this->elementEnd('div');
+
+            // @fixme
+            //$this->elementStart('div', array('class' => 'entry-content'));
+            */
             $this->elementEnd('body');
             $this->elementEnd('html');
         } else {
index 665c40857f1c96bea3a47e89c31a6497062fe9cc..f3923698d22906c135ee502eaa837e82a719c2a9 100644 (file)
@@ -125,9 +125,7 @@ class QnashowanswerForm extends Form
             'answer-' . $this->answer->id
         );
 
-
-
-        // $this->out->raw($this->answer->asHTML());
+        $this->out->raw($this->answer->asHTML());
     }
 
     /**