Skip to content
Snippets Groups Projects
Commit cb62f8ff authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline-master' into 'master'

Hotline master

See merge request !2150
parents 890dbc9e a509fae8
Branches
Tags
3 merge requests!2334Master,!2151Master,!2150Hotline master
Pipeline #1478 passed with stage
in 10 minutes and 29 seconds
11/05/2017 - v7.9.18
- ticket #60290 : Administration des articles : correction du mauvais affichage du statut de publication
- ticket #60040 : Correction d'un bug lors de l'intégration des fichiers d'abonnés Nanook
09/05/2017 - v7.9.17
- ticket #59718 : Intégration de l'enregistrement d'applications et d'authentification via OAuth
......
......@@ -59,7 +59,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
}, $bibs);
$search = $this->_getParam('title_search', '');
$status = $this->_getParam('status', '');
$status = $this->_getParam(ZendAfi_Controller_Action_Helper_ArticleListViewMode::STATUS_SEARCH, '');
$id_bib = $this->_getParam('id_bib',
$this->identity->isRoleLibraryLimited()
......@@ -69,7 +69,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
$params = ['page' => $this->_getParam('page', 0),
'search_value' => $search,
'status' => $status,
ZendAfi_Controller_Action_Helper_ArticleListViewMode::STATUS_SEARCH => $status,
'bib' => $this->_bib,
'id_bib' => $id_bib,
'id_cat' => $id_cat];
......@@ -95,7 +95,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
if($this->_request->isPost())
return $this->_redirectToRefererWithNewParams(['title_search' => $this->_getPost()['title_search'],
'page' => $this->_getParam('page'),
'status' => $this->_getPost()['status']]);
ZendAfi_Controller_Action_Helper_ArticleListViewMode::STATUS_SEARCH => $this->_getPost()[ZendAfi_Controller_Action_Helper_ArticleListViewMode::STATUS_SEARCH]]);
if (Class_AdminVar::isArticlesListMode())
return $this->_renderList();
......@@ -173,4 +173,3 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
$this->getResponse()->setBody((new Class_ArticleCategorie())->getCategoriesJson());
}
}
?>
\ No newline at end of file
......@@ -147,7 +147,7 @@ class Class_User_DoubleFinder_NanookStrategy
}
protected function _matchByLoginAndIdSigbAndIdSite() {
protected function _matchByLoginAndIdSigbAndLibrary() {
return $this->_matchRestrictedToSite(['login' => $this->getPatronLogin(),
'id_sigb' => $this->getPatronIdSigb()]);
}
......
......@@ -22,6 +22,7 @@
class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Controller_Action_Helper_AbstractListViewMode {
const STRATEGY = 'article';
const STATUS_SEARCH = 'status_search';
protected
$_filtred_categories_ids = [],
......@@ -55,7 +56,7 @@ class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Contr
'id_cat' => $this->getParam('id_cat'),
'id_bib' => $this->getParam('id_bib'),
'title_search' => $this->getSearch(),
'status' => $this->getParam('status')];
static::STATUS_SEARCH => $this->getStatus()];
}
......@@ -64,7 +65,7 @@ class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Contr
'id_bib' => $this->getBibId(),
'title_search' => '',
'page' => '1',
'status' => ''];
static::STATUS_SEARCH => ''];
}
......@@ -364,14 +365,14 @@ class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Contr
public function _getSearchForm($view) {
$form = parent::_getSearchForm($view);
if(!Class_AdminVar::isWorkflowEnabled())
if (!Class_AdminVar::isWorkflowEnabled())
return $form;
Class_ScriptLoader::getInstance()->addJQueryReady('$("form select[name=\'status\']").on("change", function() {$(this).closest("form").submit();});');
Class_ScriptLoader::getInstance()->addJQueryReady('$("form select[name=\''. static::STATUS_SEARCH .'\']").on("change", function() {$(this).closest("form").submit();});');
$form->removeDisplayGroup('list_search_group');
return $form->addElement('select',
'status',
static::STATUS_SEARCH,
['multiOptions' => [0 => $this->_('Tous statuts')] + Class_Article::getKnownStatus(),
'value' => $this->getStatus()])
->addUniqDisplayGroup('list_search_group');
......@@ -379,7 +380,7 @@ class ZendAfi_Controller_Action_Helper_ArticleListViewMode extends ZendAfi_Contr
public function getStatus() {
return $this->getParam('status');
return $this->getParam(static::STATUS_SEARCH);
}
......
......@@ -82,7 +82,7 @@ class Bokeh_Engine {
function setupConstants() {
defineConstant('BOKEH_MAJOR_VERSION','7.9');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.17');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.18');
defineConstant('BOKEH_REMOTE_FILES', 'http://git.afi-sa.fr/afi/opacce/');
......
......@@ -98,7 +98,7 @@ class CmsControllerListModeAdminBibRootTest extends CmsControllerListModeTestCas
/** @test */
public function shouldDisplayRootCategory() {
$this->assertXPathContentContains('//td/a[contains(@href, "cms/index/page/1/id_cat/1/id_bib/1/title_search//status/")]',
$this->assertXPathContentContains('//td/a[contains(@href, "cms/index/page/1/id_cat/1/id_bib/1/title_search//status_search/")]',
'Root');
}
}
......@@ -446,7 +446,7 @@ class CmsControllerListModeSearchFormTest extends CmsControllerListModeTestCase
/** @test */
public function statusSelectorShouldBeDisplay() {
$this->assertXPath('//form//select[@name="status"]');
$this->assertXPath('//form//select[@name="status_search"]');
}
......@@ -471,12 +471,12 @@ class CmsControllerListModeSearchPostFormTest extends CmsControllerListModeTestC
$this->fixture('Class_AdminVar', ['id' => 'WORKFLOW', 'valeur' => '1']);
$_SERVER['HTTP_REFERER'] = 'http://mybokeh.fr/admin/cms/index';
$this->postDispatch('/admin/cms/index/id_cat/1', ['title_search' => 'abc',
'status' => 1]);
'status_search' => 1]);
}
/** @test */
public function shouldRedirectToCms() {
$this->assertRedirectTo('/admin/cms/index/title_search/abc/status/1');
$this->assertRedirectTo('/admin/cms/index/title_search/abc/status_search/1');
}
}
......@@ -70,7 +70,7 @@ class UserDoubleFinderWithSingleNanookTest extends ModelTestCase {
'ROLE' => 'abonne_sigb',
'ROLE_LEVEL' => 2,
'IDABON' => '0046158',
'ORDREABON' => 1,
'ORDREABON' => 3,
'pseudo' => '',
'DATE_DEBUT' => '',
'ID_SIGB' => '6308',
......
......@@ -108,7 +108,7 @@ class ArticleListViewModeTest extends ModelTestCase {
$this->_list = (new ZendAfi_Controller_Action_Helper_ArticleListViewMode())
->articleListViewMode(['page' => 0,
'search_value' => $search,
'status' => 3,
'status_search' => 3,
'bib' => $this->_bib,
'id_bib' => null,
'id_cat' => 0]);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment