commit e45ece5c313f433fd850a5d79aec03e732daaab4
Author: Florent Chuffart <florent.chuffart@ens-lyon.fr>
Date:   Fri Nov 13 15:07:38 2015 +0100

    Adding features to localize cell lines from names and passages.

diff --git a/doc/conf.py b/doc/conf.py
index 3f25201..9ec208e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -50,9 +50,9 @@ copyright = u' since 2007, Florent CHUFFART, Gael YVERT'
 # built documents.
 #
 # The short X.Y version.
-version = '0.1.24'
+version = '0.1.25'
 # The full version, including alpha/beta/rc tags.
-release = '0.1.24'
+release = '0.1.25'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/src/cl_name.MVC.php b/src/cl_name.MVC.php
new file mode 100644
index 0000000..a69824e
--- /dev/null
+++ b/src/cl_name.MVC.php
@@ -0,0 +1,49 @@
+<?php
+function pre_print_r($obj) {
+  echo "<PRE>";
+  print_r($obj);
+  echo "</PRE>";
+}
+
+$results = $this->myQuery("SELECT cl_passages.ID, cl_storage.ID, cl_passages.passage, cl_passages.date_of_freezing, cl_passages.Author, cl_storage.container, cl_storage.rack, cl_storage.box, cl_storage.field_y, cl_storage.field_x FROM `cl_passages`, `cl_storage`   WHERE cl_passages.name='" . $this->rec . "' AND cl_storage.cl_passages=cl_passages.ID");
+
+$cl_passages_ids = array();
+$cl_storage_ids = array();
+
+$table_of_passages = "<table class=\"pme-main\"><tr class=\"pme-navigation\">
+<th class=\"pme-header\">Passage</th>
+<th class=\"pme-header\">Date of freezing</th>
+<th class=\"pme-header\">Author</th>
+<th class=\"pme-header\">Storage</th>
+</tr>";
+
+while ($row = mysql_fetch_array($results)) {
+  // pre_print_r($row);
+  $cl_passages_ids[] = $row[0];
+  $cl_storage_ids[] = $row[1];
+  $table_of_passages .= "<tr class=\"pme-row-0\">
+    <td class=\"pme-cell-0\">" . $row["passage"] . "</td>
+    <td class=\"pme-cell-0\">" . $row["date_of_freezing"] . "</td>
+    <td class=\"pme-cell-0\">" . $row["Author"] . "</td>
+    <td class=\"pme-cell-0\">c" . $row["container"] . " r" . $row["rack"] . " b" . $row["box"] . " " . $row["field_y"] . "" . $row["field_x"] . "</td>
+  </tr>";
+  
+}
+
+$table_of_passages .= "</table>";
+
+// pre_print_r($ids);
+
+
+$link_to_paasages = "<a href=\"http://minideb/labstocks/cl_passages.php?action=ADV_SEARCH&col_0=name&cond_0=%3D&input_0=$this->rec\">all passages (" . count(array_unique($cl_passages_ids)) . ")</a>";
+
+
+
+  $to_be_post_list_content .= <<<EOD
+    <div class="sheet">
+    $link_to_paasages
+    $table_of_passages
+    </div>
+EOD;
+
+?>
diff --git a/src/cl_name.php b/src/cl_name.php
index 28fee7f..a6009e5 100644
--- a/src/cl_name.php
+++ b/src/cl_name.php
@@ -166,5 +166,9 @@ $opts['fdd']['Author'] = array(
 	'column' => 'id')
 );
 
+// TRIGGER
+$opts['triggers']['select']['pre'][]    = 'cl_name.MVC.php';
+$opts['triggers']['update']['pre'][]    = 'cl_name.MVC.php';
+
 require("footers.php");
 ?>
diff --git a/src/cl_passages.MVC.php b/src/cl_passages.MVC.php
new file mode 100644
index 0000000..fa41c23
--- /dev/null
+++ b/src/cl_passages.MVC.php
@@ -0,0 +1,38 @@
+<?php
+function pre_print_r($obj) {
+  echo "<PRE>";
+  print_r($obj);
+  echo "</PRE>";
+}
+
+$results = $this->myQuery("SELECT cl_storage.ID, cl_storage.container, cl_storage.rack, cl_storage.box, cl_storage.field_y, cl_storage.field_x FROM `cl_storage`   WHERE cl_storage.cl_passages='" . $this->rec . "'");
+
+
+$table_of_passages = "<table class=\"pme-main\"><tr class=\"pme-navigation\">
+<th class=\"pme-header\">Storage</th>
+</tr>";
+
+while ($row = mysql_fetch_array($results)) {
+  // pre_print_r($row);
+  $cl_passages_ids[] = $row[0];
+  $cl_storage_ids[] = $row[1];
+  $table_of_passages .= "<tr class=\"pme-row-0\">
+    <td class=\"pme-cell-0\">c" . $row["container"] . " r" . $row["rack"] . " b" . $row["box"] . " " . $row["field_y"] . "" . $row["field_x"] . "</td>
+  </tr>";
+  
+}
+
+$table_of_passages .= "</table>";
+
+// pre_print_r($ids);
+
+
+
+
+  $to_be_post_list_content .= <<<EOD
+    <div class="sheet">
+    $table_of_passages
+    </div>
+EOD;
+
+?>
diff --git a/src/cl_passages.php b/src/cl_passages.php
index 1d2c718..623433e 100644
--- a/src/cl_passages.php
+++ b/src/cl_passages.php
@@ -188,6 +188,10 @@ $opts['fdd']['Author'] = array(
 	'column' => 'id')
 );
 
+// TRIGGER
+$opts['triggers']['select']['pre'][]    = 'cl_passages.MVC.php';
+$opts['triggers']['update']['pre'][]    = 'cl_passages.MVC.php';
+
 
 require("footers.php");
 ?>
