ver. 0.285: Tpl → Shared\Tpl namespace, CurlServer removal, thumb.php fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
<?= \Tpl::view('articles/article-edit-custom-script', [
|
<?= \Shared\Tpl\Tpl::view('articles/article-edit-custom-script', [
|
||||||
'article' => $this->article,
|
'article' => $this->article,
|
||||||
'user' => $this->user,
|
'user' => $this->user,
|
||||||
'languages' => $this->form->languages ?? []
|
'languages' => $this->form->languages ?? []
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<input type="checkbox" class="g-checkbox" name="pages[]" id="article_page_<?= $page['id'];?>" value="<?= $page['id'];?>" <? if ( is_array( $this -> article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked"<? endif;?> />
|
<input type="checkbox" class="g-checkbox" name="pages[]" id="article_page_<?= $page['id'];?>" value="<?= $page['id'];?>" <? if ( is_array( $this -> article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked"<? endif;?> />
|
||||||
<label for="article_page_<?= $page['id'];?>" class="mb0"><?= $page['title'];?></label>
|
<label for="article_page_<?= $page['id'];?>" class="mb0"><?= $page['title'];?></label>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'articles/subpages-list', [
|
<?= \Shared\Tpl\Tpl::view( 'articles/subpages-list', [
|
||||||
'pages' => $page['subpages'],
|
'pages' => $page['subpages'],
|
||||||
'article_pages' => $this->article_pages,
|
'article_pages' => $this->article_pages,
|
||||||
'parent_id' => $page['id'],
|
'parent_id' => $page['id'],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ ob_start();
|
|||||||
</button>
|
</button>
|
||||||
Menu: <b><?= $menu['name'];?></b>
|
Menu: <b><?= $menu['name'];?></b>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'layouts/subpages-list', [
|
<?= \Shared\Tpl\Tpl::view( 'layouts/subpages-list', [
|
||||||
'pages' => $menu['pages'],
|
'pages' => $menu['pages'],
|
||||||
'layout_pages' => $this -> layout['pages'],
|
'layout_pages' => $this -> layout['pages'],
|
||||||
'step' => 1
|
'step' => 1
|
||||||
@@ -302,7 +302,7 @@ ob_start();
|
|||||||
<input type="checkbox" class="g-checkbox" name="categories[]" value="<?= $category['id'];?>" <? if ( is_array( $this -> layout['categories'] ) and in_array( $category['id'], $this -> layout['categories'] ) ):?>checked="checked"<? endif;?> />
|
<input type="checkbox" class="g-checkbox" name="categories[]" value="<?= $category['id'];?>" <? if ( is_array( $this -> layout['categories'] ) and in_array( $category['id'], $this -> layout['categories'] ) ):?>checked="checked"<? endif;?> />
|
||||||
<b><?= $category['languages'][$this -> dlang]['title'];?></b>
|
<b><?= $category['languages'][$this -> dlang]['title'];?></b>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'layouts/subcategories-list', [
|
<?= \Shared\Tpl\Tpl::view( 'layouts/subcategories-list', [
|
||||||
'categories' => $category['subcategories'],
|
'categories' => $category['subcategories'],
|
||||||
'product_categories' => $this -> layout['categories'],
|
'product_categories' => $this -> layout['categories'],
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<input type="checkbox" class="g-checkbox" name="categories[]" value="<?= $category['id'];?>" <? if ( is_array( $this -> product_categories ) and in_array( $category['id'], $this -> product_categories ) ):?>checked="checked"<? endif;?> />
|
<input type="checkbox" class="g-checkbox" name="categories[]" value="<?= $category['id'];?>" <? if ( is_array( $this -> product_categories ) and in_array( $category['id'], $this -> product_categories ) ):?>checked="checked"<? endif;?> />
|
||||||
<b><?= $category['languages'][$this -> dlang]['title'];?></b>
|
<b><?= $category['languages'][$this -> dlang]['title'];?></b>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'layouts/subcategories-list', [
|
<?= \Shared\Tpl\Tpl::view( 'layouts/subcategories-list', [
|
||||||
'categories' => $category['subcategories'],
|
'categories' => $category['subcategories'],
|
||||||
'product_categories' => $this -> product_categories,
|
'product_categories' => $this -> product_categories,
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
if ( is_array( $page['subpages'] ) )
|
if ( is_array( $page['subpages'] ) )
|
||||||
echo \Tpl::view( 'layouts/subpages-list', [
|
echo \Shared\Tpl\Tpl::view( 'layouts/subpages-list', [
|
||||||
'pages' => $page['subpages'],
|
'pages' => $page['subpages'],
|
||||||
'layout_pages' => $this -> layout_pages,
|
'layout_pages' => $this -> layout_pages,
|
||||||
'step' => $this -> step + 1
|
'step' => $this -> step + 1
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ foreach ($menus as $menu):
|
|||||||
<?php if ($menuStatus !== 1): ?><i class="fa fa-ban fa-lg text-danger" title="Menu nieaktywne"></i><?php endif; ?>
|
<?php if ($menuStatus !== 1): ?><i class="fa fa-ban fa-lg text-danger" title="Menu nieaktywne"></i><?php endif; ?>
|
||||||
Menu: <b><?= htmlspecialchars($menuName, ENT_QUOTES, 'UTF-8'); ?></b>
|
Menu: <b><?= htmlspecialchars($menuName, ENT_QUOTES, 'UTF-8'); ?></b>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view('pages/subpages-browse-list', [
|
<?= \Shared\Tpl\Tpl::view('pages/subpages-browse-list', [
|
||||||
'pages' => $menu['pages'] ?? [],
|
'pages' => $menu['pages'] ?? [],
|
||||||
'step' => 1,
|
'step' => 1,
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ foreach ($menus as $menu):
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view('pages/subpages-list', [
|
<?= \Shared\Tpl\Tpl::view('pages/subpages-list', [
|
||||||
'pages' => $menu['pages'] ?? [],
|
'pages' => $menu['pages'] ?? [],
|
||||||
'step' => 1,
|
'step' => 1,
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ if (empty($pages)) {
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= \Tpl::view('pages/subpages-browse-list', [
|
<?= \Shared\Tpl\Tpl::view('pages/subpages-browse-list', [
|
||||||
'pages' => $page['subpages'] ?? [],
|
'pages' => $page['subpages'] ?? [],
|
||||||
'step' => $step + 1,
|
'step' => $step + 1,
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if (empty($pages)) {
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view('pages/subpages-list', [
|
<?= \Shared\Tpl\Tpl::view('pages/subpages-list', [
|
||||||
'pages' => $page['subpages'] ?? [],
|
'pages' => $page['subpages'] ?? [],
|
||||||
'step' => $step + 1,
|
'step' => $step + 1,
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ if (!empty($values)) {
|
|||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
++$rowCounter;
|
++$rowCounter;
|
||||||
$rowKey = 'existing-' . (int)($value['id'] ?? 0);
|
$rowKey = 'existing-' . (int)($value['id'] ?? 0);
|
||||||
$initialRowsHtml .= \Tpl::view('shop-attribute/_partials/value-row', [
|
$initialRowsHtml .= \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
|
||||||
'rowKey' => $rowKey,
|
'rowKey' => $rowKey,
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
'languages' => $activeLanguages,
|
'languages' => $activeLanguages,
|
||||||
@@ -47,7 +47,7 @@ if (!empty($values)) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$rowCounter = 1;
|
$rowCounter = 1;
|
||||||
$initialRowsHtml .= \Tpl::view('shop-attribute/_partials/value-row', [
|
$initialRowsHtml .= \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
|
||||||
'rowKey' => 'new-1',
|
'rowKey' => 'new-1',
|
||||||
'value' => ['id' => 0, 'is_default' => 1, 'impact_on_the_price' => null, 'languages' => []],
|
'value' => ['id' => 0, 'is_default' => 1, 'impact_on_the_price' => null, 'languages' => []],
|
||||||
'languages' => $activeLanguages,
|
'languages' => $activeLanguages,
|
||||||
@@ -55,7 +55,7 @@ if (!empty($values)) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newRowTemplate = \Tpl::view('shop-attribute/_partials/value-row', [
|
$newRowTemplate = \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
|
||||||
'rowKey' => '__ROW_KEY__',
|
'rowKey' => '__ROW_KEY__',
|
||||||
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
|
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
|
||||||
'languages' => $activeLanguages,
|
'languages' => $activeLanguages,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ ob_start();
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'shop-category/subcategories-list', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/subcategories-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
||||||
'level' => $this -> level + 1,
|
'level' => $this -> level + 1,
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
@@ -49,4 +49,4 @@ $gridContent = $out;
|
|||||||
$gridPersist = false;
|
$gridPersist = false;
|
||||||
include __DIR__ . '/../components/grid-edit-replacement.php';
|
include __DIR__ . '/../components/grid-edit-replacement.php';
|
||||||
?>
|
?>
|
||||||
<?= \Tpl::view( 'shop-category/categories-list-custom-script' ); ?>
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/categories-list-custom-script' ); ?>
|
||||||
@@ -18,7 +18,7 @@ ob_start();
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'shop-category/subcategory-browse-list', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/subcategory-browse-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
||||||
'level' => $this -> level + 1,
|
'level' => $this -> level + 1,
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
@@ -55,4 +55,4 @@ include __DIR__ . '/../components/grid-edit-replacement.php';
|
|||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<?= \Tpl::view( 'shop-category/category-browse-custom-script' ); ?>
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/category-browse-custom-script' ); ?>
|
||||||
@@ -190,5 +190,5 @@ $gridPersist = true;
|
|||||||
include __DIR__ . '/../components/grid-edit-replacement.php';
|
include __DIR__ . '/../components/grid-edit-replacement.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?= \Tpl::view( 'shop-category/category-edit-custom-script' ); ?>
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/category-edit-custom-script' ); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ $gridContent = $out;
|
|||||||
$gridPersist = false;
|
$gridPersist = false;
|
||||||
include __DIR__ . '/../components/grid-edit-replacement.php';
|
include __DIR__ . '/../components/grid-edit-replacement.php';
|
||||||
?>
|
?>
|
||||||
<?= \Tpl::view( 'shop-category/category-products-custom-script', [ 'category_id' => $this -> category_id ] ); ?>
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/category-products-custom-script', [ 'category_id' => $this -> category_id ] ); ?>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<? endif;?>
|
<? endif;?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'shop-category/subcategories-list', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/subcategories-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
||||||
'level' => $this -> level + 1,
|
'level' => $this -> level + 1,
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'shop-category/subcategory-browse-list', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-category/subcategory-browse-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
||||||
'level' => $this -> level + 1,
|
'level' => $this -> level + 1,
|
||||||
'dlang' => $this -> dlang
|
'dlang' => $this -> dlang
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<?= \Tpl::view('components/table-list', ['list' => $this->ordersTable]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->ordersTable]); ?>
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
<div class="site-title">Lista klientów</div>
|
<div class="site-title">Lista klientów</div>
|
||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
@@ -8,7 +8,7 @@ $selectedIds = is_array($this->selectedIds ?? null) ? $this->selectedIds : [];
|
|||||||
<label class="col-lg-4 control-label"><?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8'); ?>:</label>
|
<label class="col-lg-4 control-label"><?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8'); ?>:</label>
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="coupon-categories-box">
|
<div class="coupon-categories-box">
|
||||||
<?= \Tpl::view('shop-coupon/coupon-categories-tree', [
|
<?= \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-tree', [
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'selectedIds' => $selectedIds,
|
'selectedIds' => $selectedIds,
|
||||||
'inputName' => $inputName,
|
'inputName' => $inputName,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ foreach ($selectedRaw as $value) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($hasChildren): ?>
|
<?php if ($hasChildren): ?>
|
||||||
<?= \Tpl::view('shop-coupon/coupon-categories-tree', [
|
<?= \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-tree', [
|
||||||
'categories' => $children,
|
'categories' => $children,
|
||||||
'selectedIds' => array_keys($selected),
|
'selectedIds' => array_keys($selected),
|
||||||
'inputName' => $inputName,
|
'inputName' => $inputName,
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
<?= \Tpl::view('shop-coupon/coupon-edit-custom-script'); ?>
|
<?= \Shared\Tpl\Tpl::view('shop-coupon/coupon-edit-custom-script'); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ $orderId = (int)($this -> order['id'] ?? 0);
|
|||||||
<?= $this -> order['trustmate_send'] ? 'Odznacz zamówienie jako wysłane do trustmate.io' : 'Zaznacz zamówienie jako wysłane do trustmate.io';?>
|
<?= $this -> order['trustmate_send'] ? 'Odznacz zamówienie jako wysłane do trustmate.io' : 'Zaznacz zamówienie jako wysłane do trustmate.io';?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view('shop-order/order-details-custom-script', [
|
<?= \Shared\Tpl\Tpl::view('shop-order/order-details-custom-script', [
|
||||||
'order_id' => $orderId,
|
'order_id' => $orderId,
|
||||||
'trustmate_send' => (int)($this -> order['trustmate_send'] ?? 0),
|
'trustmate_send' => (int)($this -> order['trustmate_send'] ?? 0),
|
||||||
]);?>
|
]);?>
|
||||||
@@ -222,4 +222,4 @@ $orderId = (int)($this -> order['id'] ?? 0);
|
|||||||
</div>
|
</div>
|
||||||
<link class="footer" rel="stylesheet" type="text/css" href="https://geowidget.easypack24.net/css/easypack.css">
|
<link class="footer" rel="stylesheet" type="text/css" href="https://geowidget.easypack24.net/css/easypack.css">
|
||||||
<script class="footer" type="text/javascript" src="https://geowidget.easypack24.net/js/sdk-for-javascript.js"></script>
|
<script class="footer" type="text/javascript" src="https://geowidget.easypack24.net/js/sdk-for-javascript.js"></script>
|
||||||
<?= \Tpl::view('shop-order/order-edit-custom-script');?>
|
<?= \Shared\Tpl\Tpl::view('shop-order/order-edit-custom-script');?>
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
<div class="site-title">Lista zamówień</div>
|
<div class="site-title">Lista zamówień</div>
|
||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
<?= \Tpl::view('shop-product-sets/product-set-edit-custom-script'); ?>
|
<?= \Shared\Tpl\Tpl::view('shop-product-sets/product-set-edit-custom-script'); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<input type="checkbox" class="g-checkbox" name="mass_categories[]" value="<?= $category['id']; ?>" />
|
<input type="checkbox" class="g-checkbox" name="mass_categories[]" value="<?= $category['id']; ?>" />
|
||||||
<b><?= $category['languages'][$this->dlang]['title']; ?></b>
|
<b><?= $category['languages'][$this->dlang]['title']; ?></b>
|
||||||
</div>
|
</div>
|
||||||
<?= \Tpl::view( 'shop-product/subcategories-list', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
|
||||||
'level' => ($this->level ?? 0) + 1,
|
'level' => ($this->level ?? 0) + 1,
|
||||||
'dlang' => $this->dlang,
|
'dlang' => $this->dlang,
|
||||||
@@ -111,4 +111,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= \Tpl::view( 'shop-product/mass-edit-custom-script' ); ?>
|
<?= \Shared\Tpl\Tpl::view( 'shop-product/mass-edit-custom-script' ); ?>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
<?= \Tpl::view('shop-product/product-edit-custom-script', [
|
<?= \Shared\Tpl\Tpl::view('shop-product/product-edit-custom-script', [
|
||||||
'product' => $this->product,
|
'product' => $this->product,
|
||||||
'user' => $this->user,
|
'user' => $this->user,
|
||||||
'languages' => $this->form->languages ?? []
|
'languages' => $this->form->languages ?? []
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
<?php if (!empty($this->viewModel->customScriptView)): ?>
|
||||||
<?= \Tpl::view($this->viewModel->customScriptView, [
|
<?= \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, [
|
||||||
'list' => $this->viewModel,
|
'list' => $this->viewModel,
|
||||||
'apilo_enabled' => $this->apilo_enabled,
|
'apilo_enabled' => $this->apilo_enabled,
|
||||||
'shoppro_enabled' => $this->shoppro_enabled,
|
'shoppro_enabled' => $this->shoppro_enabled,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<b><?= $category[ 'languages' ][ $this -> dlang ][ 'title' ];?></b>
|
<b><?= $category[ 'languages' ][ $this -> dlang ][ 'title' ];?></b>
|
||||||
</div>
|
</div>
|
||||||
<?=
|
<?=
|
||||||
\Tpl::view( 'shop-product/subcategories-list', [
|
\Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
|
||||||
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category[ 'id' ] ),
|
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category[ 'id' ] ),
|
||||||
'product_categories' => $this -> product_categories,
|
'product_categories' => $this -> product_categories,
|
||||||
'dlang' => $this -> dlang,
|
'dlang' => $this -> dlang,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $selectedIds = is_array($this->selectedIds ?? null) ? $this->selectedIds : [];
|
|||||||
<label class="col-lg-4 control-label"><?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8'); ?>:</label>
|
<label class="col-lg-4 control-label"><?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8'); ?>:</label>
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="promotion-categories-box">
|
<div class="promotion-categories-box">
|
||||||
<?= \Tpl::view('shop-promotion/promotion-categories-tree', [
|
<?= \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-tree', [
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'selectedIds' => $selectedIds,
|
'selectedIds' => $selectedIds,
|
||||||
'inputName' => $inputName,
|
'inputName' => $inputName,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ foreach ($selectedRaw as $value) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($hasChildren): ?>
|
<?php if ($hasChildren): ?>
|
||||||
<?= \Tpl::view('shop-promotion/promotion-categories-tree', [
|
<?= \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-tree', [
|
||||||
'categories' => $children,
|
'categories' => $children,
|
||||||
'selectedIds' => array_keys($selected),
|
'selectedIds' => array_keys($selected),
|
||||||
'inputName' => $inputName,
|
'inputName' => $inputName,
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
<?= \Tpl::view('shop-promotion/promotion-edit-custom-script'); ?>
|
<?= \Shared\Tpl\Tpl::view('shop-promotion/promotion-edit-custom-script'); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
echo \Tpl::view('components/form-edit', [
|
echo \Shared\Tpl\Tpl::view('components/form-edit', [
|
||||||
'form' => $this->form,
|
'form' => $this->form,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
echo \Tpl::view('shop-transport/transport-edit-custom-script', [
|
echo \Shared\Tpl\Tpl::view('shop-transport/transport-edit-custom-script', [
|
||||||
'form' => $this->form,
|
'form' => $this->form,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
<?= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,21 @@ class Html
|
|||||||
{
|
{
|
||||||
public static function form_text( array $params = array() )
|
public static function form_text( array $params = array() )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/form-text' );
|
return $tpl -> render( 'html/form-text' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function input_switch( array $params = array() )
|
public static function input_switch( array $params = array() )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/input-switch' );
|
return $tpl -> render( 'html/input-switch' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function select( array $params = array() )
|
public static function select( array $params = array() )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/select' );
|
return $tpl -> render( 'html/select' );
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ class Html
|
|||||||
|
|
||||||
$params = array_merge( $defaults, $params );
|
$params = array_merge( $defaults, $params );
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/textarea' );
|
return $tpl -> render( 'html/textarea' );
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ class Html
|
|||||||
|
|
||||||
$params = array_merge( $defaults, $params );
|
$params = array_merge( $defaults, $params );
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/input-icon' );
|
return $tpl -> render( 'html/input-icon' );
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ class Html
|
|||||||
|
|
||||||
$params = array_merge( $defaults, $params );
|
$params = array_merge( $defaults, $params );
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/input' );
|
return $tpl -> render( 'html/input' );
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ class Html
|
|||||||
|
|
||||||
$params = array_merge( $defaults, $params );
|
$params = array_merge( $defaults, $params );
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/button' );
|
return $tpl -> render( 'html/button' );
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ class Html
|
|||||||
|
|
||||||
$params = array_merge( $defaults, $params );
|
$params = array_merge( $defaults, $params );
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> params = $params;
|
$tpl -> params = $params;
|
||||||
return $tpl -> render( 'html/panel' );
|
return $tpl -> render( 'html/panel' );
|
||||||
}
|
}
|
||||||
|
|||||||
63
autoload/Shared/Tpl/Tpl.php
Normal file
63
autoload/Shared/Tpl/Tpl.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
namespace Shared\Tpl;
|
||||||
|
|
||||||
|
class Tpl
|
||||||
|
{
|
||||||
|
protected $vars = array();
|
||||||
|
|
||||||
|
public static function view($file, $values = '')
|
||||||
|
{
|
||||||
|
$tpl = new self;
|
||||||
|
if (is_array($values)) foreach ($values as $key => $val)
|
||||||
|
$tpl->$key = $val;
|
||||||
|
return $tpl->render($file);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function secureHTML($val)
|
||||||
|
{
|
||||||
|
$out = stripslashes($val);
|
||||||
|
$out = str_replace("'", "'", $out);
|
||||||
|
$out = str_replace('"', """, $out);
|
||||||
|
$out = str_replace("<", "<", $out);
|
||||||
|
$out = str_replace(">", ">", $out);
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render($file)
|
||||||
|
{
|
||||||
|
$paths = [
|
||||||
|
'templates_user/' . $file . '.php',
|
||||||
|
'templates/' . $file . '.php',
|
||||||
|
'../templates_user/' . $file . '.php',
|
||||||
|
'../templates/' . $file . '.php',
|
||||||
|
$file . '.php',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($paths as $path) {
|
||||||
|
if (file_exists($path)) {
|
||||||
|
return $this->renderFile($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<div class="alert alert-danger" role="alert">Nie znaleziono pliku widoku: <b>' . $file . '.php</b>';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function renderFile($path)
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
include $path;
|
||||||
|
$out = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __set($name, $value)
|
||||||
|
{
|
||||||
|
$this->vars[$name] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __get($name)
|
||||||
|
{
|
||||||
|
return $this->vars[$name];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -171,7 +171,7 @@ class App
|
|||||||
return $controller->login_form();
|
return $controller->login_form();
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->content = self::route();
|
$tpl->content = self::route();
|
||||||
return $tpl->render( 'site/main-layout' );
|
return $tpl->render( 'site/main-layout' );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class ArticlesArchiveController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('articles/articles-archive-list', [
|
return \Shared\Tpl\Tpl::view('articles/articles-archive-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class ArticlesController
|
|||||||
'Dodaj artykul'
|
'Dodaj artykul'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('articles/articles-list', [
|
return \Shared\Tpl\Tpl::view('articles/articles-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ class ArticlesController
|
|||||||
|
|
||||||
$viewModel = $this->buildFormViewModel($article, $languages, $menus, $layouts);
|
$viewModel = $this->buildFormViewModel($article, $languages, $menus, $layouts);
|
||||||
|
|
||||||
return \Tpl::view('articles/article-edit', [
|
return \Shared\Tpl\Tpl::view('articles/article-edit', [
|
||||||
'form' => $viewModel,
|
'form' => $viewModel,
|
||||||
'article' => $article,
|
'article' => $article,
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
@@ -444,7 +444,7 @@ class ArticlesController
|
|||||||
. '<i class="fa fa-caret-right"></i>'
|
. '<i class="fa fa-caret-right"></i>'
|
||||||
. '</button>Menu: <b>' . $menuName . '</b>';
|
. '</button>Menu: <b>' . $menuName . '</b>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= \Tpl::view('articles/subpages-list', [
|
$html .= \Shared\Tpl\Tpl::view('articles/subpages-list', [
|
||||||
'pages' => $menuPages,
|
'pages' => $menuPages,
|
||||||
'article_pages' => $article['pages'] ?? [],
|
'article_pages' => $article['pages'] ?? [],
|
||||||
'parent_id' => $menuId,
|
'parent_id' => $menuId,
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class BannerController
|
|||||||
'banners/banners-list-custom-script'
|
'banners/banners-list-custom-script'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('banners/banners-list', [
|
return \Shared\Tpl\Tpl::view('banners/banners-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ class BannerController
|
|||||||
|
|
||||||
$viewModel = $this->buildFormViewModel($banner, $languages, $validationErrors);
|
$viewModel = $this->buildFormViewModel($banner, $languages, $validationErrors);
|
||||||
|
|
||||||
return \Tpl::view('components/form-edit', ['form' => $viewModel]);
|
return \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $viewModel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class DashboardController
|
|||||||
|
|
||||||
public function main_view(): string
|
public function main_view(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view( 'dashboard/main-view', [
|
return \Shared\Tpl\Tpl::view( 'dashboard/main-view', [
|
||||||
'last_orders' => $this->repository->lastOrders(),
|
'last_orders' => $this->repository->lastOrders(),
|
||||||
'order_statuses' => $this->statusesRepository->allStatuses(),
|
'order_statuses' => $this->statusesRepository->allStatuses(),
|
||||||
'sales' => $this->repository->last24MonthsSales(),
|
'sales' => $this->repository->last24MonthsSales(),
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class DictionariesController
|
|||||||
'Dodaj jednostke miary'
|
'Dodaj jednostke miary'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('dictionaries/units-list', [
|
return \Shared\Tpl\Tpl::view('dictionaries/units-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ class DictionariesController
|
|||||||
|
|
||||||
$viewModel = $this->buildFormViewModel($unit, $languages, $validationErrors);
|
$viewModel = $this->buildFormViewModel($unit, $languages, $validationErrors);
|
||||||
|
|
||||||
return \Tpl::view('dictionaries/unit-edit', ['form' => $viewModel]);
|
return \Shared\Tpl\Tpl::view('dictionaries/unit-edit', ['form' => $viewModel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save(): void
|
public function save(): void
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class FilemanagerController
|
|||||||
$akey = $this->ensureFilemanagerAccessKey();
|
$akey = $this->ensureFilemanagerAccessKey();
|
||||||
$filemanagerUrl = $this->buildFilemanagerUrl($akey);
|
$filemanagerUrl = $this->buildFilemanagerUrl($akey);
|
||||||
|
|
||||||
return \Tpl::view('filemanager/filemanager', [
|
return \Shared\Tpl\Tpl::view('filemanager/filemanager', [
|
||||||
'filemanager_url' => $filemanagerUrl,
|
'filemanager_url' => $filemanagerUrl,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class IntegrationsController
|
|||||||
|
|
||||||
public function apilo_settings(): string
|
public function apilo_settings(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view( 'integrations/apilo-settings', [
|
return \Shared\Tpl\Tpl::view( 'integrations/apilo-settings', [
|
||||||
'settings' => $this->repository->getSettings( 'apilo' ),
|
'settings' => $this->repository->getSettings( 'apilo' ),
|
||||||
'apilo_status' => $this->repository->apiloIntegrationStatus(),
|
'apilo_status' => $this->repository->apiloIntegrationStatus(),
|
||||||
] );
|
] );
|
||||||
@@ -127,7 +127,7 @@ class IntegrationsController
|
|||||||
|
|
||||||
public function shoppro_settings(): string
|
public function shoppro_settings(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view( 'integrations/shoppro-settings', [
|
return \Shared\Tpl\Tpl::view( 'integrations/shoppro-settings', [
|
||||||
'settings' => $this->repository->getSettings( 'shoppro' ),
|
'settings' => $this->repository->getSettings( 'shoppro' ),
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class LanguagesController
|
|||||||
'Dodaj jezyk'
|
'Dodaj jezyk'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('languages/languages-list', [
|
return \Shared\Tpl\Tpl::view('languages/languages-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ class LanguagesController
|
|||||||
unset($_SESSION['form_errors'][$this->getLanguageFormId()]);
|
unset($_SESSION['form_errors'][$this->getLanguageFormId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('languages/language-edit', [
|
return \Shared\Tpl\Tpl::view('languages/language-edit', [
|
||||||
'form' => $this->buildLanguageFormViewModel($language, $this->repository->maxOrder(), $validationErrors),
|
'form' => $this->buildLanguageFormViewModel($language, $this->repository->maxOrder(), $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -324,7 +324,7 @@ class LanguagesController
|
|||||||
'Dodaj tlumaczenie'
|
'Dodaj tlumaczenie'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('languages/translations-list', [
|
return \Shared\Tpl\Tpl::view('languages/translations-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -339,7 +339,7 @@ class LanguagesController
|
|||||||
unset($_SESSION['form_errors'][$this->getTranslationFormId()]);
|
unset($_SESSION['form_errors'][$this->getTranslationFormId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('languages/translation-edit', [
|
return \Shared\Tpl\Tpl::view('languages/translation-edit', [
|
||||||
'form' => $this->buildTranslationFormViewModel($translation, $languages, $validationErrors),
|
'form' => $this->buildTranslationFormViewModel($translation, $languages, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,14 +128,14 @@ class LayoutsController
|
|||||||
'Dodaj szablon'
|
'Dodaj szablon'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('layouts/layouts-list', [
|
return \Shared\Tpl\Tpl::view('layouts/layouts-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit(): string
|
public function edit(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('layouts/layout-edit', [
|
return \Shared\Tpl\Tpl::view('layouts/layout-edit', [
|
||||||
'layout' => $this->repository->find((int)\Shared\Helpers\Helpers::get('id')),
|
'layout' => $this->repository->find((int)\Shared\Helpers\Helpers::get('id')),
|
||||||
'menus' => $this->repository->menusWithPages(),
|
'menus' => $this->repository->menusWithPages(),
|
||||||
'categories' => $this->repository->categoriesTree(),
|
'categories' => $this->repository->categoriesTree(),
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class NewsletterController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('newsletter/emails-list', [
|
return \Shared\Tpl\Tpl::view('newsletter/emails-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ class NewsletterController
|
|||||||
unset($_SESSION['form_errors'][$this->settingsFormId()]);
|
unset($_SESSION['form_errors'][$this->settingsFormId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('newsletter/settings', [
|
return \Shared\Tpl\Tpl::view('newsletter/settings', [
|
||||||
'form' => $this->buildSettingsFormViewModel($settings, $validationErrors),
|
'form' => $this->buildSettingsFormViewModel($settings, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ class NewsletterController
|
|||||||
public function email_templates_admin(): string
|
public function email_templates_admin(): string
|
||||||
{
|
{
|
||||||
$viewModel = $this->templatesListViewModel();
|
$viewModel = $this->templatesListViewModel();
|
||||||
return \Tpl::view('newsletter/email-templates-admin', [
|
return \Shared\Tpl\Tpl::view('newsletter/email-templates-admin', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ class NewsletterController
|
|||||||
unset($_SESSION['form_errors'][$formId]);
|
unset($_SESSION['form_errors'][$formId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('newsletter/email-template-edit', [
|
return \Shared\Tpl\Tpl::view('newsletter/email-template-edit', [
|
||||||
'form' => $this->buildTemplateFormViewModel($template, $validationErrors),
|
'form' => $this->buildTemplateFormViewModel($template, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class PagesController
|
|||||||
|
|
||||||
public function list(): string
|
public function list(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('pages/pages-list', [
|
return \Shared\Tpl\Tpl::view('pages/pages-list', [
|
||||||
'menus' => $this->repository->menusWithPages(),
|
'menus' => $this->repository->menusWithPages(),
|
||||||
'cookie_pages' => $this->cookieState('cookie_pages'),
|
'cookie_pages' => $this->cookieState('cookie_pages'),
|
||||||
'cookie_menus' => $this->cookieState('cookie_menus'),
|
'cookie_menus' => $this->cookieState('cookie_menus'),
|
||||||
@@ -43,7 +43,7 @@ class PagesController
|
|||||||
$menus[$index]['pages'] = $this->withPreviewUrls($menu['pages'] ?? [], $defaultLanguage);
|
$menus[$index]['pages'] = $this->withPreviewUrls($menu['pages'] ?? [], $defaultLanguage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('pages/pages-browse-list', [
|
return \Shared\Tpl\Tpl::view('pages/pages-browse-list', [
|
||||||
'menus' => $menus,
|
'menus' => $menus,
|
||||||
'modal' => \Shared\Helpers\Helpers::get('modal'),
|
'modal' => \Shared\Helpers\Helpers::get('modal'),
|
||||||
'cookie_pages' => $this->cookieState('cookie_pages'),
|
'cookie_pages' => $this->cookieState('cookie_pages'),
|
||||||
@@ -60,7 +60,7 @@ class PagesController
|
|||||||
{
|
{
|
||||||
$menu = $this->repository->menuDetails((int)\Shared\Helpers\Helpers::get('id'));
|
$menu = $this->repository->menuDetails((int)\Shared\Helpers\Helpers::get('id'));
|
||||||
|
|
||||||
return \Tpl::view('pages/menu-edit', [
|
return \Shared\Tpl\Tpl::view('pages/menu-edit', [
|
||||||
'form' => $this->buildMenuFormViewModel($menu),
|
'form' => $this->buildMenuFormViewModel($menu),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ class PagesController
|
|||||||
$layouts = $this->layoutsRepository->listAll();
|
$layouts = $this->layoutsRepository->listAll();
|
||||||
$languages = $this->languagesRepository->languagesList();
|
$languages = $this->languagesRepository->languagesList();
|
||||||
|
|
||||||
return \Tpl::view('pages/page-edit', [
|
return \Shared\Tpl\Tpl::view('pages/page-edit', [
|
||||||
'form' => $this->buildPageFormViewModel(
|
'form' => $this->buildPageFormViewModel(
|
||||||
$page,
|
$page,
|
||||||
$parentId,
|
$parentId,
|
||||||
@@ -537,7 +537,7 @@ class PagesController
|
|||||||
public function pageArticles(): string
|
public function pageArticles(): string
|
||||||
{
|
{
|
||||||
$pageId = (int)\Shared\Helpers\Helpers::get('id');
|
$pageId = (int)\Shared\Helpers\Helpers::get('id');
|
||||||
return \Tpl::view('pages/page-articles', [
|
return \Shared\Tpl\Tpl::view('pages/page-articles', [
|
||||||
'page_id' => $pageId,
|
'page_id' => $pageId,
|
||||||
'articles' => $this->repository->pageArticles($pageId),
|
'articles' => $this->repository->pageArticles($pageId),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class ProductArchiveController
|
|||||||
'product-archive/products-list-custom-script'
|
'product-archive/products-list-custom-script'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('product-archive/products-list', [
|
return \Shared\Tpl\Tpl::view('product-archive/products-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class ScontainersController
|
|||||||
'Dodaj kontener'
|
'Dodaj kontener'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('scontainers/containers-list', [
|
return \Shared\Tpl\Tpl::view('scontainers/containers-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ class ScontainersController
|
|||||||
unset($_SESSION['form_errors'][$this->formId()]);
|
unset($_SESSION['form_errors'][$this->formId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('scontainers/container-edit', [
|
return \Shared\Tpl\Tpl::view('scontainers/container-edit', [
|
||||||
'form' => $this->buildFormViewModel($container, $languages, $validationErrors),
|
'form' => $this->buildFormViewModel($container, $languages, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ class SettingsController
|
|||||||
|
|
||||||
$viewModel = $this->buildFormViewModel($settings, $languages, $validationErrors);
|
$viewModel = $this->buildFormViewModel($settings, $languages, $validationErrors);
|
||||||
|
|
||||||
return \Tpl::view('components/form-edit', ['form' => $viewModel]);
|
return \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $viewModel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildFormViewModel(array $settings, array $languages, ?array $errors = null): FormEditViewModel
|
private function buildFormViewModel(array $settings, array $languages, ?array $errors = null): FormEditViewModel
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class ShopAttributeController
|
|||||||
'Dodaj ceche'
|
'Dodaj ceche'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-attribute/attributes-list', [
|
return \Shared\Tpl\Tpl::view('shop-attribute/attributes-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ class ShopAttributeController
|
|||||||
$attribute = $this->repository->findAttribute((int)\Shared\Helpers\Helpers::get('id'));
|
$attribute = $this->repository->findAttribute((int)\Shared\Helpers\Helpers::get('id'));
|
||||||
$languages = $this->languagesRepository->languagesList();
|
$languages = $this->languagesRepository->languagesList();
|
||||||
|
|
||||||
return \Tpl::view('shop-attribute/attribute-edit', [
|
return \Shared\Tpl\Tpl::view('shop-attribute/attribute-edit', [
|
||||||
'form' => $this->buildFormViewModel($attribute, $languages),
|
'form' => $this->buildFormViewModel($attribute, $languages),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -236,7 +236,7 @@ class ShopAttributeController
|
|||||||
|
|
||||||
$languages = $this->languagesRepository->languagesList();
|
$languages = $this->languagesRepository->languagesList();
|
||||||
|
|
||||||
return \Tpl::view('shop-attribute/values-edit', [
|
return \Shared\Tpl\Tpl::view('shop-attribute/values-edit', [
|
||||||
'attribute' => $attribute,
|
'attribute' => $attribute,
|
||||||
'values' => $this->repository->findValues($attributeId),
|
'values' => $this->repository->findValues($attributeId),
|
||||||
'languages' => $languages,
|
'languages' => $languages,
|
||||||
@@ -318,7 +318,7 @@ class ShopAttributeController
|
|||||||
$rowKey = 'new-' . time();
|
$rowKey = 'new-' . time();
|
||||||
}
|
}
|
||||||
|
|
||||||
$html = \Tpl::view('shop-attribute/_partials/value-row', [
|
$html = \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
|
||||||
'rowKey' => $rowKey,
|
'rowKey' => $rowKey,
|
||||||
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
|
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
|
||||||
'languages' => $this->languagesRepository->languagesList(),
|
'languages' => $this->languagesRepository->languagesList(),
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ShopCategoryController
|
|||||||
|
|
||||||
public function view_list(): string
|
public function view_list(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('shop-category/categories-list', [
|
return \Shared\Tpl\Tpl::view('shop-category/categories-list', [
|
||||||
'categories' => $this->repository->subcategories(null),
|
'categories' => $this->repository->subcategories(null),
|
||||||
'level' => 0,
|
'level' => 0,
|
||||||
'dlang' => $this->languagesRepository->defaultLanguage(),
|
'dlang' => $this->languagesRepository->defaultLanguage(),
|
||||||
@@ -31,7 +31,7 @@ class ShopCategoryController
|
|||||||
|
|
||||||
public function category_edit(): string
|
public function category_edit(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('shop-category/category-edit', [
|
return \Shared\Tpl\Tpl::view('shop-category/category-edit', [
|
||||||
'category' => $this->repository->categoryDetails(\Shared\Helpers\Helpers::get('id')),
|
'category' => $this->repository->categoryDetails(\Shared\Helpers\Helpers::get('id')),
|
||||||
'pid' => \Shared\Helpers\Helpers::get('pid'),
|
'pid' => \Shared\Helpers\Helpers::get('pid'),
|
||||||
'languages' => $this->languagesRepository->languagesList(),
|
'languages' => $this->languagesRepository->languagesList(),
|
||||||
@@ -87,7 +87,7 @@ class ShopCategoryController
|
|||||||
|
|
||||||
public function category_products(): string
|
public function category_products(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('shop-category/category-products', [
|
return \Shared\Tpl\Tpl::view('shop-category/category-products', [
|
||||||
'category_id' => \Shared\Helpers\Helpers::get('id'),
|
'category_id' => \Shared\Helpers\Helpers::get('id'),
|
||||||
'products' => $this->repository->categoryProducts((int)\Shared\Helpers\Helpers::get('id')),
|
'products' => $this->repository->categoryProducts((int)\Shared\Helpers\Helpers::get('id')),
|
||||||
]);
|
]);
|
||||||
@@ -100,7 +100,7 @@ class ShopCategoryController
|
|||||||
|
|
||||||
public function category_url_browser(): void
|
public function category_url_browser(): void
|
||||||
{
|
{
|
||||||
echo \Tpl::view('shop-category/category-browse-list', [
|
echo \Shared\Tpl\Tpl::view('shop-category/category-browse-list', [
|
||||||
'categories' => $this->repository->subcategories(null),
|
'categories' => $this->repository->subcategories(null),
|
||||||
'level' => 0,
|
'level' => 0,
|
||||||
'dlang' => $this->languagesRepository->defaultLanguage(),
|
'dlang' => $this->languagesRepository->defaultLanguage(),
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class ShopClientsController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-clients/view-list', [
|
return \Shared\Tpl\Tpl::view('shop-clients/view-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ class ShopClientsController
|
|||||||
'Brak zamowien klienta.'
|
'Brak zamowien klienta.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-clients/clients-details', [
|
return \Shared\Tpl\Tpl::view('shop-clients/clients-details', [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'surname' => $surname,
|
'surname' => $surname,
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class ShopCouponController
|
|||||||
'Dodaj kupon'
|
'Dodaj kupon'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-coupon/coupons-list', [
|
return \Shared\Tpl\Tpl::view('shop-coupon/coupons-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ class ShopCouponController
|
|||||||
$coupon = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
$coupon = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
||||||
$categories = $this->repository->categoriesTree(null);
|
$categories = $this->repository->categoriesTree(null);
|
||||||
|
|
||||||
return \Tpl::view('shop-coupon/coupon-edit-new', [
|
return \Shared\Tpl\Tpl::view('shop-coupon/coupon-edit-new', [
|
||||||
'form' => $this->buildFormViewModel($coupon, $categories),
|
'form' => $this->buildFormViewModel($coupon, $categories),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,7 @@ class ShopCouponController
|
|||||||
'label' => 'Dotyczy rowniez produktow przecenionych',
|
'label' => 'Dotyczy rowniez produktow przecenionych',
|
||||||
'tab' => 'settings',
|
'tab' => 'settings',
|
||||||
]),
|
]),
|
||||||
FormField::custom('coupon_categories', \Tpl::view('shop-coupon/coupon-categories-selector', [
|
FormField::custom('coupon_categories', \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-selector', [
|
||||||
'label' => 'Ogranicz promocje do wybranych kategorii',
|
'label' => 'Ogranicz promocje do wybranych kategorii',
|
||||||
'inputName' => 'categories[]',
|
'inputName' => 'categories[]',
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class ShopOrderController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-order/orders-list', [
|
return \Shared\Tpl\Tpl::view('shop-order/orders-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ class ShopOrderController
|
|||||||
$coupon = new \shop\Coupon((int)$order['coupon_id']);
|
$coupon = new \shop\Coupon((int)$order['coupon_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('shop-order/order-details', [
|
return \Shared\Tpl\Tpl::view('shop-order/order-details', [
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'coupon' => $coupon,
|
'coupon' => $coupon,
|
||||||
'order_statuses' => $this->service->statuses(),
|
'order_statuses' => $this->service->statuses(),
|
||||||
@@ -188,7 +188,7 @@ class ShopOrderController
|
|||||||
{
|
{
|
||||||
$orderId = (int)\Shared\Helpers\Helpers::get('order_id');
|
$orderId = (int)\Shared\Helpers\Helpers::get('order_id');
|
||||||
|
|
||||||
return \Tpl::view('shop-order/order-edit', [
|
return \Shared\Tpl\Tpl::view('shop-order/order-edit', [
|
||||||
'order' => $this->service->details($orderId),
|
'order' => $this->service->details($orderId),
|
||||||
'order_statuses' => $this->service->statuses(),
|
'order_statuses' => $this->service->statuses(),
|
||||||
'transport' => \shop\Transport::transport_list(),
|
'transport' => \shop\Transport::transport_list(),
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class ShopPaymentMethodController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-payment-method/payment-methods-list', [
|
return \Shared\Tpl\Tpl::view('shop-payment-method/payment-methods-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ class ShopPaymentMethodController
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('shop-payment-method/payment-method-edit', [
|
return \Shared\Tpl\Tpl::view('shop-payment-method/payment-method-edit', [
|
||||||
'form' => $this->buildFormViewModel($paymentMethod, $this->getApiloPaymentTypes()),
|
'form' => $this->buildFormViewModel($paymentMethod, $this->getApiloPaymentTypes()),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class ShopProducerController
|
|||||||
'Dodaj producenta'
|
'Dodaj producenta'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-producer/producers-list', [
|
return \Shared\Tpl\Tpl::view('shop-producer/producers-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ class ShopProducerController
|
|||||||
unset($_SESSION['form_errors'][$this->formId()]);
|
unset($_SESSION['form_errors'][$this->formId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('shop-producer/producer-edit', [
|
return \Shared\Tpl\Tpl::view('shop-producer/producer-edit', [
|
||||||
'form' => $this->buildFormViewModel($producer, $languages, $validationErrors),
|
'form' => $this->buildFormViewModel($producer, $languages, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ class ShopProductController
|
|||||||
'shop-product/products-list-custom-script'
|
'shop-product/products-list-custom-script'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view( 'shop-product/products-list', [
|
return \Shared\Tpl\Tpl::view( 'shop-product/products-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
'apilo_enabled' => $apiloEnabled,
|
'apilo_enabled' => $apiloEnabled,
|
||||||
'shoppro_enabled' => $shopproEnabled,
|
'shoppro_enabled' => $shopproEnabled,
|
||||||
@@ -230,7 +230,7 @@ class ShopProductController
|
|||||||
$product, $languages, $categories, $layouts, $products, $sets, $producers, $units, $dlang
|
$product, $languages, $categories, $layouts, $products, $sets, $producers, $units, $dlang
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view( 'shop-product/product-edit', [
|
return \Shared\Tpl\Tpl::view( 'shop-product/product-edit', [
|
||||||
'form' => $viewModel,
|
'form' => $viewModel,
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
@@ -600,7 +600,7 @@ class ShopProductController
|
|||||||
$html .= '<input type="checkbox" class="g-checkbox" name="categories[]" value="' . $catId . '"' . ( $checked ? ' checked="checked"' : '' ) . ' />';
|
$html .= '<input type="checkbox" class="g-checkbox" name="categories[]" value="' . $catId . '"' . ( $checked ? ' checked="checked"' : '' ) . ' />';
|
||||||
$html .= '<b>' . $catTitle . '</b>';
|
$html .= '<b>' . $catTitle . '</b>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= \Tpl::view( 'shop-product/subcategories-list', [
|
$html .= \Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
|
||||||
'categories' => ( new CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $catId ),
|
'categories' => ( new CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $catId ),
|
||||||
'product_categories' => $product['categories'] ?? [],
|
'product_categories' => $product['categories'] ?? [],
|
||||||
'dlang' => $dlang,
|
'dlang' => $dlang,
|
||||||
@@ -949,7 +949,7 @@ class ShopProductController
|
|||||||
{
|
{
|
||||||
$db = $GLOBALS['mdb'];
|
$db = $GLOBALS['mdb'];
|
||||||
|
|
||||||
return \Tpl::view( 'shop-product/product-combination', [
|
return \Shared\Tpl\Tpl::view( 'shop-product/product-combination', [
|
||||||
'product' => $this->repository->findForAdmin( (int) \Shared\Helpers\Helpers::get( 'product_id' ) ),
|
'product' => $this->repository->findForAdmin( (int) \Shared\Helpers\Helpers::get( 'product_id' ) ),
|
||||||
'attributes' => ( new \Domain\Attribute\AttributeRepository( $db ) )->getAttributesListForCombinations(),
|
'attributes' => ( new \Domain\Attribute\AttributeRepository( $db ) )->getAttributesListForCombinations(),
|
||||||
'default_language' => $this->languagesRepository->defaultLanguage(),
|
'default_language' => $this->languagesRepository->defaultLanguage(),
|
||||||
@@ -1146,7 +1146,7 @@ class ShopProductController
|
|||||||
{
|
{
|
||||||
$categoryRepository = new CategoryRepository( $GLOBALS['mdb'] );
|
$categoryRepository = new CategoryRepository( $GLOBALS['mdb'] );
|
||||||
|
|
||||||
return \Tpl::view( 'shop-product/mass-edit', [
|
return \Shared\Tpl\Tpl::view( 'shop-product/mass-edit', [
|
||||||
'products' => $this->repository->allProductsForMassEdit(),
|
'products' => $this->repository->allProductsForMassEdit(),
|
||||||
'categories' => $categoryRepository->subcategories( null ),
|
'categories' => $categoryRepository->subcategories( null ),
|
||||||
'dlang' => $this->languagesRepository->defaultLanguage(),
|
'dlang' => $this->languagesRepository->defaultLanguage(),
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class ShopProductSetsController
|
|||||||
'Dodaj komplet produktow'
|
'Dodaj komplet produktow'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-product-sets/product-sets-list', [
|
return \Shared\Tpl\Tpl::view('shop-product-sets/product-sets-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ class ShopProductSetsController
|
|||||||
$set = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
$set = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
||||||
$products = $this->repository->allProductsMap();
|
$products = $this->repository->allProductsMap();
|
||||||
|
|
||||||
return \Tpl::view('shop-product-sets/product-set-edit', [
|
return \Shared\Tpl\Tpl::view('shop-product-sets/product-set-edit', [
|
||||||
'form' => $this->buildFormViewModel($set, $products),
|
'form' => $this->buildFormViewModel($set, $products),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class ShopPromotionController
|
|||||||
'Dodaj promocje'
|
'Dodaj promocje'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-promotion/promotions-list', [
|
return \Shared\Tpl\Tpl::view('shop-promotion/promotions-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ class ShopPromotionController
|
|||||||
$promotion = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
$promotion = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
|
||||||
$categories = $this->repository->categoriesTree(null);
|
$categories = $this->repository->categoriesTree(null);
|
||||||
|
|
||||||
return \Tpl::view('shop-promotion/promotion-edit', [
|
return \Shared\Tpl\Tpl::view('shop-promotion/promotion-edit', [
|
||||||
'form' => $this->buildFormViewModel($promotion, $categories),
|
'form' => $this->buildFormViewModel($promotion, $categories),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ class ShopPromotionController
|
|||||||
'label' => 'Data do',
|
'label' => 'Data do',
|
||||||
'tab' => 'settings',
|
'tab' => 'settings',
|
||||||
]),
|
]),
|
||||||
FormField::custom('categories_group_1', \Tpl::view('shop-promotion/promotion-categories-selector', [
|
FormField::custom('categories_group_1', \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-selector', [
|
||||||
'label' => 'Kategorie grupa I',
|
'label' => 'Kategorie grupa I',
|
||||||
'inputName' => 'categories[]',
|
'inputName' => 'categories[]',
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
@@ -288,7 +288,7 @@ class ShopPromotionController
|
|||||||
]), [
|
]), [
|
||||||
'tab' => 'categories',
|
'tab' => 'categories',
|
||||||
]),
|
]),
|
||||||
FormField::custom('categories_group_2', \Tpl::view('shop-promotion/promotion-categories-selector', [
|
FormField::custom('categories_group_2', \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-selector', [
|
||||||
'label' => 'Kategorie grupa II',
|
'label' => 'Kategorie grupa II',
|
||||||
'inputName' => 'condition_categories[]',
|
'inputName' => 'condition_categories[]',
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class ShopStatusesController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-statuses/view-list', [
|
return \Shared\Tpl\Tpl::view('shop-statuses/view-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ class ShopStatusesController
|
|||||||
|
|
||||||
$apiloStatusList = $this->getApiloStatusList();
|
$apiloStatusList = $this->getApiloStatusList();
|
||||||
|
|
||||||
return \Tpl::view('shop-statuses/status-edit', [
|
return \Shared\Tpl\Tpl::view('shop-statuses/status-edit', [
|
||||||
'form' => $this->buildFormViewModel($status, $apiloStatusList),
|
'form' => $this->buildFormViewModel($status, $apiloStatusList),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ class ShopTransportController
|
|||||||
'Brak danych w tabeli.'
|
'Brak danych w tabeli.'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('shop-transport/transports-list', [
|
return \Shared\Tpl\Tpl::view('shop-transport/transports-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ class ShopTransportController
|
|||||||
$paymentMethods = $this->paymentMethodRepository->allForAdmin();
|
$paymentMethods = $this->paymentMethodRepository->allForAdmin();
|
||||||
$apiloCarrierAccounts = $this->getApiloCarrierAccounts();
|
$apiloCarrierAccounts = $this->getApiloCarrierAccounts();
|
||||||
|
|
||||||
return \Tpl::view('shop-transport/transport-edit', [
|
return \Shared\Tpl\Tpl::view('shop-transport/transport-edit', [
|
||||||
'form' => $this->buildFormViewModel($transport, $paymentMethods, $apiloCarrierAccounts),
|
'form' => $this->buildFormViewModel($transport, $paymentMethods, $apiloCarrierAccounts),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class UpdateController
|
|||||||
|
|
||||||
public function main_view(): string
|
public function main_view(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view( 'update/main-view', [
|
return \Shared\Tpl\Tpl::view( 'update/main-view', [
|
||||||
'ver' => \Shared\Helpers\Helpers::get_version(),
|
'ver' => \Shared\Helpers\Helpers::get_version(),
|
||||||
'new_ver' => \Shared\Helpers\Helpers::get_new_version(),
|
'new_ver' => \Shared\Helpers\Helpers::get_new_version(),
|
||||||
] );
|
] );
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class UsersController
|
|||||||
unset($_SESSION['form_errors'][$this->getFormId()]);
|
unset($_SESSION['form_errors'][$this->getFormId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Tpl::view('users/user-edit', [
|
return \Shared\Tpl\Tpl::view('users/user-edit', [
|
||||||
'form' => $this->buildFormViewModel($user, $validationErrors),
|
'form' => $this->buildFormViewModel($user, $validationErrors),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ class UsersController
|
|||||||
'Dodaj uzytkownika'
|
'Dodaj uzytkownika'
|
||||||
);
|
);
|
||||||
|
|
||||||
return \Tpl::view('users/users-list', [
|
return \Shared\Tpl\Tpl::view('users/users-list', [
|
||||||
'viewModel' => $viewModel,
|
'viewModel' => $viewModel,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -240,13 +240,13 @@ class UsersController
|
|||||||
|
|
||||||
public function login_form(): string
|
public function login_form(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('site/unlogged-layout');
|
return \Shared\Tpl\Tpl::view('site/unlogged-layout');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function twofa(): string
|
public function twofa(): string
|
||||||
{
|
{
|
||||||
return \Tpl::view('site/unlogged', [
|
return \Shared\Tpl\Tpl::view('site/unlogged', [
|
||||||
'content' => \Tpl::view('users/user-2fa'),
|
'content' => \Shared\Tpl\Tpl::view('users/user-2fa'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class Articles
|
|||||||
*/
|
*/
|
||||||
public static function fullArticle( $article )
|
public static function fullArticle( $article )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->article = $article;
|
$tpl->article = $article;
|
||||||
return $tpl->render( 'articles/article' );
|
return $tpl->render( 'articles/article' );
|
||||||
}
|
}
|
||||||
@@ -22,14 +22,14 @@ class Articles
|
|||||||
|
|
||||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->article = $article;
|
$tpl->article = $article;
|
||||||
$out .= $tpl->render( 'articles/article-miniature' );
|
$out .= $tpl->render( 'articles/article-miniature' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $ls > 1 )
|
if ( $ls > 1 )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->ls = $ls;
|
$tpl->ls = $ls;
|
||||||
$tpl->bs = $bs ? $bs : 1;
|
$tpl->bs = $bs ? $bs : 1;
|
||||||
$tpl->page = $page;
|
$tpl->page = $page;
|
||||||
@@ -44,14 +44,14 @@ class Articles
|
|||||||
*/
|
*/
|
||||||
public static function entryArticlesList( $articles, $ls, $bs, $page )
|
public static function entryArticlesList( $articles, $ls, $bs, $page )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->page_id = $page['id'];
|
$tpl->page_id = $page['id'];
|
||||||
$tpl->articles = $articles;
|
$tpl->articles = $articles;
|
||||||
$out = $tpl->render( 'articles/articles-entries' );
|
$out = $tpl->render( 'articles/articles-entries' );
|
||||||
|
|
||||||
if ( $ls > 1 )
|
if ( $ls > 1 )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->ls = $ls;
|
$tpl->ls = $ls;
|
||||||
$tpl->bs = $bs ? $bs : 1;
|
$tpl->bs = $bs ? $bs : 1;
|
||||||
$tpl->page = $page;
|
$tpl->page = $page;
|
||||||
@@ -70,14 +70,14 @@ class Articles
|
|||||||
|
|
||||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->article = $article;
|
$tpl->article = $article;
|
||||||
$out .= $tpl->render( 'articles/article-full' );
|
$out .= $tpl->render( 'articles/article-full' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $ls > 1 )
|
if ( $ls > 1 )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->ls = $ls;
|
$tpl->ls = $ls;
|
||||||
$tpl->bs = $bs ? $bs : 1;
|
$tpl->bs = $bs ? $bs : 1;
|
||||||
$tpl->page = $page;
|
$tpl->page = $page;
|
||||||
@@ -92,7 +92,7 @@ class Articles
|
|||||||
*/
|
*/
|
||||||
public static function news( $page_id, $articles )
|
public static function news( $page_id, $articles )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->page_id = $page_id;
|
$tpl->page_id = $page_id;
|
||||||
$tpl->articles = $articles;
|
$tpl->articles = $articles;
|
||||||
return $tpl->render( 'articles/news' );
|
return $tpl->render( 'articles/news' );
|
||||||
@@ -103,7 +103,7 @@ class Articles
|
|||||||
*/
|
*/
|
||||||
public static function newsList( $articles )
|
public static function newsList( $articles )
|
||||||
{
|
{
|
||||||
return \Tpl::view( 'articles/news-list', [
|
return \Shared\Tpl\Tpl::view( 'articles/news-list', [
|
||||||
'articles' => $articles
|
'articles' => $articles
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Banners
|
|||||||
{
|
{
|
||||||
public static function banners($banners)
|
public static function banners($banners)
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->banners = $banners;
|
$tpl->banners = $banners;
|
||||||
return $tpl->render('banner/banners');
|
return $tpl->render('banner/banners');
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ class Banners
|
|||||||
public static function mainBanner($banner)
|
public static function mainBanner($banner)
|
||||||
{
|
{
|
||||||
if (!\Shared\Helpers\Helpers::get_session('banner_close') && is_array($banner)) {
|
if (!\Shared\Helpers\Helpers::get_session('banner_close') && is_array($banner)) {
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl->banner = $banner;
|
$tpl->banner = $banner;
|
||||||
return $tpl->render('banner/main-banner');
|
return $tpl->render('banner/main-banner');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Languages
|
|||||||
{
|
{
|
||||||
public static function render( $languages )
|
public static function render( $languages )
|
||||||
{
|
{
|
||||||
$tpl = new \Tpl;
|
$tpl = new \Shared\Tpl\Tpl;
|
||||||
$tpl -> languages = $languages;
|
$tpl -> languages = $languages;
|
||||||
return $tpl -> render( 'site/languages' );
|
return $tpl -> render( 'site/languages' );
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user