From b3995e20c0078f67884316f7fd6a3331a9a8d1fc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 23 Jan 2017 21:37:30 -0800 Subject: [PATCH] web: add bootstrap checkbox function --- doc/get_platforms.inc | 6 ++++-- doc/projects.inc | 20 ++++++++++---------- html/inc/bootstrap.inc | 11 +++++++++++ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/doc/get_platforms.inc b/doc/get_platforms.inc index 07f5babbcb..444475076e 100644 --- a/doc/get_platforms.inc +++ b/doc/get_platforms.inc @@ -99,7 +99,7 @@ function platform_icons($f) { $x .= ""; } if ($f->linux) { - $x .= ""; + $x .= ""; } if ($f->android) { $x .= ""; @@ -108,7 +108,7 @@ function platform_icons($f) { $x .= ""; } if ($f->rasp_pi) { - $x .= ""; + $x .= ""; } if ($f->nvidia_gpu) { $x .= ""; @@ -138,6 +138,8 @@ function valid($url, $plat) { if (strstr($url, "gpugrid.net")) { if (strstr($plat, "android")) return false; if (strstr($plat, "vbox")) return false; + } else if (strstr($url, "csgrid")) { + if (strstr($plat, "android")) return false; } return true; } diff --git a/doc/projects.inc b/doc/projects.inc index 766144c191..203ca80d87 100644 --- a/doc/projects.inc +++ b/doc/projects.inc @@ -179,16 +179,16 @@ $biomed = array( "", "Study evolution using genetics" ), - array( - "Malariacontrol.net", - "http://www.malariacontrol.net/", - tra("The Swiss Tropical Institute"), - tra("Epidemiology"), - tra("Simulation models of the transmission dynamics and health effects of malaria are an important tool for malaria control. They can be used to determine optimal strategies for delivering mosquito nets, chemotherapy, or new vaccines which are currently under development and testing. Such modeling is extremely computer intensive, requiring simulations of large human populations with a diverse set of parameters related to biological and social factors that influence the distribution of the disease. "), - "africaathome.gif", - "", - "Study the spread of malaria" - ), +// array( +// "Malariacontrol.net", +// "http://www.malariacontrol.net/", +// tra("The Swiss Tropical Institute"), +// tra("Epidemiology"), +// tra("Simulation models of the transmission dynamics and health effects of malaria are an important tool for malaria control. They can be used to determine optimal strategies for delivering mosquito nets, chemotherapy, or new vaccines which are currently under development and testing. Such modeling is extremely computer intensive, requiring simulations of large human populations with a diverse set of parameters related to biological and social factors that influence the distribution of the disease. "), +// "africaathome.gif", +// "", +// "Study the spread of malaria" +// ), // array( // "Tanpaku", // "http://issofty17.is.noda.tus.ac.jp/", diff --git a/html/inc/bootstrap.inc b/html/inc/bootstrap.inc index 33faa122a5..bf78500acb 100644 --- a/html/inc/bootstrap.inc +++ b/html/inc/bootstrap.inc @@ -272,6 +272,7 @@ function grid($top_func, $left_func, $right_func, $left_width=6) { function form_start($action) { echo ' +
'; } @@ -283,6 +284,7 @@ function form_input_hidden($name, $value) { function form_end() { echo '
+
'; } @@ -351,3 +353,12 @@ function form_submit($text) { '; } + +function form_checkbox($label, $name, $checked=false) { + echo sprintf(' +
+   %s +
+ ', $name, $checked?"checked":"", $label + ); +}