Example #1
0
 public function __construct(RecordCollection $contacts, RecordCollectionPagination $pagination, $tableOnly = false)
 {
     $pagination->setNumResultsPerPage($this->getResultsPerPage());
     $this->pager = $pagination->getPager();
     $this->pagerInfo = $pagination->getInfo();
     $this->contacts = $pagination->getPaginatedResults();
     $this->requireJsPackage("typeahead");
     $this->contactsSearch = new TypeAheadSearchFormView(TypeAheadEnum::CONTACTS(), "Search Contacts...");
     $this->_tableOnly = (bool) $tableOnly;
 }
Example #2
0
 public function render()
 {
     // Main nav
     $nav = new Nav(Nav::NAV_DEFAULT);
     $nav->addItem(new NavItem(new HtmlElement("a", ["href" => "/wizard"], "<strong>**Wizard**</strong>"), $this->_getNavItemState("/wizard")))->addItem(new NavItem(new HtmlElement("a", ["href" => "/campaigns"], "Campaigns"), $this->_getNavItemState("/campaigns")))->addItem(new NavItem(new HtmlElement("a", ["href" => "/contacts"], "Contacts"), $this->_getNavItemState("/contacts")))->addItem(new NavItem(new HtmlElement("a", ["href" => "/stats"], "Stats"), $this->_getNavItemState("/stats")));
     // Global typeahead search
     $searchForm = (new TypeAheadSearchFormView(TypeAheadEnum::ALL()))->setNavBarSearch();
     // Logo or brand
     $brand = new HtmlElement("a", ["class" => "brand", "href" => "/"], "Defero");
     return $brand . $nav . $searchForm;
 }
Example #3
0
 public function __construct(array $campaigns, $options, $postData)
 {
     $this->requireJsPackage("campaigns");
     $this->requireJs("jquery-sortable-min");
     $this->requireCss("jquery-sortable-min");
     $this->campaigns = $campaigns;
     $this->sendTypeOptions = $options['sendTypeOptions'];
     $this->activeOptions = $options['activeOptions'];
     $this->labelOptions = $options['labelOptions'];
     $this->postData = $postData;
     $this->requireJsPackage("typeahead");
     $this->campaignsSearch = new TypeAheadSearchFormView(TypeAheadEnum::CAMPAIGNS(), "Search Campaigns...");
 }
Example #4
0
 public function __construct(TypeAheadEnum $typeAheadEnum = null, $placeholder = "Search...")
 {
     $this->_typeAheadEnum = $typeAheadEnum ?: TypeAheadEnum::ALL();
     $this->_placeholder = $placeholder;
 }