mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
#924 Remove viewtype from store module
This commit is contained in:
parent
c30ad70fd3
commit
af9cbbe7f3
@ -273,20 +273,25 @@ class AdvsController extends PublicController
|
|||||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
|
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
|
||||||
'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
|
'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
|
||||||
|
|
||||||
if (isset($viewType) and $viewType == 'table')
|
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||||
return $this->view->make('visiosoft.module.advs::list/table', $compact);
|
|
||||||
elseif (isset($viewType) and $viewType == 'map')
|
|
||||||
return $this->view->make('visiosoft.module.advs::list/map', $compact);
|
|
||||||
elseif (isset($viewType) and $viewType == 'gallery')
|
|
||||||
return $this->view->make('visiosoft.module.advs::list/gallery', $compact);
|
|
||||||
|
|
||||||
return $this->view->make('visiosoft.module.advs::list/list', $compact);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fullLink($request, $url, $newParameters) {
|
public function fullLink($request, $url, $newParameters) {
|
||||||
return $this->dispatch(new appendRequestURL($request, $url, $newParameters));
|
return $this->dispatch(new appendRequestURL($request, $url, $newParameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function viewTypeBasedRedirect($viewType, $compact) {
|
||||||
|
if (isset($viewType) and $viewType == 'table') {
|
||||||
|
return $this->view->make('visiosoft.module.advs::list/table', $compact);
|
||||||
|
} elseif (isset($viewType) and $viewType == 'map') {
|
||||||
|
return $this->view->make('visiosoft.module.advs::list/map', $compact);
|
||||||
|
} elseif (isset($viewType) and $viewType == 'gallery') {
|
||||||
|
return $this->view->make('visiosoft.module.advs::list/gallery', $compact);
|
||||||
|
} else {
|
||||||
|
return $this->view->make('visiosoft.module.advs::list/list', $compact);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function viewType($type)
|
public function viewType($type)
|
||||||
{
|
{
|
||||||
Cookie::queue(Cookie::make('viewType', $type, 84000));
|
Cookie::queue(Cookie::make('viewType', $type, 84000));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user