= $ClassName ?>
(= number_format($ResourceCount) ?>)
Edit
id());
$Summary->Editable($EditOkay);
$Summary->showScreenshot($ShowScreenshot);
$Summary->Display();
}
# ----- LOCAL FUNCTIONS ------------------------------------------------------
/**
* Pluralize the given word with the given suffix if the count is not +/- 1.
* @param $Word word
* @param $PluralSuffix suffix added to $Word to make it plural
* @param $Count number of items counted
* @return the pluralized word if it should be pluralized
*/
function Pluralize($Word, $PluralSuffix, $Count)
{
# singular, just use the word
if ($Count == 1 || $Count == -1) {
return $Word;
}
# pluralize
$Plural = $Word . $PluralSuffix;
return $Plural;
}
/**
* Highlight the current browsing letter
* @param $AlphabeticClassificationString the original string to display letter
* classfications
* @return the highlighted string
*/
function HighlightCurrentBrowsingLetter($AlphabeticClassificationString)
{
# determine current browsing StartingLetter and EndingLetter
if (isset($_GET["StartingLetter"])) {
$StartingLetter = substr($_GET["StartingLetter"], 0, 2);
} else {
$StartingLetter = null;
}
if (isset($_GET["EndingLetter"])) {
$EndingLetter = substr($_GET["EndingLetter"], 0, 2);
} else {
$EndingLetter = null;
}
if ($StartingLetter == null || $EndingLetter == null) {
return $AlphabeticClassificationString;
}
$StartingLetter = preg_quote($StartingLetter, "/");
$EndingLetter = preg_quote($EndingLetter, "/");
$HighlightString = "" .
$StartingLetter . "-" . $EndingLetter . "";
$MatchingString = "/" . $StartingLetter . "-" . $EndingLetter . "/";
# match and replace current browsing classification with the highlighted one
$Result = preg_replace($MatchingString, $HighlightString, $AlphabeticClassificationString);
return $Result;
}
# ----- MAIN -----------------------------------------------------------------
$AF = ApplicationFramework::getInstance();
$Header = EditingEnabled() ? "Add/Edit Classifications" : "Browse Resources";
$Schema = new MetadataSchema();
?>
= $Header; ?>
0) { ?>
(= GetClassificationCount(); ?>
= Pluralize("classification", "s", GetClassificationCount()); ?>)
0) { ?>
(= GetResourceCount(); ?>
= Pluralize("resource", "s", GetResourceCount()); ?>)
= HighlightCurrentBrowsingLetter(PrintAlphabeticClassificationLinks()); ?>
Add Classification Here
(browse hierarchy to add or edit classifications at other levels)
There are currently no classifications to browse by in this field.
0) { ?>
0) && (GetResourceCount())) { ?>
HasPriv(PRIV_RESOURCEADMIN, PRIV_COLLECTIONADMIN)) { ?>
NOTE: Only publicly visible records are shown in Browse Resources.
|