footer elements are almost displayed
This commit is contained in:
@@ -115,9 +115,12 @@
|
||||
// console.log("Mouse pos: ", {x:_m_pos.x, y:_m_pos.y});
|
||||
})
|
||||
.on('click', function(event) {
|
||||
event.preventDefault();
|
||||
if(_node_hover_id != -1){
|
||||
console.log("click on node", _nodes[_node_hover_id]);
|
||||
if(event.target.tagName != "A"){
|
||||
console.log("Corpus : click", event);
|
||||
event.preventDefault();
|
||||
if(_node_hover_id != -1){
|
||||
console.log("click on node", _nodes[_node_hover_id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -115,9 +115,12 @@
|
||||
// console.log("Mouse pos: ", {x:_m_pos.x, y:_m_pos.y});
|
||||
})
|
||||
.on('click', function(event) {
|
||||
event.preventDefault();
|
||||
if(_node_hover_id != -1){
|
||||
console.log("click on node", _nodes[_node_hover_id]);
|
||||
if(event.target.tagName != "A"){
|
||||
console.log("Corpus : click", event);
|
||||
event.preventDefault();
|
||||
if(_node_hover_id != -1){
|
||||
console.log("click on node", _nodes[_node_hover_id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
namespace Drupal\edlp_corpus\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Block\BlockBase;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
* Creates a 'Entrees' Block
|
||||
* @Block(
|
||||
* id = "block_edlp_entrees",
|
||||
* admin_label = @Translation("Edlp entrees block"),
|
||||
* )
|
||||
*/
|
||||
class BlockEntrees extends BlockBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function build() {
|
||||
|
||||
$query = \Drupal::entityQuery('taxonomy_term')
|
||||
->condition('vid', 'entrees');
|
||||
|
||||
$tids = $query->execute();
|
||||
$terms = entity_load_multiple('taxonomy_term', $tids);
|
||||
// dsm($terms);
|
||||
foreach ($terms as $term) {
|
||||
$tid = $term->id();
|
||||
$name = $term->getName();
|
||||
$url = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' => $tid]);
|
||||
$link = Link::fromTextAndUrl($name, $url);
|
||||
$link = $link->toRenderable();
|
||||
$link["#attributes"]["class"] = 'term-'.$term->id();
|
||||
$entrees[] = $link;
|
||||
}
|
||||
|
||||
return array (
|
||||
'#theme' => 'item_list',
|
||||
'#items' => $entrees,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user