'.$H_Error.""; return; } # verify that required incoming variables are set if (!isset($H_ItemIds)) { throw new Exception("Variable \$H_ItemIds not set."); } if (!isset($H_SearchParams)) { throw new Exception("Variable \$H_SearchParams not set."); } if (!isset($H_BaseLink)) { throw new Exception("Variable \$H_BaseLink not set."); } # initialize convenience values $AF = ApplicationFramework::getInstance(); $User = User::getCurrentUser(); # make sure CSS styles specific to our page are loaded $AF->requireUIFile("P_PhotoGallery.css"); # determine which version of images to use to match SCSS size $ImageSizeName = Image::getNextLargestSize($ImageSizeInPx, $ImageSizeInPx); # get HTML for transport controls (if any) $TransportControlsHtml = isset($H_TransportUI) ? $H_TransportUI->getHtml() : ""; # create edit button with settings that are the same for all items $EditButton = new HtmlButton("Edit"); $EditButton->setIcon("Pencil.svg"); $EditButton->setSize(HtmlButton::SIZE_SMALL); # set up facet interface $PseudoSearchScores = array_fill_keys($H_ItemIds, 1); $FacetUI = new SearchFacetUI($H_SearchParams, $PseudoSearchScores); $FacetUI->setBaseLink($H_BaseLink); $FacetUI->setAllFacetsOpenByDefault(); # ----- DISPLAY -------------------------------------------------------------- $AF->setPageTitle("Display Photo Gallery"); ?>

# Photo Library

getMapped("Title")); $Screenshots = $Item->getMapped("Screenshot", true); # skip item with no photo available if (($Screenshots === null) || (count($Screenshots) == 0)) { continue; } # use first photo in field $Screenshot = array_pop($Screenshots); # build item-related links and HTML $EditButton->setLink($Item->getEditPageUrl()); $EditButtonHtml = $Item->userCanEdit($User) ? $EditButton->getHtml() : ""; $FullRecordLink = htmlspecialchars($Item->getViewPageUrl()); $ImageSrc = $Screenshot->url($ImageSizeName); # ----- DISPLAY (WITHIN LOOP) ------------------------------------ ?>

###

getHtml() ?>