123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
- defined('STATUSNET') || die();
- class PluginsadminpanelAction extends AdminPanelAction
- {
-
- function title()
- {
-
- return _m('TITLE', 'Plugins');
- }
-
- function getInstructions()
- {
-
- return _m('Additional plugins can be enabled and configured manually. ' .
- 'See the <a href="https://notabug.org/diogo/gnu-social/src/nightly/plugins/README.md">online plugin ' .
- 'documentation</a> for more details.');
- }
-
- function showForm()
- {
- $this->elementStart('form', [
- 'enctype' => 'multipart/form-data',
- 'method' => 'post',
- 'id' => 'form_install_plugin',
- 'class' => 'form_settings',
- 'action' =>
- common_local_url('plugininstall')
- ]);
- $this->elementStart('fieldset');
-
- $this->element('legend', null, _('Install Plugin'));
- $this->hidden('token', common_session_token());
- $this->elementStart('ul', 'form_data');
- $this->elementStart('li', ['id' => 'settings_attach']);
- $this->element('input', [
- 'name' => 'MAX_FILE_SIZE',
- 'type' => 'hidden',
- 'id' => 'MAX_FILE_SIZE',
- 'value' => common_config('attachments', 'file_quota')
- ]);
- $this->element('input', [
- 'name' => 'pluginfile',
- 'type' => 'file',
- 'id' => 'pluginfile'
- ]);
- $this->elementEnd('li');
- $this->elementEnd('ul');
- $this->elementStart('ul', 'form_actions');
- $this->elementStart('li');
-
- $this->submit('upload', _m('BUTTON', 'Upload'));
- $this->elementEnd('li');
- $this->elementEnd('ul');
- $this->elementEnd('fieldset');
- $this->elementEnd('form');
- $this->elementStart('fieldset', ['id' => 'settings_plugins_default']);
-
- $this->element('legend', null, _m('Available Plugins'));
- $this->showPlugins();
- $this->elementEnd('fieldset');
- }
- protected function showPlugins()
- {
- $list = new PluginList($this);
- $list->show();
- }
- function saveSettings()
- {
- parent::saveSettings();
- }
- }
|