Assigned to = number_format($UsageCount); ?> resources
(= $UsagePercentage; ?>% coverage)
FieldId());
$InUseCount = $CN->getAssociatedResourceCount();
$SearchParams = new SearchParameterSet();
$SearchParams->addParameter("=".$CN->name(), $Field);
$Link = "index.php?P=SearchResults&".$SearchParams->urlParameterString();
# display number of resources that use this controlled name
if ($InUseCount == 1) {
$InUseMessage = "(".$InUseCount." resource)";
} elseif ($InUseCount > 0) {
$InUseMessage = "(".$InUseCount." resources)";
} else {
$InUseMessage = "(Not Used)";
}
// @codingStandardsIgnoreStart
?>
= $InUseMessage; ?>
0){ ?>
Remap to:
Id(), "", "", FALSE, "D_Remap_".$Index); ?>
UsesQualifiers()) {
if ($Field->HasItemLevelQualifiers()) {
# first value is "--"
$Items = $Field->AssociatedQualifierList();
$Items["--"] = "--";
ksort($Items);
$OptList = new HtmlOptionList("F_QualifierName_".$Index, $Items, $QualifierId);
$OptList->PrintIfEmpty(false);
$OptList->PrintHtml();
} else {
$Qualifier = new Qualifier($Field->DefaultQualifier());
print $Qualifier->Name();
}
}
}
/**
* Display pagination controls for ControlledName search.
* @param int $NumResults Number of results per page.
* @param MetadataField $Field Field searched.
* @param string $ControlledName Name searched for.
* @param int $StartRecord Numerical index of the first record on this
* page.
* @param int $PerPage Number of records per page.
*/
function displayPagination($NumResults, $Field, $ControlledName, $StartRecord, $PerPage)
{
// @codingStandardsIgnoreStart
if ($NumResults > $PerPage) { ?>
Id()] = $Schema->Name() . " Schema";
}
$OptList = new HtmlOptionList("SC", $Options, $SchemaInUse->Id());
$OptList->SubmitOnChange(true);
$OptList->PrintHtml();
}
# ----- COMPLETE FUNCTIONS ---------------------------------------------------
# functions for when changes are submitted
/**
* Display list of modified controlled names.
* @param array $CNArray Array giving modified controlled names, keyed
* by ControlledName with Variants for values.
*/
function displayControlledNameList($CNArray)
{
if (count($CNArray) > 0) {
foreach ($CNArray as $CNName => $CNVariant) {
print $CNName;
if (!empty($CNVariant)) {
print ", Variant ($CNVariant)";
}
print " ";
}
} else {
print "(none)";
}
}
/**
* Display list of modified resources.
* @param array $LinkArray Array of links to modified resources.
*/
function displayModifiedResourceList($LinkArray)
{
if (count($LinkArray) > 0) {
foreach ($LinkArray as $LinkString) {
print $LinkString;
}
} else {
print "(none)";
}
}
# ----- MAIN -----------------------------------------------------------------
$SafeSchemaId = defaulthtmlentities($H_Schema->Id());
// @codingStandardsIgnoreStart
?>
0) { ?>