mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-03 11:49:03 +00:00
Improve templates
This commit is contained in:
@@ -10,7 +10,7 @@ class BrowseGroupController extends BasePageController
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function show(Request $request): void
|
||||
public function show(Request $request)
|
||||
{
|
||||
// Get the search term from the request
|
||||
$search = $request->get('search', '') ?? '';
|
||||
@@ -18,10 +18,7 @@ class BrowseGroupController extends BasePageController
|
||||
// Get groups based on search term
|
||||
$groupList = UsenetGroup::getGroupsRange($search, true);
|
||||
|
||||
// Pass data to the view
|
||||
$this->smarty->assign('results', $groupList);
|
||||
$this->smarty->assign('search', $search);
|
||||
|
||||
// Set meta data
|
||||
$meta_title = 'Browse Groups';
|
||||
$meta_keywords = 'browse,groups,description,details';
|
||||
$meta_description = 'Browse groups';
|
||||
@@ -30,8 +27,21 @@ class BrowseGroupController extends BasePageController
|
||||
$meta_description = 'Browse groups search results for '.$search;
|
||||
}
|
||||
|
||||
$content = $this->smarty->fetch('browsegroup.tpl');
|
||||
$this->smarty->assign(compact('content', 'meta_title', 'meta_keywords', 'meta_description'));
|
||||
$this->pagerender();
|
||||
// Render the content view
|
||||
$content = view('browsegroup', [
|
||||
'results' => $groupList,
|
||||
'search' => $search,
|
||||
'site' => $this->settings,
|
||||
])->render();
|
||||
|
||||
// Prepare view data for main layout
|
||||
$this->viewData = array_merge($this->viewData, [
|
||||
'content' => $content,
|
||||
'meta_title' => $meta_title,
|
||||
'meta_keywords' => $meta_keywords,
|
||||
'meta_description' => $meta_description,
|
||||
]);
|
||||
|
||||
return $this->pagerender();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user