Skip to content

Commit

Permalink
Fix: concept details table layout max-with when long strings (#649)
Browse files Browse the repository at this point in the history
* fix concepts table layout when we put very long strings

* fix concepts json button position

* use a css class intead of an id for the concepts_json_button

* move concepts_json_button css class from concept details file to concepts file

* remvoe #concepts_json_link unsued style

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>
  • Loading branch information
Bilelkihal and syphax-bouazzouni committed Jun 14, 2024
1 parent f8d1176 commit fac6747
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/components/concept_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

.concept_details_component table th {
width: 220px;
}

.concept_details_component td, .concept_details_component th{
max-width: 200px;
}
4 changes: 2 additions & 2 deletions app/assets/stylesheets/concepts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ div.synonym-change-request button {
display: inline !important;
}

#concepts_json_link{
margin-top: -4px;
.concepts_json_button{
margin-right: 5px;
margin-top: -4px;
}
3 changes: 2 additions & 1 deletion app/views/concepts/_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
= link_to("#classPermalinkModal", class: "class-permalink nav-link", title: t('concepts.permanent_link_class'), aria: {label: t('concepts.permanent_link_class')}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do
%i{class: "fas fa-link", aria: {hidden: "true"}}
%div{'data-concepts-json-target': 'button'}
= render RoundedButtonComponent.new(link: "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all&apikey=#{get_apikey}", target:'_blank')
.concepts_json_button
= render RoundedButtonComponent.new(link: "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all&apikey=#{get_apikey}", target:'_blank')
- apikey = "apikey=#{get_apikey}"
- baseClassUrl = "#{@ontology.id}/classes/#{escape(@concept.id)}"
- c.item(title: t('concepts.details'), path: '#details', selected: true, json_link: "#{baseClassUrl}?#{apikey}&display=all")
Expand Down

0 comments on commit fac6747

Please sign in to comment.