diff --git a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.info.yml b/sites/all/modules/figli/edlp_ajax/edlp_ajax.info.yml similarity index 54% rename from sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.info.yml rename to sites/all/modules/figli/edlp_ajax/edlp_ajax.info.yml index 7645fa675..abd774525 100644 --- a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.info.yml +++ b/sites/all/modules/figli/edlp_ajax/edlp_ajax.info.yml @@ -1,11 +1,11 @@ # @Author: Bachir Soussi Chiadmi # @Email: bachir@figureslibres.io -# @Filename: edlp_ajax_node.info.yml +# @Filename: edlp_ajax.info.yml # @License: GPL-V3 -name: Edlp Ajax Node +name: Edlp Ajax type: module -description: Manage ajax node loading for edlp d8. +description: Manage ajax entity loading for edlp d8. core: 8.x package: Edlp diff --git a/sites/all/modules/figli/edlp_ajax/edlp_ajax.module b/sites/all/modules/figli/edlp_ajax/edlp_ajax.module new file mode 100644 index 000000000..e739c53f3 --- /dev/null +++ b/sites/all/modules/figli/edlp_ajax/edlp_ajax.module @@ -0,0 +1,41 @@ + +# @Email: bachir@figureslibres.io +# @Filename: edlp_ajax.module +# @License: GPL-V3 + +/** + * Implements hook_theme(). + */ +function edlp_ajax_theme($existing, $type, $theme, $path) { + // @see https://www.drupal.org/docs/8/theming/twig/create-custom-twig-templates-from-custom-module + return array( + 'edlp_ajax' => array( + 'file' => 'includes/edlp_ajax.inc', + 'variables' => array( + 'entity_type' => 'node', + 'entity' => NULL, + 'view_mode' => 'default' + ), + ), + ); +} + +/** + * Implements hook_theme_suggestions_HOOK(). + */ +function edlp_ajax_theme_suggestions_edlp_ajax(array $vars) { + // dpm($vars); + $suggestions = []; + // $node = $variables['elements']['#node']; + $sanitized_view_mode = strtr($vars['view_mode'], '.', '_'); + // + $suggestions[] = 'edlp_ajax__' . $vars['entity_type']; + $suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $sanitized_view_mode; + // $suggestions[] = 'node__' . $node->bundle() . '__' . $sanitized_view_mode; + $suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['entity']->id(); + $suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['entity']->id() . '__' . $sanitized_view_mode; + + return $suggestions; +} diff --git a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.routing.yml b/sites/all/modules/figli/edlp_ajax/edlp_ajax.routing.yml similarity index 52% rename from sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.routing.yml rename to sites/all/modules/figli/edlp_ajax/edlp_ajax.routing.yml index f3c385bb5..41a40d0ae 100644 --- a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.routing.yml +++ b/sites/all/modules/figli/edlp_ajax/edlp_ajax.routing.yml @@ -6,20 +6,20 @@ # @Last modified time: 20-12-2017 # @License: GPL-V3 -edlp_ajax_node.node: - path: '/edlp/node/{nid}/{viewmode}' +edlp_ajax.node: + path: '/edlp/ajax/{entity_type}/{id}/{viewmode}' defaults: - _controller: '\Drupal\edlp_ajax_node\Controller\EdlpAjaxNodeController::node' - _title: 'Node' + _controller: '\Drupal\edlp_ajax\Controller\EdlpAjaxController::entity' + _title: 'EdlpAjax' viewmode: 'default' requirements: _permission: 'access content' -edlp_ajax_node.ajaxnode: - path: '/edlp/node/{nid}/ajax/{viewmode}' +edlp_ajax.ajaxnode: + path: '/edlp/ajax/json/{entity_type}/{id}/{viewmode}' defaults: - _controller: '\Drupal\edlp_ajax_node\Controller\EdlpAjaxNodeController::nodejson' - _title: 'AjaxNode' + _controller: '\Drupal\edlp_ajax\Controller\EdlpAjaxController::entityjson' + _title: 'EdlpAjaxJson' viewmode: 'default' requirements: _permission: 'access content' diff --git a/sites/all/modules/figli/edlp_ajax/includes/edlp_ajax.inc b/sites/all/modules/figli/edlp_ajax/includes/edlp_ajax.inc new file mode 100644 index 000000000..acd6601ac --- /dev/null +++ b/sites/all/modules/figli/edlp_ajax/includes/edlp_ajax.inc @@ -0,0 +1,12 @@ +getViewBuilder($vars['entity_type']); + $vars['content'] = $view_builder->view($vars['entity'], $vars['view_mode']); +} diff --git a/sites/all/modules/figli/edlp_ajax/src/Controller/EdlpAjaxController.php b/sites/all/modules/figli/edlp_ajax/src/Controller/EdlpAjaxController.php new file mode 100644 index 000000000..3e8520d8b --- /dev/null +++ b/sites/all/modules/figli/edlp_ajax/src/Controller/EdlpAjaxController.php @@ -0,0 +1,69 @@ +entity = entity_load($this->entity_type, $this->id); + } + + private function toRenderable(){ + $this->query(); + + if($this->entity){ + return array( + "#theme"=>'edlp_ajax', + "#entity_type" => $this->entity_type, + '#entity' => $this->entity, + '#view_mode' => $this->viewmode, + ); + }else{ + return array( + '#markup'=>'404! '.$this->entity_type.' '.$this->id." not found!" + ); + } + } + + /** + * Display entity as a page. + * + * @return renderable array + */ + public function entity($entity_type, $id, $viewmode) { + $this->entity_type = $entity_type; + $this->id = $id; + $this->viewmode = $viewmode; + return $this->toRenderable(); + } + + /** + * Get entity as json through ajax. + * + * @return json + */ + public function entityjson($entity_type, $id, $viewmode) { + $this->entity_type = $entity_type; + $this->id = $id; + $this->viewmode = $viewmode; + $renderable = $this->toRenderable(); + $rendered = render($renderable); + + $response = new JsonResponse(); + $response->setData([ + 'test' => 'hello edlp ajax', + 'id' => $this->id, + 'view_mode' => $this->viewmode, + 'bundle' => $this->entity->getType(), + 'entity_type' => $this->entity_type, + 'rendered'=> $rendered, + ]); + + return $response; + } + +} diff --git a/sites/all/modules/figli/edlp_ajax/templates/edlp-ajax.html.twig b/sites/all/modules/figli/edlp_ajax/templates/edlp-ajax.html.twig new file mode 100644 index 000000000..cddd07099 --- /dev/null +++ b/sites/all/modules/figli/edlp_ajax/templates/edlp-ajax.html.twig @@ -0,0 +1 @@ +{{ content }} diff --git a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.module b/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.module deleted file mode 100644 index 2b778be7f..000000000 --- a/sites/all/modules/figli/edlp_ajax_node/edlp_ajax_node.module +++ /dev/null @@ -1,22 +0,0 @@ - -# @Email: bachir@figureslibres.io -# @Filename: edlp_ajax_node.module -# @License: GPL-V3 - -/** - * Implements hook_theme(). - */ -function edlp_ajax_node_theme($existing, $type, $theme, $path) { - // @see https://www.drupal.org/docs/8/theming/twig/create-custom-twig-templates-from-custom-module - return array( - 'edlp_ajax_node' => array( - 'file' => 'includes/edlp_ajax_node.inc', - 'variables' => array( - 'node_object' => NULL, - 'view_mode' => 'default' - ), - ), - ); -} diff --git a/sites/all/modules/figli/edlp_ajax_node/includes/edlp_ajax_node.inc b/sites/all/modules/figli/edlp_ajax_node/includes/edlp_ajax_node.inc deleted file mode 100644 index 7575079ff..000000000 --- a/sites/all/modules/figli/edlp_ajax_node/includes/edlp_ajax_node.inc +++ /dev/null @@ -1,12 +0,0 @@ -getViewBuilder('node'); - $vars['node'] = $view_builder->view($vars['node_object'], $vars['view_mode']); -} diff --git a/sites/all/modules/figli/edlp_ajax_node/src/Controller/EdlpAjaxNodeController.php b/sites/all/modules/figli/edlp_ajax_node/src/Controller/EdlpAjaxNodeController.php deleted file mode 100644 index df9ea1e40..000000000 --- a/sites/all/modules/figli/edlp_ajax_node/src/Controller/EdlpAjaxNodeController.php +++ /dev/null @@ -1,64 +0,0 @@ -node = entity_load('node', $this->nid); - } - - private function toRenderable(){ - $this->query(); - - if($this->node){ - return array( - "#theme"=>'edlp_ajax_node', - '#node_object' => $this->node, - '#view_mode' => $this->viewmode, - ); - }else{ - return array( - '#markup'=>'404! Node '.$this->nid." not found!" - ); - } - } - - /** - * Display node as a page. - * - * @return renderable array - */ - public function node($nid, $viewmode) { - $this->nid = $nid; - $this->viewmode = $viewmode; - return $this->toRenderable(); - } - - /** - * Get node as json through ajax. - * - * @return json - */ - public function nodejson($nid, $viewmode) { - $this->nid = $nid; - $this->viewmode = $viewmode; - $renderable = $this->toRenderable(); - $rendered = render($renderable); - - $response = new JsonResponse(); - $response->setData([ - 'test' => 'hello edlp ajax node', - 'nid' => $this->nid, - 'view_mode' => $this->viewmode, - 'rendered'=> $rendered, - ]); - - return $response; - } - -} diff --git a/sites/all/modules/figli/edlp_ajax_node/templates/edlp-ajax-node.html.twig b/sites/all/modules/figli/edlp_ajax_node/templates/edlp-ajax-node.html.twig deleted file mode 100644 index 44667ef00..000000000 --- a/sites/all/modules/figli/edlp_ajax_node/templates/edlp-ajax-node.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ node }} diff --git a/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js b/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js index 105355bee..2011154ce 100644 --- a/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js +++ b/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js @@ -155,41 +155,30 @@ this.r = 5; break; } - // this.base_radius = _base_radius; - // this.g = { - // l : 1, // drawing line width - // s : 1 // drawing space between squares - // }; - // this.real_radius = this.base_radius + (this.g.l+this.g.s)*this.entrees.length; - - // prototype function not available on construct :( - // this.calcWallLimits(); - this.wall_limits = { - top: _canvas_props.margin_top +this.r, - right: _canvas.width -_canvas_props.margin_right -this.r, - bottom: _canvas.height -_canvas_props.margin_bottom -this.r, - left: _canvas_props.margin_left +this.r - } - - this.x = this.wall_limits.left + Math.random()*(this.wall_limits.right - this.wall_limits.left); - this.y = this.wall_limits.top + Math.random()*(this.wall_limits.bottom - this.wall_limits.top); this.e_color = 'e_col_'+this.entrees[Math.floor(Math.random(this.entrees.length))]; this.hover = false; this.opened = false; - // physics - this.p = _physics.makeParticle(this.mass, this.x, this.y); - this.p.velocity = new Physics.Vector((Math.random()-0.5)*_p_velocity_factor, (Math.random()-0.5)*_p_velocity_factor); - - // if(this.id == '620'){ - // _node_pop_up.setNode(this); - // } - // prototypes if (typeof Node.initialized == "undefined") { + Node.prototype.init = function(){ + this.calcWallLimits(); + + this.x = this.wall_limits.left + Math.random()*(this.wall_limits.right - this.wall_limits.left); + this.y = this.wall_limits.top + Math.random()*(this.wall_limits.bottom - this.wall_limits.top); + + // physics + this.p = _physics.makeParticle(this.mass, this.x, this.y); + this.p.velocity = new Physics.Vector((Math.random()-0.5)*_p_velocity_factor, (Math.random()-0.5)*_p_velocity_factor); + + // if(this.id == '620'){ + // _node_pop_up.setNode(this); + // } + }; + Node.prototype.calcWallLimits = function(){ this.wall_limits = { top: _canvas_props.margin_top +this.r, @@ -223,6 +212,7 @@ if (Math.abs(this.p.velocity.x) < this.velocity_threshold && Math.abs(this.p.velocity.y) < this.velocity_threshold){ this.p.velocity.multiplyScalar(0); + // this.p.makeFixed(); } }; @@ -287,8 +277,8 @@ // actif entouré de rouge _ctx.beginPath(); - // _ctx.fillStyle = !this.p.resting() ? edlp_vars[this.e_color] : 'rgb(0, 0, 0)'; - _ctx.fillStyle = edlp_vars[this.e_color]; + _ctx.fillStyle = !this.p.resting() ? edlp_vars[this.e_color] : 'rgb(0, 0, 0)'; + // _ctx.fillStyle = edlp_vars[this.e_color]; _ctx.fillRect(this.x - this.r,this.y - this.r,this.r*2,this.r*2); if(this.opened){ @@ -303,7 +293,7 @@ Node.initialized = true; } - // this.init(); + this.init(); }; // TODO: we may convert a lot of computation into a web worker https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers function checkParticulesCollisions(){ diff --git a/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js b/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js index 105355bee..2011154ce 100644 --- a/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js +++ b/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js @@ -155,41 +155,30 @@ this.r = 5; break; } - // this.base_radius = _base_radius; - // this.g = { - // l : 1, // drawing line width - // s : 1 // drawing space between squares - // }; - // this.real_radius = this.base_radius + (this.g.l+this.g.s)*this.entrees.length; - - // prototype function not available on construct :( - // this.calcWallLimits(); - this.wall_limits = { - top: _canvas_props.margin_top +this.r, - right: _canvas.width -_canvas_props.margin_right -this.r, - bottom: _canvas.height -_canvas_props.margin_bottom -this.r, - left: _canvas_props.margin_left +this.r - } - - this.x = this.wall_limits.left + Math.random()*(this.wall_limits.right - this.wall_limits.left); - this.y = this.wall_limits.top + Math.random()*(this.wall_limits.bottom - this.wall_limits.top); this.e_color = 'e_col_'+this.entrees[Math.floor(Math.random(this.entrees.length))]; this.hover = false; this.opened = false; - // physics - this.p = _physics.makeParticle(this.mass, this.x, this.y); - this.p.velocity = new Physics.Vector((Math.random()-0.5)*_p_velocity_factor, (Math.random()-0.5)*_p_velocity_factor); - - // if(this.id == '620'){ - // _node_pop_up.setNode(this); - // } - // prototypes if (typeof Node.initialized == "undefined") { + Node.prototype.init = function(){ + this.calcWallLimits(); + + this.x = this.wall_limits.left + Math.random()*(this.wall_limits.right - this.wall_limits.left); + this.y = this.wall_limits.top + Math.random()*(this.wall_limits.bottom - this.wall_limits.top); + + // physics + this.p = _physics.makeParticle(this.mass, this.x, this.y); + this.p.velocity = new Physics.Vector((Math.random()-0.5)*_p_velocity_factor, (Math.random()-0.5)*_p_velocity_factor); + + // if(this.id == '620'){ + // _node_pop_up.setNode(this); + // } + }; + Node.prototype.calcWallLimits = function(){ this.wall_limits = { top: _canvas_props.margin_top +this.r, @@ -223,6 +212,7 @@ if (Math.abs(this.p.velocity.x) < this.velocity_threshold && Math.abs(this.p.velocity.y) < this.velocity_threshold){ this.p.velocity.multiplyScalar(0); + // this.p.makeFixed(); } }; @@ -287,8 +277,8 @@ // actif entouré de rouge _ctx.beginPath(); - // _ctx.fillStyle = !this.p.resting() ? edlp_vars[this.e_color] : 'rgb(0, 0, 0)'; - _ctx.fillStyle = edlp_vars[this.e_color]; + _ctx.fillStyle = !this.p.resting() ? edlp_vars[this.e_color] : 'rgb(0, 0, 0)'; + // _ctx.fillStyle = edlp_vars[this.e_color]; _ctx.fillRect(this.x - this.r,this.y - this.r,this.r*2,this.r*2); if(this.opened){ @@ -303,7 +293,7 @@ Node.initialized = true; } - // this.init(); + this.init(); }; // TODO: we may convert a lot of computation into a web worker https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers function checkParticulesCollisions(){ diff --git a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js index 301e9738c..a6321d0bd 100644 --- a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js +++ b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js @@ -120,7 +120,7 @@ edlp_vars = { // cartel functions loadNode(nid){ this.$cartel.addClass('loading'); - $.getJSON('/edlp/node/'+nid+'/ajax/player_cartel', {}) + $.getJSON('/edlp/ajax/json/node/'+nid+'/player_cartel', {}) .done(this.onNodeLoaded.bind(this)) .fail(this.onNodeLoadFail.bind(this)); }, @@ -242,11 +242,7 @@ edlp_vars = { var $this = $(this); // avoid already ajaxified links // if($this.is('.ajax-enable')) return; - var sys_path = $this.attr('data-drupal-link-system-path'); - if(sys_path){ - // convert node link to edlp_ajax_node module links - m = sys_path.match(/^\/?(node\/\d+)$/g); - if(m) $this.attr('data-drupal-link-system-path', 'edlp/'+m[0]); + if($this.attr('data-drupal-link-system-path')){ $this.on('click', onClickAjaxLink).addClass('ajax-enable'); } }); @@ -260,19 +256,28 @@ edlp_vars = { return false; var sys_path = $(this).attr('data-drupal-link-system-path'); + var ajax_path = sys_path; if(sys_path == ''){ backToFrontPage(); return false; } + m = ajax_path.match(/^\/?(node\/\d+)$/g); + if(m){ + // convert node link to edlp_ajax_node module links + ajax_path = 'edlp/ajax/json/'+m[0]; + // check for viewmode attribute + if($link.attr('viewmode')){ + ajax_path += '/'+$link.attr('viewmode'); + } + }else{ + // convert other link to ajax + ajax_path += '/ajax' + } - var path = window.location.origin + drupalSettings.path.baseUrl + sys_path; _$body.addClass('ajax-loading'); $link.addClass('ajax-loading'); - // check for viewmode attribute - path += '/ajax'; - if($link.attr('viewmode') != ''){ - path += '/'+$link.attr('viewmode'); - } + + var path = window.location.origin + drupalSettings.path.baseUrl + ajax_path; $.getJSON(path, {}) .done(function(data){ onAjaxLinkLoaded(data, $link, sys_path); @@ -298,9 +303,16 @@ edlp_vars = { _$content_container.html(data.rendered); // add body class for currently loaded content - _$body.removeClass().addClass('path-'+sys_path.replace(/\//g, '-')); + var body_classes = [ + 'path-'+sys_path.replace(/\//g, '-'), + 'entity-type-'+data.entity_type, + 'bundle-'+data.bundle, + 'view-mode-'+data.view_mode + ]; + _$body.removeClass().addClass(body_classes.join(' ')); + // id node add a generic path-node class to body - m = sys_path.match(/^\/?(edlp\/node\/\d+)$/g); + m = sys_path.match(/^\/?(node\/\d+)$/g); if(m) _$body.addClass('path-edlp-node'); diff --git a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css index d990f43b9..291b82765 100644 --- a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css +++ b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css @@ -1607,7 +1607,7 @@ footer { footer .block-block-edlp-entrees { pointer-events: none; display: inline-block; } - body:not(.path-frontpage) footer .block-block-edlp-entrees { + body.path-productions footer .block-block-edlp-entrees { display: none; } footer .block-block-edlp-entrees ul { white-space: nowrap; } diff --git a/sites/all/themes/custom/edlptheme/assets/scripts/main.js b/sites/all/themes/custom/edlptheme/assets/scripts/main.js index 5811ef9c3..8d3ec5262 100644 --- a/sites/all/themes/custom/edlptheme/assets/scripts/main.js +++ b/sites/all/themes/custom/edlptheme/assets/scripts/main.js @@ -97,7 +97,7 @@ // cartel functions loadNode(nid){ this.$cartel.addClass('loading'); - $.getJSON('/edlp/node/'+nid+'/ajax/player_cartel', {}) + $.getJSON('/edlp/ajax/json/node/'+nid+'/player_cartel', {}) .done(this.onNodeLoaded.bind(this)) .fail(this.onNodeLoadFail.bind(this)); }, @@ -219,11 +219,7 @@ var $this = $(this); // avoid already ajaxified links // if($this.is('.ajax-enable')) return; - var sys_path = $this.attr('data-drupal-link-system-path'); - if(sys_path){ - // convert node link to edlp_ajax_node module links - m = sys_path.match(/^\/?(node\/\d+)$/g); - if(m) $this.attr('data-drupal-link-system-path', 'edlp/'+m[0]); + if($this.attr('data-drupal-link-system-path')){ $this.on('click', onClickAjaxLink).addClass('ajax-enable'); } }); @@ -237,19 +233,28 @@ return false; var sys_path = $(this).attr('data-drupal-link-system-path'); + var ajax_path = sys_path; if(sys_path == ''){ backToFrontPage(); return false; } + m = ajax_path.match(/^\/?(node\/\d+)$/g); + if(m){ + // convert node link to edlp_ajax_node module links + ajax_path = 'edlp/ajax/json/'+m[0]; + // check for viewmode attribute + if($link.attr('viewmode')){ + ajax_path += '/'+$link.attr('viewmode'); + } + }else{ + // convert other link to ajax + ajax_path += '/ajax' + } - var path = window.location.origin + drupalSettings.path.baseUrl + sys_path; _$body.addClass('ajax-loading'); $link.addClass('ajax-loading'); - // check for viewmode attribute - path += '/ajax'; - if($link.attr('viewmode') != ''){ - path += '/'+$link.attr('viewmode'); - } + + var path = window.location.origin + drupalSettings.path.baseUrl + ajax_path; $.getJSON(path, {}) .done(function(data){ onAjaxLinkLoaded(data, $link, sys_path); @@ -275,9 +280,16 @@ _$content_container.html(data.rendered); // add body class for currently loaded content - _$body.removeClass().addClass('path-'+sys_path.replace(/\//g, '-')); + var body_classes = [ + 'path-'+sys_path.replace(/\//g, '-'), + 'entity-type-'+data.entity_type, + 'bundle-'+data.bundle, + 'view-mode-'+data.view_mode + ]; + _$body.removeClass().addClass(body_classes.join(' ')); + // id node add a generic path-node class to body - m = sys_path.match(/^\/?(edlp\/node\/\d+)$/g); + m = sys_path.match(/^\/?(node\/\d+)$/g); if(m) _$body.addClass('path-edlp-node'); diff --git a/sites/all/themes/custom/edlptheme/assets/styles/app.scss b/sites/all/themes/custom/edlptheme/assets/styles/app.scss index d598ab225..367a6d235 100644 --- a/sites/all/themes/custom/edlptheme/assets/styles/app.scss +++ b/sites/all/themes/custom/edlptheme/assets/styles/app.scss @@ -590,7 +590,7 @@ footer{ .block-block-edlp-entrees{ pointer-events: none; - body:not(.path-frontpage) & {display:none} + body.path-productions & {display:none} display: inline-block; // vertical-align: top; diff --git a/sites/all/themes/custom/edlptheme/templates/content/_BAD_edlp-ajax-node.html.twig b/sites/all/themes/custom/edlptheme/templates/content/_BAD_edlp-ajax-node.html.twig deleted file mode 100644 index 6e98dba51..000000000 --- a/sites/all/themes/custom/edlptheme/templates/content/_BAD_edlp-ajax-node.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -
-
-
- {{ node }} -
-
-
diff --git a/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--article.html.twig b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--article.html.twig new file mode 100644 index 000000000..c5a1f63a3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--article.html.twig @@ -0,0 +1,7 @@ +
+
+
+ {{ content }} +
+
+
diff --git a/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--default.html.twig b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--default.html.twig new file mode 100644 index 000000000..c5a1f63a3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--default.html.twig @@ -0,0 +1,7 @@ +
+
+
+ {{ content }} +
+
+
diff --git a/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--transcript.html.twig b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--transcript.html.twig new file mode 100644 index 000000000..c5a1f63a3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/content/edlp-ajax--node--transcript.html.twig @@ -0,0 +1,7 @@ +
+
+
+ {{ content }} +
+
+
diff --git a/sites/default/config/sync/core.extension.yml b/sites/default/config/sync/core.extension.yml index 73cc01195..53bc5948c 100644 --- a/sites/default/config/sync/core.extension.yml +++ b/sites/default/config/sync/core.extension.yml @@ -28,7 +28,7 @@ module: editor: 0 edlp_admin: 0 edlp_agenda: 0 - edlp_ajax_node: 0 + edlp_ajax: 0 edlp_corpus: 0 edlp_fils: 0 edlp_home: 0