- $this->startHTML('text/xml;charset=utf-8', true);
- $this->elementStart('head');
- // TRANS: Title for form to send a new notice.
- $this->element('title', null, _m('TITLE','New notice'));
- $this->elementEnd('head');
- $this->elementStart('body');
-
- $form = new NoticeForm($this);
- $form->show();
-
- $this->elementEnd('body');
- $this->elementEnd('html');
- }
-
- /**
- * Formerly page output
- *
- * This used to be the whole page output; now that's been largely
- * subsumed by showPage. So this just stores an error message, if
- * it was passed, and calls showPage.
- *
- * Note that since we started doing Ajax output, this page is rarely
- * seen.
- *
- * @param string $msg An error/info message, if any
- * @param boolean $success false for error indication, true for info
- *
- * @return void
- */
- function showForm($msg=null, $success=false)
- {
- if (StatusNet::isAjax()) {
- if ($msg) {
- $this->ajaxErrorMsg($msg);
- } else {
- $this->ajaxShowForm();
- }
- return;
- }
-
- parent::showForm($msg, $success);
- }
-
- /**
- * // XXX: Should we be showing the notice form with microapps here?
- *
- * Overload for replies or bad results
- *
- * We show content in the notice form if there were replies or results.
- *
- * @return void
- */
- function showNoticeForm()
- {
- $content = $this->trimmed('status_textarea');
- if (!$content) {
- $replyto = $this->trimmed('replyto');
- $inreplyto = $this->trimmed('inreplyto');
- $profile = Profile::getKV('nickname', $replyto);
- if ($profile) {
- $content = '@' . $profile->nickname . ' ';
- }
- } else {
- // @fixme most of these bits above aren't being passed on above
- $inreplyto = null;
- }
-
- $this->elementStart('div', 'input_forms');
- $this->elementStart(
- 'div',
- array(
- 'id' => 'input_form_status',
- 'class' => 'input_form current nonav'
- )
- );
-
- $notice_form = new NoticeForm(
- $this,
- array(
- 'content' => $content,
- 'inreplyto' => $inreplyto
- )
- );
-
- $notice_form->show();
-
- $this->elementEnd('div');
- $this->elementEnd('div');
- }
-
- /**
- * Show an error message
- *
- * Shows an error message if there is one.
- *
- * @return void
- *
- * @todo maybe show some instructions?
- */
- function showPageNotice()
- {
- if ($this->msg) {
- $this->element('p', array('id' => 'error'), $this->msg);