forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/federate-search-page' into test
- Loading branch information
Showing
37 changed files
with
341 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
.taxonomy-page-container { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
.taxonomy-page-subcontainer { | ||
width: 1248px; | ||
padding: 20px 50px; | ||
} | ||
.taxonomy-page-title .text{ | ||
font-size: 25px; | ||
font-weight: 700; | ||
} | ||
|
||
.taxonomy-page-title .line{ | ||
height: 2px; | ||
width: 57px; | ||
background-color: var(--primary-color); | ||
border-radius: 10px; | ||
} | ||
.taxonomy-page-decription{ | ||
color: #888888; | ||
margin: 20px 0; | ||
} | ||
.taxonomy-section{ | ||
display: flex; | ||
} | ||
.taxonomy-section .second-row{ | ||
margin-left: 10px; | ||
} | ||
.taxonomy-card{ | ||
border: 1px solid #DFDFDF; | ||
padding: 15px 20px; | ||
width: 569px; | ||
border-radius: 5px; | ||
margin-top: 10px; | ||
} | ||
|
||
.taxonomy-card .title-bar{ | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.taxonomy-card .title{ | ||
color: var(--primary-color); | ||
font-size: 18px; | ||
font-weight: bold; | ||
} | ||
|
||
.taxonomy-card .ontologies{ | ||
display: flex; | ||
align-items: center; | ||
color: var(--primary-color); | ||
margin: 3px 0; | ||
} | ||
.taxonomy-card .ontologies svg{ | ||
width: 15px; | ||
height: 15px; | ||
margin-right: 10px; | ||
} | ||
|
||
.taxonomy-card .ontologies svg path{ | ||
fill: var(--primary-color); | ||
} | ||
.taxonomy-card .description{ | ||
color: #666666; | ||
padding-bottom: 5px; | ||
} | ||
.taxonomy-slice-svg{ | ||
width: 35px; | ||
height: 35px; | ||
margin-bottom: 2px; | ||
} | ||
|
||
.taxonomy-children-reveal{ | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
color: var(--primary-color); | ||
} | ||
.taxonomy-children-reveal svg{ | ||
margin-left: 5px; | ||
margin-top: 3px; | ||
} | ||
|
||
.taxonomy-children .taxonomy-card{ | ||
border: none; | ||
padding: 0px 18px; | ||
width: unset; | ||
} | ||
|
||
.taxonomy-children-container{ | ||
display: flex; | ||
margin-top: 10px | ||
} | ||
|
||
.taxonomy-children-line{ | ||
width: 1px; | ||
background-color: var(--primary-color); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Display::TaxonomyCardComponent < ViewComponent::Base | ||
def initialize(taxonomy: , ontologies_names: ) | ||
@taxonomy = taxonomy | ||
@ontologies_names = ontologies_names | ||
end | ||
|
||
def reveal_id | ||
@taxonomy.id | ||
end | ||
end |
26 changes: 26 additions & 0 deletions
26
app/components/display/taxonomy_card_component/taxonomy_card_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.taxonomy-card{'data-controller': 'reveal-component'} | ||
.title-bar | ||
.title | ||
= "#{@taxonomy.name} (#{@taxonomy.acronym})" | ||
%a{href: "https://#{@taxonomy.acronym}.#{$UI_URL.sub("https://", "")}"} | ||
= inline_svg_tag('icons/slices.svg', class: "taxonomy-slice-svg #{@taxonomy.is_slice ? '' : 'd-none'}") | ||
%a.ontologies{href: "/ontologies?#{@taxonomy.id.split('/')[-2]}=#{@taxonomy.acronym}"} | ||
= inline_svg_tag('icons/ontology.svg') | ||
.number-of-ontologies | ||
= "#{@taxonomy.ontologies.length} ontologies" | ||
.description | ||
= render TextAreaFieldComponent.new(value: @taxonomy.description) | ||
.ontologies-cards | ||
- @taxonomy.ontologies.each do |ontology| | ||
= render ChipButtonComponent.new(url: "/ontologies/#{ontology.split('/').last}", text: ontology.split('/').last, tooltip: @ontologies_names[ontology], type: "clickable") | ||
|
||
- if @taxonomy.children | ||
.taxonomy-children-reveal{'data-action': "click->reveal-component#toggle", 'data-id': reveal_id} | ||
.text | ||
= t('taxonomy.show_sub_categories') | ||
= inline_svg_tag 'icons/arrow-down.svg' | ||
.taxonomy-children-container | ||
.taxonomy-children-line | ||
.taxonomy-children.d-none{id: reveal_id} | ||
- @taxonomy.children.each do |child| | ||
= render Display::TaxonomyCardComponent.new(taxonomy: child, ontologies_names: @ontologies_names) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.