aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/category/index.php9
-rw-r--r--admin/page/index.php9
-rw-r--r--admin/post/index.php9
-rw-r--r--admin/user/index.php9
4 files changed, 12 insertions, 24 deletions
diff --git a/admin/category/index.php b/admin/category/index.php
index 429435a..35a78c3 100644
--- a/admin/category/index.php
+++ b/admin/category/index.php
@@ -50,11 +50,6 @@ foreach($categories as $Category) {
#===============================================================================
# Build document
#===============================================================================
-$PaginationTemplate = Template\Factory::build('pagination');
-$PaginationTemplate->set('THIS', $currentSite);
-$PaginationTemplate->set('LAST', $lastSite);
-$PaginationTemplate->set('HREF', Application::getAdminURL('category/?site=%d'));
-
$ListTemplate = Template\Factory::build('category/index');
$ListTemplate->set('LIST', [
'CATEGORIES' => $templates ?? []
@@ -63,7 +58,9 @@ $ListTemplate->set('LIST', [
$ListTemplate->set('PAGINATION', [
'THIS' => $currentSite,
'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
+ 'HTML' => createPaginationTemplate(
+ $currentSite, $lastSite, Application::getAdminURL('category/')
+ )
]);
$MainTemplate = Template\Factory::build('main');
diff --git a/admin/page/index.php b/admin/page/index.php
index 2ec4eab..7586d3c 100644
--- a/admin/page/index.php
+++ b/admin/page/index.php
@@ -56,11 +56,6 @@ foreach($pages as $Page) {
#===============================================================================
# Build document
#===============================================================================
-$PaginationTemplate = Template\Factory::build('pagination');
-$PaginationTemplate->set('THIS', $currentSite);
-$PaginationTemplate->set('LAST', $lastSite);
-$PaginationTemplate->set('HREF', Application::getAdminURL('page/?site=%d'));
-
$ListTemplate = Template\Factory::build('page/index');
$ListTemplate->set('LIST', [
'PAGES' => $templates ?? []
@@ -69,7 +64,9 @@ $ListTemplate->set('LIST', [
$ListTemplate->set('PAGINATION', [
'THIS' => $currentSite,
'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
+ 'HTML' => createPaginationTemplate(
+ $currentSite, $lastSite, Application::getAdminURL('page/')
+ )
]);
$MainTemplate = Template\Factory::build('main');
diff --git a/admin/post/index.php b/admin/post/index.php
index 43d960a..2da0f81 100644
--- a/admin/post/index.php
+++ b/admin/post/index.php
@@ -56,11 +56,6 @@ foreach($posts as $Post) {
#===============================================================================
# Build document
#===============================================================================
-$PaginationTemplate = Template\Factory::build('pagination');
-$PaginationTemplate->set('THIS', $currentSite);
-$PaginationTemplate->set('LAST', $lastSite);
-$PaginationTemplate->set('HREF', Application::getAdminURL('post/?site=%d'));
-
$ListTemplate = Template\Factory::build('post/index');
$ListTemplate->set('LIST', [
'POSTS' => $templates ?? []
@@ -69,7 +64,9 @@ $ListTemplate->set('LIST', [
$ListTemplate->set('PAGINATION', [
'THIS' => $currentSite,
'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
+ 'HTML' => createPaginationTemplate(
+ $currentSite, $lastSite, Application::getAdminURL('post/')
+ )
]);
$MainTemplate = Template\Factory::build('main');
diff --git a/admin/user/index.php b/admin/user/index.php
index dce21db..d2bee8d 100644
--- a/admin/user/index.php
+++ b/admin/user/index.php
@@ -54,11 +54,6 @@ foreach($users as $User) {
#===============================================================================
# Build document
#===============================================================================
-$PaginationTemplate = Template\Factory::build('pagination');
-$PaginationTemplate->set('THIS', $currentSite);
-$PaginationTemplate->set('LAST', $lastSite);
-$PaginationTemplate->set('HREF', Application::getAdminURL('user/?site=%d'));
-
$ListTemplate = Template\Factory::build('user/index');
$ListTemplate->set('LIST', [
'USERS' => $templates ?? []
@@ -67,7 +62,9 @@ $ListTemplate->set('LIST', [
$ListTemplate->set('PAGINATION', [
'THIS' => $currentSite,
'LAST' => $lastSite,
- 'HTML' => $PaginationTemplate
+ 'HTML' => createPaginationTemplate(
+ $currentSite, $lastSite, Application::getAdminURL('user/')
+ )
]);
$MainTemplate = Template\Factory::build('main');