Skip to content

Commit

Permalink
fix #55, make A1.1 and R1.1 get highlighted when clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 21, 2022
1 parent 2d8b6a5 commit acfcb70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/helpers/fair_score_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def default_score?(question)
(properties.nil? || properties.empty?) && score.positive?
end

def get_name_with_out_dot(question)
question.to_s.gsub(/\./,"")
def get_name_with_out_dot(name)
name.to_s.gsub(/\./,"")
end

def print_score(score)
Expand Down
8 changes: 4 additions & 4 deletions app/views/fair_score/_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
FAIRness assessment questions
%nav.nav.nav-pills.flex-column
- @fair_scores_data[:criteria][:labels].each_with_index do |label , index|
%a.nav-link{href:"#"+label}
%a.nav-link{href:"#"+get_name_with_out_dot(label)}
=label
%nav.nav.pills.flex-column
- @fair_scores_data[:criteria][:questions][index].each do |question|
%a.nav-link.my-1.ml-3.text-dark{href:"#"+question[0]}
%a.nav-link.my-1.ml-3.text-dark{href:"#"+get_name_with_out_dot(question[0])}
=question[0]
%div.col-9#fair-details-content{style:"overflow: scroll;height: 70vh;"}
%div.alert.alert-light
Expand All @@ -36,7 +36,7 @@
%div
This ontology repository implements #{mod_link} but does not necessity encode a metadata with the same properties (#{submission_link})
- @fair_scores_data[:criteria][:labels].each_with_index do |label , index|
%div.my-3.border{id:label}
%div.my-3.border{id:get_name_with_out_dot(label)}
%div.py-3.px-4
%h5.criterion-score-container
%div
Expand All @@ -60,7 +60,7 @@
#{score_rest} (#{score_rest_normalized}%)
%div.card-body
- @fair_scores_data[:criteria][:questions][index].each do |question|
%div.card.m-3{id:question[0]}
%div.card.m-3{id:get_name_with_out_dot(question[0])}
%div.card-body
%div.card-title.d-flex.justify-content-between
%h6.mr-2
Expand Down

0 comments on commit acfcb70

Please sign in to comment.