Code

Added border to divlist in fai script listing.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Aug 2007 08:59:16 +0000 (08:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Aug 2007 08:59:16 +0000 (08:59 +0000)
Added Sorting images

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6966 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiScript.inc

index 3f9d0612e075105a2c3e76fc2867f32eefbb3088..7fd3c4a609fbf177de6ce7580a1bb750865bf769 100644 (file)
@@ -257,8 +257,23 @@ class faiScript extends plugin
     $divlist = new divlist("FAIscripts");
     $plug = $_GET['plug'];
 
-    $divlist->SetHeader(array(  array("string"=>"<a href='?plug=".$plug."&amp;sort=name'>"._("Name")."</a>"),
-          array("string"=>"<a href='?plug=".$plug."&amp;sort=priority'>"._("Priority")."</a>"),
+     if($this->sort_order == "up"){
+       $dir = "<img src='images/sort_up.png' title='"._("Sort direction")."' alt='\/' border=0>";
+     }else{
+       $dir = "<img src='images/sort_down.png' title='"._("Sort direction")."' alt='/\' border=0>";
+     }
+
+     if($this->sort_by == "name"){
+       $sort_name = $dir;
+       $sort_prio = "";
+     }else{
+       $sort_name = "";
+       $sort_prio = $dir;
+     }
+
+     $divlist->SetHeader(array(  
+          array("string"=>"<a href='?plug=".$plug."&amp;sort=name'>"._("Name").$sort_name."</a>"),
+          array("string"=>"<a href='?plug=".$plug."&amp;sort=priority'>".$sort_prio._("Priority")."</a>"),
           array("string"=>_("Download")),
           array("string"=>_("Action"))));
     $divlist->SetHeight(300);