CC-4954: Please make Library page remember the status per user
-done
This commit is contained in:
parent
9715a9ad6d
commit
d1301ff676
5 changed files with 72 additions and 4 deletions
|
@ -77,6 +77,17 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
//get user settings and determine if we need to hide
|
||||
// or show the playlist editor
|
||||
$showPlaylist = false;
|
||||
$data = Application_Model_Preference::getLibraryScreenSettings();
|
||||
if (!is_null($data)) {
|
||||
if ($data["playlist"] == "true") {
|
||||
$showLib = true;
|
||||
}
|
||||
}
|
||||
$this->view->showPlaylist = $showPlaylist;
|
||||
|
||||
$formatter = new LengthFormatter($obj->getLength());
|
||||
$this->view->length = $formatter->format();
|
||||
$this->view->type = $obj_sess->type;
|
||||
|
|
|
@ -15,6 +15,7 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
->addActionContext('remindme', 'json')
|
||||
->addActionContext('remindme-never', 'json')
|
||||
->addActionContext('donotshowregistrationpopup', 'json')
|
||||
->addActionContext('set-library-screen-settings', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
|
@ -54,6 +55,7 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
{
|
||||
$request = $this->getRequest();
|
||||
$settings = $request->getParam("settings");
|
||||
|
||||
Application_Model_Preference::setTimelineDatatableSetting($settings);
|
||||
}
|
||||
|
||||
|
@ -91,4 +93,11 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
// unset session
|
||||
Zend_Session::namespaceUnset('referrer');
|
||||
}
|
||||
|
||||
public function setLibraryScreenSettingsAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$settings = $request->getParam("settings");
|
||||
Application_Model_Preference::setLibraryScreenSettings($settings);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue