Example #1
0
 /**
  * Parse the datagrid and the reports
  */
 protected function parse()
 {
     parent::parse();
     // assign datagrid
     $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false);
     // assign the selected theme, so we can propagate it to the add/edit actions.
     $this->tpl->assign('selectedTheme', urlencode($this->selectedTheme));
 }
Example #2
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false);
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('groupName', $this->record['name']);
     // only allow deletion of empty groups
     $this->tpl->assign('showGroupsDelete', $this->dataGridUsers->getNumResults() == 0 && BackendAuthentication::isAllowedAction('Delete'));
 }
Example #3
0
 /**
  * Load the form
  */
 private function loadForm()
 {
     // create form
     $this->frm = new BackendForm('editOrder');
     // create elements
     $this->frm->addText('email', $this->record['email']);
     $this->frm->addText('fname', $this->record['fname']);
     $this->frm->addText('lname', $this->record['lname']);
     $this->frm->addText('address', $this->record['address']);
     $this->frm->addText('hnumber', $this->record['hnumber']);
     $this->frm->addText('postal', $this->record['postal']);
     $this->frm->addText('hometown', $this->record['hometown']);
     // assign URL
     //$this->tpl->assign('itemURL', BackendModel::getURLForBlock($this->getModule(), 'detail') . '/' . $this->record['product_url'] . '#order-' . $this->record['product_id']);
     $this->tpl->assign('products', $this->record);
     $this->tpl->assign('dgProducts', $this->dgProducts->getNumResults() != 0 ? $this->dgProducts->getContent() : false);
     $this->tpl->assign('orderPerson', $this->record['fname']);
 }
Example #4
0
 /**
  * Parse & display the page.
  */
 protected function parse()
 {
     parent::parse();
     // parse data grid
     $this->tpl->assign('dgProfiles', $this->dgProfiles->getNumResults() != 0 ? $this->dgProfiles->getContent() : false);
     // parse paging & sorting
     $this->tpl->assign('offset', (int) $this->dgProfiles->getOffset());
     $this->tpl->assign('order', (string) $this->dgProfiles->getOrder());
     $this->tpl->assign('sort', (string) $this->dgProfiles->getSort());
     // parse filter
     $this->tpl->assign($this->filter);
 }
Example #5
0
 /**
  * Parse & display the page
  */
 protected function parse()
 {
     parent::parse();
     // published datagrid and num results
     $this->tpl->assign('dgPublished', (string) $this->dgPublished->getContent());
     $this->tpl->assign('numPublished', $this->dgPublished->getNumResults());
     // moderation datagrid and num results
     $this->tpl->assign('dgModeration', (string) $this->dgModeration->getContent());
     $this->tpl->assign('numModeration', $this->dgModeration->getNumResults());
     // spam datagrid and num results
     $this->tpl->assign('dgSpam', (string) $this->dgSpam->getContent());
     $this->tpl->assign('numSpam', $this->dgSpam->getNumResults());
 }
Example #6
0
 /**
  * Parse the datagrid and the reports
  */
 protected function parse()
 {
     parent::parse();
     // parse dgRecentlyEdited
     $this->tpl->assign('dgRecentlyEdited', $this->dgRecentlyEdited->getNumResults() != 0 ? $this->dgRecentlyEdited->getContent() : false);
     $this->tpl->assign('dgDrafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
     // parse the tree
     $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
     // open the tree on a specific page
     if ($this->getParameter('id', 'int') !== null) {
         $this->tpl->assign('openedPageId', $this->getParameter('id', 'int'));
     } else {
         $this->tpl->assign('openedPageId', 1);
     }
 }
Example #7
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the active record and additional variables
     $this->tpl->assign('profile', $this->profile);
     // parse data grids
     $this->tpl->assign('dgGroups', $this->dgGroups->getNumResults() != 0 ? $this->dgGroups->getContent() : false);
     // show delete or undelete button?
     if ($this->profile['status'] === 'deleted') {
         $this->tpl->assign('deleted', true);
     }
     // show block or unblock button?
     if ($this->profile['status'] === 'blocked') {
         $this->tpl->assign('blocked', true);
     }
 }
Example #8
0
 /**
  * Parse
  */
 protected function parse()
 {
     parent::parse();
     // set
     $this->record['url'] = $this->meta->getURL();
     if ($this->id == 1) {
         $this->record['url'] = '';
     }
     // parse some variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('isGod', $this->isGod);
     $this->tpl->assign('templates', $this->templates);
     $this->tpl->assign('positions', $this->positions);
     $this->tpl->assign('extrasData', json_encode(BackendExtensionsModel::getExtrasData()));
     $this->tpl->assign('extrasById', json_encode(BackendExtensionsModel::getExtras()));
     $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/'));
     $this->tpl->assign('formErrors', (string) $this->frm->getErrors());
     $this->tpl->assign('showTags', $this->showTags());
     // init var
     $showDelete = true;
     // has children?
     if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) {
         $showDelete = false;
     }
     if (!$this->record['delete_allowed']) {
         $showDelete = false;
     }
     // allowed?
     if (!BackendAuthentication::isAllowedAction('Delete', $this->getModule())) {
         $showDelete = false;
     }
     // show delete button
     $this->tpl->assign('allowPagesDelete', $showDelete);
     // assign template
     $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template');
     // parse datagrids
     $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
     $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
     // parse the tree
     $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
     // assign if profiles module is installed
     $this->tpl->assign('showAuthenticationTab', BackendModel::isModuleInstalled('Profiles'));
 }
Example #9
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // get url
     $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
     $url404 = BackendModel::getURL(404);
     // parse additional variables
     if ($url404 != $url) {
         $this->tpl->assign('detailURL', SITE_URL . $url);
     }
     // fetch proper slug
     $this->record['url'] = $this->meta->getURL();
     // assign the active record and additional variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('status', BL::lbl(\SpoonFilter::ucfirst($this->record['status'])));
     // assign revisions-datagrid
     $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
     $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
     $this->tpl->assign('imageIsAllowed', $this->imageIsAllowed);
     // assign category
     if ($this->categoryId !== null) {
         $this->tpl->assign('categoryId', $this->categoryId);
     }
 }