Example #1
0
$crossTypeWidget->renderScript();
// Store any filter and exclusive/inclusive parameters passed in via URL
$urlParams = CrossTypeSearchWidget::parseSegments();
$queryBoolValue = 'and';
$exclusiveChecked = true;
if (isset($urlParams['filterParams'])) {
    $filterButtonValue = "Hide Filters";
} else {
    $filterButtonValue = "Show Filters";
}
if (isset($urlParams['exclusive'])) {
    $queryBoolValue = $urlParams['exclusive']['bool'];
    $exclusiveChecked = $urlParams['exclusive']['checked'];
}
// Prepare BreadcrumbWigdet
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add("Browse Across Types");
?>

<script type="text/javascript" src="<?php 
echo $module->moduleStatic;
?>
/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	$('#showFilters').click(function() {
		if ($(this).val() == "Show Filters") {
			$('#filter_widget').fadeIn('slow');
			$(this).val('Hide Filters');
Example #2
0
if ($productVisibilityLevel == CasBrowser::VIS_NONE) {
    App::Get()->redirect(SITE_ROOT . '/errors/403');
}
// Create and load a MetadataDisplay widget wit the visible metadata
$metadataWidget = new MetadataDisplayWidget(array());
$metadataWidget->loadMetadata($browser->getVisibleMetadataForProduct($productId));
// Record the product page to send the user back to, if provided
$returnPage = isset(App::Get()->request->segments[1]) ? App::Get()->request->segments[1] : 1;
// Create a ProductDownloadWidget
$productDownloadWidget = new ProductDownloadWidget(array("dataDeliveryUrl" => App::Get()->settings['browser_datadeliv_url']));
$productDownloadWidget->setClient($client);
$productDownloadWidget->load($product);
// Add the cas-browser styles
App::Get()->response->addStylesheet($module->moduleStatic . '/css/cas-browser.css');
// Prepare BreadcrumbWigdet
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add('Browse By Type', $module->moduleRoot . '/');
$bcw->add($productTypeName, $module->moduleRoot . "/dataset/{$productTypeId}");
$bcw->add('Products', $module->moduleRoot . "/products/{$productTypeId}/page/{$returnPage}");
$bcw->add(App::Get()->request->segments[0]);
?>


<hr class="space"/>
<div class="span-22 last prepend-1 append-1">
	<div id="cas_browser_product_metadata">
		<h2 class="larger loud">Product Metadata: <?php 
echo wordwrap($productName, 62, "<br />", true);
?>
</h2>
Example #3
0
File: 403.php Project: fornava/oodt
<?php

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Prepare BreadcrumbsWigdet
require_once HOME . '/scripts/widgets/BreadcrumbsWidget.php';
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add('Access Forbidden');
?>

<div id="page_content">
	<h2> 403 Access Forbidden </h2>
	<h5> You are not authorized to view the requested resource. If you feel this is in error, please
             contact the webmaster for this site </h5>
</div>
Example #4
0
    array_push($filterParams, array($segments[$index], $segments[$index + 1]));
}
if (count($filterParams) > 0) {
    $filterButtonValue = "Hide Filters";
} else {
    $filterButtonValue = "Show Filters";
}
// Initialize the FilterWidget
$querySiteRoot = isset(App::Get()->settings['query_service_url']) ? App::Get()->settings['query_service_url'] : 'http://' . $_SERVER['HTTP_HOST'] . $module->moduleRoot;
$resultFormat = "json";
$filterWidget = new FilterWidget(array('productType' => $productType, 'htmlID' => 'cas_browser_product_list', 'loadingID' => 'loading_icon_container', 'siteUrl' => $querySiteRoot, 'pagedResults' => true, 'resultFormat' => $resultFormat));
$filterWidget->renderScript();
// Determine whether to show the download widget
$showDownloadWidget = isset(App::Get()->settings['browser_show_download_widget']) && App::Get()->settings['browser_show_download_widget'] == 0 ? false : true;
// Prepare BreadcrumbWigdet
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add("Browse By Type", $module->moduleRoot . '/');
$bcw->add($ptName, $module->moduleRoot . "/dataset/{$ptID}");
$bcw->add("Products");
?>

<script type="text/javascript">
$(document).ready(function() {

	$('#showFilters').click(function() {
		if ($(this).val() == "Show Filters") {
			$('#filter_widget').fadeIn('slow');
			$(this).val('Hide Filters');
		} else {
			$('#filter_widget').fadeOut('slow');
Example #5
0
    $productTypes = array();
    foreach ($response as $pt) {
        $ptArray = $pt->toAssocArray();
        $ptVisibility = $browser->getProductTypeVisibilityLevel($pt->getId());
        if ($ptVisibility == CasBrowser::VIS_NONE) {
            continue;
        }
        $merged = array("name" => array($ptArray[App::Get()->settings['browser_pt_name_key']], $client->getNumProducts($pt)), "description" => array($ptArray[App::Get()->settings['browser_pt_desc_key']]), "id" => array($ptArray[App::Get()->settings['browser_pt_id_key']]));
        $merged += $ptArray['typeMetadata'];
        $productTypes[$ptArray[App::Get()->settings['browser_pt_id_key']]] = $merged;
    }
    $productTypeListWidget = new ProductTypeListWidget(array("productTypes" => $productTypes));
    $productTypeListWidget->setUrlBase($module->moduleRoot);
}
// Prepare BreadcrumbWigdet
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add("Browse By Type");
?>

<script type="text/javascript" src="<?php 
echo $module->moduleStatic;
?>
/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	// Turn the table into a sortable, searchable table
	$("#productTypeSearch").dataTable();
	// Give the search box the initial focus
	$("#productTypeSearch_filter > input").focus();
}); 
Example #6
0
// Determine the visibility level based on the current user
$ptVisibilityLevel = $browser->getProductTypeVisibilityLevel($ptID);
// Redirect the user if they are not authorized
if ($ptVisibilityLevel == CasBrowser::VIS_NONE) {
    App::Get()->redirect(SITE_ROOT . '/errors/403');
}
// Load a MetadataDisplayWidget with the visible metadata for this product type
$typeMetadataWidget = new MetadataDisplayWidget(array());
$typeMetadataWidget->loadMetadata($browser->getVisibleMetadataForProductType($ptID));
// Create a MetadataDisplayWidget to display system metadata (all except typeMetadata)
$typeMetadata = $productType->toAssocArray();
unset($typeMetadata['typeMetadata']);
$systemMetadataWidget = new MetadataDisplayWidget(array());
$systemMetadataWidget->loadMetadata($typeMetadata);
// Prepare BreadcrumbWigdet
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add("Browse By Type", $module->moduleRoot . '/');
$bcw->add($ptName);
?>


<div class="container">
	<hr class="space" />

	<div id="cas_browser_container">
		<h2><?php 
echo $sortedMetadata['DataSetName'][0];
?>
 <?php 
echo $ptName;
Example #7
0
File: 404.php Project: fornava/oodt
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Prepare BreadcrumbsWigdet
require_once HOME . '/scripts/widgets/BreadcrumbsWidget.php';
$bcw = new BreadcrumbsWidget();
$bcw->add('Home', SITE_ROOT . '/');
$bcw->add('Not Found');
?>

<div id="page_content">
        <h2> 404 Not Found </h2>
        <h5> The requested resource (<?php 
echo App::Get()->request->uri;
?>
) does not exist.</h5>
</div>