Esempio n. 1
0
 function action()
 {
     $msg = '';
     $event = new event();
     $server = new openqrm_server();
     $plugin = new plugin();
     $identifier = $this->response->html->request()->get($this->identifier_name);
     $enabled = $plugin->enabled();
     if ($identifier !== '') {
         foreach ($identifier as $id) {
             if (in_array($id, $enabled)) {
                 $return = $server->send_command("openqrm_server_plugin_command {$id} start");
                 if ($return === true) {
                     if ($this->__check($id)) {
                         $msg .= sprintf($this->lang['msg'], $id) . '<br>';
                     } else {
                         $msg .= sprintf($this->lang['error_timeout'], $id) . '<br>';
                     }
                 } else {
                     $msg .= sprintf($this->lang['error_start'], $id) . '<br>';
                 }
             }
         }
     }
     $this->response->redirect($this->response->get_url($this->actions_name, 'select', $this->message_param, $msg));
 }
 function action()
 {
     $msg = '';
     $event = new event();
     $server = new openqrm_server();
     $plugin = new plugin();
     $identifier = $this->response->html->request()->get($this->identifier_name);
     $enabled = $plugin->enabled();
     if ($identifier !== '') {
         foreach ($identifier as $id) {
             if (in_array($id, $enabled)) {
                 $error = false;
                 // check dependencies
                 foreach ($enabled as $v) {
                     if ($v !== $id) {
                         $tmp = $plugin->get_dependencies($v);
                         if ($tmp !== '' && isset($tmp['dependencies']) && $tmp['dependencies'] !== '') {
                             if (strpos($tmp['dependencies'], $id) !== false) {
                                 $msg .= sprintf($this->lang['error_dependencies'], $id, $v) . '<br>';
                                 $error = true;
                             }
                         }
                     }
                 }
                 // handle plugin type
                 if ($error === false) {
                     $tmp = $plugin->get_config($id);
                     switch ($tmp['type']) {
                         case 'storage':
                             $storage = new storage();
                             $types = $storage->get_storage_types();
                             $deployment = new deployment();
                             $dep = $deployment->get_id_by_storagetype($id);
                             foreach ($dep as $val) {
                                 if (in_array($val['value'], $types)) {
                                     $msg .= sprintf($this->lang['error_in_use'], $id) . '<br>';
                                     $error = true;
                                 }
                             }
                             break;
                     }
                 }
                 if ($error === false) {
                     $return = $server->send_command("openqrm_server_plugin_command " . $id . " uninstall " . $GLOBALS['OPENQRM_ADMIN']->name . ' ' . $GLOBALS['OPENQRM_ADMIN']->password);
                     if ($return === true) {
                         if ($this->__check($id)) {
                             $msg .= sprintf($this->lang['msg'], $id) . '<br>';
                         } else {
                             $msg .= sprintf($this->lang['error_timeout'], $id) . '<br>';
                         }
                     } else {
                         $msg .= sprintf($this->lang['error_disable'], $id) . '<br>';
                     }
                 }
             }
         }
     }
     $this->response->redirect($this->response->get_url($this->actions_name, 'select', $this->message_param, $msg));
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     $this->registry = registry::getInstance();
     $this->html = html::getInstance();
     $this->plugin = plugin::getInstance();
 }
 /**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     // Only add the events if we are on that controller
     if (Router::$controller == 'reports' and (Router::$method == 'view' or Router::$method == 'index')) {
         plugin::add_stylesheet('printreport/css/print');
     }
 }
Esempio n. 5
0
 private static function getClass($_id)
 {
     if (get_called_class() != __CLASS__) {
         return get_called_class();
     }
     $values = array('id' => $_id);
     $sql = 'SELECT plugin,isEnable
             FROM eqLogic
             WHERE eqReal_id=:id';
     $result = DB::Prepare($sql, $values, DB::FETCH_TYPE_ROW);
     $eqTyme_name = $result['plugin'];
     if ($result['isEnable'] == 0) {
         try {
             $plugin = null;
             if ($eqTyme_name != '') {
                 $plugin = plugin::byId($eqTyme_name);
             }
             if (!is_object($plugin) || $plugin->isActive() == 0) {
                 return __CLASS__;
             }
         } catch (Exception $e) {
             return __CLASS__;
         }
     }
     if (class_exists($eqTyme_name)) {
         if (method_exists($eqTyme_name, 'getClassCmd')) {
             return $eqTyme_name::getClassCmd();
         }
     }
     if (class_exists($eqTyme_name . 'Real')) {
         return $eqTyme_name . 'Real';
     }
     return __CLASS__;
 }
Esempio n. 6
0
 /**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     // Add a Sub-Nav Link
     Event::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));
     // Only add the events if we are on that controller
     if (Router::$current_uri == "admin/reports") {
         plugin::add_stylesheet('analysis/views/css/buttons');
         // Add Buttons to the report List
         Event::add('ushahidi_action.report_extra_admin', array($this, '_reports_list_buttons'));
     } elseif (Router::$controller == 'analysis') {
         plugin::add_javascript('analysis/views/js/ui.dialog');
         plugin::add_javascript('analysis/views/js/ui.draggable');
         plugin::add_javascript('analysis/views/js/ui.resizable');
         plugin::add_stylesheet('analysis/views/css/main');
     } elseif (strripos(Router::$current_uri, "admin/reports/edit") !== false) {
         plugin::add_stylesheet('analysis/views/css/report');
         plugin::add_javascript('analysis/views/js/jquery.copy.min');
         Event::add('ushahidi_action.report_pre_form_admin', array($this, '_reports_list_analysis'));
         Event::add('ushahidi_action.header_scripts_admin', array($this, '_save_analysis_js'));
         Event::add('ushahidi_action.report_edit', array($this, '_save_analysis'));
     } elseif (strripos(Router::$current_uri, "reports/submit") !== false) {
         //Add dropdown fields to the submit form
         Event::add('ushahidi_action.report_form', array($this, '_submit_form'));
         //Save the contents of the dropdown
         Event::add('ushahidi_action.report_submit', array($this, '_handle_post_data'));
         Event::add('ushahidi_action.report_add', array($this, '_save_submit_form'));
     }
 }
Esempio n. 7
0
 /**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     // Add a Sub-Nav Link
     Event::add('ushahidi_action.nav_admin_settings', array($this, '_settings_link'));
     Event::add('ushahidi_action.nav_main_top', array($this, '_top_nav_link'));
     // Only add the events if we are on the main controller
     if (Router::$controller == 'main') {
         switch (Router::$method) {
             // Hook into the main dashboard
             case 'index':
                 plugin::add_stylesheet('flickrwijit/media/css/style');
                 plugin::add_stylesheet('../media/css/picbox/picbox');
                 plugin::add_javascript('../media/js/picbox');
                 Event::add('ushahidi_action.main_sidebar', array($this, '_display_flickrwiji'));
                 break;
         }
     } elseif (Router::$controller == 'flickrwijit') {
         // Add Flickrwijit to settings page
         switch (Router::$method) {
             case 'index':
                 //Hook js and css files into flickrwijit page
                 plugin::add_stylesheet('flickrwijit/media/css/style');
                 plugin::add_stylesheet('../media/css/picbox/picbox');
                 plugin::add_javascript('../media/js/picbox');
                 break;
         }
     }
 }
Esempio n. 8
0
    public function __construct()
    {
		parent::__construct();
		
		// Set Table Prefix
		$this->table_prefix = Kohana::config('database.default.table_prefix');
		
		// Load Header & Footer
        $this->template->header  = new View('keitai/header');
        $this->template->footer  = new View('keitai/footer');

		$this->template->header->site_name = Kohana::config('settings.site_name');
		$this->template->header->site_tagline = Kohana::config('settings.site_tagline');

		plugin::add_javascript('keitai/views/js/jquery');
		plugin::add_javascript('keitai/views/js/jquery.treeview');
		plugin::add_javascript('keitai/views/js/expand');
		plugin::add_stylesheet('keitai/views/css/styles');
		plugin::add_stylesheet('keitai/views/css/jquery.treeview');
		
		$this->template->header->show_map = FALSE;
		$this->template->header->js = "";
		$this->template->header->breadcrumbs = "";
		
		// Google Analytics
		$google_analytics = Kohana::config('settings.google_analytics');
		$this->template->footer->google_analytics = $this->_google_analytics($google_analytics);

		$this->template->header->latlong = (isset($_GET['latlong'])) ? $_GET['latlong'] : "";
		$this->template->footer->latlong = (isset($_GET['latlong'])) ? $_GET['latlong'] : "";
	}
 /**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     // Only add the events if we are on that controller
     if (Router::$controller == 'reports') {
         switch (Router::$method) {
             // Hook into the Report Add/Edit Form in Admin
             case 'edit':
                 // Hook into the form itself
                 Event::add('ushahidi_action.report_form_admin', array($this, '_report_form'));
                 // Hook into the report_submit_admin (post_POST) event right before saving
                 // Event::add('ushahidi_action.report_submit_admin', array($this, '_report_validate'));
                 // Hook into the report_edit (post_SAVE) event
                 Event::add('ushahidi_action.report_edit', array($this, '_report_form_submit'));
                 break;
                 // Hook into the Report view (front end)
             // Hook into the Report view (front end)
             case 'view':
                 plugin::add_stylesheet('actionable/views/css/actionable');
                 Event::add('ushahidi_action.report_meta', array($this, '_report_view'));
                 break;
         }
     } elseif (Router::$controller == 'feed') {
         // Add Actionable Tag to RSS Feed
         Event::add('ushahidi_action.feed_rss_item', array($this, '_feed_rss'));
     }
 }
Esempio n. 10
0
function jeedomPluginAutoload($classname)
{
    $plugin = null;
    try {
        $plugin = plugin::byId($classname);
    } catch (Exception $e) {
        if (!is_object($plugin)) {
            if (strpos($classname, 'Real') !== false) {
                $plugin = plugin::byId(substr($classname, 0, -4));
            }
            if (!is_object($plugin) && strpos($classname, 'Cmd') !== false) {
                $classname = str_replace('Cmd', '', $classname);
                try {
                    $plugin = plugin::byId($classname);
                } catch (Exception $e) {
                    if (strpos($classname, '_') !== false && strpos($classname, 'com_') === false) {
                        $plugin = plugin::byId(substr($classname, 0, strpos($classname, '_')));
                    }
                }
            }
            if (!is_object($plugin) && strpos($classname, '_') !== false && strpos($classname, 'com_') === false) {
                $plugin = plugin::byId(substr($classname, 0, strpos($classname, '_')));
            }
        }
    }
    try {
        if (is_object($plugin)) {
            if ($plugin->isActive() == 1) {
                $include = $plugin->getInclude();
                include_file('core', $include['file'], $include['type'], $plugin->getId());
            }
        }
    } catch (Exception $e) {
    }
}
 /**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     if (Router::$controller == 'main') {
         // Add stylesheet
         plugin::add_stylesheet('categorycloud/views/css/categorycloud');
         Event::add('ushahidi_action.main_sidebar', array($this, '_generate_cloud'));
     }
 }
Esempio n. 12
0
 public static function load($name)
 {
     if (self::isLoaded($name)) {
         return;
     }
     $title = '';
     $description = '';
     $autoload = array();
     require_once self::getPluginsPath() . $name . '/plugin.php';
     $plugin = new plugin($name);
     $plugin->setTitle($title);
     $plugin->setDescription($description);
     self::$_plugins[$name] = $plugin;
     foreach ($autoload as $class => $filename) {
         self::$_autoload[$class] = self::getPluginsPath() . $name . '/' . $filename;
     }
 }
Esempio n. 13
0
 public function add()
 {
     switch (Router::$current_uri) {
         case "reports/download":
             plugin::add_stylesheet('downloadreports/views/css/download_reports');
             Event::add('ushahidi_action.header_scripts', array($this, '_add_scripts'));
             break;
     }
 }
Esempio n. 14
0
 function propertyForm($param)
 {
     $id_form = $param[0];
     $id_field = $param[1];
     $field = $this->modelForm->renderFormByTable($id_form);
     $field = $field["detail_field"];
     for ($i = 1; $i < count($field); $i++) {
         $result[$i]['kolom'] = $field[$i]['Field'];
         $result[$i]['nama_label'] = explode(",", $field[$i]['Comment']);
         $result[$i]['nama_label'] = $result[$i]['nama_label'][0];
     }
     //	$this->loadExt("plugin");
     $plg = new plugin();
     echo $plg->encode_json($result);
     ///// Butuh Solusi //////////
     ////
     //$this->loadView("fieldProperty",$data);
 }
 /**
  * Adds all other events for the plugin framework to the application
  */
 public function add()
 {
     // Add the nexmo plugin to the list of SMS providers
     plugin::add_sms_provider('nexmo');
     // Add Nexmo CSS
     plugin::add_stylesheet('nexmo/views/css/nexmo');
     // Add event callbacks
     Event::add('nexmo_action.update_message_log', array($this, 'update_message_log'));
 }
Esempio n. 16
0
 static function data_output($columns, $data, $db, $home)
 {
     $out = array();
     for ($i = 0, $ien = count($data); $i < $ien; $i++) {
         $row = array();
         for ($j = 0, $jen = count($columns); $j < $jen; $j++) {
             $column = $columns[$j];
             // Is there a formatter?
             if (isset($column['formatter'])) {
                 $row[$column['dt']] = $column['formatter']($data[$i][$column['db']], $data[$i]);
             } else {
                 //var_dump($columns[$j]);
                 /// Buat Format Numeric
                 if (is_numeric($data[$i][$columns[$j]['db']])) {
                     $row[$column['dt']] = number_format($data[$i][$columns[$j]['db']]);
                 } else {
                     $row[$column['dt']] = $data[$i][$columns[$j]['db']];
                 }
                 ///////////////// Sebagai Pengganti Join table ( Karena join table terlalu Mainstrum ) ////////////
                 if ($columns[$j]['join']['table'] != NULL) {
                     $value = $data[$i][$columns[$j]['db']];
                     $row[$column['dt']] = self::select($db, $columns[$j]['join']['table'], $columns[$j]['join']['field'], $data[$i][$columns[$j]['db']]);
                 }
                 /////////////////////// End Join Table
                 if ($columns[$j]['tipe'] == 'date') {
                     $plg = new plugin();
                     $row[$column['dt']] = $plg->tanggal2($data[$i][$columns[$j]['db']]);
                 }
                 if ($columns[$j]['tipe'] == 'file') {
                     $row[$column['dt']] = "<a href='" . $home . $data[$i][$columns[$j]['db']] . "' target='_blank'>Download</a>";
                 }
                 if ($columns[$j]['tipe'] == 'bool') {
                     if ($data[$i][$columns[$j]['db']] == 0) {
                         $row[$column['dt']] = "<i class='fa fa-times'></i> Salah";
                     } else {
                         $row[$column['dt']] = "<i class='fa fa-check'></i> Benar";
                     }
                 }
             }
         }
         $out[] = $row;
     }
     return $out;
 }
Esempio n. 17
0
 function path($name, $file = '')
 {
     self::$name = $name;
     $path = iCMS_PLUGINS_PATH . '/' . $name . '/';
     $file && ($filepath = $path . $file);
     if (file_exists($filepath)) {
         return $filepath;
     }
     return empty($file) ? $path : false;
 }
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     $am =& $this->_pluginAPI->getActionManager();
     $em =& $this->_pluginAPI->getEventManager();
     $am->addAction(new action('adminUserManager', 'GET', array($this, 'onViewUserManager'), array(), array()));
     $am->addAction(new action('adminMakeUserAdmin', 'POST', array($this, 'onMakeUserAdmin'), array(new IDInput('userID')), array()));
     $am->addAction(new action('adminMakeUserNormal', 'POST', array($this, 'onMakeUserNormal'), array(new IDInput('userID')), array()));
     $am->addAction(new action('adminUserDelete', 'GET', array($this, 'onDeleteUser'), array(new IDInput('userID')), array()));
 }
Esempio n. 19
0
 public static function setup_adminmap($map_controller, $map_view = "adminmap/mapview", $map_css = "adminmap/css/adminmap")
 {
     //set the CSS for this
     plugin::add_stylesheet($map_css);
     plugin::add_javascript("adminmap/js/jquery.flot");
     plugin::add_javascript("adminmap/js/excanvas.min");
     plugin::add_javascript("adminmap/js/timeline");
     $map_controller->template->content = new View($map_view);
     // Get Default Color
     $map_controller->template->content->default_map_all = Kohana::config('settings.default_map_all');
 }
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     $this->_adminPlugin = new viewPageCoreAdminPlugin($this->_loadedDir);
     $this->_adminPlugin->load($pluginAPI);
     $am =& $this->_pluginAPI->getActionManager();
     $am->addAction(new action('viewPage', 'GET', array($this, 'onViewPage'), array(), array(new IDInput('pageID'), new LocaleInput('pageLang'))));
     $em =& $this->_pluginAPI->getEventManager();
     $em->addEvent(new Event('viewPage', array('pageID', 'pageLang')));
     $em->subscribeToEvent('viewPage', new callback('setPageVars', array($this, 'setPageVars'), array('pageID', 'pageLang')));
 }
 function load(&$pluginAPI)
 {
     include_once $this->getLoadedDir() . '/mailingList.class.php';
     include_once $this->getLoadedDir() . '/mailingMember.class.php';
     parent::load($pluginAPI);
     $executor = array($this, 'onViewManager');
     $requiredOptions = array();
     $smth = new action('adminMailingListManager', 'GET', $executor, $requiredOptions);
     $actionmanager =& $pluginAPI->getActionManager();
     $actionmanager->addAction($smth);
 }
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     $am =& $this->_pluginAPI->getActionManager();
     $em =& $this->_pluginAPI->getEventManager();
     $am->addAction(new action('adminPluginManager', 'GET', array($this, 'onViewPluginManager'), array(), array()));
     $am->addAction(new action('adminEnablePlugin', 'GET', array($this, 'onEnablePlugin'), array(new StringInput('pluginID')), array()));
     $am->addAction(new action('adminInstallPlugin', 'GET', array($this, 'onInstallPlugin'), array(new StringInput('pluginID')), array()));
     $am->addAction(new action('adminDisablePlugin', 'GET', array($this, 'onDisablePlugin'), array(new StringInput('pluginID')), array()));
     $am->addAction(new action('adminUnInstallPlugin', 'GET', array($this, 'onUnInstallPlugin'), array(new StringInput('pluginID')), array()));
 }
Esempio n. 23
0
 function get_application_list()
 {
     $application_list = array();
     $plugin = new plugin();
     $enabled_plugins = $plugin->enabled();
     foreach ($enabled_plugins as $index => $plugin_name) {
         $plugin_cloud_application_hook = $this->webdir . "/plugins/" . $plugin_name . "/openqrm-" . $plugin_name . "-cloud-application-hook.php";
         if (file_exists($plugin_cloud_application_hook)) {
             $this->event->log("get_application_list", $_SERVER['REQUEST_TIME'], 5, "cloudapplication.class.php", "Found plugin " . $plugin_name . " providing a Cloud-application hook.", "", "", 0, 0, 0);
             require_once $plugin_cloud_application_hook;
             $application_function = "openqrm_" . "{$plugin_name}" . "_get_cloud_applications";
             $application_function = str_replace("-", "_", $application_function);
             $application_array = $application_function();
             foreach ($application_array as $index => $app) {
                 $application_list[] .= $app;
             }
         }
     }
     return $application_list;
 }
Esempio n. 24
0
 protected function getView()
 {
     static $view;
     if (!isset($view)) {
         plugin::call('view_start');
         //实例化view
         $view = new View();
         //初始化模版
         $view->getTheme();
     }
     return $view;
 }
Esempio n. 25
0
 function getList()
 {
     if ($p = parent::getList(array(), false)) {
         $current = $this->getCurrentPlugin();
         foreach ($p as $k => $v) {
             $p[$k]['ifvalid'] = $current == $k ? 'true' : 'false';
             $p[$k]['passport_type'] = $p[$k]['name'];
             unset($p[$k]['name']);
         }
     }
     return $p;
 }
Esempio n. 26
0
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     include $this->getLoadedDir() . '/users.admin.plugin.php';
     $this->_adminPlugin = new adminCoreUserAdminPlugin($this->getLoadedDir());
     $this->_adminPlugin->load($this->_pluginAPI);
     $am =& $this->_pluginAPI->getActionManager();
     $am->addAction(new action('userLogin', 'POST', array($this, 'onLogin'), array(new StringInput('login'), new StringInput('password')), array()));
     $am->addAction(new action('userLogout', 'POST', array($this, 'onLogout'), array(), array()));
     $am->addAction(new action('userRegisterForm', 'POST', array($this, 'onRegisterForm'), array(), array(new LocaleInput('pageLang'))));
     $am->addAction(new action('userRegister', 'POST', array($this, 'onRegister'), array(new StringInput('login'), new EmailInput('email'), new PasswordNewInput('password')), array()));
     $em =& $this->_pluginAPI->getEventManager();
     $em->subscribeToEvent('viewPage', new callback('userVars', array($this, 'setUserVars')));
 }
Esempio n. 27
0
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     include_once $this->_loadedDir . '/adminpluginplugin.class.php';
     $this->_pluginAdmin = new adminCorePluginAdminPlugin($this->_loadedDir);
     $this->_pluginAdmin->load($pluginAPI);
     $am =& $this->_pluginAPI->getActionManager();
     $em =& $this->_pluginAPI->getEventManager();
     $am->addAction(new action('admin', 'GET', array(&$this, 'onViewAdmin'), array(), array(new IDInput('pageID'), new LocaleInput('pageLang'))));
     $am->addAction(new action('adminLogin', 'POST', array(&$this, 'onLogin'), array(new StringInput('adminLogin'), new StringInput('adminPassword')), array()));
     $am->addAction(new action('adminLogout', 'GET', array(&$this, 'onLogout'), array(), array()));
     $em->addEvent(new event('viewAnyAdminPage', array('pageID')));
     $em->subscribeToEvent('viewAnyAdminPage', new callback('setAdminVars', array(&$this, 'setAdminVars'), array('pageID')));
 }
 function load(&$pluginAPI)
 {
     parent::load($pluginAPI);
     /*$this->_pluginAPI->getActionManager ()->addAction (
     		new action ('installerAskLanguage', 'GET',  
     			array (&$this, 'askLanguage'), array (), array ()));*/
     $aM =& $this->_pluginAPI->getActionManager();
     $aM->addAction(new action('installerShowLicense', 'GET', array(&$this, 'showLicense'), array(), array(new LocaleInput('language'))));
     $aM->addAction(new action('installerAgreeLicense', 'GET', array(&$this, 'agreeLicense'), array(new BoolInput('agreed')), array()));
     $aM->addAction(new action('installerShowRequirements', 'GET', array(&$this, 'showRequirements'), array(new BoolInput('agreed')), array()));
     $aM->addAction(new action('askConfig', 'GET', array(&$this, 'askConfig'), array(new BoolInput('canRun')), array()));
     $aM->addAction(new action('installerInstall', 'POST', array(&$this, 'installConfigAndDatabase'), array(new StringInput('siteName'), new StringInput('databaseModule'), new StringInput('databaseHost'), new StringInput('databaseUser'), new StringInput('databasePassword'), new StringInput('databaseName'), new StringInput('databasePrefix'), new StringInput('adminLogin'), new PasswordNewInput('adminPassword'), new EmailInput('adminMail')), array()));
     //echo $this->_pluginAPI->_actionManager;
 }
Esempio n. 29
0
	/**
	 * Adds all the events to the main Ushahidi application
	 */
	public function add()
	{
		// Only add the events if we are on that controller
		if (Router::$controller == 'main')
		{
			plugin::add_javascript('fullscreenmap/views/js/jquery.colorbox');
			#plugin::add_javascript('fullscreenmap/views/js/ui.draggable');
			plugin::add_stylesheet('fullscreenmap/views/css/fullscreenmap');
			plugin::add_stylesheet('fullscreenmap/views/css/colorbox');
			
			Event::add('ushahidi_action.header_scripts', array($this, '_main_js'));
			Event::add('ushahidi_action.map_main_filters', array($this, '_button'));
		}
	}
Esempio n. 30
0
 public function add()
 {
     // Add an Admin Sub-Nav Link
     Event::add('ushahidi_action.nav_admin_settings', array($this, '_settings_link'));
     // Add the events on the main controller only
     if (Router::$controller == 'crowdflower_settings') {
         switch (Router::$method) {
             // Hook into the main dashboard
             case 'index':
                 plugin::add_stylesheet('crowdflower/media/css/crowdflower');
                 break;
         }
     }
 }