diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 1340bdbb26..484db94c07 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -49,7 +49,6 @@ jQuery(document).data().bp.ontolobridge_ontologies = <%=$NEW_TERM_REQUEST_ONTOLOGIES.to_json.html_safe%> || []; - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; @@ -60,4 +59,4 @@ <%= turbo_frame_tag :cookies_modal, src: cookies_path if cookies[:cookies_accepted].nil? && !(Rails.env.development? || Rails.env.test?) %>
-<%= render partial: 'layouts/notices' %> \ No newline at end of file +<%= render partial: 'layouts/notices' %> diff --git a/app/views/layouts/_ontology_viewer.html.haml b/app/views/layouts/_ontology_viewer.html.haml index e7f3010e16..95fe55300d 100644 --- a/app/views/layouts/_ontology_viewer.html.haml +++ b/app/views/layouts/_ontology_viewer.html.haml @@ -4,26 +4,6 @@ = render :partial =>'layouts/header' %div#bd.bg-white.ontology-viewer - :javascript - // Ontology viewer vars - jQuery(document).data().bp.ont_viewer = {}; - jQuery(document).data().bp.ont_viewer.ontology_id = jQuery(document).data().bp.ontology.acronym; - jQuery(document).data().bp.ont_viewer.ontology_version_id = jQuery(document).data().bp.submission_latest.submissionId; - jQuery(document).data().bp.ont_viewer.ontology_name = "#{@ontology.name}"; - jQuery(document).data().bp.ont_viewer.org_site = "#{$ORG_SITE}"; - jQuery(document).data().bp.ont_viewer.concept_id = "#{params[:conceptid] || (@concept ? @concept.id : 'root')}"; - jQuery(document).data().bp.ont_viewer.content_section = "#{sanitize(h(content_section))}"; - jQuery(document).data().bp.ont_viewer.concept_param = "#{"conceptid=\#{params[:conceptid]}" unless params[:conceptid].nil? || params[:conceptid].empty?}"; - jQuery(document).data().bp.ont_viewer.concept_name = "#{@concept.prefLabel unless @concept.nil?}"; - jQuery(document).data().bp.ont_viewer.metadata_only = "#{@ontology.summaryOnly}"; - jQuery(document).data().bp.ont_viewer.current_purl = "#{@current_purl}"; - jQuery(document).data().bp.ont_viewer.purl_prefix = "#{($PURL_ENABLED ? $PURL_PREFIX+"/"+@ontology.acronym : '')}"; - jQuery(document).data().bp.ont_viewer.concept_name_title = (jQuery(document).data().bp.ont_viewer.concept_name == "") ? - "" : " - " + jQuery(document).data().bp.ont_viewer.concept_name; - - - - = modal_frame_container = render partial: 'concepts/perma_link_modal' diff --git a/app/views/layouts/appliance.html.haml b/app/views/layouts/appliance.html.haml index 3e306068c0..801d72caba 100644 --- a/app/views/layouts/appliance.html.haml +++ b/app/views/layouts/appliance.html.haml @@ -21,7 +21,6 @@ jQuery(document).data({bp: {config: #{bp_config_json.html_safe}, user: #{(session[:user] || {}).to_hash.to_json.html_safe}}}); jQuery(document).data().bp.ontology = #{@ontology.to_json.html_safe} || {}; jQuery(document).data().bp.submission_latest = #{@submission_latest.to_json.html_safe} || {}; - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; %body{:class => "#{controller_name} #{action_name}"} @@ -35,4 +34,3 @@ = yield = render partial: "layouts/footer" - diff --git a/app/views/layouts/component_preview.html.erb b/app/views/layouts/component_preview.html.erb index 429f630109..dc33be7e03 100644 --- a/app/views/layouts/component_preview.html.erb +++ b/app/views/layouts/component_preview.html.erb @@ -44,7 +44,6 @@ jQuery(document).data().bp.ontolobridge_ontologies = <%=$NEW_TERM_REQUEST_ONTOLOGIES.to_json.html_safe%> || []; - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; @@ -57,4 +56,4 @@ - \ No newline at end of file + diff --git a/app/views/layouts/component_preview_not_centred.html.erb b/app/views/layouts/component_preview_not_centred.html.erb index 81b1c29645..f189620bb9 100644 --- a/app/views/layouts/component_preview_not_centred.html.erb +++ b/app/views/layouts/component_preview_not_centred.html.erb @@ -44,7 +44,6 @@ jQuery(document).data().bp.ontolobridge_ontologies = <%=$NEW_TERM_REQUEST_ONTOLOGIES.to_json.html_safe%> || []; - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; @@ -53,4 +52,4 @@ <%= yield %> <%= javascript_include_tag "application" %> - \ No newline at end of file + diff --git a/app/views/layouts/popup.html.erb b/app/views/layouts/popup.html.erb index 7262ec44fc..8050bf57a7 100644 --- a/app/views/layouts/popup.html.erb +++ b/app/views/layouts/popup.html.erb @@ -17,7 +17,6 @@ jQuery(document).data({bp: {config: <%=bp_config_json.html_safe%>, user: <%=(session[:user] || {}).to_hash.to_json.html_safe%>}}); jQuery(document).data().bp.ontology = <%=@ontology.to_json.html_safe%> || {}; jQuery(document).data().bp.submission_latest = <%=@submission_latest.to_json.html_safe%> || {}; - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; <%= csrf_meta_tag %> @@ -63,4 +62,3 @@ - diff --git a/app/views/layouts/tool.html.haml b/app/views/layouts/tool.html.haml index 26350b57b1..94b8efef7d 100644 --- a/app/views/layouts/tool.html.haml +++ b/app/views/layouts/tool.html.haml @@ -22,7 +22,6 @@ = javascript_include_tag "vendor" :javascript jQuery(document).data({bp: {config: {ui_url: ''}, user: {}}}); - jQuery(document).data().bp.ont_viewer = {}; jQuery(document).data().bp.ont_chart = {}; %body{class: " #{controller_name} #{action_name}", style: 'background-color: var(--light-color);'} @@ -39,4 +38,4 @@ = yield -= javascript_include_tag "application" \ No newline at end of file += javascript_include_tag "application" diff --git a/config/routes.rb b/config/routes.rb index 77275c350f..e21cd5338e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,7 @@ match 'cookies', to: 'home#set_cookies', via: [:post, :get] root to: 'home#index' - mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development? + mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development? get'/tools', to: 'home#tools' get 'auth/:provider/callback', to: 'login#create_omniauth' @@ -142,8 +142,8 @@ get 'statistics/index' # Error pages - match "/404", to: "errors#not_found", via: :all - match "/500", to: "errors#internal_server_error", via: :all + match '/404', to: 'errors#not_found', via: :all + match '/500', to: 'errors#internal_server_error', via: :all # Robots.txt get '/robots.txt' => 'robots#index' @@ -186,16 +186,16 @@ get '/ajax/classes/date_sorted_list' => 'concepts#show_date_sorted_list' get '/ajax/properties/children' => 'properties#show_children' get '/ajax/properties/tree' => 'concepts#property_tree' - get 'ajax/schemes/label', to: "schemes#show_label" - get 'ajax/collections/label', to: "collections#show_label" - get 'ajax/label_xl/label', to: "label_xl#show_label" - get 'ajax/label_xl', to: "label_xl#show" + get 'ajax/schemes/label', to: 'schemes#show_label' + get 'ajax/collections/label', to: 'collections#show_label' + get 'ajax/label_xl/label', to: 'label_xl#show_label' + get 'ajax/label_xl', to: 'label_xl#show' get '/ajax/biomixer' => 'concepts#biomixer' get '/ajax/fair_score/html' => 'fair_score#details_html' get '/ajax/submission/show_licenses/:id' => 'ontologies#show_licenses' get '/ajax/fair_score/json' => 'fair_score#details_json' - get '/ajax/ontologies', to: "ontologies#ajax_ontologies" - get '/ajax/agents', to: "agents#ajax_agents" + get '/ajax/ontologies', to: 'ontologies#ajax_ontologies' + get '/ajax/agents', to: 'agents#ajax_agents' get '/ajax/images/show' => 'application#show_image_modal' # User @@ -217,4 +217,5 @@ get 'check_resolvability' => 'check_resolvability#index' get 'check_url_resolvability' => 'check_resolvability#check_resolvability' + mount Lookbook::Engine, at: '/lookbook' end diff --git a/db/schema.rb b/db/schema.rb index 22dc2b318a..ec76487f77 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2020_09_21_120918) do +ActiveRecord::Schema[7.0].define(version: 2023_11_30_210229) do create_table "analytics", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "segment" t.string "action"