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

dev #75882 add link to search result to author browser

parent ec78818a
Branches
Tags
3 merge requests!2711Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2,!2707Tessadoc lost pass,!2699Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2
Pipeline #4360 passed with stage
in 35 minutes and 40 seconds
......@@ -29,4 +29,23 @@ class ZendAfi_Controller_Plugin_ResourceDefinition_Author extends ZendAfi_Contro
'actions' => ['index' => ['title' => $this->_('Parcourir les auteurs')]]];
}
public function getActions($model) {
if(!$model)
return [];
return [
['url' => $this->_view->url(['module' => 'opac',
'controller' => 'recherche',
'action' => 'simple',
'facette' => $model->getFacetCode()
],
null,
true),
'icon' => 'view',
'label' => $this->_('Voir les documents qui ont la facette "%s"',$model->getFacetCode()),
'anchorOptions' => ['target' => '_blank']
]];
}
}
\ No newline at end of file
......@@ -56,9 +56,25 @@ class CodificationBrowserAuthorIndexDispatchTest extends Admin_AbstractControlle
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->fixture('Class_CodifAuteur',
['id' => 15,
'libelle' => 'Erroc']);
$this->dispatch('/admin/author-browser', true);
}
/** @test */
public function linkToCodificationBrowserShouldBePresent() {
$this->dispatch('/admin/author-browser', true);
$this->assertXPathContentContains('//a[@href="/admin/codification-browser"]', 'Racine');
}
/** @test */
public function linkToSearchWithFacetA15ShouldBePresent() {
$this->assertXPath('//td//a[contains(@href, "/recherche/simple/facette/A15")]');
}
}
\ No newline at end of file
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