Project

General

Profile

« Previous | Next » 

Revision 7ea461ec

Added by Alex Theys almost 12 years ago

AT: Committing Uses dataportal interface changes

View differences:

5.x/modules/cdm_dataportal/cdm_dataportal.module
582 582
    //$block[3]["info"] = t("CDM Filters");
583 583
    $block[4]["info"] = t("CDM Dataportal Print");
584 584
    $block["keys"]["info"] = t("CDM identification keys");
585
<<<<<<< .working
586 585
    $block["uses"]["info"] = t("CDM Uses");
587
=======
588 586
    $block["fundedByEDIT"]["info"] = t('Funded by EDIT');
589
>>>>>>> .merge-right.r14872
587

  
590 588
    return $block;
591 589
  }
592 590
  else if ($op == 'view') {
......
610 608
        $block['subject'] = t('Identification Keys');
611 609
        $block['content'] = theme('cdm_block_IdentificationKeys');
612 610
        return $block;
613
<<<<<<< .working
614 611
      //Creating a block specific for the Use Interface.
615 612
      case "uses":
616 613
      	$block['subject'] = t('Uses');
617 614
        $block['content'] = theme('cdm_block_uses');
618 615
        return $block;
619
=======
620 616
      case "fundedByEDIT":
621 617
        $text = '<none>'; //t('Funded by EDIT');
622 618
        $block['subject'] = $text;
623 619
        $img_tag = '<img src="' . drupal_get_path('module', 'cdm_dataportal').'/images/funded_by_EDIT.png' . '" alt="'.$text.'"/>';
624 620
        $block['content'] = l($img_tag, "http://www.e-taxonomy.eu/", array("target"=>"EDIT"), NULL, NULL, TRUE, TRUE);
625 621
        return $block;
626
>>>>>>> .merge-right.r14872
627 622
    }
628 623
  }
629 624
}
5.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
1227 1227

  
1228 1228

  
1229 1229
//this theming function formats the use description and use record list for these descriptions 
1230
function theme_cdm_UseDescription($descriptions = null, $pageSize, $pageNumber) {
1230
function theme_cdm_UseDescription($descriptions = null, $taxonUuid = null, $pageSize, $pageNumber) {
1231 1231
	$out = '<div id="content"><ul id="Description" class ="description">';
1232 1232
	if ($descriptions == null) {
1233 1233
		return;
......
1235 1235
	$descriptionSynonyms;
1236 1236
	$descriptionOut = "";
1237 1237
	$synonymOut = "";
1238
	$currentTaxon = cdm_ws_get(CDM_WS_PORTAL_TAXON, $taxonUuid);
1238 1239
	foreach($descriptions as $description) {
1239 1240
		$useSummary = "";
1240
		$synonyms = cdm_ws_get(CDM_WS_PORTAL_TAXON_SYNONYMY,$description->taxon->uuid);
1241 1241
		$serializedSynonyms = serialize($synonyms);
1242 1242
		foreach ($description->elements as $element) {
1243 1243
			
......
1247 1247
		}
1248 1248
		foreach ($description->sources as $source) {
1249 1249
			$isSynonym = false;
1250
			$originalTaxonUsedInSource = null;
1250 1251
			if($source->originalNameString) {
1251
				$originalTaxonUsedInSource = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, $source->originalNameString . ".");
1252 1252
				
1253
				if (strpos($serializedSynonyms, $originalTaxonUsedInSource->uuid)) {
1253
				$originalTaxonUsedInSource = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, $source->originalNameString . ".");
1254
				if($currentTaxon->name->uuid != $originalTaxonUsedInSource->uuid){
1254 1255
					$isSynonym = true;
1255 1256
				}
1256 1257
				
......
1301 1302
						}
1302 1303
					}
1303 1304
					$synonymOut .= '</ul></li>';
1305
					$isSynonym = false;
1304 1306
					
1305 1307
				}
1306 1308

  
......
1328 1330
		//$out .= print_r($useDescriptions);
1329 1331
  		//$out .= print_r($useDescriptions);
1330 1332
		$out .= '<div id="block-cdm_dataportal-feature-description" class="clear-block block block-cdm_dataportal-feature"><H2><a name="userecords"> </a> Uses </H2>';
1331
  		$formatUseDescriptions = theme('cdm_UseDescription', $useDescriptions, $pageSize, $pageNumber);
1333
  		$formatUseDescriptions = theme('cdm_UseDescription', $useDescriptions, $taxonUuid, $pageSize, $pageNumber);
1332 1334
		$out .= $formatUseDescriptions;
1333 1335
		$out .="</div>";
1334 1336
  	}

Also available in: Unified diff