Skip to content
Snippets Groups Projects
Commit f141edf8 authored by gloas's avatar gloas
Browse files

dev #14377 display principal autor in autocomplete

parent c9bd6ca1
Branches
Tags
5 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!215Dev#12992 Custom Fields,!209Hotline#13914 Album Link Config Menu,!190Dev#12691 Autocomplete,!185Dev#12691 Autocomplete
......@@ -21,11 +21,13 @@
class Class_Autocomplete_IndexTitle extends Class_Autocomplete_Index {
use Trait_Translator;
protected $file_name = 'titles';
protected $model_name='Class_Notice';
protected function getRecordData($record) {
return str_replace('<br />', ': ', $record->getTitrePrincipal());
return str_replace('<br />', ': ', $record->getTitrePrincipal() . $this->_(' de ') . $record->getAuteurPrincipal());
}
}
?>
\ No newline at end of file
......@@ -61,12 +61,13 @@ class Class_Autocomplete_IndexTest extends Storm_Test_ModelTestCase{
$this->fixture('Class_Notice',
['id' => 1301,
'titre_principal' => 'Bone of my bones']);
'titre_principal' => 'Bone of my bones',
'auteur_principal' => 'Charle']);
Class_Autocomplete_Index::indexRecordsTitle();
$this->assertTrue(
$this->_file_system->methodHasBeenCalledWithParams('fwrite', [$handle, "Bone of my bones\n"]));
$this->_file_system->methodHasBeenCalledWithParams('fwrite', [$handle, "Bone of my bones de Charle\n"]));
}
}
?>
\ 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