3 * StatusNet, the distributed open-source microblogging tool
5 * Yammer import administration panel
9 * LICENCE: This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * @author Zach Copley <zach@status.net>
25 * @copyright 2010 StatusNet, Inc.
26 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
27 * @link http://status.net/
30 if (!defined('STATUSNET')) {
34 class YammeradminpanelAction extends AdminPanelAction
37 * Returns the page title
39 * @return string page title
43 return _m('Yammer Import');
47 * Instructions for using this form.
49 * @return string instructions
51 function getInstructions()
53 return _m('Yammer import tool');
57 * Show the Yammer admin panel form
63 $form = new YammerAdminPanelForm($this);
69 class YammerAdminPanelForm extends AdminForm
74 * @return string ID of the form
78 return 'yammeradminpanel';
84 * @return string class of the form
88 return 'form_settings';
94 * @return string URL of the action
98 return common_local_url('yammeradminpanel');
102 * Data elements of the form
108 $this->out->element('p', array(), 'yammer import IN DA HOUSE');
111 Possible states of the yammer import process:
112 - null (not doing any sort of import)
121 $yammerState = Yammer_state::staticGet('id', 1);
122 $state = $yammerState ? $yammerState->state || null;
127 $this->out->element('p', array(), 'Time to start auth:');
128 $this->showAuthForm();
130 case 'requesting-auth':
131 $this->out->element('p', array(), 'Need to finish auth!');
132 $this->showAuthForm();
135 case 'import-groups':
136 case 'import-messages':
137 case 'save-messages':
138 $this->showImportState();
149 function formActions()
151 // No submit buttons needed at bottom