/** * Build the content for this action * * @return boolean * @access public * @since 4/26/05 */ function buildContent() { $actionRows = $this->getActionRows(); $harmoni = Harmoni::instance(); ob_start(); CollectionsPrinter::printFunctionLinks(); $layout = new Block(ob_get_contents(), STANDARD_BLOCK); ob_end_clean(); $actionRows->add($layout, null, null, CENTER, CENTER); $type = HarmoniType::fromString(urldecode(RequestContext::value('type'))); $repositoryManager = Services::getService("Repository"); // Get the Repositories $allRepositories = $repositoryManager->getRepositoriesByType($type); // put the repositories into an array and order them. // @todo, do authorization checking $repositoryArray = array(); while ($allRepositories->hasNext()) { $repository = $allRepositories->next(); $repositoryArray[$repository->getDisplayName()] = $repository; } ksort($repositoryArray); // print the Results $resultPrinter = new ArrayResultPrinter($repositoryArray, 2, 20, "printrepositoryShort", $harmoni); $resultPrinter->addLinksStyleProperty(new MarginTopSP("10px")); $resultLayout = $resultPrinter->getLayout(); $actionRows->add($resultLayout, null, null, CENTER, CENTER); }
/** * Build the content for this action * * @return boolean * @access public * @since 4/26/05 */ function buildContent() { $actionRows = $this->getActionRows(); $harmoni = Harmoni::instance(); ob_start(); CollectionsPrinter::printFunctionLinks(); print "<p>"; print _("Below are listed the available <em>Collections</em>, organized by type, then name."); print "</p>\n<p>"; print _("Some <em>Collections</em>, <em>Exhibitions</em>, <em>Assets</em>, and <em>Slide-Shows</em> may be restricted to certain users or groups of users. Log in above to ensure your greatest access to all parts of the system."); print "</p>"; $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, CENTER, CENTER); ob_end_clean(); $exhibitionRepositoryType = new Type('System Repositories', 'edu.middlebury.concerto', 'Exhibitions'); $repositoryManager = Services::getService("Repository"); // Get all the types $types = $repositoryManager->getRepositoryTypes(); // put the drs into an array and order them. $typeArray = array(); while ($types->hasNext()) { $type = $types->next(); // include all but Exhibitions repository. if (!$exhibitionRepositoryType->isEqual($type)) { $typeArray[HarmoniType::typeToString($type)] = $type; } } ksort($typeArray); // print the Results $resultPrinter = new ArrayResultPrinter($typeArray, 2, 20, "printTypeShort"); $resultPrinter->addLinksStyleProperty(new MarginTopSP("10px")); $resultLayout = $resultPrinter->getLayout(); $actionRows->add($resultLayout, null, null, CENTER, CENTER); }
/** * Build the content for this action * * @return boolean * @access public * @since 4/26/05 */ function buildContent() { $actionRows = $this->getActionRows(); $harmoni = Harmoni::instance(); // Get the Repository $repositoryManager = Services::getService("Repository"); $idManager = Services::getService("Id"); ob_start(); CollectionsPrinter::printFunctionLinks(); print "<p>"; print _("Some <em>Collections</em>, <em>Exhibitions</em>, <em>Assets</em>, and <em>Slide-Shows</em> may be restricted to certain users or groups of users. Log in above to ensure your greatest access to all parts of the system."); print "</p>"; $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, CENTER, CENTER); ob_end_clean(); // Print out the search types ob_start(); // Get all the drs and all of their search types $searchModules = Services::getService("RepositorySearchModules"); $searchArray = array(); $repositories = $repositoryManager->getRepositories(); while ($repositories->hasNext()) { $repository = $repositories->next(); $searchTypes = $repository->getSearchTypes(); while ($searchTypes->hasNext()) { $searchType = $searchTypes->next(); $typeString = HarmoniType::typeToString($searchType); if (!isset($searchArray[$typeString])) { $searchArray[$typeString] = $searchType; } } } // print out the types foreach (array_keys($searchArray) as $typeString) { $searchType = $searchArray[$typeString]; print "\n<h3>" . $typeString . "</h3>"; $harmoni = Harmoni::instance(); print "\n" . $searchModules->createSearchForm($repository, $searchType, $harmoni->request->quickURL("collections", "searchresults", array("search_type" => urlencode($typeString)))); } $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, LEFT, CENTER); ob_end_clean(); }
/** * Build the content for this action * * @return boolean * @access public * @since 4/26/05 */ function buildContent() { $actionRows = $this->getActionRows(); $harmoni = Harmoni::instance(); ob_start(); CollectionsPrinter::printFunctionLinks(); print "<p>"; print _("Below are listed the available <em>Collections</em>, organized by name."); print "</p>\n<p>"; print _("Some <em>Collections</em>, <em>Exhibitions</em>, <em>Assets</em>, and <em>Slide-Shows</em> may be restricted to certain users or groups of users. Log in above to ensure your greatest access to all parts of the system."); print "</p>"; $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, CENTER, CENTER); ob_end_clean(); // Get the Repositoriess $repositoryManager = Services::getService("Repository"); $allRepositories = $repositoryManager->getRepositories(); $exhibitionRepositoryType = new Type('System Repositories', 'edu.middlebury.concerto', 'Exhibitions'); // put the drs into an array and order them. // @todo, do authorization checking $repositoryArray = array(); $repositoryTitles = array(); while ($allRepositories->hasNext()) { $repository = $allRepositories->next(); // include all but Exhibitions repository. if (!$exhibitionRepositoryType->isEqual($repository->getType())) { $id = $repository->getId(); $repositoryTitles[$id->getIdString()] = $repository->getDisplayName(); $repositoryArray[$id->getIdString()] = $repository; } } array_multisort($repositoryTitles, SORT_ASC, SORT_STRING, $repositoryArray); // print the Results $resultPrinter = new ArrayResultPrinter($repositoryArray, 1, 20, "printRepositoryShort", $harmoni); $resultPrinter->addLinksStyleProperty(new MarginTopSP("10px")); $resultLayout = $resultPrinter->getLayout('canView'); $actionRows->add($resultLayout, "100%", null, LEFT, CENTER); }