当前位置: 首页>>代码示例>>PHP>>正文


PHP caDetailLink函数代码示例

本文整理汇总了PHP中caDetailLink函数的典型用法代码示例。如果您正苦于以下问题:PHP caDetailLink函数的具体用法?PHP caDetailLink怎么用?PHP caDetailLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了caDetailLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

}
?>
<div class="container">
	<div class="row">
		<div class="col-sm-12">
<?php 
if (is_array($va_item_media) && sizeof($va_item_media)) {
    ?>
   
		<div class="jcarousel-wrapper">
			<!-- Carousel -->
			<div class="jcarousel">
				<ul>
<?php 
    foreach ($va_item_media as $vn_object_id => $va_media) {
        print "<li>" . caDetailLink($this->request, $va_media["tags"]["slideshowsmall"], '', 'ca_objects', $vn_object_id) . "</li>";
    }
    ?>
				</ul>
			</div><!-- end jcarousel -->
<?php 
    if (sizeof($va_item_media) > 1) {
        ?>
			<!-- Prev/next controls -->
			<a href="#" class="jcarousel-control-prev"><i class="fa fa-angle-left"></i></a>
			<a href="#" class="jcarousel-control-next"><i class="fa fa-angle-right"></i></a>
		
			<!-- Pagination -->
			<p class="jcarousel-pagination">
			<!-- Pagination items will be generated in here -->
			</p>
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:archives.php

示例2: array

 if ($qr_res->get("ca_objects.creation_date")) {
     print ", ";
     if (strtolower($qr_res->get("ca_objects.creation_date")) == "unknown") {
         print "Date " . $qr_res->get("ca_objects.creation_date");
     } else {
         print $qr_res->get("ca_objects.creation_date");
     }
 }
 $va_entities = $qr_res->get("ca_entities", array("returnAsArray" => true, "restrictToRelationshipTypes" => array("creator"), "checkAccess" => $va_access_values));
 if (sizeof($va_entities)) {
     $t_entity = new ca_entities();
     print "<br/>";
     $i = 0;
     foreach ($va_entities as $va_entity) {
         $t_entity->load($va_entity["entity_id"]);
         print caDetailLink($this->request, $t_entity->getLabelForDisplay(), "", "ca_entities", $t_entity->get("entity_id"));
         $vs_nationality = trim($t_entity->get("nationality", array("delimiter" => "; ", "convertCodesToDisplayText" => true)));
         $vs_dob = $t_entity->get("dob_dod");
         if (strtolower($vs_dob) == "unknown") {
             $vs_dob = "";
         }
         if ($vs_nationality || $vs_dob) {
             print " (" . $vs_nationality;
             if ($vs_nationality && $vs_dob) {
                 print ", ";
             }
             print $vs_dob . ")";
         }
         $i++;
         if ($i < sizeof($va_entities)) {
             print ", ";
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:featured_set_slideshow_html.php

示例3: caDetailLink

     # --- artwork
     $vs_label_artist = "<p class='artist lower'>" . caDetailLink($this->request, $q_set_items->get("ca_entities.preferred_labels.name", array('restrictToRelationshipTypes' => 'artist')), '', 'ca_objects', $vn_id) . "</p>";
     $vs_label_detail_link = "<p><i>" . caDetailLink($this->request, $q_set_items->get("ca_objects.preferred_labels.name"), '', 'ca_objects', $vn_id) . "</i>, " . $q_set_items->get("ca_objects.creation_date") . "</p>";
     if ($q_set_items->get('is_deaccessioned') && $q_set_items->get('deaccession_date', array('getDirectDate' => true)) <= caDateToHistoricTimestamp(_t('now'))) {
         $vs_deaccessioned = "<div class='searchDeaccessioned'>" . _t('Deaccessioned %1', $q_set_items->get('deaccession_date')) . "</div>\n";
     } else {
         $vs_deaccessioned = "";
     }
     if ($this->request->user->hasUserRole("founders_new") || $this->request->user->hasUserRole("admin") || $this->request->user->hasUserRole("curatorial_all_new") || $this->request->user->hasUserRole("curatorial_basic_new") || $this->request->user->hasUserRole("archives_new") || $this->request->user->hasUserRole("library_new")) {
         $vs_art_idno_link = "<p class='idno'>" . $q_set_items->get("ca_objects.idno") . "</p>";
     } else {
         $vs_art_idno_link = "";
     }
 } else {
     #$vs_label_artist	 	= "<p class='artist lower'>".$q_set_items->get("ca_entities.preferred_labels.name", array('restrictToRelationshipTypes' => 'artist'))."</p>";
     $vs_label_detail_link = "<p>" . caDetailLink($this->request, $q_set_items->get("ca_objects.preferred_labels.name"), '', 'ca_objects', $vn_id) . "</p>";
     $vs_idno_detail_link = "<p class='idno'>" . $q_set_items->get("ca_objects.idno") . "</p>";
     if ($q_set_items->get('ca_objects.dc_date.dc_dates_value')) {
         $vs_date_link = "<p>" . $q_set_items->get('ca_objects.dc_date', array('returnAsLink' => true, 'delimiter' => '; ', 'template' => '^dc_dates_value')) . "</p>";
     } else {
         $vs_date_link = "";
     }
     if ($q_set_items->get('ca_objects.type_id') == 23 || $q_set_items->get('ca_objects.type_id') == 26 || $q_set_items->get('ca_objects.type_id') == 25 || $q_set_items->get('ca_objects.type_id') == 24 || $q_set_items->get('ca_objects.type_id') == 27) {
         $vs_type_link = "<p>" . $q_set_items->get('ca_objects.type_id', array('convertCodesToDisplayText' => true)) . "</p>";
     } else {
         $vs_type_link = "";
     }
     if ($q_set_items->get('ca_objects.type_id') == 23 || $q_set_items->get('ca_objects.type_id') == 26 || $q_set_items->get('ca_objects.type_id') == 25 || $q_set_items->get('ca_objects.type_id') == 24 || $q_set_items->get('ca_objects.type_id') == 27) {
         $va_collection_id = $q_set_items->get('ca_collections.collection_id');
         $t_collection = new ca_collections($va_collection_id);
         $vn_parent_ids = $t_collection->getHierarchyAncestors($va_collection_id, array('idsOnly' => true));
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:set_detail_thumbnail_html.php

示例4: array

 print "<div class='searchFullTextTitle'>Stratigraphy</div>";
 $vs_era = $qr_res->get('ca_places.era', array("convertCodesToDisplayText" => true, "delimiter" => ", "));
 $vs_period = $qr_res->get('ca_places.period', array("convertCodesToDisplayText" => true, "delimiter" => ", "));
 $vs_period = str_replace(array("-, -", "-,", ", -", "-"), "", $vs_period);
 $vs_epoch = $qr_res->get('ca_places.epoch', array("convertCodesToDisplayText" => true, "delimiter" => ", "));
 $vs_epoch = str_replace(array("-, -", "-,", ", -", "-"), "", $vs_epoch);
 $vs_group = $qr_res->get('ca_places.group', array("convertCodesToDisplayText" => true, "delimiter" => ", "));
 $vs_formation = $qr_res->get('ca_places.formation', array("convertCodesToDisplayText" => true, "delimiter" => ", "));
 print "<div><b>" . _t('Era') . ": </b>" . caReturnDefaultIfBlank($vs_era) . "</div>";
 print "<div><b>" . _t('Period') . ": </b>" . caReturnDefaultIfBlank(str_replace(", -", "", $vs_period)) . "</div>";
 print "<div><b>" . _t('Epoch') . ": </b>" . caReturnDefaultIfBlank($vs_epoch) . "</div>";
 print "<div><b>" . _t('Group') . ": </b>" . caReturnDefaultIfBlank($vs_group) . "</div>";
 print "<div><b>" . _t('Formation') . ": </b>" . caReturnDefaultIfBlank($vs_formation) . "</div>";
 $vs_locality = "";
 if ($qr_res->get('ca_places.idno') && in_array($qr_res->get('ca_places.access'), $va_access_values)) {
     $vs_locality = caDetailLink($this->request, $qr_res->get('ca_places.idno', array('delimiter' => ', ', 'checkAccess' => $va_access_values)), '', 'ca_places', $qr_res->get('ca_places.place_id'), array("subsite" => "tracks"));
 }
 print "<div><b>" . _t('Locality') . ":</b> " . caReturnDefaultIfBlank($vs_locality) . "</div>";
 print "</div><!-- END searchFullText col2 -->\n";
 # --- place hierarchy
 $va_locality_list = $qr_res->get("ca_places", array('returnAsArray' => true, 'checkAccess' => $va_access_values));
 if (sizeof($va_locality_list)) {
     print "<div class='searchFullTextSmall'>";
     print "<div class='searchFullTextTitle'>Geographic Location</div>";
     foreach ($va_locality_list as $va_locality) {
         $va_hierarchy = caExtractValuesByUserLocale($t_place->getHierarchyAncestors($va_locality["place_id"], array("additionalTableToJoin" => "ca_place_labels", "additionalTableSelectFields" => array("name"))));
         $va_hierarchy = array_reverse($va_hierarchy);
         array_shift($va_hierarchy);
         foreach ($va_hierarchy as $va_hier_locality) {
             if (!in_array($va_hier_locality["type_id"], $va_place_type_ids_to_exclude)) {
                 print "<div><b>" . $t_lists->getItemFromListForDisplayByItemID("place_types", $va_hier_locality["type_id"]) . ": </b>" . $va_hier_locality["name"] . "</div>";
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:browse_results_list_html.php

示例5: array

            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>";
    print "<h2>" . caDetailLink($this->request, $t_exhibition->get("ca_occurrences.exhibition_subtitle"), '', 'ca_occurrences', $t_exhibition->get("ca_occurrences.occurrence_id"), null, null, array("type_id" => $t_exhibition->get("ca_occurrences.type_id"))) . "</h2>";
    $va_exhibition_dates = $t_exhibition->get("ca_occurrences.opening_closing", array("rawDate" => true));
    print date("r", $va_exhibition_dates["start"]);
    print "<h4>" . $t_exhibition->get("ca_occurrences.opening_closing") . ($t_exhibition->get("ca_occurrences.opening_reception") ? " | Opening Reception: " . $t_exhibition->get("ca_occurrences.opening_reception") : "") . "</h4>";
}
?>
	</div><!--end col-sm-12-->
</div><!-- end row -->
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:front_page_html.php

示例6: caGetDisplayImagesForAuthorityItems

        }
        $va_images = caGetDisplayImagesForAuthorityItems($vs_table, $va_ids, array('version' => 'small', 'relationshipTypes' => caGetOption('selectMediaUsingRelationshipTypes', $va_options, null), 'checkAccess' => $va_access_values));
        $vn_c = 0;
        $qr_res->seek($vn_start);
    }
    $vs_add_to_lightbox_msg = addslashes(_t('Add to lightbox'));
    while ($qr_res->nextHit() && $vn_c < $vn_hits_per_block) {
        $vn_id = $qr_res->get("{$vs_table}.{$vs_pk}");
        $vs_idno_detail_link = caDetailLink($this->request, $qr_res->get("{$vs_table}.idno"), '', $vs_table, $vn_id, array("subsite" => $this->request->session->getVar("coloradoSubSite")));
        $vs_label_detail_link = caDetailLink($this->request, $qr_res->get("{$vs_table}.preferred_labels.name"), '', $vs_table, $vn_id, array("subsite" => $this->request->session->getVar("coloradoSubSite")));
        $vs_thumbnail = "";
        if ($vs_table == 'ca_objects') {
            if (!($vs_thumbnail = $qr_res->getMediaTag('ca_object_representations.media', 'medium', array("checkAccess" => $va_access_values)))) {
                $vs_thumbnail = $vs_placeholder_tag;
            }
            $vs_rep_detail_link = caDetailLink($this->request, $vs_thumbnail, '', $vs_table, $vn_id, array("subsite" => $this->request->session->getVar("coloradoSubSite")));
        } else {
            if ($va_images[$vn_id]) {
                $vs_thumbnail = $va_images[$vn_id];
            } else {
                $vs_thumbnail = $vs_placeholder_tag;
            }
            $vs_rep_detail_link = caDetailLink($this->request, $vs_thumbnail, '', $vs_table, $vn_id, array("subsite" => $this->request->session->getVar("coloradoSubSite")));
        }
        $vs_add_to_set_url = caNavUrl($this->request, '', 'Sets', 'addItemForm', array($vs_pk => $vn_id));
        $vs_expanded_info = $qr_res->getWithTemplate($vs_extended_info_template);
        print "\n\t<div class='bResultItemCol col-xs-{$vn_col_span_xs} col-sm-{$vn_col_span_sm} col-md-{$vn_col_span}'>\n\t\t<div class='bResultItem' onmouseover='jQuery(\"#bResultItemExpandedInfo{$vn_id}\").show();'  onmouseout='jQuery(\"#bResultItemExpandedInfo{$vn_id}\").hide();'>\n\t\t\t<div class='bResultItemContent'><div class='text-center bResultItemImg'>{$vs_rep_detail_link}</div>\n\t\t\t\t<div class='bResultItemText'>\n\t\t\t\t\t<small>{$vs_idno_detail_link}</small><br/>{$vs_label_detail_link}\n\t\t\t\t</div><!-- end bResultItemText -->\n\t\t\t</div><!-- end bResultItemContent -->\n\t\t\t<div class='bResultItemExpandedInfo' id='bResultItemExpandedInfo{$vn_id}'>\n\t\t\t\t<hr>\n\t\t\t\t{$vs_expanded_info}\n\t\t\t\t" . ($this->request->config->get("disable_my_collections") ? "" : "<a href='#' onclick='caMediaPanel.showPanel(\"{$vs_add_to_set_url}\"); return false;' title='{$vs_add_to_lightbox_msg}'>" . $vs_lightbox_icon . "</i></a>") . "\n\t\t\t</div><!-- bResultItemExpandedInfo -->\n\t\t</div><!-- end bResultItem -->\n\t</div><!-- end col -->";
        $vn_c++;
    }
    print caNavLink($this->request, _t('Next %1', $vn_hits_per_block), 'jscroll-next', '*', '*', '*', array('s' => $vn_start + $vn_hits_per_block, 'key' => $vs_browse_key, 'view' => $vs_current_view));
}
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:browse_results_images_html.php

示例7: Information

if ($vs_value = $t_item->get("ca_occurrences.keywords", array("convertCodesToDisplayText" => true, "delimiter" => ", "))) {
    print "<div class='unit'><b>Keyword(s):</b> " . $vs_value . "</div><!-- end unit -->";
}
if ($vs_value = $t_item->get("ca_occurrences.other_info", array("convertCodesToDisplayText" => true, "delimiter" => ", "))) {
    print "<div class='unit'><b>Other Information(s):</b> " . $vs_value . "</div><!-- end unit -->";
}
# --- objects
$va_objects = $t_item->get("ca_objects", array("returnAsArray" => 1, 'checkAccess' => $va_access_values));
$va_sorted_objects = array();
if (sizeof($va_objects) > 0) {
    $t_obj = new ca_objects();
    $va_item_types = $t_obj->getTypeList();
    foreach ($va_objects as $va_object) {
        $t_obj->load($va_object['object_id']);
        $va_sorted_objects[$va_object['item_type_id']][$va_object['object_id']] = $va_object;
    }
    foreach ($va_sorted_objects as $vn_object_type_id => $va_object_list) {
        ?>
						<div class="unit"><h2><?php 
        print _t("Related") . " " . $va_item_types[$vn_object_type_id]['name_singular'] . (sizeof($va_object_list) > 1 ? "s" : "");
        ?>
</h2>
<?php 
        foreach ($va_object_list as $vn_rel_object_id => $va_info) {
            print "<div>" . caDetailLink($this->request, $va_info["idno"], '', 'ca_objects', $vn_rel_object_id, array("subsite" => $this->request->session->getVar("coloradoSubSite"))) . " (" . $va_info['relationship_typename'] . ")</div>";
        }
        print "</div><!-- end unit -->";
    }
}
?>
</div><!-- end detailBody -->
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:ca_occurrences_default_html.php

示例8: caDetailLink

					<li<?php 
print $ps_view == "works" ? " class='active'" : "";
?>
><?php 
print caDetailLink($this->request, _t("Selected Works"), '', 'ca_entities', $t_item->get("entity_id"), null, null, array("type_id" => $t_item->get("type_id")));
?>
</li>
					<li<?php 
print $ps_view == "exhibitions" ? " class='active'" : "";
?>
><?php 
print caDetailLink($this->request, _t("Exhibitions"), '', 'ca_entities', $t_item->get("entity_id"), array("view" => "exhibitions"), null, array("type_id" => $t_item->get("type_id")));
?>
</li>
					<li<?php 
print $ps_view == "bio" ? " class='active'" : "";
?>
><?php 
print caDetailLink($this->request, _t("Biography"), '', 'ca_entities', $t_item->get("entity_id"), array("view" => "bio"), null, array("type_id" => $t_item->get("type_id")));
?>
</li>
					<li><?php 
print caNavLink($this->request, _t("Request Information"), "", "", "Contact", "Form");
?>
</li>
				</ul>			
			</div><!-- end col -->
		</div><!-- end row -->				
	</div><!--end row contentbody-->
	
开发者ID:ffarago,项目名称:pawtucket2,代码行数:29,代码来源:ca_entities_default_html.php

示例9: foreach

<?php 
foreach ($va_lists as $vn_type_id => $qr_list) {
    if (!$qr_list) {
        continue;
    }
    $vs_year = null;
    while ($qr_list->nextHit()) {
        if ($vs_year != $qr_list->get("exhibition_year")) {
            if ($vs_year) {
                print "</div><!-- end yearTab -->";
            }
            $vs_year = $qr_list->get("exhibition_year");
            print "<div id='yearTab" . $vs_year . "' class='yearTab'>";
        }
        print "<div class='row'>";
        print "<div class='col-sm-4 exhibitionListing'>" . caDetailLink($this->request, $va_images[$qr_list->get("occurrence_id")], '', 'ca_occurrences', $qr_list->get("occurrence_id"), null, null, array("type_id" => $qr_list->get("type_id"))) . "</div>\n";
        print "<div class='col-sm-8 exhibitionListing'><h2><strong>" . $qr_list->getWithTemplate('<l>^ca_occurrences.preferred_labels.name</l>') . "</strong></h2>" . $qr_list->get("ca_occurrences.opening_closing") . "</div>";
        print "</div><!-- end row -->\n";
    }
    print "</div><!-- end last yearTab -->";
}
?>
		</div><!--end col-sm-9-->
		<div class="row">
			<div class="col-sm-3 btmsubnav">
<?php 
print $this->render("SubNav/exhibitions_html.inc");
?>
			
			</div><!-- end col -->
		</div><!-- end row -->		
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:ca_occurrences_listing_subview_html.php

示例10: caCreateLinksFromText

/**
 * Creates links to the appropriate editor (in Providence) or detail page (in Pawtucket) from supplied text and ids.
 * Used in SearchResult::get() and BundlableLabelableBaseModelWithAttributes::get() to automatically generate links when fetching
 * information from related tables.
 *
 * @param array $pa_text An array of strings to create links for
 * @param string $ps_table_name The name of the table/record to which the links refer
 * @param array $pa_row_ids Array of row_ids to link to. Values must correspond by index with those in $pa_text
 * @param string $ps_class Optional CSS class to apply to links
 * @param string $ps_target
 * @param array $pa_options Supported options are:
 *		requireLinkTags = if set then links are only added when explicitly defined with <l> tags. Default is to make the entire text a link in the absence of <l> tags.
 * 		addRelParameter =
 *
 * @return array A list of HTML links
 */
function caCreateLinksFromText($pa_text, $ps_table_name, $pa_row_ids, $ps_class = null, $ps_target = null, $pa_options = null)
{
    if (!in_array(__CA_APP_TYPE__, array('PROVIDENCE', 'PAWTUCKET'))) {
        return $pa_text;
    }
    if (__CA_APP_TYPE__ == 'PAWTUCKET') {
        $o_config = Configuration::load();
    }
    $pb_add_rel = caGetOption('addRelParameter', $pa_options, false);
    $vb_can_handle_target = false;
    if ($ps_target) {
        $o_app_plugin_manager = new ApplicationPluginManager();
        $vb_can_handle_target = $o_app_plugin_manager->hookCanHandleGetAsLinkTarget(array('target' => $ps_target));
    }
    // Parse template
    $o_doc = str_get_dom($ps_template);
    $va_links = array();
    global $g_request;
    if (!$g_request) {
        return $pa_text;
    }
    foreach ($pa_text as $vn_i => $vs_text) {
        $vs_text = preg_replace("!([A-Za-z0-9]+)='([^']*)'!", "\$1=\"\$2\"", $vs_text);
        $va_l_tags = array();
        $o_links = $o_doc('l');
        foreach ($o_links as $o_link) {
            if (!$o_link) {
                continue;
            }
            $vs_html = $o_link->html();
            $vs_content = preg_replace("!^<[^\\>]+>!", "", $vs_html);
            $vs_content = preg_replace("!<[^\\>]+>\$!", "", $vs_content);
            $va_l_tags[] = array('directive' => html_entity_decode($vs_html), 'content' => $vs_content);
            //html_entity_decode
        }
        if (sizeof($va_l_tags)) {
            $vs_content = html_entity_decode($vs_text);
            $vs_content = preg_replace_callback("/(&#[0-9]+;)/", function ($m) {
                return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES");
            }, $vs_content);
            foreach ($va_l_tags as $va_l) {
                if ($vb_can_handle_target) {
                    $va_params = array('request' => $g_request, 'content' => $va_l['content'], 'table' => $ps_table_name, 'id' => $pa_row_ids[$vn_i], 'classname' => $ps_class, 'target' => $ps_target, 'additionalParameters' => null, 'options' => null);
                    $va_params = $o_app_plugin_manager->hookGetAsLink($va_params);
                    $vs_link_text = $va_params['tag'];
                } else {
                    switch (__CA_APP_TYPE__) {
                        case 'PROVIDENCE':
                            $vs_link_text = caEditorLink($g_request, $va_l['content'], $ps_class, $ps_table_name, $pa_row_ids[$vn_i], $pb_add_rel ? array('rel' => true) : array());
                            break;
                        case 'PAWTUCKET':
                            $vs_link_text = caDetailLink($g_request, $va_l['content'], $ps_class, $ps_table_name, $pa_row_ids[$vn_i]);
                            break;
                    }
                }
                if ($vs_link_text) {
                    $vs_content = str_replace($va_l['directive'], $vs_link_text, $vs_content);
                } else {
                    $vs_content = str_replace($va_l['directive'], $va_l['content'], $vs_content);
                }
            }
            $va_links[] = $vs_content;
        } else {
            if (isset($pa_options['requireLinkTags']) && $pa_options['requireLinkTags']) {
                $va_links[] = $vs_text;
                continue;
            }
            if ($vb_can_handle_target) {
                $va_params = array('request' => $g_request, 'content' => $vs_text, 'table' => $ps_table_name, 'id' => $pa_row_ids[$vn_i], 'classname' => $ps_class, 'target' => $ps_target, 'additionalParameters' => null, 'options' => null);
                $va_params = $o_app_plugin_manager->hookGetAsLink($va_params);
                $va_links[] = $va_params['tag'];
            } else {
                switch (__CA_APP_TYPE__) {
                    case 'PROVIDENCE':
                        $va_links[] = ($vs_link = caEditorLink($g_request, $vs_text, $ps_class, $ps_table_name, $pa_row_ids[$vn_i])) ? $vs_link : $vs_text;
                        break;
                    case 'PAWTUCKET':
                        $va_links[] = ($vs_link = caDetailLink($g_request, $vs_text, $ps_class, $ps_table_name, $pa_row_ids[$vn_i])) ? $vs_link : $vs_text;
                        break;
                    default:
                        $va_links[] = $vs_text;
                        break;
                }
            }
//.........这里部分代码省略.........
开发者ID:samrahman,项目名称:providence,代码行数:101,代码来源:displayHelpers.php

示例11: array

        }
    }
}
$va_user_tags = $t_object->getTags(null, true);
$va_tags = array();
if (is_array($va_user_tags)) {
    foreach ($va_user_tags as $va_user_tag) {
        if (!in_array($va_user_tag["tag"], $va_tags)) {
            $va_tags[] = $va_user_tag["tag"];
        }
    }
}
?>
<div id="detailTools">
	<div class="detailTool"><?php 
print caDetailLink($this->request, "<span class='glyphicon glyphicon-plus'></span>" . _t("VIEW RECORD"), '', 'ca_objects', $this->getVar("object_id"));
?>
</div>
	<div class="detailTool"><a href='#' onclick='jQuery("#detailComments").slideToggle(); return false;'><span class="glyphicon glyphicon-comment"></span>Comments (<?php 
print sizeof($va_comments);
?>
)</a></div><!-- end detailTool -->
	<div id='detailComments'><?php 
#print caDetailItemComments($this->request, $t_object->getPrimaryKey(), $t_object, $va_comments, $va_tags);
?>
	
<?php 
if (is_array($va_comments) && sizeof($va_comments) > 0) {
    foreach ($va_comments as $va_comment) {
        print "<blockquote>";
        if ($va_comment["media1"]) {
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:set_item_info_html.php

示例12: in_array

					<li<?php 
    print in_array($ps_view, array("images", "thumbnails")) ? " class='active'" : "";
    ?>
><?php 
    print caDetailLink($this->request, _t("Works"), '', 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "images"), null, array("type_id" => $t_item->get("type_id")));
    ?>
</li>
<?php 
}
if (is_array($va_rep_install_ids) && sizeof($va_rep_install_ids)) {
    ?>
					<li<?php 
    print in_array($ps_view, array("installations", "installationThumbnails")) ? " class='active'" : "";
    ?>
><?php 
    print caDetailLink($this->request, _t("Installation views"), '', 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "installations"), null, array("type_id" => $t_item->get("type_id")));
    ?>
</li>
<?php 
}
if ($vs_pr_link = $t_item->get("press_release", array("version" => "original", "return" => "url"))) {
    print "<li><a href='" . $vs_pr_link . "'>Press Release</a></li>";
}
?>
			
				</ul>		
			</div><!-- end col -->
		</div><!-- end row -->				
	</div><!--end row contentbody-->
	
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:29,代码来源:ca_occurrences_art_fair_html.php

示例13: array

$va_locality_display = array();
$va_place_type_ids_to_exclude = array($t_lists->getItemIDFromList("place_types", "city"), $t_lists->getItemIDFromList("place_types", "basin"), $t_lists->getItemIDFromList("place_types", "other"), $t_lists->getItemIDFromList("place_types", "locality"));
if (sizeof($va_locality_list)) {
    $t_place = new ca_places();
    print "<br><div class='unit'><h2>UCM " . (sizeof($va_places) > 1 ? "Localities" : "Locality") . "</h2>";
    foreach ($va_locality_list as $va_locality) {
        $vs_locality_path = "";
        $va_hierarchy = caExtractValuesByUserLocale($t_place->getHierarchyAncestors($va_locality["place_id"], array("additionalTableToJoin" => "ca_place_labels", "additionalTableSelectFields" => array("name"))));
        $va_hierarchy = array_reverse($va_hierarchy);
        array_shift($va_hierarchy);
        foreach ($va_hierarchy as $va_hier_locality) {
            if (!in_array($va_hier_locality["type_id"], $va_place_type_ids_to_exclude)) {
                $vs_locality_path .= $va_hier_locality["name"] . " / ";
            }
        }
        $vs_locality_path = caDetailLink($this->request, $va_locality["idno"], '', 'ca_places', $va_locality["place_id"], array("subsite" => $this->request->session->getVar("coloradoSubSite"))) . "<br/>" . $vs_locality_path . $va_locality["idno"];
        $va_locality_display[] = $vs_locality_path;
    }
    print join("<br/>", $va_locality_display);
    print "</div><!-- end unit -->";
}
?>
		</div><!-- end leftCol-->
		<div id="rightCol">
<?php 
if ($this->getVar("representationViewer")) {
    print $this->getVar("representationViewer");
}
?>
		</div><!-- end rightCol -->
	</div><!-- end detailBody -->
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:ca_objects_default_html.php

示例14: caDetailLink

        # -------------------------------------------------------------------------------
}
if (in_array($ps_view, array("images", "thumbnails"))) {
    ?>
			<div id="imageNav">
<?php 
    print caDetailLink($this->request, _t("slideshow"), $ps_view == "images" ? "active" : "", 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "images"), null, array("type_id" => $t_item->get("type_id"))) . " | " . caDetailLink($this->request, _t("thumbnails"), $ps_view == "thumbnails" ? "active" : "", 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "thumbnails"), null, array("type_id" => $t_item->get("type_id")));
    ?>
			</div>
<?php 
}
if (in_array($ps_view, array("installations", "installationThumbnails"))) {
    ?>
			<div id="imageNav">
<?php 
    print caDetailLink($this->request, _t("slideshow"), $ps_view == "installations" ? "active" : "", 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "installations"), null, array("type_id" => $t_item->get("type_id"))) . " | " . caDetailLink($this->request, _t("thumbnails"), $ps_view == "installationThumbnails" ? "active" : "", 'ca_occurrences', $t_item->get("occurrence_id"), array("view" => "installationThumbnails"), null, array("type_id" => $t_item->get("type_id")));
    ?>
			</div>
<?php 
}
?>
				</div><!--end col-sm-12-->
			</div><!--end row-->
		</div><!--end col-sm-9-->
		<div class="row">
			<div class="col-sm-3 btmsubnav">
<?php 
print $this->render("SubNav/exhibitions_html.inc");
?>
			
			</div><!-- end col -->
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:ca_occurrences_exhibition_html.php

示例15: caCreateLinksFromText

/**
 * Creates links to the appropriate editor (in Providence) or detail page (in Pawtucket) from supplied text and ids.
 * Used in SearchResult::get() and BundlableLabelableBaseModelWithAttributes::get() to automatically generate links when fetching
 * information from related tables.
 *
 * @param array $pa_text An array of strings to create links for
 * @param string $ps_table_name The name of the table/record to which the links refer
 * @param array $pa_row_ids Array of row_ids to link to. Values must correspond by index with those in $pa_text
 * @param string $ps_class Optional CSS class to apply to links
 * @param string $ps_target
 * @param array $pa_options Supported options are:
 *		requireLinkTags = if set then links are only added when explicitly defined with <l> tags. Default is to make the entire text a link in the absence of <l> tags.
 * 		addRelParameter =
 *
 * @return array A list of HTML links
 */
function caCreateLinksFromText($pa_text, $ps_table_name, $pa_row_ids, $ps_class = null, $ps_target = null, $pa_options = null)
{
    if (!in_array(__CA_APP_TYPE__, array('PROVIDENCE', 'PAWTUCKET'))) {
        return $pa_text;
    }
    if (__CA_APP_TYPE__ == 'PAWTUCKET') {
        $o_config = Configuration::load();
    }
    $pb_add_rel = caGetOption('addRelParameter', $pa_options, false);
    $vb_can_handle_target = false;
    if ($ps_target) {
        $o_app_plugin_manager = new ApplicationPluginManager();
        $vb_can_handle_target = $o_app_plugin_manager->hookCanHandleGetAsLinkTarget(array('target' => $ps_target));
    }
    // Parse template
    $o_dom = new DOMDocument('1.0', 'utf-8');
    $o_dom->preserveWhiteSpace = true;
    libxml_use_internal_errors(true);
    // don't reported mangled HTML errors
    $va_links = array();
    global $g_request;
    if (!$g_request) {
        return $pa_text;
    }
    foreach ($pa_text as $vn_i => $vs_text) {
        $vs_text = preg_replace("!([A-Za-z0-9]+)='([^']*)'!", "\$1=\"\$2\"", $vs_text);
        // DomDcoument converts single quotes around attributes to double quotes so we do the same to the template
        $vs_text = preg_replace("![ ]+/>!", "/>", $vs_text);
        $vs_text = preg_replace("![\r\n]+!", "", $vs_text);
        // DomDocument removes newlines so we do the same here to the template
        $o_dom->loadHTML('<?xml encoding="utf-8">' . mb_convert_encoding($vs_text, 'HTML-ENTITIES', 'UTF-8'));
        // Needs XML declaration to force it to consider the text as UTF-8. Please don't ask why. No one knows.
        $o_dom->encoding = 'utf-8';
        libxml_clear_errors();
        $va_l_tags = array();
        $o_links = $o_dom->getElementsByTagName("l");
        // l=link
        foreach ($o_links as $o_link) {
            if (!$o_link) {
                continue;
            }
            $vs_html = $o_dom->saveXML($o_link);
            $vs_content = preg_replace("!^<[^\\>]+>!", "", $vs_html);
            $vs_content = preg_replace("!<[^\\>]+>\$!", "", $vs_content);
            $va_l_tags[] = array('directive' => html_entity_decode($vs_html), 'content' => $vs_content);
            //html_entity_decode
        }
        if (sizeof($va_l_tags)) {
            $vs_content = html_entity_decode($vs_text);
            $vs_content = preg_replace_callback("/(&#[0-9]+;)/", function ($m) {
                return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES");
            }, $vs_content);
            foreach ($va_l_tags as $va_l) {
                if ($vb_can_handle_target) {
                    $va_params = array('request' => $g_request, 'content' => $va_l['content'], 'table' => $ps_table_name, 'id' => $pa_row_ids[$vn_i], 'classname' => $ps_class, 'target' => $ps_target, 'additionalParameters' => null, 'options' => null);
                    $va_params = $o_app_plugin_manager->hookGetAsLink($va_params);
                    $vs_link_text = $va_params['tag'];
                } else {
                    switch (__CA_APP_TYPE__) {
                        case 'PROVIDENCE':
                            $vs_link_text = caEditorLink($g_request, $va_l['content'], $ps_class, $ps_table_name, $pa_row_ids[$vn_i], $pb_add_rel ? array('rel' => true) : array());
                            break;
                        case 'PAWTUCKET':
                            $vs_link_text = caDetailLink($g_request, $va_l['content'], $ps_class, $ps_table_name, $pa_row_ids[$vn_i]);
                            break;
                    }
                }
                if ($vs_link_text) {
                    $vs_content = str_replace($va_l['directive'], $vs_link_text, $vs_content);
                } else {
                    $vs_content = str_replace($va_l['directive'], $va_l['content'], $vs_content);
                }
            }
            $va_links[] = $vs_content;
        } else {
            if (isset($pa_options['requireLinkTags']) && $pa_options['requireLinkTags']) {
                $va_links[] = $vs_text;
                continue;
            }
            if ($vb_can_handle_target) {
                $va_params = array('request' => $g_request, 'content' => $vs_text, 'table' => $ps_table_name, 'id' => $pa_row_ids[$vn_i], 'classname' => $ps_class, 'target' => $ps_target, 'additionalParameters' => null, 'options' => null);
                $va_params = $o_app_plugin_manager->hookGetAsLink($va_params);
                $va_links[] = $va_params['tag'];
            } else {
//.........这里部分代码省略.........
开发者ID:kai-iak,项目名称:providence,代码行数:101,代码来源:displayHelpers.php


注:本文中的caDetailLink函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。