From f6a6f37fa83c2512b27ac95e4d0285cce9f6893a Mon Sep 17 00:00:00 2001
From: Bilelkihal <61744974+Bilelkihal@users.noreply.github.com>
Date: Fri, 2 Jun 2023 12:03:22 +0200
Subject: [PATCH 1/4] Update concepts partial design
---
app/assets/images/arrow-down.svg | 3 +
app/assets/stylesheets/concepts.scss | 118 ++++++++++++++++-
app/components/concept_details_component.rb | 2 +-
.../concept_details_component.html.haml | 35 +++---
app/views/concepts/_details.html.haml | 20 +--
app/views/concepts/_show.html.haml | 119 +++++++++---------
.../ontologies/sections/visualize.html.haml | 16 +--
app/views/submissions/_form_content.html.haml | 4 +-
db/schema.rb | 10 +-
9 files changed, 223 insertions(+), 104 deletions(-)
create mode 100644 app/assets/images/arrow-down.svg
diff --git a/app/assets/images/arrow-down.svg b/app/assets/images/arrow-down.svg
new file mode 100644
index 000000000..2757508f6
--- /dev/null
+++ b/app/assets/images/arrow-down.svg
@@ -0,0 +1,3 @@
+
diff --git a/app/assets/stylesheets/concepts.scss b/app/assets/stylesheets/concepts.scss
index 7f3bc860d..0c8c7a08d 100644
--- a/app/assets/stylesheets/concepts.scss
+++ b/app/assets/stylesheets/concepts.scss
@@ -18,7 +18,7 @@
}
}
-.concept_details td:nth-child(1) {
+.concept_details td:nth-child(2) {
white-space: nowrap;
}
@@ -31,3 +31,119 @@ div.synonym-change-request {
div.synonym-change-request button {
padding: 0px;
}
+.nav-link.active{
+ border-radius: 5px;
+}
+.concepts-general-details{
+ width: 870px;
+ border-radius: 5px;
+ border: 1px solid #DFDFDF;
+}
+.concepts-nav-item{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.concepts-nav-item a{
+ margin: 12px 24px;
+ color: #888888 !important;
+ cursor: pointer;
+}
+.concepts-tabs-container{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.concepts-tabs{
+ display: flex;
+ justify-content: space-between;
+ width: 589px;
+}
+.concepts-active-tab a{
+ font-weight: 600;
+ color: var(--primary-color) !important;
+}
+.concepts-active-tab hr{
+ margin: 0;
+ border: 1px solid var(--primary-color);
+ border-radius: 5px;
+ display: block !important;
+ width: 100%;
+}
+.concepts-nav-item hr{
+ margin: 0;
+ display: none;
+}
+#concepts-header-line{
+ margin: 0;
+}
+.concepts-json{
+ width: 32px;
+ height: 32px;
+ border: 1px solid var(--primary-color);
+ border-radius: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ right: 40px;
+ transition: background-color ease 0.3s;
+}
+.concepts-json:hover{
+ background-color: var(--primary-color);
+
+}
+.concepts-json:hover svg path{
+ fill: white;
+}
+.concepts-content{
+ border-collapse: collapse;
+ width: 100%;
+ border-spacing: 0;
+
+}
+.concepts-content td{
+ padding: 12px 24px;
+ vertical-align: top;
+}
+.concepts-content tr:nth-child(odd) {
+ background-color: #FAFAFA;
+}
+
+.concepts-content td:first-child {
+ color: #888888;
+ width: 220px;
+}
+.concepts-content td:first-child {
+ color: #888888;
+ width: 220px;
+}
+.concepts-content a{
+ text-decoration: underline;
+ color: #888888;
+}
+.concepts-content div{
+ margin-bottom: 5px;
+}
+.concepts-raw-data{
+ margin-top: 20px;
+ border-radius: 5px;
+ border: 1px solid #DFDFDF;
+
+}
+.concepts-raw-title{
+ display: flex;
+ justify-content: space-between;
+ padding: 12px 24px;
+ color: #888888;
+ cursor: pointer;
+ font-size: 16px;
+ font-weight: 400;
+}
+.concepts-raw-title div{
+ padding: 10px 0px;
+}
+#details_content{
+ margin-top: 15px;
+}
\ No newline at end of file
diff --git a/app/components/concept_details_component.rb b/app/components/concept_details_component.rb
index 380427a3c..82d74dd9f 100644
--- a/app/components/concept_details_component.rb
+++ b/app/components/concept_details_component.rb
@@ -40,7 +40,7 @@ def render_properties(properties_set, ontology_acronym, &block)
#{remove_owl_notation(key)}
|
- #{" #{ajax_links.join(' ')} ".html_safe} |
+ #{"#{ajax_links.join(' ')}".html_safe} |
EOS
out += line
diff --git a/app/components/concept_details_component/concept_details_component.html.haml b/app/components/concept_details_component/concept_details_component.html.haml
index e60407b13..f2741dc8a 100644
--- a/app/components/concept_details_component/concept_details_component.html.haml
+++ b/app/components/concept_details_component/concept_details_component.html.haml
@@ -1,23 +1,20 @@
- require 'cgi'
-%div.py-3.pl-3.hide-if-loading
+%div.hide-if-loading
%div.card
- %table.minimal.concept_details{cellpadding: "0", cellspacing: "0", width: "100%"}
- %tr{style:"visibility:hidden"}
- %td{style:"width:30%"}
- %td
+ %table.concepts-content
= header
%div.my-3
- .accordion.card{id: "accordion-#{@id}"}
- .card
- %div{id: "heading-#{@id}"}
- %h2.mb-0.text-right
- %button.btn.btn-link{"data-target" => "#collapse-#{@id}", "data-toggle" => "collapse"}
- %i.fas.fa-sort
- .collapse.show{id: "collapse-#{@id}", "data-parent" => "#accordion-#{@id}"}
- %table.minimal.concept_details{cellpadding: "0", cellspacing: "0", width: "100%"}
- - top_set, leftover_set, bottom_set = filter_properties(@top_keys, @bottom_keys, @exclude_keys, @concept_properties)
- = render_properties(top_set, @acronym)
- = render_properties(leftover_set, @acronym)
- - sections&.each do |section|
- = section
- = render_properties(bottom_set, @acronym)
\ No newline at end of file
+ .accordion.concepts-raw-data{id: "accordion-#{@id}"}
+ %div{id: "heading-#{@id}"}
+ %h2.mb-0.text-right
+ .concepts-raw-title{"data-target" => "#collapse-#{@id}", "data-toggle" => "collapse"}
+ %div Raw data
+ %img{src: asset_path("arrow-down.svg")}
+ .collapse{id: "collapse-#{@id}", "data-parent" => "#accordion-#{@id}"}
+ %table#concepts-content.concepts-content
+ - top_set, leftover_set, bottom_set = filter_properties(@top_keys, @bottom_keys, @exclude_keys, @concept_properties)
+ = render_properties(top_set, @acronym)
+ = render_properties(leftover_set, @acronym)
+ - sections&.each do |section|
+ = section
+ = render_properties(bottom_set, @acronym)
diff --git a/app/views/concepts/_details.html.haml b/app/views/concepts/_details.html.haml
index 0d55f3130..b122f67e7 100644
--- a/app/views/concepts/_details.html.haml
+++ b/app/views/concepts/_details.html.haml
@@ -2,25 +2,25 @@
- schemes_keys = %w[hasTopConcept topConceptOf]
- label_xl_set = %w[skos-xl#prefLabel skos-xl#altLabel skos-xl#hiddenLabel]
= render ConceptDetailsComponent.new(id:'concept-details', acronym: @ontology.acronym,
- properties: @concept.properties,
- top_keys: %w[description comment],
- bottom_keys: %w[disjoint subclass is_a has_part],
- exclude_keys: schemes_keys + label_xl_set + ['inScheme']) do |c|
+ properties: @concept.properties,
+ top_keys: %w[description comment],
+ bottom_keys: %w[disjoint subclass is_a has_part],
+ exclude_keys: schemes_keys + label_xl_set + ['inScheme']) do |c|
- c.header do
%tr
%td{nowrap: ""} ID
%td
- %p= @concept.id
+ = @concept.id
%tr
%td{nowrap: ""} Preferred Name
%td
- %p= @concept.prefLabel({:use_html => true}).html_safe
+ = @concept.prefLabel({:use_html => true}).html_safe
- unless @concept.synonym.nil? || @concept.synonym.empty?
%tr
%td{nowrap: ""} Synonyms
%td
- for synonym in @concept.synonym
- %p= synonym
+ = synonym
%td
%div.synonym-change-request
= add_synonym_button
@@ -29,12 +29,12 @@
%tr
%td{nowrap: ""} Definitions
%td
- %p= @concept.definition.join(" ")
+ = @concept.definition.join(" ")
- if @concept.obsolete?
%tr
%td{nowrap: ""} Obsolete
%td
- %p true
+ true
- if skos?
- unless @concept.memberOf.nil? || @concept.memberOf.empty?
%tr
@@ -53,7 +53,7 @@
%tr
%td{nowrap: ""} Type
%td
- %p= @concept.type
+ = @concept.type
- scheme_set = c.properties_set_by_keys(schemes_keys, c.concept_properties)
- label_xl_set = c.properties_set_by_keys(label_xl_set, c.concept_properties)
diff --git a/app/views/concepts/_show.html.haml b/app/views/concepts/_show.html.haml
index 0ac47b83e..bfcc26ed7 100644
--- a/app/views/concepts/_show.html.haml
+++ b/app/views/concepts/_show.html.haml
@@ -3,66 +3,69 @@
%div{:style => "padding: 100px 0; font-size: larger; font-weight: bold; text-align: center;"}
Use the "Jump To" to find a class and display details, visualization, notes, and mappings
- else
- .cls-info-container
- %ul.nav.nav-tabs.tabs
- %li#details_top.nav-item
- %a.nav-link.active.py-1{:href => "#details" , data:{toggle: 'tab', target: '#details_content'}} Details
- - unless skos?
- %li#instances_top.nav-item
- %a.nav-link.py-1{:href => "#instances" , data:{toggle: 'tab', target: '#instances_content'}}
- Instances
- (
- %span#instances_count
- )
- %li#visualization_top.nav-item
- %a.nav-link.py-1{:href => "#visualization", data:{toggle: 'tab', target: '#visualization_content'}} Visualization
- %li#notes_top.nav-item
- %a.nav-link.py-1{:href => "#notes", data:{toggle: 'tab', target: '#notes_content'}}
- Notes
- %span#note_count_wrapper
- (
- %span#note_count= @notes.length
- )
- %li#mappings_top.nav-item
- %a.nav-link.py-1{:href => "#mappings", data:{toggle: 'tab', target: '#mappings_content'}}
- #{concept_label_to_show(submission: @submission)} Mappings (
- %span#mapping_count= 'loading'
+
+ %ul.nav.tabs
+ %li#details_top.nav-item
+ %a.nav-link.active.py-1{:href => "#details" , data:{toggle: 'tab', target: '#details_content'}} Details
+ - unless skos?
+ %li#instances_top.nav-item
+ %a.nav-link.py-1{:href => "#instances" , data:{toggle: 'tab', target: '#instances_content'}}
+ Instances
+ (
+ %span#instances_count
+ )
+ %li#visualization_top.nav-item
+ %a.nav-link.py-1{:href => "#visualization", data:{toggle: 'tab', target: '#visualization_content'}} Visualization
+ %li#notes_top.nav-item
+ %a.nav-link.py-1{:href => "#notes", data:{toggle: 'tab', target: '#notes_content'}}
+ Notes
+ %span#note_count_wrapper
+ (
+ %span#note_count= @notes.length
)
+ %li#mappings_top.nav-item
+ %a.nav-link.py-1{:href => "#mappings", data:{toggle: 'tab', target: '#mappings_content'}}
+ #{concept_label_to_show(submission: @submission)} Mappings (
+ %span#mapping_count= 'loading'
+ )
+
+ %a.concepts-json{:href => "#json"}
+ %svg{:fill => "none", :height => "14", :viewbox => "0 0 14 14", :width => "14", :xmlns => "http://www.w3.org/2000/svg"}
+ %path{:d => "M12.4444 4.66573V3.11173C12.4444 1.39417 11.0514 0 9.33333 0V1.55633C9.74582 1.55652 10.1414 1.72044 10.433 2.01209C10.7247 2.30374 10.8887 2.69925 10.889 3.11173V4.66573C10.889 5.60047 11.3097 6.4295 11.9623 7C11.3097 7.57027 10.889 8.39813 10.889 9.33333V10.8887C10.8888 11.3014 10.7247 11.6971 10.4329 11.9888C10.141 12.2805 9.74528 12.4444 9.33263 12.4444V14C11.0497 14 12.4444 12.6077 12.4444 10.8887V9.33333C12.4445 8.92079 12.6084 8.52518 12.9001 8.23347C13.1918 7.94176 13.5875 7.77782 14 7.7777V6.22137C13.7957 6.2214 13.5934 6.18118 13.4046 6.10301C13.2159 6.02485 13.0444 5.91026 12.8999 5.7658C12.7555 5.62134 12.6409 5.44984 12.5627 5.26108C12.4846 5.07233 12.4443 4.87003 12.4444 4.66573ZM3.11197 4.66667V3.11103C3.11215 2.69839 3.2762 2.30271 3.56805 2.01099C3.8599 1.71927 4.25566 1.5554 4.6683 1.5554V0C2.95027 0 1.55633 1.3923 1.55633 3.11103L1.55563 4.66667C1.55563 4.87094 1.51539 5.07322 1.43721 5.26195C1.35903 5.45067 1.24444 5.62215 1.09998 5.76658C0.955528 5.91102 0.784034 6.02558 0.595298 6.10374C0.406561 6.18189 0.204278 6.2221 0 6.22207V7.7777L0.000700061 7.7784C0.204989 7.7784 0.407277 7.81864 0.596015 7.89682C0.784753 7.97499 0.956245 8.08958 1.1007 8.23403C1.24515 8.37849 1.35974 8.54998 1.43792 8.73872C1.5161 8.92746 1.55633 9.12974 1.55633 9.33403V10.888C1.55633 12.6054 2.94863 14 4.66737 14V12.4437C4.46309 12.4437 4.26081 12.4034 4.07209 12.3252C3.88336 12.2471 3.71189 12.1325 3.56745 11.988C3.42302 11.8436 3.30845 11.6721 3.2303 11.4833C3.15214 11.2946 3.11194 11.0923 3.11197 10.888V9.33403C3.11197 8.39907 2.69103 7.57027 2.03863 7C2.69103 6.4295 3.11197 5.60117 3.11197 4.66667Z", :fill => "#31B404"}
- %li#restlink_top.nav-item
- %a.nav-link.py-1{:href => "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all", :style => "margin-bottom: 1em; margin-left: 1em;", :target => "_blank"} Access #{concept_label_to_show(submission: @submission)} JSON
- - if @enable_ontolobridge
- %li#request_term_top.nav-item
- %a.nav-link.py-1{:href => "#request_term", data:{toggle: 'tab', target: '#request_term'}}
- New Term Requests
- - if $PURL_ENABLED
- = link_to("#classPermalinkModal", class: "class-permalink nav-link", title: "Get a permanent link to this class", aria: {label: "Get a permanent link to this class"}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do
- %i{class: "fas fa-link", aria: {hidden: "true"}}
- #contents.tab-content
- #details_content.tab-pane.active.show
- = render :partial =>'/concepts/details'
- - unless skos?
- #instances_content.tab-pane
- = render :partial =>'instances/instances' , locals: {id: "class-instances-data-table"}
- #visualization_content.tab-pane
- = render :partial =>'/concepts/biomixer'
- #notes_content.tab-pane
- = render :partial =>'/notes/list'
- #mappings_content.tab-pane
- = render TurboFrameComponent.new(id:'concept_mappings',
- src:"/ajax/mappings/get_concept_table?ontologyid=#{@ontology.acronym}&conceptid=#{CGI.escape(@concept.id)}")
- - if @enable_ontolobridge
- #request_term_content.tab-pane
- = render :partial =>'/concepts/request_term'
+
+ - if @enable_ontolobridge
+ %li#request_term_top.nav-item
+ %a.nav-link.py-1{:href => "#request_term", data:{toggle: 'tab', target: '#request_term'}}
+ New Term Requests
+ - if $PURL_ENABLED
+ = link_to("#classPermalinkModal", class: "class-permalink nav-link", title: "Get a permanent link to this class", aria: {label: "Get a permanent link to this class"}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do
+ %i{class: "fas fa-link", aria: {hidden: "true"}}
+ #contents.tab-content
+ #details_content.tab-pane.active.show
+ = render :partial =>'/concepts/details'
+ - unless skos?
+ #instances_content.tab-pane
+ = render :partial =>'instances/instances' , locals: {id: "class-instances-data-table"}
+ #visualization_content.tab-pane
+ = render :partial =>'/concepts/biomixer'
+ #notes_content.tab-pane
+ = render :partial =>'/notes/list'
+ #mappings_content.tab-pane
+ = render TurboFrameComponent.new(id:'concept_mappings',
+ src:"/ajax/mappings/get_concept_table?ontologyid=#{@ontology.acronym}&conceptid=#{CGI.escape(@concept.id)}")
+ - if @enable_ontolobridge
+ #request_term_content.tab-pane
+ = render :partial =>'/concepts/request_term'
:javascript
- jQuery(document).ready(function(){
+ jQuery(document).ready(function(){
- jQuery("#classPermalinkModal").on("shown.bs.modal", function (e) {
- var currentPurl = jQuery("a.class-permalink").data("current-purl");
- jQuery("#purl_input").val(currentPurl);
- })
+ jQuery("#classPermalinkModal").on("shown.bs.modal", function (e) {
+ var currentPurl = jQuery("a.class-permalink").data("current-purl");
+ jQuery("#purl_input").val(currentPurl);
+ })
- jQuery("#purl_input").on("click", function () {
- jQuery(this).select();
- });
- });
+ jQuery("#purl_input").on("click", function () {
+ jQuery(this).select();
+ });
+ });
diff --git a/app/views/ontologies/sections/visualize.html.haml b/app/views/ontologies/sections/visualize.html.haml
index 52f9808b7..fcaa805f2 100644
--- a/app/views/ontologies/sections/visualize.html.haml
+++ b/app/views/ontologies/sections/visualize.html.haml
@@ -7,7 +7,7 @@
%div#bd_content.bd_content.explore{data:{controller: 'container-splitter'}}
%div.sidebar.d-flex.flex-column.mr-2.card{data:{'container-splitter-target': 'container'}}
= render partial: 'ontologies/concepts_browsers/concepts_browser'
- %div#concept_content.d-flex.flex-column.card.p-1.ml-2{data:{'container-splitter-target': 'container'}}
+ %div#concept_content.d-flex.flex-column.p-1.ml-2{data:{'container-splitter-target': 'container'}}
= render partial: 'concepts/show'
- form_for(:search, :url => {:controller =>'search',:action=>'fetch_results'},:html=>{:id=>'search_form'}) do |f|
@@ -18,14 +18,14 @@
= "#{@error}
"
:javascript
- $(document).ready(function() {
- const ontology_acronym = "#{@ontology.acronym}"
- let data = #{raw @instance_details.to_json} || null
+ $(document).ready(function() {
+ const ontology_acronym = "#{@ontology.acronym}"
+ let data = #{raw @instance_details.to_json} || null
- if(data && Object.keys(data).length !== 0){
- $.facebox({ajax: `/ontologies/${ontology_acronym}/instances/${encodeURIComponent(data["@id"])}`})
- }
- })
+ if(data && Object.keys(data).length !== 0){
+ $.facebox({ajax: `/ontologies/${ontology_acronym}/instances/${encodeURIComponent(data["@id"])}`})
+ }
+ })
diff --git a/app/views/submissions/_form_content.html.haml b/app/views/submissions/_form_content.html.haml
index 5b55e4ec9..0eeaa8d3f 100644
--- a/app/views/submissions/_form_content.html.haml
+++ b/app/views/submissions/_form_content.html.haml
@@ -2,7 +2,7 @@
= hidden_field object_name, :ontology, value: acronym
= hidden_field object_name, :id, value: submissionId
%div#general-card.mt-4
- = metadata_section('general', 'General', collapsed: false) do
+ = metadata_section('general', 'General', collapsed: false) do |c|
= attribute_container('format', required: true) do
= turbo_frame_tag "#{object_name(acronym, submissionId)}Format_from_group_input" do
= render partial: 'submissions/submission_format_form'
@@ -143,4 +143,4 @@
= metadata_section('more-metrics-informations', 'More metrics informations', parent_id: "ontology-content-metrics") do
- for attr in @metadata.select { |m| m['display'] == 'metrics' }
- = form_group_attribute(attr["attribute"])
\ No newline at end of file
+ = form_group_attribute(attr["attribute"])
diff --git a/db/schema.rb b/db/schema.rb
index 51716810e..22dc2b318 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,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
- create_table "analytics", id: :integer, charset: "utf8mb3", force: :cascade do |t|
+ create_table "analytics", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "segment"
t.string "action"
t.string "bp_slice"
@@ -22,13 +22,13 @@
t.datetime "updated_at", precision: nil
end
- create_table "licenses", charset: "utf8mb3", force: :cascade do |t|
+ create_table "licenses", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.text "encrypted_key"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
end
- create_table "ontologies", charset: "utf8mb3", force: :cascade do |t|
+ create_table "ontologies", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "acronym", null: false
t.text "new_term_instructions"
t.text "custom_message"
@@ -37,7 +37,7 @@
t.index ["acronym"], name: "index_ontologies_on_acronym", unique: true
end
- create_table "timeouts", id: :integer, charset: "utf8mb3", force: :cascade do |t|
+ create_table "timeouts", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "path"
t.integer "ontology_id"
t.text "concept_id"
@@ -45,7 +45,7 @@
t.timestamp "created"
end
- create_table "virtual_appliance_users", id: :integer, charset: "utf8mb3", force: :cascade do |t|
+ create_table "virtual_appliance_users", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "user_id"
t.datetime "created_at", precision: nil
t.datetime "updated_at", precision: nil
From 3ee57362a88ba03cb0e4252f94ce4fffdb6bae39 Mon Sep 17 00:00:00 2001
From: Bilelkihal <61744974+Bilelkihal@users.noreply.github.com>
Date: Fri, 2 Jun 2023 12:14:09 +0200
Subject: [PATCH 2/4] Extract json icon to an svg file and use inline_svg gem
in concepts page
---
Gemfile | 1 +
Gemfile.lock | 4 ++++
app/assets/images/json.svg | 3 +++
app/views/concepts/_show.html.haml | 4 +---
4 files changed, 9 insertions(+), 3 deletions(-)
create mode 100644 app/assets/images/json.svg
diff --git a/Gemfile b/Gemfile
index 9aa696608..af11624c9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -122,3 +122,4 @@ end
gem "net-ftp", "~> 0.2.0", require: false
gem "net-http"
+gem 'inline_svg'
diff --git a/Gemfile.lock b/Gemfile.lock
index a6db07def..85862836c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -183,6 +183,9 @@ GEM
importmap-rails (1.1.6)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
+ inline_svg (1.9.0)
+ activesupport (>= 3.0)
+ nokogiri (>= 1.6)
io-console (0.6.0)
irb (1.6.4)
reline (>= 0.3.0)
@@ -469,6 +472,7 @@ DEPENDENCIES
i18n
iconv
importmap-rails
+ inline_svg
jquery-rails
jquery-ui-rails
jsbundling-rails
diff --git a/app/assets/images/json.svg b/app/assets/images/json.svg
new file mode 100644
index 000000000..7af4b2fb2
--- /dev/null
+++ b/app/assets/images/json.svg
@@ -0,0 +1,3 @@
+
diff --git a/app/views/concepts/_show.html.haml b/app/views/concepts/_show.html.haml
index bfcc26ed7..5afdf4c88 100644
--- a/app/views/concepts/_show.html.haml
+++ b/app/views/concepts/_show.html.haml
@@ -30,9 +30,7 @@
)
%a.concepts-json{:href => "#json"}
- %svg{:fill => "none", :height => "14", :viewbox => "0 0 14 14", :width => "14", :xmlns => "http://www.w3.org/2000/svg"}
- %path{:d => "M12.4444 4.66573V3.11173C12.4444 1.39417 11.0514 0 9.33333 0V1.55633C9.74582 1.55652 10.1414 1.72044 10.433 2.01209C10.7247 2.30374 10.8887 2.69925 10.889 3.11173V4.66573C10.889 5.60047 11.3097 6.4295 11.9623 7C11.3097 7.57027 10.889 8.39813 10.889 9.33333V10.8887C10.8888 11.3014 10.7247 11.6971 10.4329 11.9888C10.141 12.2805 9.74528 12.4444 9.33263 12.4444V14C11.0497 14 12.4444 12.6077 12.4444 10.8887V9.33333C12.4445 8.92079 12.6084 8.52518 12.9001 8.23347C13.1918 7.94176 13.5875 7.77782 14 7.7777V6.22137C13.7957 6.2214 13.5934 6.18118 13.4046 6.10301C13.2159 6.02485 13.0444 5.91026 12.8999 5.7658C12.7555 5.62134 12.6409 5.44984 12.5627 5.26108C12.4846 5.07233 12.4443 4.87003 12.4444 4.66573ZM3.11197 4.66667V3.11103C3.11215 2.69839 3.2762 2.30271 3.56805 2.01099C3.8599 1.71927 4.25566 1.5554 4.6683 1.5554V0C2.95027 0 1.55633 1.3923 1.55633 3.11103L1.55563 4.66667C1.55563 4.87094 1.51539 5.07322 1.43721 5.26195C1.35903 5.45067 1.24444 5.62215 1.09998 5.76658C0.955528 5.91102 0.784034 6.02558 0.595298 6.10374C0.406561 6.18189 0.204278 6.2221 0 6.22207V7.7777L0.000700061 7.7784C0.204989 7.7784 0.407277 7.81864 0.596015 7.89682C0.784753 7.97499 0.956245 8.08958 1.1007 8.23403C1.24515 8.37849 1.35974 8.54998 1.43792 8.73872C1.5161 8.92746 1.55633 9.12974 1.55633 9.33403V10.888C1.55633 12.6054 2.94863 14 4.66737 14V12.4437C4.46309 12.4437 4.26081 12.4034 4.07209 12.3252C3.88336 12.2471 3.71189 12.1325 3.56745 11.988C3.42302 11.8436 3.30845 11.6721 3.2303 11.4833C3.15214 11.2946 3.11194 11.0923 3.11197 10.888V9.33403C3.11197 8.39907 2.69103 7.57027 2.03863 7C2.69103 6.4295 3.11197 5.60117 3.11197 4.66667Z", :fill => "#31B404"}
-
+ = inline_svg_tag "json.svg"
- if @enable_ontolobridge
%li#request_term_top.nav-item
From e01fecb1d76cb656ef1a4abc8ef602c98c202505 Mon Sep 17 00:00:00 2001
From: Syphax Bouazzouni
Date: Wed, 7 Jun 2023 12:19:57 +0200
Subject: [PATCH 3/4] wrap concept details links values
---
app/components/concept_details_component.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/components/concept_details_component.rb b/app/components/concept_details_component.rb
index 82d74dd9f..86074870e 100644
--- a/app/components/concept_details_component.rb
+++ b/app/components/concept_details_component.rb
@@ -40,7 +40,7 @@ def render_properties(properties_set, ontology_acronym, &block)
#{remove_owl_notation(key)}
|
- #{"#{ajax_links.join(' ')}".html_safe} |
+ #{" #{ajax_links.join(' ')}".html_safe} |
EOS
out += line
From ffb1b2bc33fb63f79961f59c04937e8824ca0789 Mon Sep 17 00:00:00 2001
From: Syphax Bouazzouni
Date: Wed, 7 Jun 2023 12:20:47 +0200
Subject: [PATCH 4/4] add concept details JSON link
---
app/views/concepts/_show.html.haml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/concepts/_show.html.haml b/app/views/concepts/_show.html.haml
index 5afdf4c88..af69f8f2e 100644
--- a/app/views/concepts/_show.html.haml
+++ b/app/views/concepts/_show.html.haml
@@ -29,9 +29,9 @@
%span#mapping_count= 'loading'
)
- %a.concepts-json{:href => "#json"}
+ %a.concepts-json{:href => "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all&apikey=#{get_apikey}", target: '_blank'}
= inline_svg_tag "json.svg"
-
+
- if @enable_ontolobridge
%li#request_term_top.nav-item
%a.nav-link.py-1{:href => "#request_term", data:{toggle: 'tab', target: '#request_term'}}