- the content template will now be automatically set

- can be overridden with the new View->setContentTemplate() method
parent 6ee94081
......@@ -249,9 +249,14 @@ class ACP3_CMS {
switch (ACP3_Modules::check()) {
// Seite ausgeben
case 1:
self::$view->setContentTemplate(self::$uri->mod . '/' . self::$uri->file . '.tpl');
require MODULES_DIR . self::$uri->mod . '/' . self::$uri->file . '.php';
if (self::$view->getNoOutput() === false) {
if (self::$content === '') {
self::setContent(self::$view->fetchTemplate(self::$view->getContentTemplate()));
}
// Evtl. gesetzten Content-Type des Servers überschreiben
header(self::$view->getContentType());
......
......@@ -35,6 +35,13 @@ class ACP3_View
*/
private $layout = 'layout.tpl';
/**
* Das zuverwendende Template für den Contentbereich
*
* @var string
*/
private $content_template = '';
/**
* Legt fest, welche JavaScript Bibliotheken beim Seitenaufruf geladen werden sollen
*
......@@ -105,6 +112,28 @@ class ACP3_View
return $this->layout;
}
/**
*
* @param string $file
*/
public function setContentTemplate($file)
{
$this->content_template = $file;
}
/**
*
* @return string
*/
public function getContentTemplate()
{
return $this->content_template;
}
/**
*
* @return object
*/
public static function getRenderer()
{
return self::$renderer_obj;
......
......@@ -21,6 +21,4 @@ foreach ($mod_list as $name => $info) {
$mods[$name]['dir'] = $dir;
}
}
ACP3_CMS::$view->assign('modules', $mods);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('acp/acp_list.tpl'));
ACP3_CMS::$view->assign('modules', $mods);
\ No newline at end of file
......@@ -124,6 +124,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $defaults);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('articles/acp_create.tpl'));
}
......@@ -64,8 +64,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $page);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('articles/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -21,7 +21,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$breadcrumb->replaceAnchestor($page['title'], 0, true);
ACP3_CMS::$view->assign('page', splitTextIntoPages(rewriteInternalUri($page['text']), ACP3_CMS::$uri->getCleanQuery()));
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('articles/details.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
\ No newline at end of file
......@@ -25,6 +25,4 @@ if ($c_articles > 0) {
}
ACP3_CMS::$view->assign('articles', $articles);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('articles/list.tpl'));
\ No newline at end of file
}
\ No newline at end of file
......@@ -79,6 +79,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('mod_list', $mod_list);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('categories/acp_create.tpl'));
}
......@@ -73,8 +73,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $category);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('categories/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -41,6 +41,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('categories/acp_settings.tpl'));
}
......@@ -54,8 +54,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('module_id', (int) $comment['module_id']);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('comments/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -52,6 +52,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
}
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('comments/acp_settings.tpl'));
}
\ No newline at end of file
......@@ -42,6 +42,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('contact/acp_list.tpl'));
}
......@@ -15,6 +15,4 @@ $settings['address'] = rewriteInternalUri($settings['address']);
$settings['disclaimer'] = rewriteInternalUri($settings['disclaimer']);
ACP3_CMS::$view->assign('imprint', $settings);
ACP3_CMS::$view->assign('powered_by', sprintf(ACP3_CMS::$lang->t('contact', 'powered_by'), '<a href="http://www.acp3-cms.net" onclick="window.open(this.href); return false">ACP3</a>'));
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('contact/imprint.tpl'));
\ No newline at end of file
ACP3_CMS::$view->assign('powered_by', sprintf(ACP3_CMS::$lang->t('contact', 'powered_by'), '<a href="http://www.acp3-cms.net" onclick="window.open(this.href); return false">ACP3</a>'));
\ No newline at end of file
......@@ -79,6 +79,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
}
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('contact/list.tpl'));
}
......@@ -7,7 +7,7 @@
<form action="{uri args="acp/contact"}" method="post" accept-charset="UTF-8" class="form-horizontal">
<div class="control-group">
<label for="address" class="control-label">{lang t="contact|address"}</label>
<div class="controls">{wysiwyg name="address" value="`$form.address`" height="150" toolbar="simple"}</div>
<div class="controls">{wysiwyg name="address" value="`$form.address`" toolbar="simple"}</div>
</div>
<div class="control-group">
<label for="mail" class="control-label">{lang t="system|email_address"}</label>
......@@ -23,7 +23,7 @@
</div>
<div class="control-group">
<label for="disclaimer" class="control-label">{lang t="contact|disclaimer"}</label>
<div class="controls">{wysiwyg name="disclaimer" value="`$form.disclaimer`" height="150px" toolbar="simple"}</div>
<div class="controls">{wysiwyg name="disclaimer" value="`$form.disclaimer`" toolbar="simple"}</div>
</div>
<div class="form-actions">
<button type="submit" name="submit" class="btn">{lang t="system|submit"}</button>
......
......@@ -55,6 +55,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('code' => '', 'description' => ''));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('emoticons/acp_create.tpl'));
}
......@@ -67,8 +67,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $emoticon);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('emoticons/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -41,6 +41,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('emoticons/acp_settings.tpl'));
}
......@@ -10,5 +10,4 @@
if (defined('IN_ACP3') === false)
exit;
header('HTTP/1.0 403 Forbidden');
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('errors/403.tpl'));
header('HTTP/1.0 403 Forbidden');
\ No newline at end of file
......@@ -10,6 +10,4 @@
if (defined('IN_ACP3') === false)
exit;
header('HTTP/1.0 404 not found');
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('errors/404.tpl'));
header('HTTP/1.0 404 not found');
\ No newline at end of file
......@@ -48,6 +48,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('feeds/acp_list.tpl'));
}
......@@ -125,6 +125,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $defaults);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/acp_create.tpl'));
}
\ No newline at end of file
......@@ -137,8 +137,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $dl);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/403');
......
......@@ -56,6 +56,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('sidebar_entries', recordsPerPage((int) $settings['sidebar'], 1, 10));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/acp_settings.tpl'));
}
\ No newline at end of file
......@@ -55,7 +55,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('comments', commentsList('files', ACP3_CMS::$uri->id));
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/details.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -32,7 +32,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->cat) &&
}
ACP3_CMS::$view->assign('files', $files);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/files.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
......@@ -16,6 +16,4 @@ if (ACP3_Modules::check('categories', 'functions') === true) {
if (count($categories) > 0) {
ACP3_CMS::$view->assign('categories', $categories);
}
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('files/list.tpl'));
}
\ No newline at end of file
......@@ -50,6 +50,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('title' => '', 'alias' => '', 'seo_keywords' => '', 'seo_description' => ''));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/acp_create.tpl'));
}
......@@ -81,8 +81,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('gallery_id', ACP3_CMS::$uri->id);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/acp_create_picture.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -77,8 +77,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('gallery_id', ACP3_CMS::$uri->id);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/acp_edit_picture.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -91,6 +91,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/acp_settings.tpl'));
}
......@@ -65,8 +65,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('comments', commentsList('gallery', ACP3_CMS::$uri->id));
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/details.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
\ No newline at end of file
......@@ -26,5 +26,4 @@ if ($c_galleries > 0) {
$galleries[$i]['pics_lang'] = $galleries[$i]['pics'] . ' ' . ACP3_CMS::$lang->t('gallery', $galleries[$i]['pics'] == 1 ? 'picture' : 'pictures');
}
ACP3_CMS::$view->assign('galleries', $galleries);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/list.tpl'));
}
\ No newline at end of file
......@@ -37,7 +37,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('pictures', $pictures);
ACP3_CMS::$view->assign('overlay', (int) $settings['overlay']);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('gallery/pics.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
......@@ -64,8 +64,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $guestbook);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('guestbook/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -100,6 +100,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('notify_email' => $settings['notify_email']));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('guestbook/acp_settings.tpl'));
}
\ No newline at end of file
......@@ -144,6 +144,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
}
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('guestbook/create.tpl'));
}
\ No newline at end of file
......@@ -49,5 +49,4 @@ if ($c_guestbook > 0) {
$guestbook[$i]['mail'] = !empty($guestbook[$i]['user_mail']) ? substr($guestbook[$i]['user_mail'], 0, -2) : $guestbook[$i]['mail'];
}
ACP3_CMS::$view->assign('guestbook', $guestbook);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('guestbook/list.tpl'));
\ No newline at end of file
}
\ No newline at end of file
......@@ -40,6 +40,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('index_name' => '', 'title' => ''));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('menus/acp_create.tpl'));
}
......@@ -148,6 +148,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $defaults);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('menus/acp_create_item.tpl'));
}
......@@ -47,8 +47,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $block);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('menus/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -149,8 +149,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $page);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('menus/acp_edit_item.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -35,6 +35,4 @@ if ($c_menus > 0) {
}
}
ACP3_CMS::$view->assign('pages_list', $pages_list);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('menus/acp_list.tpl'));
\ No newline at end of file
}
\ No newline at end of file
......@@ -100,6 +100,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('title' => '', 'text' => '', 'uri' => '', 'link_title' => '', 'alias' => '', 'seo_keywords' => '', 'seo_description' => ''));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('news/acp_create.tpl'));
}
\ No newline at end of file
......@@ -106,8 +106,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $news);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('news/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -85,6 +85,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('category_in_breadcrumb', $category_in_breadcrumb);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('news/acp_settings.tpl'));
}
\ No newline at end of file
......@@ -43,7 +43,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('comments', commentsList('news', ACP3_CMS::$uri->id));
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('news/details.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
\ No newline at end of file
......@@ -64,6 +64,4 @@ if ($c_news > 0) {
}
}
ACP3_CMS::$view->assign('news', $news);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('news/list.tpl'));
\ No newline at end of file
}
\ No newline at end of file
......@@ -81,6 +81,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('action', $action);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('newsletter/acp_create.tpl'));
}
\ No newline at end of file
......@@ -89,8 +89,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('action', $action);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('newsletter/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -28,4 +28,4 @@ if ($c_accounts > 0) {
ACP3_CMS::$view->assign('accounts', $accounts);
ACP3_CMS::$view->assign('can_delete', $can_delete);
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('newsletter/acp_list_accounts.tpl'));
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('newsletter/acp_list_accounts.tpl'));
\ No newline at end of file
......@@ -37,6 +37,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('newsletter/acp_settings.tpl'));
}
......@@ -35,6 +35,4 @@ if ($c_newsletters > 0) {
$newsletters[$i]['selected'] = selectEntry('newsletter', $newsletters[$i]['id']);
}
ACP3_CMS::$view->assign('newsletters', $newsletters);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('newsletter/archive.tpl'));
\ No newline at end of file
}
\ No newline at end of file
......@@ -79,6 +79,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
}
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('newsletter/list.tpl'));
}
\ No newline at end of file
......@@ -96,6 +96,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('modules', $modules);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_create.tpl'));
}
......@@ -63,6 +63,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('resource' => ''));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_create_resource.tpl'));
}
\ No newline at end of file
......@@ -108,8 +108,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $role);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -57,8 +57,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : array('resource' => $resource['page'], 'modules' => $resource['module_name']));
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_edit_resource.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -22,5 +22,4 @@ if ($c_roles > 0) {
ACP3_CMS::$view->assign('roles', $roles);
ACP3_CMS::$view->assign('can_delete', ACP3_Modules::check('permissions', 'acp_delete'));
ACP3_CMS::$view->assign('can_order', ACP3_Modules::check('permissions', 'acp_order'));
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_list.tpl'));
}
\ No newline at end of file
......@@ -23,6 +23,4 @@ for ($i = 0; $i < $c_resources; ++$i) {
}
ksort($output);
ACP3_CMS::$view->assign('resources', $output);
ACP3_CMS::$view->assign('can_delete_resource', ACP3_Modules::check('permissions', 'acp_delete_resources'));
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('permissions/acp_list_resources.tpl'));
\ No newline at end of file
ACP3_CMS::$view->assign('can_delete_resource', ACP3_Modules::check('permissions', 'acp_delete_resources'));
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div id="adm-list" class="navbar">
<div class="navbar-inner navbar-text">
<h2 class="brand">{lang t="system|overview"}</h2>
{check_access mode="link" path="acp/permissions/create_resource" icon="32/resource" lang="permissions|create_resource"}
{check_access mode="link" path="acp/permissions/create_resource" icon="32/resource" lang="permissions|acp_create_resource"}
{check_access mode="input" path="acp/permissions/delete_resources" icon="32/cancel" lang="system|delete_marked"}
</div>
</div>
......
......@@ -89,6 +89,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('disable', count($answers) < 10 ? false : true);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('polls/acp_create.tpl'));
}
......@@ -119,8 +119,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('disable', count($answers) < 10 ? false : true);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('polls/acp_edit.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -33,5 +33,3 @@ if ($c_polls > 0) {
}
ACP3_CMS::$view->assign('polls', $polls);
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('polls/list.tpl'));
......@@ -29,8 +29,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('question', $question['title']);
ACP3_CMS::$view->assign('answers', $answers);
ACP3_CMS::$view->assign('total_votes', $total_votes);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('polls/result.tpl'));
} else {
ACP3_CMS::$uri->redirect('errors/404');
}
......@@ -73,8 +73,6 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
ACP3_CMS::$view->assign('question', $poll['title']);
ACP3_CMS::$view->assign('multiple', $poll['multiple']);
ACP3_CMS::$view->assign('answers', $answers);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('polls/vote.tpl'));
}
} else {
ACP3_CMS::$uri->redirect('errors/404');
......
......@@ -42,7 +42,7 @@ if (isset($_POST['submit']) === true) {
ACP3_CMS::$view->assign('no_search_results', sprintf(ACP3_CMS::$lang->t('search', 'no_search_results'), $_POST['search_term']));
}
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('search/results.tpl'));
ACP3_CMS::$view->setContentTemplate('search/results.tpl');
}
}
if (isset($_POST['submit']) === false || isset($errors) === true && is_array($errors) === true) {
......@@ -91,6 +91,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
$sort_hits[1]['checked'] = selectEntry('sort', 'desc', 'asc', 'checked');
$sort_hits[1]['lang'] = ACP3_CMS::$lang->t('search', 'desc');
ACP3_CMS::$view->assign('sort_hits', $sort_hits);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('search/list.tpl'));
}
......@@ -224,6 +224,4 @@ if (isset($_POST['submit']) === false || isset($errors) === true && is_array($er
ACP3_CMS::$view->assign('form', isset($_POST['submit']) ? $_POST : $settings);
ACP3_CMS::$session->generateFormToken();
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/acp_configuration.tpl'));
}
\ No newline at end of file
......@@ -44,6 +44,4 @@ if (isset(ACP3_CMS::$uri->dir)) {
}
}
ACP3_CMS::$view->assign('designs', $designs);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/acp_designs.tpl'));
}
\ No newline at end of file
......@@ -2,4 +2,4 @@
if (defined('IN_ADM') === false)
exit;
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/acp_extensions.tpl'));
ACP3_CMS::$view->setContentTemplate('system/acp_extensions.tpl');
......@@ -39,6 +39,4 @@ if (isset(ACP3_CMS::$uri->dir)) {
}
}
ACP3_CMS::$view->assign('languages', $languages);
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/acp_languages.tpl'));
}
......@@ -10,4 +10,4 @@
if (defined('IN_ADM') === false)
exit;
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/acp_list.tpl'));