10 * @author Zach Copley <zach@status.net>
11 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
12 * @link http://status.net/
14 * StatusNet - the distributed open-source microblogging tool
15 * Copyright (C) 2010, StatusNet, Inc.
17 * This program is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU Affero General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU Affero General Public License for more details.
27 * You should have received a copy of the GNU Affero General Public License
28 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31 if (!defined('STATUSNET') && !defined('LACONICA')) {
36 * Base class for displaying dialog box like messages to the user
40 * @author Zach Copley <zach@status.net>
41 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
42 * @link http://status.net/
47 class InfoAction extends Action
51 function __construct($title, $message, $output='php://output', $indent=null)
53 parent::__construct($output, $indent);
55 $this->message = $message;
56 $this->title = $title;
58 // XXX: hack alert: usually we aren't going to
59 // call this page directly, but because it's
60 // an action it needs an args array anyway
61 $this->prepare($_REQUEST);
72 return empty($this->title) ? '' : $this->title;
75 function isReadOnly($args)
80 // Overload a bunch of stuff so the page isn't too bloated
84 $this->elementStart('body', array('id' => 'error'));
85 $this->elementStart('div', array('id' => 'wrap'));
89 $this->elementEnd('div');
90 $this->elementEnd('body');
95 $this->elementStart('div', array('id' => 'core'));
96 $this->elementStart('div', array('id' => 'aside_primary_wrapper'));
97 $this->elementStart('div', array('id' => 'content_wrapper'));
98 $this->elementStart('div', array('id' => 'site_nav_local_views_wrapper'));
99 $this->showContentBlock();
100 $this->elementEnd('div');
101 $this->elementEnd('div');
102 $this->elementEnd('div');
103 $this->elementEnd('div');
106 function showHeader()
108 $this->elementStart('div', array('id' => 'header'));
110 $this->showPrimaryNav();
111 $this->elementEnd('div');
119 function showContent()
121 $this->element('div', array('class' => 'info'), $this->message);