Esempio n. 1
0
 public function loadTypeSpecificValueFromRow($pa_value_array)
 {
     $this->opn_place_id = $pa_value_array['value_integer1'];
     require_once __CA_MODELS_DIR__ . '/ca_places.php';
     $t_place = new ca_places($this->opn_place_id);
     $this->ops_text = $t_place->getLabelForDisplay() . ($t_place->get("idno") ? " [" . $t_place->get("idno") . "]" : "");
 }
		</div>
<?php 
} else {
    ?>
		<!--<span class="listhead"><?php 
    print $vs_facet_name;
    ?>
</span>-->
		<ul>
<?php 
    if ($vs_facet_name == "place_facet") {
        # --- only show a few places - this list of place ids is configured in the plugin conf file
        $va_browse_place_ids = $this->getVar("browse_place_ids");
        $t_place = new ca_places();
        foreach ($va_browse_place_ids as $vn_place_id) {
            $t_place->load($vn_place_id);
            if ($t_place->get("place_id")) {
                print "<li><a href='#' class='abFacetOptionsList' id='abFacetOptionsList" . $t_place->get("place_id") . "' onclick='jQuery(\".abFacetOptionsList\").removeClass(\"selected\"); jQuery(\"#abFacetOptionsList" . $t_place->get("place_id") . "\").addClass(\"selected\"); jQuery(\"#contentBox\").load(\"" . caNavUrl($this->request, 'eastend', 'Map', 'clearAndAddCriteria', array('facet' => $vs_facet_name, 'id' => $t_place->get("place_id"), 'mod_id' => $vm_modify_id)) . "\"); return false;'>" . $t_place->getLabelForDisplay() . "</a></li>";
            }
        }
    } else {
        foreach ($va_facet as $vn_i => $va_item) {
            $vs_label = caGetLabelForDisplay($va_facet, $va_item, $va_facet_info);
            #print "<div>".caNavLink($this->request, $vs_label, 'browseSelectPanelLink', $this->request->getModulePath(), $this->request->getController(), ((strlen($vm_modify_id)) ? 'modifyCriteria' : 'addCriteria'), array('facet' => $vs_facet_name, 'id' => $va_item['id'], 'mod_id' => $vm_modify_id))."</div>";
            print "<li><a href='#' class='abFacetOptionsList' id='abFacetOptionsList" . $va_item['id'] . "' onclick='jQuery(\".abFacetOptionsList\").removeClass(\"selected\"); jQuery(\"#abFacetOptionsList" . $va_item['id'] . "\").addClass(\"selected\"); jQuery(\"#contentBox\").load(\"" . caNavUrl($this->request, 'eastend', 'Map', 'clearAndAddCriteria', array('facet' => $vs_facet_name, 'id' => $va_item['id'], 'mod_id' => $vm_modify_id)) . "\"); return false;'>" . $vs_label . "</a></li>";
        }
    }
    ?>
		</ul>
<?php 
}
 * CollectiveAccess is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * 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
 *
 * ----------------------------------------------------------------------
 */
$va_place_ids = $this->getVar("place_ids");
$t_place = new ca_places();
?>
	<div id="chronologyMapBalloonContainer">
<?php 
foreach ($va_place_ids as $vn_place_id) {
    $t_place->load($vn_place_id);
    # --- display the entities related to the place - this is what we searched up on since that is the curent data available
    print "<H1>" . caNavLink($this->request, $t_place->getLabelForDisplay(), '', 'Detail', 'Place', 'Show', array('place_id' => $t_place->get("ca_places.place_id"))) . "</H1>";
    # --- entities
    $va_entities = $t_place->get("ca_entities", array("returnAsArray" => 1, 'checkAccess' => $va_access_values, 'sort' => 'surname'));
    if (sizeof($va_entities) > 0) {
        foreach ($va_entities as $va_entity) {
            print "<div>" . ($this->request->config->get('allow_detail_for_ca_entities') ? caNavLink($this->request, $va_entity["label"], '', 'Detail', 'Entity', 'Show', array('entity_id' => $va_entity["entity_id"])) : $va_entity["label"]) . " (" . $va_entity['relationship_typename'] . ")</div>";
        }
    }
    print "<p>" . caNavLink($this->request, _t("More") . " &rsaquo;", '', 'Detail', 'Place', 'Show', array('place_id' => $t_place->get("ca_places.place_id"))) . "</p>";
}
?>
	</div><!-- end chronologyMapBalloonContainer -->
Esempio n. 4
0
 if ($va_primary_venue = $t_occurrence->get('ca_entities', array('restrict_to_relationship_types' => array('primary_venue'), "returnAsArray" => 1, 'checkAccess' => $va_access_values))) {
     $va_primary_venue_name = array();
     foreach ($va_primary_venue as $vn_relation_id => $va_primary_venue_info) {
         $va_entities_output[] = $va_primary_venue_info["relation_id"];
         $va_primary_venue_name[] = $va_primary_venue_info["displayname"];
         $vn_venue_entity_id = $va_primary_venue_info["entity_id"];
     }
     print "<div class='subtitle'>" . implode($va_primary_venue_name, ", ") . "</div><!-- end subtitle -->";
 }
 if ($vn_venue_entity_id) {
     $t_venue = new ca_entities($vn_venue_entity_id);
     if ($va_primary_venue_location = $t_venue->get('ca_places', array('restrict_to_relationship_types' => array('location'), "returnAsArray" => 1, 'checkAccess' => $va_access_values))) {
         $va_primary_venue_location_name = array();
         foreach ($va_primary_venue_location as $vn_relation_id => $va_primary_venue_location_info) {
             $t_place = new ca_places($va_primary_venue_location_info["place_id"]);
             $va_primary_venue_location_name[] = $t_place->getLabelForDisplay();
             if ($t_place->get('ca_places.parent.preferred_labels')) {
                 $va_primary_venue_location_name[] = $t_place->get('ca_places.parent.preferred_labels');
             }
             #$va_primary_venue_location_name[] = $va_primary_venue_location_info["name"];
         }
         print "<div class='subsubtitle'>" . implode($va_primary_venue_location_name, ", ") . "</div><!-- end subsubtitle -->";
     }
 }
 if ($t_occurrence->get("ca_occurrences.date.display_date")) {
     $va_date_info = array_pop($t_occurrence->get("ca_occurrences.date.parsed_date", array("rawDate" => true, "returnAsArray" => true)));
     if (($vn_start_date = intval($va_date_info["start"])) && $vn_start_date >= 1904 && $vn_start_date <= 1988) {
         print "<div class='subsubtitle'>" . caNavLink($this->request, $t_occurrence->get("ca_occurrences.date.display_date"), '', 'Chronology', 'Detail', '', array('year' => $vn_start_date)) . "</div>";
     } else {
         print "<div class='subsubtitle'>" . $t_occurrence->get("ca_occurrences.date.display_date") . "</div>";
     }