Merge branch 'platal-0.9.17'
[platal.git] / include / userset.inc.php
index ab77c01..f45cf48 100644 (file)
@@ -209,6 +209,23 @@ class MinificheView extends MultipageView
                  : "");
     }
 
+    public function bounds()
+    {
+        $order = Env::v('order', $this->defaultkey);
+        $show_bounds = 0;
+        if (($order == "name") || ($order == "-name")) {
+            $this->bound_field = "nom";
+            $show_bounds = 1;
+        } elseif (($order == "promo") || ($order == "-promo")) {
+            $this->bound_field = "promo";
+            $show_bounds = -1;
+        }
+        if ($order{0} == '-') {
+            $show_bounds = -$show_bounds;
+        }
+        return $show_bounds;
+    }
+
     public function templateName()
     {
         return 'include/plview.minifiche.tpl';
@@ -234,6 +251,23 @@ class MentorView extends MultipageView
                 ms.secteur, ms.ss_secteur";
     }
 
+    public function bounds()
+    {
+        $order = Env::v('order', $this->defaultkey);
+        $show_bounds = 0;
+        if (($order == "name") || ($order == "-name")) {
+            $this->bound_field = "nom";
+            $show_bounds = 1;
+        } elseif (($order == "promo") || ($order == "-promo")) {
+            $this->bound_field = "promo";
+            $show_bounds = -1;
+        }
+        if ($order{0} == '-') {
+            $show_bounds = -$show_bounds;
+        }
+        return $show_bounds;
+    }
+
     public function templateName()
     {
         return 'include/plview.referent.tpl';
@@ -264,6 +298,23 @@ class TrombiView extends MultipageView
         return "INNER JOIN  photo AS p ON (p.uid = u.user_id) ";
     }
 
+    public function bounds()
+    {
+        $order = Env::v('order', $this->defaultkey);
+        $show_bounds = 0;
+        if (($order == "name") || ($order == "-name")) {
+            $this->bound_field = "nom";
+            $show_bounds = 1;
+        } elseif (($order == "promo") || ($order == "-promo")) {
+            $this->bound_field = "promo";
+            $show_bounds = -1;
+        }
+        if ($order{0} == '-') {
+            $show_bounds = -$show_bounds;
+        }
+        return $show_bounds;
+    }
+
     public function templateName()
     {
         return 'include/plview.trombi.tpl';