Skip to content
Snippets Groups Projects

dev#189214: Add managed libraries select in users edit/add form

Viewing commit 5fd2329e
Show latest version
4 files
+ 136
34
Preferences
Compare changes
Files
4
@@ -41,24 +41,14 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
protected function _renderList() {
$bibs = Class_Bib::findAllForCurrentUserAndPortal();
$current_library = (Class_Users::isCurrentUserCanAccessAllBibs())
? null
: $this->identity->getBib();
$ids = array_map(function($model)
{
return $model->getId();
}, $bibs);
$ids = array_map(fn($model) => $model->getId(), $bibs);
$search = $this->_getParam('title_search', '');
$order = $this->_getParam('order', 'titre');
$status = $this->_getParam(ZendAfi_Controller_Action_Helper_ListViewMode_Article::STATUS_SEARCH, '');
$id_bib = $this->_getParam('id_bib',
($current_library
? $current_library->getId()
: null));
$id_bib = $this->_getParam('id_bib', null);
$article = ($id_article = $this->_getParam('id', null))
? Class_Article::find($id_article)
@@ -72,7 +62,6 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
'search_value' => $search,
'order' => $order,
ZendAfi_Controller_Action_Helper_ListViewMode_Article::STATUS_SEARCH => $status,
'bib' => $current_library,
'id_bib' => $id_bib,
'id_cat' => $id_cat];