public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css'); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('eastend plugin is not enabled')); } // redirect user if not logged in if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form")); } $po_request->session->setVar('pawtucket2_browse_target', "ca_objects"); if ($this->request->config->get("dont_enforce_access_settings")) { $this->opa_access_values = array(); } else { $this->opa_access_values = caGetUserAccessValues($this->request); } $this->view->setVar('access_values', $va_access_values); $this->opo_result_context = new ResultContext($po_request, $this->ops_tablename, $this->ops_find_type); $this->opo_result_context->setAsLastFind(); $this->opo_browse = new ObjectBrowse($x = $this->opo_result_context->getSearchExpression()); $this->view->setvar("browse_place_ids", $this->opo_plugin_config->get('artist_browser_place_ids')); }
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views')); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/MetabolicChronology/conf/Chronology.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('Metabolic Chronology plugin is not enabled')); } $this->_initView($pa_options); $this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'MetabolicChronology'); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/MetabolicChronology/themes/" . $this->ops_theme . "/css/chronology.css", 'text/css'); JavascriptLoadManager::register('jcarousel'); JavascriptLoadManager::register('maps'); $t_list = new ca_lists(); $this->opn_silo_type_id = $t_list->getItemIDFromList('collection_types', 'silo'); $this->opn_action_type_id = $t_list->getItemIDFromList('occurrence_types', 'action'); $this->opn_context_type_id = $t_list->getItemIDFromList('occurrence_types', 'context'); $this->opn_yes_list_id = $t_list->getItemIDFromList('yes_no', 'yes'); $t_relationship_types = new ca_relationship_types(); $this->opn_rel_type_action_display_image = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "display"); $this->opn_rel_type_action_secondary_images = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "secondary"); $va_access_values = caGetUserAccessValues($this->request); $this->opa_access_values = $va_access_values; $this->view->setVar('access_values', $va_access_values); }
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views')); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/NovaMuse/conf/NovaMuse.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('NovaMuse plugin is not enabled')); } MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/NovaMuse/themes/" . $this->ops_theme . "/css/dashboard.css", 'text/css'); $this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'dashboard'); $t_list = new ca_lists(); $this->opn_member_institution_id = $t_list->getItemIDFromList('entity_types', 'member_institution'); $this->opn_individual_id = $t_list->getItemIDFromList('entity_types', 'ind'); $this->opn_family_id = $t_list->getItemIDFromList('entity_types', 'fam'); $this->opn_organization_id = $t_list->getItemIDFromList('entity_types', 'org'); $t_object = new ca_objects(); $this->opn_objectTableNum = $t_object->tableNum(); $va_access_values = caGetUserAccessValues($this->request); $this->opa_access_values = $va_access_values; $this->view->setVar('access_values', $va_access_values); }
/** * */ public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/Cataloging/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/Cataloging/themes/' . $this->ops_theme . '/views')); $this->opo_plugin_config = Configuration::load($po_request->getAppConfig()->get('application_plugins') . '/Cataloging/conf/cataloging.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('Cataloging plugin is not enabled')); } $vs_default_ui = $this->opo_plugin_config->get('default_ui'); $vs_requested_ui = $this->request->getParameter('ui', pString); $va_ui_list = $this->opo_plugin_config->getAssoc('uis'); $o_dm = Datamodel::load(); if (isset($va_ui_list[$vs_requested_ui]) && is_array($va_ui_list[$vs_requested_ui])) { $this->opa_ui_info = $va_ui_list[$vs_requested_ui]; $this->ops_ui_code = $vs_requested_ui; } else { if (isset($va_ui_list[$vs_default_ui]) && is_array($va_ui_list[$vs_default_ui])) { $this->opa_ui_info = $va_ui_list[$vs_default_ui]; } else { $vs_default_ui = array_shift(array_keys($va_ui_list)); $this->opa_ui_info = $va_ui_list[$vs_default_ui]; } $this->ops_ui_code = $vs_default_ui; } $this->ops_table_name = $this->opa_ui_info['table']; if (!($this->opo_instance = $o_dm->getInstanceByTableName($this->ops_table_name, true))) { die(_t('Invalid table "%1" specified in Cataloging plugin for form "%2"', $this->ops_table_name, $vs_default_ui)); } # --- load the current record if (!($pn_id = $this->request->getParameter($this->opo_instance->primaryKey(), pInteger))) { die(_t("Primary key of record must be passed to form")); } if (!$this->opo_instance->load($pn_id)) { die(_t("Invalid id")); } $t_list = new ca_lists(); if (isset($this->opa_ui_info['representation_type']) && $this->opa_ui_info['representation_type']) { $this->opa_ui_info['representation_type_id'] = $t_list->getItemIDFromList('object_representation_types', $this->opa_ui_info['representation_type']); } CatalogingPlugin::setUIInfo($this->ops_ui_code, $this->opa_ui_info); JavascriptLoadManager::register('panel'); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/Cataloging/themes/" . $this->ops_theme . "/css/cataloging.css", 'text/css'); $this->request->setParameter('dont_set_pawtucket2_last_page', '1'); // Setting this parameter ensures that the "last page" we (may) redirect to after submission isn't the Cataloging form itself if ($this->opa_ui_info['require_login'] && !$po_request->isLoggedIn()) { $this->notification->addNotification(_t("You must be logged in to use user cataloging features."), __NOTIFICATION_TYPE_ERROR__); $this->response->setRedirect(caNavUrl($this->request, '', 'LoginReg', 'form')); return; } }
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/FindingAids/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/FindingAids/themes/' . $this->ops_theme . '/views')); MetaTagManager::addLink("stylesheet", $this->request->getBaseUrlPath() . "/app/plugins/FindingAids/themes/" . $this->ops_theme . "/css/findingaids.css", "text/css"); // redirect user if not logged in if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form")); } elseif ($this->request->config->get('show_bristol_only') && $this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "bristol", "Show", "Index")); } }
/** * */ public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { // Set view path for plugin views directory if (!is_array($pa_view_paths)) { $pa_view_paths = array(); } $pa_view_paths[] = __CA_APP_DIR__ . "/plugins/WorldCat/themes/" . __CA_THEME__ . "/views"; // Load plugin configuration file $this->opo_config = Configuration::load(__CA_APP_DIR__ . '/plugins/WorldCat/conf/worldcat.conf'); parent::__construct($po_request, $po_response, $pa_view_paths); if (!$this->request->user->canDoAction('can_import_worldcat')) { $this->response->setRedirect($this->request->config->get('error_display_url') . '/n/3000?r=' . urlencode($this->request->getFullUrlPath())); return; } // Load plugin stylesheet MetaTagManager::addLink('stylesheet', __CA_URL_ROOT__ . "/app/plugins/WorldCat/themes/" . __CA_THEME__ . "/css/WorldCat.css", 'text/css'); }
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css'); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('eastend plugin is not enabled')); } // redirect user if not logged in if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form")); } JavascriptLoadManager::register('cycle'); $t_list = new ca_lists(); $this->view->setVar("user_contributed_source_id", $t_list->getItemIDFromList('object_sources', 'user_contributed')); $this->view->setVar("user_contributed_other_source_id", $t_list->getItemIDFromList('object_sources', 'user_contributed_other')); }
$htmlChart = str_ireplace("^type", $va_parameters['selectedChartingType'], $htmlChart); } else { // Missing parameters, printing an error message print _t("<p>Charting class defined in the conf file requires other parameters : " . $charting_class . " - " . implode(", ", $chart->returnRequiredParameters()) . "</p>\n"); } } else { // No chart $htmlChart = ""; } // Content creation : TABLE if ($va_table_width) { $htmlTable .= renderStatisticsTable($va_sql['result'], $va_informations->columns, $va_informations->charting_columns, $va_informations->total_columns); } //If chart goes first if ($va_firstElement == "chart") { $first = $htmlChart; $second = $htmlTable; } else { $first = $htmlTable; $second = $htmlChart; } // Final print // Printing statistics title & comment print "<h2>" . $va_informations->title . "</h2>"; print "<p>" . $va_informations->comment . "</p>"; // Include the CSS for the options drop-down form, then add the options drop-down form MetaTagManager::addLink('stylesheet', __CA_URL_ROOT__ . "/app/plugins/statisticsViewer/css/statisticsViewer.css", 'text/css'); print renderOptions($va_views_images_path, $va_informations->id, $va_parameters['positions'], $va_parameters['selectedPosition'], $va_parameters['ChartTypes'], $va_parameters['selectedChartingType']); print "<div class=\"divide\"><!-- empty --></div>\n"; print ($va_sidebyside == "yes" ? "<div style=\"float:left;width:" . $va_table_width . "px;\">" : "<div>\n") . $first . "</div>\n" . ($va_sidebyside == "yes" ? "<div style=\"float:left;width:" . $va_table_width . "px;\">" : "<div>\n") . $second . "</div>"; print "\t<div class=\"editorBottomPadding\"><!-- empty --></div>\n" . "<div class=\"clear\"><!--empty--></div>";
} } print caNavLink($this->request, "<img src='" . $this->request->getThemeUrlPath() . "/graphics/icons/email.png' border='0' title='Email this record'>", "", "Share", "Share", "objectForm", array('object_id' => $vn_object_id)); print "<a href='http://www.facebook.com/sharer.php?u=" . urlencode($this->request->config->get("site_host") . caNavUrl($this->request, "Detail", "Object", "Show", array("object_id" => $vn_object_id))) . "&t=" . urlencode($vs_title) . "'><img src='" . $this->request->getThemeUrlPath() . "/graphics/icons/facebook.png' border='0' title='Share on Facebook'></a>"; ?> </div><!-- end bottomBar --> </div><!-- end leftCol --> </div><!-- end detailBody --> <?php require_once __CA_LIB_DIR__ . '/core/Parsers/COinS.php'; print COinS::getTags($t_object); # -- metatags for facebook sharing MetaTagManager::addMeta('og:title', $vs_title); if ($t_rep && $t_rep->getPrimaryKey() && ($vs_media_url = $t_rep->getMediaUrl('media', 'thumbnail'))) { MetaTagManager::addMeta('og:image', $vs_media_url); MetaTagManager::addLink('image_src', $vs_media_url); } if ($vs_description_text) { MetaTagManager::addMeta('og:description', $vs_description_text); } ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('.scrollPane').jScrollPane({ animateScroll: true, }); }); </script>
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css'); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('eastend plugin is not enabled')); } // redirect user if not logged in if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form")); } $po_request->session->setVar('pawtucket2_browse_target', "ca_entities"); // // Minimal view list (all targets have a "full" results view) // $this->opa_views = array('full' => _t('List')); $this->opa_views_options = array('full' => array("description" => _t("View results in a list"), "icon" => "icon_list.gif")); if ($this->request->config->get("dont_enforce_access_settings")) { $this->opa_access_values = array(); } else { $this->opa_access_values = caGetUserAccessValues($this->request); } $this->view->setVar('access_values', $va_access_values); $this->opo_result_context = new ResultContext($po_request, $this->ops_tablename, $this->ops_find_type); $this->opo_result_context->setAsLastFind(); $this->opo_browse = new EntityBrowse(); // get configured result views, if specified if ($va_result_views_for_ca_entities = $po_request->config->getAssoc('result_views_for_ca_entities')) { $this->opa_views = $va_result_views_for_ca_entities; } // get configured result views options, if specified if ($va_result_views_options_for_ca_entities = $po_request->config->getAssoc('result_views_options_for_ca_entities')) { $this->opa_views_options = $va_result_views_options_for_ca_entities; } // get configured result sort options, if specified if ($va_sort_options_for_ca_entities = $po_request->config->getAssoc('result_sort_options_for_ca_entities')) { $this->opa_sorts = $va_sort_options_for_ca_entities; } else { $this->opa_sorts = array('ca_entity_labels.displayname' => _t('Name'), 'ca_entities.type_id' => _t('Type'), 'ca_entities.idno_sort' => _t('Idno')); } $va_sources = array(); $t_list_item = new ca_lists(); $vn_aoee_source = $t_list_item->getItemIDFromList("entity_sources", "aoee"); $va_sources[] = $vn_aoee_source; $this->aoee_source = $vn_aoee_source; $this->view->setVar('aoee_source', $vn_aoee_source); $vn_aoee_featured_source = $t_list_item->getItemIDFromList("entity_sources", "featured"); $va_sources[] = $vn_aoee_featured_source; $this->aoee_featured_source = $vn_aoee_featured_source; $this->view->setVar('aoee_featured_source', $vn_aoee_featured_source); $vn_aoee_priority_source = $t_list_item->getItemIDFromList("entity_sources", "priority"); $va_sources[] = $vn_aoee_priority_source; $this->aoee_priority_source = $vn_aoee_priority_source; $this->view->setVar('aoee_priority_source', $vn_aoee_priority_source); $this->aoee_sourcea = $va_sources; $this->view->setVar('aoee_sources', $va_sources); $this->opo_browse->addResultFilter("ca_entities.source_id", "IN", join(',', $va_sources)); $vn_on_view_yes_id = $t_list_item->getItemIDFromList("yes_no", "yes"); $this->view->setVar('on_view_yes_id', $vn_on_view_yes_id); $this->view->setvar("browse_place_ids", $this->opo_plugin_config->get('artist_browser_place_ids')); }
public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { $this->ops_theme = __CA_THEME__; // get current theme if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) { // if theme is not defined for this plugin, try to use "default" theme $this->ops_theme = 'default'; } parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')); JavascriptLoadManager::register('smoothDivScrollVertical'); MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css'); $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf'); if (!(bool) $this->opo_plugin_config->get('enabled')) { die(_t('eastend plugin is not enabled')); } // redirect user if not logged in if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form")); } if ($this->request->config->get("dont_enforce_access_settings")) { $this->opa_access_values = array(); } else { $this->opa_access_values = caGetUserAccessValues($this->request); } $this->view->setVar('access_values', $this->opa_access_values); $this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'chronology'); $t_list = new ca_lists(); $pn_type_restriction_id_entity = $t_list->getItemIDFromList('entity_types', 'individual'); // set type restrictions for searches $this->opo_search_result_context_entity = new ResultContext($this->request, "ca_entities", 'chronology'); $this->opo_search_result_context_entity->setTypeRestriction($pn_type_restriction_id_entity); $this->opo_search_result_context_entity->saveContext(); $va_periods = $this->opa_periods; $this->view->setVar('periods', $this->opa_periods); $vn_year = $this->request->getParameter('year', pInteger); $vn_period = $this->request->getParameter('period', pInteger); if (!$vn_period || !$va_periods[$vn_period]) { if ($vn_year) { # --- determine the period from the year foreach ($va_periods as $i => $va_per_info) { if ($vn_year >= $va_per_info["start"] && $vn_year <= $va_per_info["end"]) { $vn_period = $i; break; } } } else { $vn_period = $this->opn_default_period; } } $this->view->setVar('period', $vn_period); $this->opn_period = $vn_period; if (!$vn_year) { $vn_year = $va_periods[$vn_period]["start"]; } $this->view->setVar('year', $vn_year); if ($va_periods[$vn_period]["displayAllYears"] == 1) { $this->ops_date_range = $va_periods[$vn_period]["start"] . " to " . $va_periods[$vn_period]["end"]; } else { $this->ops_date_range = $vn_year; } JavascriptLoadManager::register('maps'); }