예제 #1
0
 /**
  * Parse the page
  */
 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);
     }
 }
예제 #2
0
파일: edit.php 프로젝트: richsage/forkcms
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // get url
     $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
     $url404 = BackendModel::getURL(404);
     if ($url404 != $url) {
         $this->tpl->assign('detailURL', SITE_URL . $url);
     }
     // assign the active record and additional variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('feedback', $this->feedback);
 }
예제 #3
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);
     }
 }
예제 #4
0
 /**
  * Load the form for step 4
  *
  * @return	void
  */
 private function loadFormForStep4()
 {
     // check if we have to redirect back to step 3 (HTML content is not set)
     if (empty($this->record['content_html'])) {
         $this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $this->id . '&step=3&error=complete-step-3');
     }
     // get preview URL
     $previewURL = BackendMailmotorModel::getMailingPreviewURL($this->record['id']);
     // check if the mailmotor is linked
     if (BackendModel::getURLForBlock($this->getModule(), 'detail') == BackendModel::getURL(404)) {
         $previewURL = false;
     }
     // parse the preview URL
     $this->tpl->assign('previewURL', $previewURL);
     // create form
     $this->frm = new BackendForm('step4');
     // subject
     $this->frm->addText('email');
     $this->frm->addDate('send_on_date', $this->record['send_on']);
     $this->frm->addTime('send_on_time', SpoonDate::getDate('H:i', $this->record['send_on']));
     // show the form
     $this->tpl->assign('step4', true);
 }