audio links in entree index launch the audio player

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-09 10:52:51 +01:00
parent 6d1b3d33bb
commit 02155ede91
8 changed files with 146 additions and 15 deletions
@@ -36,7 +36,7 @@ function edlp_corpus_entity_extra_field_info(){
'label' => t('Index'),
'description' => 'Display index of all documents tagued with the term',
'weight' => 99,
'visible' => FALSE,
// 'visible' => FALSE,
];
return $extra;
}
@@ -59,7 +59,6 @@ function edlp_corpus_taxonomy_term_view(array &$build, \Drupal\Core\Entity\Entit
->condition('field_entrees', $entity->id());
$documents_nids = $query->execute();
// dpm($documents_nids);
$documents = entity_load_multiple('node', $documents_nids);
$documents_list = array (
@@ -70,21 +69,25 @@ function edlp_corpus_taxonomy_term_view(array &$build, \Drupal\Core\Entity\Entit
$documents_list['#items'][] = $view_builder->view($doc, 'index');
}
// And the last step is to actually build the tree.
$build['index'] = array(
'#type'=>"container",
'#attributes'=>array(
'class'=>'index'
),
'label'=>array(
'#type' => 'container',
"#markup"=> t("Index"),
'#attributes'=>array(
'class'=>'field__label'
),
),
'documents'=> $documents_list
);
}
}
/**
* Implements hook_page_attachments().
* @param array $attachments