mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -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',
|
||||
'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
|
||||
|
||||
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);
|
||||
|
||||
return $this->view->make('visiosoft.module.advs::list/list', $compact);
|
||||
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||
}
|
||||
|
||||
public function fullLink($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)
|
||||
{
|
||||
Cookie::queue(Cookie::make('viewType', $type, 84000));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user