123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class AddMirrorWizard extends Widget
- {
-
- function formLegend()
- {
- }
-
- function show()
- {
- $this->out->elementStart('div', array('id' => 'add-mirror-wizard'));
- $providers = $this->providers();
- $this->showProviders($providers);
- $this->out->elementEnd('div');
- }
- function providers()
- {
- return array(
-
-
- array(
- 'id' => 'feed',
-
- 'name' => _m('RSS or Atom feed'),
- ),
- );
- }
- function showProviders(array $providers)
- {
- $out = $this->out;
- $out->elementStart('div', 'provider-list');
-
- $out->element('h2', null, _m('Select a feed provider'));
- $out->elementStart('table');
- foreach ($providers as $provider) {
- $icon = common_path('plugins/SubMirror/images/providers/' . $provider['id'] . '.png');
- $targetUrl = common_local_url('mirrorsettings', array('provider' => $provider['id']));
- $out->elementStart('tr', array('class' => 'provider'));
- $out->elementStart('td');
- $out->elementStart('div', 'provider-heading');
- $out->element('img', array('src' => $icon));
- $out->element('a', array('href' => $targetUrl), $provider['name']);
- $out->elementEnd('div');
- $out->elementEnd('td');
- $out->elementEnd('tr');
- }
- $out->elementEnd('table');
- $out->elementEnd('div');
- }
-
- function formActions()
- {
- }
-
- function id()
- {
- return 'add-mirror-wizard';
- }
-
- function action()
- {
- return common_local_url('addmirror');
- }
-
- function formClass()
- {
- return 'form_settings';
- }
- }
|