public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Clock');
     $this->description = _t('Tells time in digital or faux analog formats');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/clockWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Message of the day');
     $this->description = _t('Display the message of the day.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/messageWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Saved searches');
     $this->description = _t('Performed saved search queries from your dashboard');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/savedSearches.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Records by status');
     $this->description = _t('Displays objects or authority items by cataloguing status');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/recordsByStatus.conf');
     $this->opo_datamodel = Datamodel::load();
     # -- get status values
     $t_lists = new ca_lists();
     $va_statuses = caExtractValuesByUserLocale($t_lists->getItemsForList("workflow_statuses"));
     $va_status_info = array();
     $va_status_values = array();
     foreach ($va_statuses as $i => $va_info) {
         $va_status_info[$va_info["item_value"]] = $va_info["name_singular"];
         $va_status_values[] = $va_info["item_value"];
     }
     $this->opa_status_display_names = $va_status_info;
     $this->opa_status_values = $va_status_values;
     $this->opa_table_display_names = array('ca_objects' => _t('Objects'), 'ca_entities' => _t('Entities'), 'ca_places' => _t('Places'), 'ca_occurrences' => _t('Occurrences'), 'ca_sets' => _t('Sets'), 'ca_collections' => _t('Collections'), 'ca_object_representations' => _t('Object representations'), 'ca_object_lots' => _t('Object lots'));
     foreach ($this->opa_table_display_names as $vs_table => $vs_display) {
         if (!$this->getRequest() || !$this->getRequest()->user->canDoAction("can_use_records_by_status_widget_{$vs_table}")) {
             foreach (BaseWidget::$s_widget_settings['recordsByStatusWidget']["display_type"]["options"] as $vs_setting_display => $vs_setting_table) {
                 if ($vs_setting_table == $vs_table) {
                     unset(BaseWidget::$s_widget_settings['recordsByStatusWidget']["display_type"]["options"][$vs_setting_display]);
                 }
             }
         }
     }
 }
Exemple #5
0
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('lol Katz');
     $this->description = _t('I Can Has Cheezburger?');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/lolCatWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Recent logins');
     $this->description = _t('Displays recent logins to the system');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/lastLogins.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Search By Set');
     $this->description = _t('Search for items in your sets.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/searchBySet.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Links');
     $this->description = _t('Displays CollectiveAccess project links');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/links.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Random Object');
     $this->description = _t('Displays a random object from the collection');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/randomObjectWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Your Watched Items');
     $this->description = _t('Get a list of your watched items.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/watchedItemsWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('RSS Viewer');
     $this->description = _t('Display the content of an RSS feed');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/rssViewerWidget.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Comments');
     $this->description = _t('Lists recently created comments');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/recentComments.conf');
     $this->opo_datamodel = Datamodel::load();
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Recent changes');
     $this->description = _t('Lists recent changes to objects or authority items');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/recentChangesWidget.conf');
     $this->opo_datamodel = Datamodel::load();
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Processing status');
     $this->description = _t('View the current status of queued processing tasks');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/trackProcessing.conf');
     $this->opo_db = new Db();
     AssetLoadManager::register('prettyDate');
 }
Exemple #15
0
 function __construct($id = '')
 {
     global $phpAnvil;
     parent::__construct($id);
     $this->name = 'New UI Widget';
     $this->version = '1.0';
     $this->build = '1';
     $this->contentModule = $phpAnvil->module['content'];
     $this->page = $this->contentModule->page;
     $this->content = new anvilContainer('content');
     return true;
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Counts');
     $this->description = _t('Keep track of record totals for objects and authorities');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/countWidget.conf');
     $this->opa_tables = array('ca_objects' => 0, 'ca_object_lots' => 0, 'ca_entities' => 0, 'ca_places' => 0, 'ca_occurrences' => 0, 'ca_collections' => 0, 'ca_storage_locations' => 0, 'ca_object_representations' => 0, 'ca_loans' => 0, 'ca_movements' => 0);
     $o_config = Configuration::load();
     foreach ($this->opa_tables as $vs_table => $vn_c) {
         if ((bool) $o_config->get($vs_table . '_disable')) {
             if ($vs_table == 'ca_object_representations' && !(bool) $o_config->get('ca_objects_disable')) {
                 continue;
             }
             unset(BaseWidget::$s_widget_settings['countWidget']['show_' . $vs_table]);
         }
     }
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Recently created');
     $this->description = _t('Lists recently created objects or authority items');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/recentlyCreated.conf');
     $this->opo_datamodel = Datamodel::load();
     $this->opb_dont_show_timestamp = (bool) Configuration::load()->get('dont_show_timestamp_in_change_log');
     $this->opa_table_display_names = array('ca_objects' => _t('Objects'), 'ca_entities' => _t('Entities'), 'ca_places' => _t('Places'), 'ca_occurrences' => _t('Occurrences'), 'ca_sets' => _t('Sets'), 'ca_collections' => _t('Collections'), 'ca_object_representations' => _t('Object representations'), 'ca_object_lots' => _t('Object lots'));
     foreach ($this->opa_table_display_names as $vs_table => $vs_display) {
         if (!$this->getRequest() || !$this->getRequest()->user->canDoAction("can_use_recently_created_widget_{$vs_table}")) {
             foreach (BaseWidget::$s_widget_settings['recentlyCreatedWidget']["display_type"]["options"] as $vs_setting_display => $vs_setting_table) {
                 if ($vs_setting_table == $vs_table) {
                     unset(BaseWidget::$s_widget_settings['recentlyCreatedWidget']["display_type"]["options"][$vs_setting_display]);
                 }
             }
         }
     }
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     global $g_ui_locale_id;
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/advancedSearchForm.conf');
     $this->title = _t('Advanced search form');
     $this->description = _t('Use advanced search forms in your dashboard');
     parent::__construct($ps_widget_path, $pa_settings);
     if (!$this->request || !$this->request->isLoggedIn()) {
         return null;
     }
     // can be invoked by command line process when instantiating ca_user_roles
     $t_form = new ca_search_forms();
     $o_dm = Datamodel::load();
     $va_forms = caExtractValuesByUserLocale($t_form->getForms(array('user_id' => $this->request->getUserID(), 'access' => __CA_SEARCH_FORM_READ_ACCESS__)));
     $va_form_list = array();
     foreach ($va_forms as $va_form) {
         $va_form_list[unicode_ucfirst($o_dm->getTableProperty($va_form['table_num'], 'NAME_PLURAL')) . ": " . $va_form["name"]] = $va_form["form_id"];
     }
     BaseWidget::$s_widget_settings['advancedSearchFormWidget']["form_code"] = array('formatType' => FT_TEXT, 'displayType' => DT_SELECT, 'width' => 40, 'height' => 1, 'takesLocale' => false, 'default' => '', 'options' => $va_form_list, 'label' => _t('Search form'), 'description' => _t('Search form to display'));
 }