id()); $Summary->includeResourceType(true); $Summary->additionalContext([ "FolderId" => $Folder->id() ]); $CssClasses = "mv-folders-resource"; if ($Folder->isShared() && !$Item->userCanView(User::getAnonymousUser())) { $CssClasses .= " mv-notpublic"; } ?>
display(); ?>
getCoverImageId() === false) { return; } $Image = new Image($Folder->getCoverImageId()); print '
' .$Image->getHtml("mv-image-thumbnail") .'
'; } /** * Signal HTML Insertion Point for Folder Buttons. * @param Folder $Folder Current folder. * @return void */ function signalButtonInsertionPoint(Folder $Folder) : void { $AF = ApplicationFramework::getInstance(); $AF->signalEvent( "EVENT_HTML_INSERTION_POINT", [ "PageName" => $AF->getPageName(), "Location" => "Folder Buttons", "Context" => [ "FolderId" => $Folder->id() ] ] ); } # ----- SETUP ----------------------------------------------------------------- if (isset($H_ErrorMessage)) { print '
' .$H_ErrorMessage .'
'; return; } if (!isset($H_SortFieldId)) { throw new Exception("H_SortFieldId is not defined."); } if (!isset($H_Folder)) { throw new Exception("H_Folder is not defined."); } if (!isset($H_FolderSchemas)) { throw new Exception("H_FolderSchemas is not defined."); } if (!isset($H_Items)) { throw new Exception("H_Items is not defined."); } if (!isset($H_Length)) { throw new Exception("H_Length is not defined."); } if (!isset($H_TransportUI)) { throw new Exception("H_TransportUI is not defined."); } $AF = ApplicationFramework::getInstance(); $User = User::getCurrentUser(); $AF->requireUIFile("jquery-ui.css", ApplicationFramework::ORDER_FIRST); $AF->requireUIFile("jquery-ui.js"); $IsOwner = $User->isLoggedIn() && ($H_Folder->ownerId() == $User->id()); $SafeName = defaulthtmlentities($H_Folder->name()); $SafeTruncatedName = defaulthtmlentities( StdLib::neatlyTruncateString($H_Folder->name(), 18) ); $SafeNote = defaulthtmlentities($H_Folder->note()); $SafeShareUrl = defaulthtmlentities(Common::getShareUrl($H_Folder)); $LengthValues = [10 => 10, 25 => 25, 50 => 50, 100 => 100]; $HasItems = (count($H_Items) > 0) ? true : false; $ShowTransportControls = $HasItems && $H_TransportUI->itemCount() > $H_TransportUI->itemsPerPage(); $SortItemList[-1] = "(manual)"; $FieldTypesForSorting = [ MetadataSchema::MDFTYPE_TEXT, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_DATE, MetadataSchema::MDFTYPE_TIMESTAMP, MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_USER ]; # schemas to retrieve field (for sorting) from foreach ($H_FolderSchemas as $SchemaId => $Val) { $Schema = new MetadataSchema($SchemaId); $SchemaName = $Schema->name(); # retrieve field names for all field type foreach ($FieldTypesForSorting as $Type) { $Fields = $Schema->getFields($Type); foreach ($Fields as $FieldId => $Field) { $SortItemList[$SchemaName][$FieldId] = $Field->name(); } } } $EditButton = new HtmlButton("Settings"); $EditButton->setIcon("cog.png"); $EditButton->setSize(HtmlButton::SIZE_SMALL); $EditButton->setLink( "index.php?P=P_Folders_EditFolderSettings&ID=".$H_Folder->id() ); $ManageButton = new HtmlButton("Folders"); $ManageButton->setIcon("OpenFolder.svg"); $ManageButton->setSize(HtmlButton::SIZE_SMALL); $ManageButton->setLink( "index.php?P=P_Folders_ManageFolders" ); $SortOptionList = new HtmlOptionList( TransportControlsUI::PNAME_SORTFIELD, $SortItemList, $H_SortFieldId ); $SortOptionList->submitOnChange(true); $SortOptionList->disabledOptions("Placeholder"); $SortDirOptionList = new HtmlOptionList( TransportControlsUI::PNAME_REVERSESORT, [0 => "Asc", 1 => "Dsc"], $H_TransportUI->reverseSortFlag() ); $SortDirOptionList->classForList("btn btn-primary"); $LengthOptionList = new HtmlOptionList("L", $LengthValues, $H_Length); $LengthOptionList->submitOnChange(true); $ClearButton = new HtmlButton("Clear"); $ClearButton->setIcon("Broom.svg"); $ClearButton->setSize(HtmlButton::SIZE_SMALL); $ClearButton->setTitle("Remove all resources from this folder"); $ClearButton->addSemanticClass("btn-danger"); $ClearButton->addClass("mv-folders-removeresource mv-folders-clear-confirmlink"); $ClearButton->setId("mv-folders-folderlink" . $H_Folder->id()); $ClearButton->addAttributes(["data-parentfolderid" => $H_Folder->id(), "data-folderid" => $H_Folder->id() ]); $ClearButton->setLink("index.php?P=P_Folders_RemoveAllItems&FolderId=" . $H_Folder->id()); # ----- DISPLAY --------------------------------------------------------------- ?>
Sort: getHtml() ?>getHtml() ?> Per Page: getHtml() ?> getHtml() ?> getHtml(); ?> getHtml() ?>

#

isShared()) { ?>

display(); ?>

There are no items in this folder.

display(); ?>
Clear contents of folder ?