From e39f1b64c78c4c32268010802bd31c45b73daf8d Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Sun, 26 Mar 2023 19:11:41 +0200 Subject: [PATCH] use request_lang in show concept details and concept children --- app/controllers/concepts_controller.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/concepts_controller.rb b/app/controllers/concepts_controller.rb index 2a6fcda63..fefd77f73 100644 --- a/app/controllers/concepts_controller.rb +++ b/app/controllers/concepts_controller.rb @@ -19,7 +19,7 @@ def show_concept @submission = get_ontology_submission_ready(@ontology) @ob_instructions = helpers.ontolobridge_instructions_template(@ontology) - @concept = @ontology.explore.single_class({full: true}, params[:id]) + @concept = @ontology.explore.single_class({full: true, language: request_lang}, params[:id]) @instances_concept_id = @concept.id concept_not_found(params[:id]) if @concept.nil? @@ -53,9 +53,8 @@ def show @concept = @ontology.explore.single_class({full: true}, params[:id]) concept_not_found(params[:id]) if @concept.nil? - - show_uri_request # process a full call - render :file => '/ontologies/visualize', :use_full_path => true, :layout => 'ontology' + @schemes = params[:concept_schemes].split(',') + show_ajax_request # process a full call end end @@ -189,7 +188,7 @@ def show_ajax_request gather_details render :partial => 'load' when 'children' # Children is called only for drawing the tree - @children = @concept.explore.children(pagesize: 750, concept_schemes: @schemes.join(',')).collection || [] + @children = @concept.explore.children(pagesize: 750, concept_schemes: @schemes.join(','), language: request_lang, display: 'prefLabel,obsolete,hasChildren').collection || [] @children.sort! { |x, y| (x.prefLabel || "").downcase <=> (y.prefLabel || "").downcase } unless @children.empty? render :partial => 'child_nodes' end