public function loadTypeSpecificValueFromRow($pa_value_array) { $this->opn_occurrence_id = $pa_value_array['value_integer1']; require_once __CA_MODELS_DIR__ . '/ca_occurrences.php'; $t_occ = new ca_occurrences($this->opn_occurrence_id); $this->ops_text = $t_occ->getLabelForDisplay() . ($t_occ->get("idno") ? " [" . $t_occ->get("idno") . "]" : ""); }
public function Index() { $t_occurrence = new ca_occurrences(); if ($this->request->config->get("dont_enforce_access_settings")) { $va_access_values = array(); } else { $va_access_values = caGetUserAccessValues($this->request); } # --- get the most viewed occ records $va_occ_info = array(); $va_most_viewed_occs = $t_occurrence->getMostViewedItems(3, array('checkAccess' => $va_access_values)); foreach ($va_most_viewed_occs as $vn_occurrence_id => $va_occ_info) { $t_occurrence->load($vn_occurrence_id); $va_occ_info['title'] = $t_occurrence->getLabelForDisplay(); $va_preview_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "widepreview", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_preview_stills) > 0) { $va_occ_info["mediaPreview"] = array_shift($va_preview_stills); } $va_medium_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "medium", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_medium_stills) > 0) { $va_occ_info["mediaMedium"] = array_shift($va_medium_stills); } $va_occ_info["repository"] = $t_occurrence->get("CLIR2_institution", array('convertCodesToDisplayText' => true)); $va_most_viewed_occs[$vn_occurrence_id] = $va_occ_info; } $this->view->setVar('most_viewed_occs', $va_most_viewed_occs); $this->render('Engage/engage_index_html.php'); }
function caDownloadAttributeMedia($po_request, $po_response, $pn_occurrence_id, $ps_version, $pa_options = null) { $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/'); $t_occurrence = new ca_occurrences($pn_occurrence_id); if (!$t_occurrence->getPrimaryKey()) { return null; } $vs_path = $t_occurrence->get('ca_occurrences.report_file', array('version' => $ps_version, 'return' => 'path')); $vs_path_ext = pathinfo($vs_path, PATHINFO_EXTENSION); if (!($vs_title = trim($t_occurrence->get('ca_occurrences.preferred_labels.name')))) { $vs_title = "report"; } $vs_name = _t(preg_replace('![^A-Za-z0-9\\,\\/\\?\\"\']+!', '_', $vs_title) . ".{$vs_path_ext}"); $o_view->setVar('file_path', $vs_path); $o_view->setVar('file_name', $vs_name); // send download return $o_view->render('ca_attributes_download_media.php'); }
$va_exhibition_ids = array_keys(is_array($va_tmp = $t_set->getItemRowIDs(array('checkAccess' => $va_access_values, 'shuffle' => 1))) ? $va_tmp : array()); $t_exhibition->load($va_exhibition_ids[0]); } # --- check to see if there is an image set configured if ($this->getVar("featured_set_id")) { $qr_res = $this->getVar('featured_set_items_as_search_result'); if ($qr_res && $qr_res->numHits()) { while ($qr_res->nextHit()) { if ($vs_media = $qr_res->getWithTemplate('^ca_object_representations.media.front', array("checkAccess" => $va_access_values))) { print "<div class='col-sm-12'><div class='frontSlide'>" . $vs_media . "</div></div>"; break; } } } } else { if ($t_exhibition->get("occurrence_id")) { # --- use the featured image from the show $va_objects = $t_exhibition->get('ca_objects', array("checkAccess" => $va_access_values, "restrictToRelationshipTypes" => array("used_website"), "returnAsArray" => true)); if (is_array($va_objects) && sizeof($va_objects)) { $va_object = array_pop($va_objects); $t_object = new ca_objects($va_object["object_id"]); print "<div class='col-sm-12'><div class='frontSlide'>" . caDetailLink($this->request, $t_object->get("ca_object_representations.media.front", array("checkAccess" => $va_access_values)), '', 'ca_occurrences', $t_exhibition->get("occurrence_id"), null, null, array("type_id" => $t_exhibition->get("ca_occurrences.type_id"))) . "</div></div>"; } } } ?> <div class="col-sm-12"> <?php if ($t_exhibition->get("occurrence_id")) { print "<h1>" . caDetailLink($this->request, $t_exhibition->get("ca_occurrences.preferred_labels.name"), '', 'ca_occurrences', $t_exhibition->get("ca_occurrences.occurrence_id"), null, null, array("type_id" => $t_exhibition->get("ca_occurrences.type_id"))) . "</h1>";
/** * Returns content for overlay containing details for object representation linked to occurrence */ public function getOccurrenceMediaOverlay() { $pn_occurrence_id = $this->request->getParameter('occurrence_id', pInteger); $pn_object_id = $this->request->getParameter('object_id', pInteger); $this->view->setVar('object_id', $pn_object_id); $pn_representation_id = $this->request->getParameter('representation_id', pInteger); $this->view->setVar('occurrence_id', $pn_occurrence_id); $t_occurrence = new ca_occurrences($pn_occurrence_id); $this->view->setVar('object_id', $pn_object_id); $t_object = new ca_objects($pn_object_id); $this->view->setVar('t_object', $t_object); $t_rep = new ca_object_representations($pn_representation_id); $this->view->setVar('representation_id', $pn_representation_id); $this->view->setVar('t_object_representation', $t_rep); if ($this->request->config->get("dont_enforce_access_settings")) { $va_access_values = array(); } else { $va_access_values = caGetUserAccessValues($this->request); } if (!$t_occurrence->getPrimaryKey()) { die("Invalid occurrence_id"); } if (!$t_object->getPrimaryKey()) { die("Invalid object_id"); } if (!$t_rep->getPrimaryKey()) { die("Invalid representation_id"); } if (sizeof($va_access_values) && !in_array($t_occurrence->get('access'), $va_access_values)) { die("Invalid occurrence_id"); } if (sizeof($va_access_values) && !in_array($t_object->get('access'), $va_access_values)) { die("Invalid object_id"); } if (sizeof($va_access_values) && !in_array($t_rep->get('access'), $va_access_values)) { die("Invalid rep_id"); } // Get media for display using configured rules $va_rep_display_info = caGetMediaDisplayInfo("media_overlay", $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE')); // set version $this->view->setVar('version', $va_rep_display_info['display_version']); unset($va_display_info['display_version']); // set poster frame URL //$va_rep_display_info['poster_frame_url'] = $t_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']); //unset($va_display_info['poster_frame_version']); //$va_rep_display_info['viewer_base_url'] = $t_rep->getAppConfig()->get('ca_url_root'); // set other options $this->view->setVar('display_options', $va_rep_display_info); if (!($ps_display_type = trim($this->request->getParameter('display_type', pString)))) { $ps_display_type = 'media_overlay'; } if (!($ps_containerID = trim($this->request->getParameter('containerID', pString)))) { $ps_containerID = 'caMediaPanelContentArea'; } $this->view->setVar("display_type", $ps_display_type); $this->view->setVar("containerID", $ps_containerID); // Get all objects asscoiated with this occurrence and show primary reps as icons for navigation $va_exhibition_images = $t_occurrence->get("ca_objects", array('restrict_to_relationship_types' => array('describes'), "returnAsArray" => 1, 'checkAccess' => $va_access_values)); if (sizeof($va_exhibition_images) > 0) { $t_image_objects = new ca_objects(); $i = 1; foreach ($va_exhibition_images as $vn_rel_id => $va_info) { $t_image_objects->load($va_info["object_id"]); if ($t_primary_rep = $t_image_objects->getPrimaryRepresentationInstance()) { $va_temp = array(); if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) { $va_temp["representation_id"] = $t_primary_rep->get("representation_id"); $va_temp["rep_icon"] = $t_primary_rep->getMediaTag('media', 'icon'); $va_temp["rep_tinyicon"] = $t_primary_rep->getMediaTag('media', 'tinyicon'); $va_temp["object_id"] = $va_info["object_id"]; $va_thumbnails[$va_info["object_id"]] = $va_temp; if ($vn_getNext == 1) { $this->view->setVar("next_object_id", $va_info["object_id"]); $this->view->setVar("next_representation_id", $t_primary_rep->get("representation_id")); $vn_getNext = 0; } if ($va_info["object_id"] == $pn_object_id) { $this->view->setVar("representation_index", $i); $this->view->setVar("previous_object_id", $vn_prev_obj_id); $this->view->setVar("previous_representation_id", $vn_prev_rep_id); $vn_getNext = 1; } $vn_prev_obj_id = $va_info["object_id"]; $vn_prev_rep_id = $t_primary_rep->get("representation_id"); $i++; } } } } $this->view->setVar('reps', $va_thumbnails); return $this->render("Detail/ajax_ca_occurrences_media_overlay_html.php"); }
* * This source code is free and modifiable under the terms of * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See * the "license.txt" file for details, or visit the CollectiveAccess web site at * http://www.CollectiveAccess.org * * ---------------------------------------------------------------------- */ # --- session vars for persistent browse filters $pn_user_category = $this->request->getParameter('user_category', pInteger); if ($pn_user_category && $pn_user_category != $this->request->session->getVar("bokUserCategory")) { $this->request->session->setVar("bokUserCategory", $pn_user_category); require_once __CA_MODELS_DIR__ . "/ca_occurrences.php"; $t_occurrence = new ca_occurrences(); $t_occurrence->load($pn_user_category); $this->request->session->setVar("bokUserCategoryLabel", strtolower($t_occurrence->get("ca_occurrences.preferred_labels.name"))); $this->request->session->setVar("bokUserCategoryIdno", strtolower($t_occurrence->get("ca_occurrences.idno"))); } $pn_user_category = $this->request->session->getVar("bokUserCategory"); $ps_user_category = $this->request->session->getVar("bokUserCategoryLabel"); $ps_user_category_idno = $this->request->session->getVar("bokUserCategoryIdno"); # --- collect the user links - they are output twice - once for toggle menu and once for nav $vs_user_links = ""; if ($this->request->isLoggedIn()) { $vs_user_links .= '<li role="presentation" class="dropdown-header">' . trim($this->request->user->get("fname") . " " . $this->request->user->get("lname")) . ', ' . $this->request->user->get("email") . '</li>'; $vs_user_links .= '<li class="divider nav-divider"></li>'; $vs_user_links .= "<li>" . caNavLink($this->request, _t('Lightbox'), '', '', 'Sets', 'Index', array()) . "</li>"; $vs_user_links .= "<li>" . caNavLink($this->request, _t('Logout'), '', '', 'LoginReg', 'Logout', array()) . "</li>"; } else { $vs_user_links .= "<li><a href='#' onclick='caMediaPanel.showPanel(\"" . caNavUrl($this->request, '', 'LoginReg', 'LoginForm', array()) . "\"); return false;' >" . _t("Login") . "</a></li>"; $vs_user_links .= "<li><a href='#' onclick='caMediaPanel.showPanel(\"" . caNavUrl($this->request, '', 'LoginReg', 'RegisterForm', array()) . "\"); return false;' >" . _t("Register") . "</a></li>";
if (trim($t_occurrence->get("ca_occurrences.internal_notes"))) { print "<H3>Comments</H3><div class='unit'>"; print $t_occurrence->get("ca_occurrences.internal_notes", null, array('convertLinkBreaks' => true)); print "</div><!-- end unit -->"; } # --- occurrences $va_occurrences = $t_occurrence->get("ca_occurrences", array("returnAsArray" => 1, 'checkAccess' => $va_access_values, 'sort' => array('ca_occurrences.date.parsed_date'))); $va_sorted_occurrences = array(); if (sizeof($this->getVar('occurrences'))) { $t_occ = new ca_occurrences(); $va_item_types = $t_occ->getTypeList(); foreach ($this->getVar('occurrences') as $va_occurrence) { $t_occ->load($va_occurrence['occurrence_id']); $vs_venue = ""; $va_venues = array(); $va_venues = $t_occ->get('ca_entities', array('restrict_to_relationship_types' => array('primary_venue'), "returnAsArray" => 1, 'checkAccess' => $va_access_values)); if (sizeof($va_venues) > 0) { $va_venue_name = array(); foreach ($va_venues as $va_venue_info) { $va_venue_name[] = $va_venue_info["displayname"]; } $vs_venue = implode($va_venue_name, ", "); } $va_sorted_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = array("label" => $va_occurrence['label'], "date" => $t_occ->get("ca_occurrences.date.display_date"), "year_published" => $t_occ->get("ca_occurrences.bib_year_published"), "venue" => $vs_venue, "relationship_type_id" => $va_occurrence['relationship_type_id'], "bib_full_citation" => $t_occ->get("ca_occurrences.bib_full_citation")); } $va_occ_rel_types = $t_rel_types->getRelationshipInfo('ca_objects_x_occurrences'); foreach ($va_sorted_occurrences as $vn_occurrence_type_id => $va_occurrence_list) { switch ($va_item_types[$vn_occurrence_type_id]['idno']) { case "bibliography": $vs_title = "Related Text"; break;
} if ($vs_thumb) { print "</div></div><!-- end row -->"; } else { print "<br/>"; } print "<br/>"; } } $va_occurrences = $t_item->get("ca_occurrences", array("returnAsArray" => true, "checkAccess" => $va_access_values)); if (sizeof($va_occurrences)) { print "<H6>Related event" . (sizeof($va_occurrences) > 1 ? "s" : "") . "</H6>"; $t_rel_occurrence = new ca_occurrences(); foreach ($va_occurrences as $va_occurrence) { $t_rel_occurrence->load($va_occurrence["occurrence_id"]); $t_object_thumb->load($t_rel_occurrence->get("ca_objects.object_id", array("restrictToRelationshipTypes" => array("cover"), "checkAccess" => $va_access_values))); $vs_thumb = $t_object_thumb->get("ca_object_representations.media.icon", array("checkAccess" => $va_access_values)); if ($vs_thumb) { print "<div class='row'><div class='col-sm-3 col-md-3 col-lg-3'>" . $vs_thumb . "</div>\n"; print "<div class='col-sm-9 col-md-9 col-lg-9'>\n"; } print $t_rel_occurrence->getWithTemplate("<b><l>^ca_occurrences.preferred_labels.name</l></b>"); if ($vs_brief_description = $t_rel_occurrence->get("ca_occurrences.brief_description")) { print "<br/>" . $vs_brief_description; } if ($vs_thumb) { print "</div></div><!-- end row -->"; } else { print "<br/>"; } print "<br/>";
} print "</div></div>"; print "</div><!-- blockResults-->"; print "</div><!-- blockTitle-->"; print "</div><!-- occurrencesBlock-->"; } # Related Events Block if (sizeof($va_events) > 0) { print "<div id='eventsBlock'>"; print "<div class='blockTitle related'>" . _t('Related Events') . "</div>"; print "<div class='blockResults scrollBlock'>"; print "<div class='scrollingDiv'><div class='scrollingDivContent'>"; foreach ($va_events as $occurrence_id => $va_event) { $vn_occurrence_id = $va_event['occurrence_id']; $t_occurrence = new ca_occurrences($vn_occurrence_id); $va_objects = $t_occurrence->get('ca_objects.object_id', array('returnAsArray' => true)); $va_object_reps = caGetPrimaryRepresentationsForIDs($va_objects, array('versions' => array('resultthumb'), 'return' => array('tags'))); print "<div class='occurrencesResult'>"; print "<div class='exImage' {$vs_style}>" . $va_object_reps[0] . "</div>"; print "<div class='exTitle'>" . caNavLink($this->request, $va_event['name'], '', '', 'Detail', 'Occurrences/' . $va_event['occurrence_id']) . "</div>"; print "<div class='exDate'>" . $t_occurrence->get('ca_occurrences.event_dates') . "</div>"; print "</div><!-- end occurrenceResult -->"; } print "</div></div>"; print "</div><!-- end blockResults -->"; print "</div><!-- end entitiesBlock -->"; } # Related Entities Block if (sizeof($va_entities) > 0) { print "<div id='entitiesBlock'>"; print "<div class='blockTitle related'>" . _t('Related People') . "</div>";
/** * */ private function _getActionsCollection($pn_collection_id, $pn_start = 0, $pn_num_actions = 10) { $o_search = new OccurrenceSearch(); $o_search->setTypeRestrictions(array($this->opn_context_type_id, $this->opn_action_type_id)); $o_search->addResultFilter("ca_occurrences.access", "IN", join(',', $this->opa_access_values)); $qr_res = $o_search->search("ca_collections.collection_id:{$pn_collection_id}", array('sort' => 'ca_occurrences.date.dates_value', 'sort_direction' => 'asc')); $qr_res->seek($pn_start); $va_actions = array(); $vn_c = 0; $t_occ = new ca_occurrences(); while ($qr_res->nextHit()) { if (!($vs_date = trim($qr_res->get('ca_occurrences.date.dates_value', array('dateFormat' => 'delimited'))))) { continue; } if ($vs_date == 'present') { continue; } $va_silos = array(); $va_projects = array(); $t_occ->load($qr_res->get('ca_occurrences.occurrence_id')); $va_silos = $t_occ->get("ca_collections", array("restrictToTypes" => array("silo"), "returnAsArray" => 1, 'checkAccess' => $this->opa_access_values)); # --- format silo icons here $vs_silos = ""; if (is_array($va_silos) && sizeof($va_silos) > 0) { $vs_silos = "<div class='actionSiloIcons'>"; foreach ($va_silos as $vn_i => $va_silo_info) { $vs_bgColor = ""; switch ($va_silo_info["collection_id"]) { case $this->request->config->get('silo_strawberry_flag'): $vs_bgColor = $this->request->config->get('silo_strawberry_flag_bg'); break; # -------------------------------------- # -------------------------------------- case $this->request->config->get('silo_silver_water'): $vs_bgColor = $this->request->config->get('silo_silver_water_bg'); break; # -------------------------------------- # -------------------------------------- default: $vs_bgColor = "#000000"; break; } $vs_silos .= caNavLink($this->request, "<div class='actionSiloIcon siloIcon" . $va_silo_info["collection_id"] . "' style='background-color:" . $vs_bgColor . "'><!-- empty --></div>", '', 'Detail', 'Collection', 'Show', array('collection_id' => $va_silo_info["collection_id"]), array("title" => $va_silo_info["label"])); } $vs_silos .= "</div>"; } $va_projects = $t_occ->get("ca_collections", array("restrictToTypes" => array("project"), "returnAsArray" => 1, 'checkAccess' => $this->opa_access_values)); $va_timestamps = array_shift($qr_res->get('ca_occurrences.date.dates_value', array('rawDate' => true, 'returnAsArray' => true))); $va_actions[$vn_id = $qr_res->get('ca_occurrences.occurrence_id')] = array('occurrence_id' => $vn_id, 'label' => $qr_res->get('ca_occurrences.preferred_labels.name'), 'idno' => $qr_res->get('ca_occurrences.idno'), 'date' => $vs_date, 'timestamp' => $va_timestamps['start'], 'location' => $qr_res->get('ca_occurrences.georeference.geocode'), 'silos' => $va_silos, 'silos_formatted' => $vs_silos, 'projects' => $va_projects); $vn_c++; if ($vn_c >= $pn_num_actions) { break; } } return $va_actions; }
if (sizeof($va_events) > 0) { print "<div id='occurrencesBlock'>"; print "<div class='blockTitle related'>" . _t('Related Events') . "</div>"; print "<div class='blockResults scrollBlock'>"; print "<div class='scrollingDiv'><div class='scrollingDivContent'>"; $vn_i = 0; foreach ($va_events as $event_id => $va_event) { $vn_event_idno = $va_event['idno']; $vn_event_id = $va_event['occurrence_id']; $t_occurrence = new ca_occurrences($vn_event_id); if ($vn_i == 0) { print "<div class='eventSet'>"; } print "<div class='eventsResult'>"; print "<div>" . caNavLink($this->request, $va_event['label'], '', '', 'Detail', 'Occurrences/' . $vn_event_id) . "</div>"; print "<div class='exDate'>" . $t_occurrence->get('ca_occurrences.event_dates') . "</div>"; print "</div>"; $vn_i++; if ($vn_i == 5) { print "</div>"; $vn_i = 0; } } if (end($va_events) == $va_event && $vn_i < 5 && $vn_i != 0) { print "</div>"; } print "</div></div>"; print "</div><!-- end blockResults -->"; print "</div><!-- end occurrencesBlock-->"; } # Related Objects Block
?> </div><!-- end infoArea--> </div><!-- end contentArea--> <div id='relatedInfo'> <?php # Related Exhibitions Block $va_occurrences = $t_item->get('ca_occurrences', array('restrictToTypes' => array('mf_exhibition'), 'returnAsArray' => true, 'checkAccess' => $va_access_values)); if (sizeof($va_occurrences) > 0) { print "<div id='occurrencesBlock'>"; print "<div class='blockTitle related'>" . _t('Related Exhibitions') . "</div>"; print "<div class='blockResults exhibitions'>"; print "<div>"; foreach ($va_occurrences as $occurrence_id => $va_occurrence) { $vn_occurrence_id = $va_occurrence['occurrence_id']; $t_occurrence = new ca_occurrences($vn_occurrence_id); $va_artworks = $t_occurrence->get('ca_collections.collection_id', array('returnAsArray' => true)); print "<div class='occurrencesResult'>"; $vn_ii = 0; if (sizeof($va_artworks) >= 4) { foreach ($va_artworks as $key => $vn_artwork_id) { $t_collection = new ca_collections($vn_artwork_id); $va_related_objects = $t_collection->get('ca_objects.object_id', array('returnAsArray' => true)); $va_object_reps = caGetPrimaryRepresentationsForIDs($va_related_objects, array('versions' => array('resultthumb'), 'return' => array('tags'))); if ($vn_ii % 2 == 0) { $vs_style = "style='margin-right:10px;'"; } else { $vs_style = ""; } if ($va_primary_rep = array_shift(array_values($va_object_reps))) { print "<div class='exImage' {$vs_style}>" . caNavLink($this->request, $va_primary_rep, '', '', 'Detail', 'Occurrences/' . $va_occurrence['occurrence_id']) . "</div>"; $vn_i++;
"> <name><![CDATA[<?php print $t_set->getLabelForDisplay(); ?> ]]></name> <description><![CDATA[<?php print $t_set->getAttributesForDisplay("description"); ?> ]]></description> </setInfo> <setImages> <?php if (sizeof($va_items)) { foreach ($va_items as $vn_item_id => $va_item) { $t_occurrence->load($va_item[row_id]); $va_image_urls = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "large", "return" => 'url', "returnAsArray" => true)); if (is_array($va_image_urls) && sizeof($va_image_urls) > 0) { $vs_large_image = caEscapeForXML(array_shift($va_image_urls)); } $vs_thumbnail_image = ''; $vs_maker = ''; $vs_credit = ''; $vs_title = caEscapeForXML($va_item['name']); ?> <image large="<?php print $vs_large_image; ?> " thumbnail="<?php print $vs_thumbnail_image; ?> " title="<?php
$t_list = new ca_lists(); $vn_i = 0; while ($vn_i < $vn_items_per_page && $vo_result->nextHit()) { $vs_idno = $vo_result->get('ca_occurrences.idno'); $vs_class = ""; $vn_item_count++; if ($vn_item_count == 2) { $vs_class = "resultBg"; $vn_item_count = 0; } $vn_occurrence_id = $vo_result->get('ca_occurrences.occurrence_id'); $va_labels = $vo_result->getDisplayLabels($this->request); print "<div" . ($vs_class ? " class='{$vs_class}'" : "") . " style='clear:both;'>"; $t_occurrence->load($vn_occurrence_id); $vs_padding = 0; $va_related_objects_links = $t_occurrence->get("ca_objects_x_occurrences.relation_id", array("returnAsArray" => true)); if (sizeof($va_related_objects_links)) { $t_objects_x_occurrences = new ca_objects_x_occurrences(); foreach ($va_related_objects_links as $vn_relation_id) { $t_objects_x_occurrences->load($vn_relation_id); $va_reps = $t_objects_x_occurrences->get("ca_objects_x_occurrences.representation_list", array("returnAsArray" => true, 'idsOnly' => true)); if (is_array($va_reps)) { foreach ($va_reps as $vn_relation_id => $va_attr) { $t_rep = new ca_object_representations($va_attr['representation_list']); $va_info = $t_rep->getMediaInfo("media"); $vs_padding = round($va_info["thumbnail"]["HEIGHT"] / 2) - 7; print "<div class='occThumb'>" . $t_rep->getMediaTag('media', 'thumbnail') . "</div><!-- end occThumb -->"; break; } } break;
</div> <?php } } ?> {{{<ifcount code="ca_occurrences.description" min="1"><span class='metaTitle'>Description</span><span class='meta'><unit>^ca_occurrences.description</unit></span></ifcount>}}} {{{<ifcount relativeTo="ca_occurrences" code="ca_occurrences.locationText" min="1"><span class='metaTitle'>Location</span><span class='meta'><unit relativeTo="ca_occurrences">^ca_occurrences.locationText</unit></span></ifcount>}}} {{{<ifcount relativeTo="ca_occurrences" code="ca_occurrences.legacyLocation" min="1"><span class='metaTitle'>Location (legacy text)</span><span class='meta'><unit relativeTo="ca_occurrences">^ca_occurrences.legacyLocation</unit></span></ifcount>}}} <?php if ($va_rel_works = $t_object->get('ca_occurrences.occurrence_id', array('returnAsArray' => true))) { print "<span class='metaTitle'>Related places</span>"; print "<div class='meta'>"; foreach ($va_rel_works as $va_key => $va_occurrence_id) { $t_occurrence = new ca_occurrences($va_occurrence_id); print $t_occurrence->get('ca_places.preferred_labels'); } print "</div>"; } if (is_array($va_occurrence_ids = $t_object->get('ca_occurrences.occurrence_id', array('returnAsArray' => true)))) { $qr_occ = caMakeSearchResult('ca_occurrences', $va_occurrence_ids); while ($qr_occ->nextHit()) { if (is_array($va_contributors = $qr_occ->get('ca_entities', array('restrictToRelationshipTypes' => array('subject', 'interviewee'), 'returnWithStructure' => true, 'checkAccess' => caGetUserAccessValues($this->request)))) && sizeof($va_contributors)) { print "<div><span class='metaTitle'>Subjects</span><div class='meta'>"; foreach ($va_contributors as $cont_key => $va_contributor) { print "<div>" . caNavLink($this->request, $va_contributor['displayname'] . " (" . $va_contributor['relationship_typename'] . ")", '', 'Detail', 'entities', $va_contributor['entity_id']) . "</div>"; } print "</div></div>"; } } }
public function BlankWorksheet() { # --- used for back button $pn_occurrence_id = $this->request->getParameter('occurrence_id', pInteger); $this->view->setVar("occurrence_id", $pn_occurrence_id); $t_occurrence = new ca_occurrences($pn_occurrence_id); $pn_relation_id = $this->request->getParameter('relation_id', pInteger); $this->view->setVar("relation_id", $pn_relation_id); $t_objects_x_occurrences = new ca_objects_x_occurrences($pn_relation_id); $t_object = new ca_objects($t_objects_x_occurrences->get("object_id")); # --- get the images $va_reps = $t_object->getRepresentations(array("medium")); $va_images = array(); if (is_array($va_reps)) { foreach ($va_reps as $vn_i => $va_rep) { $va_rep["representation_id"]; $va_images[$va_rep["representation_id"]] = $va_rep["tags"]["medium"]; } } $this->view->setVar("images", $va_images); $t_lists = new ca_lists(); $vn_original_date = $t_lists->getItemIDFromList("date_types", "dateOriginal"); $vs_image_info = "<div style='font-size:11px; font-style:italic;'>" . $t_objects_x_occurrences->get("ca_objects.preferred_labels.name"); if ($va_dates = $t_objects_x_occurrences->get("ca_objects.date", array("returnAsArray" => true))) { foreach ($va_dates as $va_date_info) { if ($va_date_info["dc_dates_types"] == $vn_original_date) { $vs_image_info .= ", " . $va_date_info["dates_value"]; } } } if ($t_objects_x_occurrences->get("ca_objects.repository")) { $vs_image_info .= ", " . $t_objects_x_occurrences->get("ca_objects.repository", array('delimiter' => ', ', 'convertCodesToDisplayText' => true)); } $vs_image_info .= ", " . $t_objects_x_occurrences->get("ca_objects.idno") . "</div>"; $this->view->setVar("image_info", $vs_image_info); # --- try to get the tranlation/transcription for the rep your making the blank worksheet for # --- those fields can be on either the occurrence or ca_object_x_occurrences record $vs_translation = ""; if ($t_occurrence->get("translation")) { $vs_translation = $t_occurrence->get("translation"); } elseif ($t_objects_x_occurrences->get("translation")) { $vs_translation = $t_objects_x_occurrences->get("translation"); } $this->view->setVar("translation", $vs_translation); $vs_transcription = ""; if ($t_occurrence->get("ca_occurrences.transcription")) { $vs_transcription = $t_occurrence->get("ca_occurrences.transcription"); } elseif ($t_objects_x_occurrences->get("ca_objects_x_occurrences.transcription")) { $vs_transcription = $t_objects_x_occurrences->get("ca_objects_x_occurrences.transcription"); } $this->view->setVar("transcription", $vs_transcription); # --- attributes used in worksheets # --- these will be displayed as title and form elements so user can enter their own text $this->view->setVar("worksheet_attributes", $this->opa_worksheet_attributes); $this->render('nysa/customize_worksheet_html.php'); }
?> <li class='setItem' id='setItem<?php print $vn_item_id; ?> '> <div id='setItemContainer<?php print $vn_item_id; ?> ' class='imagecontainer'> <div class='remove'><a href='#' class='setDeleteButton' id='setItemDelete<?php print $vn_item_id; ?> '>X</a></div> <div class='setItemThumbnail'> <?php $va_still_thumbnail = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "thumbnail", "showMediaInfo" => false, "returnAsArray" => true)); if (is_array($va_still_thumbnail) && sizeof($va_still_thumbnail) > 0) { print caNavLink($this->request, array_shift($va_still_thumbnail), '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $va_item['row_id'])); } if ($va_item['name']) { if (unicode_strlen($va_item['name']) > 70) { $va_title[] = '<em>' . unicode_substr($va_item['name'], 0, 67) . '...</em>'; } else { $va_title[] = '<em>' . $va_item['name'] . '</em>'; } } if ($va_item['idno']) { $va_title[] = '<strong>' . _t('Id:') . '</strong> ' . $va_item['idno']; } $vs_title = join('<br/>', $va_title); ?>
/** * Return array containing information about all hierarchies, including their root_id's * For non-adhoc hierarchies such as occurrences, this call returns the contents of the occurrence_hierarchies list * with some extra information such as the # of top-level items in each hierarchy. * * For an ad-hoc hierarchy like that of an collection, there is only ever one hierarchy to display - that of the current collection. * So for adhoc hierarchies we just return a single entry corresponding to the root of the current occurrence hierarchy */ public function getHierarchyList($pb_dummy = false) { $vn_pk = $this->getPrimaryKey(); $vs_template = $this->getAppConfig()->get('ca_occurrences_hierarchy_browser_display_settings'); if (!$vn_pk) { $o_db = new Db(); if (is_array($va_type_ids = caMergeTypeRestrictionLists($this, array())) && sizeof($va_type_ids)) { $qr_res = $o_db->query("\n\t\t\t\t\tSELECT o.occurrence_id, count(*) c\n\t\t\t\t\tFROM ca_occurrences o\n\t\t\t\t\tINNER JOIN ca_occurrences AS p ON p.parent_id = o.occurrence_id\n\t\t\t\t\tWHERE o.parent_id IS NULL AND o.type_id IN (?)\n\t\t\t\t\tGROUP BY o.occurrence_id\n\t\t\t\t", array($va_type_ids)); } else { $qr_res = $o_db->query("\n\t\t\t\t\tSELECT o.occurrence_id, count(*) c\n\t\t\t\t\tFROM ca_occurrences o\n\t\t\t\t\tINNER JOIN ca_occurrences AS p ON p.parent_id = o.occurrence_id\n\t\t\t\t\tWHERE o.parent_id IS NULL\n\t\t\t\t\tGROUP BY o.occurrence_id\n\t\t\t\t"); } $va_hiers = array(); $va_occurrence_ids = $qr_res->getAllFieldValues('occurrence_id'); $qr_res->seek(0); $va_labels = $this->getPreferredDisplayLabelsForIDs($va_occurrence_ids); while ($qr_res->nextRow()) { $va_hiers[$vn_occurrence_id = $qr_res->get('occurrence_id')] = array('occurrence_id' => $vn_occurrence_id, 'name' => caProcessTemplateForIDs($vs_template, 'ca_occurrences', array($vn_occurrence_id)), 'hierarchy_id' => $vn_occurrence_id, 'children' => (int) $qr_res->get('c')); } return $va_hiers; } else { // return specific occurrence as root of hierarchy $vs_label = $this->getLabelForDisplay(false); $vs_hier_fld = $this->getProperty('HIERARCHY_ID_FLD'); $vs_parent_fld = $this->getProperty('PARENT_ID_FLD'); $vn_hier_id = $this->get($vs_hier_fld); if ($this->get($vs_parent_fld)) { // currently loaded row is not the root so get the root $va_ancestors = $this->getHierarchyAncestors(); if (!is_array($va_ancestors) || sizeof($va_ancestors) == 0) { return null; } $t_occurrence = new ca_occurrences($va_ancestors[0]); } else { $t_occurrence =& $this; } $va_children = $t_occurrence->getHierarchyChildren(null, array('idsOnly' => true)); $va_occurrence_hierarchy_root = array($t_occurrence->get($vs_hier_fld) => array('occurrence_id' => $vn_pk, 'item_id' => $vn_pk, 'name' => $vs_name = caProcessTemplateForIDs($vs_template, 'ca_occurrences', array($vn_pk)), 'hierarchy_id' => $vn_hier_id, 'children' => sizeof($va_children))); return $va_occurrence_hierarchy_root; } }
} $vn_i++; ?> </p> <?php } # --- occurrences $va_occurrences = $t_object->get("ca_occurrences", array("returnAsArray" => 1, 'checkAccess' => $va_access_values)); $va_sorted_occurrences = array(); if (sizeof($va_occurrences) > 0) { $t_occ = new ca_occurrences(); $va_item_types = $t_occ->getTypeList(); foreach ($va_occurrences as $va_occurrence) { $t_occ->load($va_occurrence['occurrence_id']); $va_rel_entities = array(); $va_rel_entities = $t_occ->get("ca_entities", array('restrictToTypes' => array('organization'), "returnAsArray" => 1, 'checkAccess' => $va_access_values, 'sort' => 'surname')); $va_occurrence["related_entities"] = $va_rel_entities; $va_sorted_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = $va_occurrence; } $t_list = new ca_lists(); $vn_exhibition_type_id = $t_list->getItemIDFromList("occurrence_types", "exhibition"); foreach ($va_sorted_occurrences as $vn_occurrence_type_id => $va_occurrence_list) { ?> <h3><?php print _t("Related") . " " . $va_item_types[$vn_occurrence_type_id]['name_singular'] . (sizeof($va_occurrence_list) > 1 ? "s" : ""); ?> </h3> <div class='scrollPane'> <?php foreach ($va_occurrence_list as $vn_rel_occurrence_id => $va_info) { print "<p>" . ($this->request->config->get('allow_detail_for_ca_occurrences') ? caNavLink($this->request, $va_info["label"], '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_rel_occurrence_id)) : $va_info["label"]);
<?php if ($pn_user_category = $this->request->getParameter('user_category', pInteger)) { require_once __CA_MODELS_DIR__ . "/ca_occurrences.php"; $t_occurrence = new ca_occurrences(); $t_occurrence->load($pn_user_category); $ps_user_category = strtolower($t_occurrence->get("ca_occurrences.preferred_labels.name")); } else { $pn_user_category = $this->request->session->getVar("bokUserCategory"); $ps_user_category = $this->request->session->getVar("bokUserCategoryLabel"); } ?> <div class="container containerTextPadding" id="comp_content"> <div class="row"> <div class="col-sm-12"> <H2>Choose content within the <span class='capital'><?php print $ps_user_category; ?> </span> category below:</H2><br/> </div> </div> <div class="row"> <div class="col-sm-5 col-sm-offset-1"> <table class="table"> <tr> <td class="contentbox iconbox"><?php print caNavLink($this->request, caGetThemeGraphic($this->request, 'button_content.png') . "<br />content", "", "", "Browse", "Content", array("facet" => "category_facet", "id" => $pn_user_category)); ?> </td> <td class="compsec_info"><?php print caNavLink($this->request, "Explore an e-learning platform for self-guided professional development based on competences.", "", "", "Browse", "Content", array("facet" => "category_facet", "id" => $pn_user_category));
if ($vs_description = $t_object->get("ca_objects.description")) { print "<div class='unit'><b>" . _t('Description') . ":</b> {$vs_description}</div><!-- end unit -->"; } if ($va_photographs = $t_object->get('ca_objects.photographs', array('convertCodesToDisplayText' => true))) { print "<div class='unit'><b>" . _t('Photographs') . ":</b> " . $va_photographs . "</div>"; } } #end if statement if ($va_citations = $t_object->get('ca_occurrences', array('returnAsArray' => true, 'checkAccess' => $va_access_values))) { if (sizeof($va_citations)) { $t_occurrence = new ca_occurrences(); print "<br><div class='unit'><h2>" . (sizeof($va_citations) > 1 ? "Citations" : "Citation") . "</h2>"; foreach ($va_citations as $va_citation) { $t_occurrence->load($va_citation["occurrence_id"]); $vs_citation = ""; $vs_citation .= $t_occurrence->get("ca_entities.preferred_labels.displayname", array("restrict_to_relationship_types" => array("author"), "convertCodesToDisplayText" => true, "delimiter" => "; ")) . ". "; $vs_citation .= "\"" . $va_citation["name"] . ".\" "; if ($t_occurrence->get("ca_occurrences.journal")) { $vs_citation .= "<i>" . $t_occurrence->get("ca_occurrences.journal") . "</i> "; } if ($t_occurrence->get("ca_occurrences.month_volume")) { $vs_citation .= $t_occurrence->get("ca_occurrences.month_volume") . " "; } if ($t_occurrence->get("year")) { $vs_citation .= "(" . $t_occurrence->get("year") . ") "; } if ($t_occurrence->get("ca_occurrences.pages")) { $vs_citation .= ": " . $t_occurrence->get("ca_occurrences.pages"); } $vs_citation .= "."; print caDetailLink($this->request, $vs_citation, '', 'ca_occurrences', $va_citation["occurrence_id"], array("subsite" => $this->request->session->getVar("coloradoSubSite")));
* * @package CollectiveAccess * @subpackage Core * @license http://www.gnu.org/copyleft/gpl.html GNU Public License version 3 * * ---------------------------------------------------------------------- */ $va_lists = $this->getVar('lists'); $va_type_info = $this->getVar('typeInfo'); $va_listing_info = $this->getVar('listingInfo'); foreach ($va_lists as $vn_type_id => $qr_list) { if (!$qr_list) { continue; } print "<h2>{$va_listing_info['displayName']}</h2>\n"; print "<div class='row'>"; while ($qr_list->nextHit()) { $t_occurrence = new ca_occurrences($qr_list->get('ca_occurrences.occurrence_id')); $va_related_objects = $t_occurrence->get('ca_objects.object_id', array('returnAsArray' => true)); print "<div class='event col-sm-4 col-md-3 col-lg-2'>"; $t_object = new ca_objects($va_related_objects[0]); if ($t_object->get('ca_object_representations.media.medium')) { print "<div class='eventImg'>" . $t_object->get('ca_object_representations.media.medium') . "</div>"; } else { print "<div class='placeholder'></div>"; } print $qr_list->get('ca_occurrences.preferred_labels.name'); print "</div>"; } print "</div>"; }
public function setItemInfo() { $va_access_values = caGetUserAccessValues($this->request); $pn_set_id = $this->request->getParameter('set_id', pInteger); $t_set = new ca_sets($pn_set_id); $this->view->setVar('set_id', $pn_set_id); $pn_set_item_id = $this->request->getParameter('set_item_id', pInteger); $t_set_item = new ca_set_items($pn_set_item_id); $va_set_item_info = array(); $va_items = $t_set->getItemIDs(array("checkAccess" => $va_access_values)); $pn_previous_id = ""; foreach ($va_items as $vn_item_id => $va_item_info) { if ($va_set_item_info["item_id"]) { $va_set_item_info["next_id"] = $vn_item_id; break; } if ($pn_set_item_id == $vn_item_id) { $va_set_item_info["previous_id"] = $pn_previous_id; $va_set_item_info["item_id"] = $vn_item_id; } $pn_previous_id = $vn_item_id; } $va_set_item_info["item_id"] = $t_set_item->get("item_id"); $va_set_item_info["info"] = $va_rep[0]['info']; $va_set_item_info["label"] = $t_set_item->getLabelForDisplay(); $va_set_item_info["description"] = $t_set_item->get($this->opo_plugin_config->get('set_description_element_code'), array('convertLineBreaks' => true)); $va_set_item_info["row_id"] = $t_set_item->get("row_id"); $t_occurrence = new ca_occurrences($t_set_item->get("row_id")); $va_set_item_info["label"] = $t_occurrence->getLabelForDisplay(); $va_mediumlarge_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "mediumlarge", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_mediumlarge_stills) > 0) { $va_set_item_info["media_still"] = array_shift($va_mediumlarge_stills); $va_image_caption = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_credit', array("returnAsArray" => true)); $vs_image_caption = array_shift($va_image_caption); if ($vs_image_caption) { $va_set_item_info["media_still_caption"] = $vs_image_caption; } } if ($vs_video = $t_occurrence->get('ca_occurrences.ic_moving_images.ic_moving_images_media', array('version' => 'original', 'showMediaInfo' => false, 'viewer_width' => 580, 'viewer_height' => 450, 'poster_frame_version' => 'mediumlarge'))) { $va_set_item_info["media_video"] = $vs_video; if ($vs_video_caption = $t_occurrence->get('ca_occurrences.ic_moving_images.ic_moving_images_credit')) { $va_set_item_info["media_video_caption"] = $vs_video_caption; } } $this->view->setVar('item_info', $va_set_item_info); $this->render('Exhibits/ajax_item_info_html.php'); }
<?php break; # ------------------------------------------------------------------------------- # ------------------------------------------------------------------------------- case "exhibitions": ?> <div class="row"> <div class="col-sm-7"> <?php $va_exhibitions = $t_item->get("ca_occurrences", array("returnAsArray" => true, "checkAccess" => $va_access_values, "restrictToRelationshipTypes" => array("exhibited"), "sort" => array("ca_occurrences.opening_closing"), "sortDirection" => "desc")); $t_occurrence = new ca_occurrences(); if (sizeof($va_exhibitions) > 0) { foreach ($va_exhibitions as $va_exhibition) { $t_occurrence->load($va_exhibition["occurrence_id"]); print "<h2>" . caDetailLink($this->request, $t_occurrence->get("ca_occurrences.preferred_labels.name"), '', 'ca_occurrences', $va_exhibition["occurrence_id"], null, null, array("type_id" => $t_occurrence->get("ca_occurrences.type_id"))) . "</h2>"; print "<h2>" . $t_occurrence->get("ca_occurrences.exhibition_subtitle") . "</h2>"; print "<h4>" . $t_occurrence->get("ca_occurrences.opening_closing") . "</h4>"; print "<br/>"; } } else { print "<h2>No exhibitions</h2>"; } ?> </div><!-- end col --> <div class="col-sm-4 col-sm-offset-1"> {{{<ifcount code="ca_objects" min="1"> <unit relativeTo="ca_objects" delimiter=" " restrictToRelationshipTypes="creator_website"> <div class="thumbnail">^ca_object_representations.media.medium <div class="caption">^ca_objects.caption</div> </div>
print "</div>"; } print "</div></div>"; print "</div><!-- blockResults-->"; print "</div><!-- objectsBlock-->"; } # Related Exhibitions Block if (sizeof($va_occurrences) > 0) { print "<div id='occurrencesBlock'>"; print "<div class='blockTitle related'>" . _t('Related Exhibitions') . "</div>"; print "<div class='blockResults exhibitions scrollBlock'>"; print "<div class='scrollingDiv'><div class='scrollingDivContent'>"; foreach ($va_occurrences as $occurrence_id => $va_occurrence) { $vn_occurrence_id = $va_occurrence['occurrence_id']; $t_occurrence = new ca_occurrences($vn_occurrence_id); $va_artworks = $t_occurrence->get('ca_collections.collection_id', array('returnAsArray' => true, 'restrictToTypes' => array('installation'))); print "<div class='occurrencesResult' style='width:320px'>"; $vn_ii = 0; $vn_i = 0; if (sizeof($va_artworks) >= 4) { foreach ($va_artworks as $key => $vn_artwork_id) { $t_collection = new ca_collections($vn_artwork_id); $va_related_objects = $t_collection->get('ca_objects.object_id', array('returnAsArray' => true)); $va_object_reps = caGetPrimaryRepresentationsForIDs($va_related_objects, array('versions' => array('resultthumb'), 'return' => array('tags'))); if ($vn_ii % 2 == 0) { $vs_style = "style='margin-right:10px;'"; } else { $vs_style = ""; } if ($va_primary_rep = array_shift(array_values($va_object_reps))) { print "<div class='exImage' {$vs_style}>" . caNavLink($this->request, $va_primary_rep, '', '', 'Detail', 'Occurrences/' . $va_occurrence['occurrence_id']) . "</div>";
print $this->render('Exhibits/intro_text_html.php'); } else { print $this->render('Exhibits/your_sets_intro_text_html.php'); } ?> </div> <?php $t_occurrence = new ca_occurrences(); foreach ($va_set_list as $vn_set_id => $va_set_info) { $va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))]; $t_occurrence->load($va_item['row_id']); $va_preview_stills = array(); $vs_preview_still = ""; $va_medium_stills = array(); $vs_medium_still = ""; $va_preview_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "widepreview", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_preview_stills) > 0) { $vs_preview_still = array_shift($va_preview_stills); } $va_medium_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "medium", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_medium_stills) > 0) { $vs_medium_still = array_shift($va_medium_stills); } print "<div class='setInfo'>"; $va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))]; print "<div class='setImage'>" . caNavLink($this->request, $vs_preview_still, '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div><!-- end setImage -->"; print "<div class='setTitle'>" . caNavLink($this->request, strlen($va_set_info["name"]) > 60 ? substr($va_set_info["name"], 0, 60) . "..." : $va_set_info["name"], '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div>"; $vs_set_text = ""; if (isset($va_set_descriptions[$vn_set_id]) && $va_set_descriptions[$vn_set_id]) { $vs_set_text = $va_set_descriptions[$vn_set_id][0]; // is array because fields could (but usually don't) repeat - just grab the first desc
$qr_exhibitions = $va_years_info["exhibitions"]; if ($qr_exhibitions->numHits() > 0) { print "<div class='unit'><div class='chronologyHeading'>" . _t("Exhibitions in %1", $vs_year_label) . "</div>"; $t_occ = new ca_occurrences(); $i = 0; while ($qr_exhibitions->nextHit()) { if ($i == $vn_num_more_link) { print "<div id='exhibitionsMore' class='relatedMoreItems'>"; } $vn_occurrence_id = $qr_exhibitions->get("ca_occurrences.occurrence_id"); $t_occ->load($vn_occurrence_id); $va_labels = $qr_exhibitions->getDisplayLabels($this->request); $vs_label = "\"" . join("; ", $va_labels) . ",\" "; $vs_venue = ""; $va_venues = array(); $va_venues = $t_occ->get('ca_entities', array('returnAsArray' => 1, 'checkAccess' => $va_access_values, 'restrict_to_relationship_types' => array('primary_venue'))); if (sizeof($va_venues) > 0) { $va_venue_name = array(); foreach ($va_venues as $va_venue_info) { $va_venue_name[] = $va_venue_info["displayname"]; } $vs_venue = implode($va_venue_name, ", "); } if ($vs_venue) { $vs_label .= $vs_venue; } if ($qr_exhibitions->get("ca_occurrences.date.display_date")) { $vs_label .= ", " . $qr_exhibitions->get("ca_occurrences.date.display_date"); } print "<div class='indent'>"; print $this->request->config->get('allow_detail_for_ca_occurrences') ? caNavLink($this->request, $vs_label, '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_occurrence_id)) : $vs_label;
} else { print _t("More Collections"); } ?> </H3> <?php foreach ($va_set_list as $vn_set_id => $va_set_info) { if ($vn_set_id == $t_set->get("set_id")) { continue; } print "<div class='setInfo'>"; $va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))]; $t_occurrence->load($va_item["row_id"]); $va_preview_stills = array(); $vs_preview_still = ""; $va_preview_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "icon", "showMediaInfo" => false, "returnAsArray" => true)); if (sizeof($va_preview_stills) > 0) { $vs_preview_still = array_shift($va_preview_stills); } print "<div class='setImage'>" . caNavLink($this->request, $vs_preview_still, '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div><!-- end setImage -->"; print "<div class='setTitle'>" . caNavLink($this->request, strlen($va_set_info["name"]) > 120 ? substr($va_set_info["name"], 0, 120) . "..." : $va_set_info["name"], '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div>"; print "<div style='clear:left; height:1px;'><!-- empty --></div><!-- end clear --></div><!-- end setInfo -->"; } ?> </div><!-- end allSets --> <?php } # --- selected set info - descriptiona and grid of items with links to open panel with more info ?> <H1><?php print $this->getVar('set_title');