RequireUIFile( ["jquery-ui.js", "jquery-ui.css"], ApplicationFramework::ORDER_FIRST); # set up fields to display $Fields = [ "FromAddr" => [ "Heading" => "From", ], "ToAddr" => [ "Heading" => "To", ], "Subject" => [ "Heading" => "Subject", ], "NumResources" => [ "Heading" => "Num. Resources", ], "DateCreated" => [ "Heading" => "Date Queued", ], ]; $FormUI = new FormUI([ "SS" => [ "Type" => FormUI::FTYPE_TEXT, "Label" => "Search", "Value" => $H_SearchString, ], "Template" => [ "Type" => FormUI::FTYPE_OPTION, "Label" => "Mailer Template", "Value" => $H_SelectedTemplate, "Options" => $H_Templates, ], ]); $OptList = new HtmlOptionList("TID", $H_Templates, $H_SelectedTemplate); $OptList->SubmitOnChange(TRUE); ?>
Template: GetHtml() ?> Search:

# Queued Email

ItemsPerPage($H_ItemsPerPage); $ListUI->BaseLink($H_BaseLink); # if we have any items, such that it makes any sense to show buttons # to send/view/delete them, then configure those buttons if (count($H_EmailList)) { $SearchParamsForUrl = "&SS=".urlencode($H_SearchString) ."&TID=".urlencode($H_SelectedTemplate); $SendLink = "index.php?P=P_Mailer_ViewMessage&ID=\$ID" ."&A=Send".$SearchParamsForUrl; $ViewLink = "index.php?P=P_Mailer_ViewMessage&ID=\$ID" ."&A=View".$SearchParamsForUrl; $DeleteLink = "index.php?P=P_Mailer_ViewMessage&ID=\$ID" ."&A=Delete".$SearchParamsForUrl; # set the label for our top buttons, showing simply 'All' when all # messages were shown (no subsetting by search string or template, # and the item count equals the total items), or "All Displayed" # otherwise $ManyLabel = (strlen($H_SearchString)==0 && $H_SelectedTemplate == -1 && count($H_EmailList) == $H_TotalItems) ? "All" : "All Displayed"; $SendManyLink = "index.php?P=P_Mailer_ProcessMany" ."&A=Send" ."&IDs=".implode("-", array_keys($H_EmailList)) .$SearchParamsForUrl; $DeleteManyLink = "index.php?P=P_Mailer_ProcessMany" ."&A=Destroy" ."&IDs=".implode("-", array_keys($H_EmailList)) .$SearchParamsForUrl; $ListUI->AddTopButton( "Send ".$ManyLabel, $SendManyLink, "accept.png"); $ListUI->AddTopButton( "Delete ".$ManyLabel, $DeleteManyLink, "cross.png"); $ListUI->AddActionButton("Send", $SendLink, "accept.png"); $ListUI->AddActionButton("View", $ViewLink, "asterisk_yellow.png"); $ListUI->AddActionButton("Delete", $DeleteLink, "cross.png"); } $ListUI->Display($H_EmailList, $H_TotalItems);