From 3c943fbb4de62a0b0042786edfe42b4bb3a20c36 Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 15 Nov 2013 15:51:35 +0100 Subject: models sorted by endpoint --- views/predict.haml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'views') diff --git a/views/predict.haml b/views/predict.haml index 317acd6..4272a38 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -74,13 +74,13 @@ #models - @detail_count = 0 - // TODO order models by echa endpoint - #endpoint - @models.each do |model| + - model_endpoint = model.type.select{|endpoint| endpoint =~ /Endpoint/}.to_s - model_title = model.title.split("_").last(2)[0] - model_t = model.title.gsub("_", " ") - - case model_title - - when /LC50/i + - case model_endpoint + - when /fish/i + %br %b Acute toxicity to fish (lethality): - @detail_count +=1 %div{:id => model_title} @@ -112,7 +112,7 @@ Detailed report link /%p Number of predictions: integer /%p Correct predictions: % - - when /hamster/i + - when /Carcinogenicity/i %br %b Carcinogenicity: - @detail_count +=1 @@ -146,7 +146,7 @@ /%p Number of predictions: integer /%p Correct predictions: % %br - - when /mutagenicity/i + - when /Mutagenicity/i %br %b Mutagenicity: - @detail_count +=1 -- cgit v1.2.3