mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Add GamesController, adjust themes and classes
This commit is contained in:
@@ -32,12 +32,10 @@ class ConsoleController extends BasePageController
|
||||
$this->smarty->assign('catlist', $ctmp);
|
||||
$this->smarty->assign('category', $category->title);
|
||||
|
||||
$offset = ($request->has('offset') && ctype_digit($request->input('offset'))) ? $request->input('offset') : 0;
|
||||
$ordering = $console->getConsoleOrdering();
|
||||
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
|
||||
$page = \request()->has('page') ? \request()->input('page') : 1;
|
||||
|
||||
$consoles = [];
|
||||
$results = $console->getConsoleRange($catarray, $orderby, $this->userdata['categoryexclusions']);
|
||||
$results = $console->getConsoleRange($page, $catarray, $this->userdata['categoryexclusions']);
|
||||
|
||||
$maxwords = 50;
|
||||
foreach ($results as $result) {
|
||||
@@ -66,32 +64,17 @@ class ConsoleController extends BasePageController
|
||||
$this->smarty->assign('genres', $genres);
|
||||
$this->smarty->assign('genre', $genre);
|
||||
|
||||
$browseby_link = '&title='.$title.'&platform='.$platform;
|
||||
|
||||
$this->smarty->assign('pagertotalitems', $results[0]['_totalcount'] ?? 0);
|
||||
$this->smarty->assign('pageroffset', $offset);
|
||||
$this->smarty->assign('pageritemsperpage', config('nntmux.items_per_cover_page'));
|
||||
$this->smarty->assign('pagerquerybase', WWW_TOP.'/console?t='.$category.$browseby_link.'&ob='.$orderby.'&offset=');
|
||||
$this->smarty->assign('pagerquerysuffix', '#results');
|
||||
|
||||
$thisr = $this->smarty->fetch('pager.tpl');
|
||||
$this->smarty->assign('pager', $thisr);
|
||||
|
||||
if ((int) $category === -1) {
|
||||
if ($category === -1) {
|
||||
$this->smarty->assign('catname', 'All');
|
||||
} else {
|
||||
$cdata = Category::find($category);
|
||||
if ($cdata) {
|
||||
$this->smarty->assign('catname', $cdata->parent !== null ? $cdata->parent->title.' > '.$cdata->title : $cdata->title);
|
||||
$this->smarty->assign('catname', array_first($cdata)->parent !== null ? array_first($cdata)->parent->title.' > '.array_first($cdata)->title : array_first($cdata)->title);
|
||||
} else {
|
||||
$this->show404();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($ordering as $ordertype) {
|
||||
$this->smarty->assign('orderby'.$ordertype, WWW_TOP.'/console?t='.$category.$browseby_link.'&ob='.$ordertype.'&offset=0');
|
||||
}
|
||||
|
||||
$this->smarty->assign('results', $consoles);
|
||||
|
||||
$meta_title = 'Browse Console';
|
||||
|
||||
Reference in New Issue
Block a user