Code

Folder images implemented
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:16:35 +0000 (09:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:16:35 +0000 (09:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8808 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/groups/apps/app_list.tpl
gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc

index ab448d0a3a0b08d22742b2e1c4f5a12c0733382b..0cb597952cdeef49b640d0fd40bc2558ce28362e 100644 (file)
                </tr>
        {elseif $item.TYPE == "FOLDER"}
                <tr>
-                       <td style='width:20px; padding-top:5px;padding-bottom:5px;'>
-                               <img class="center" src='images/folder.png' alt='{t}Folder{/t}'>
+                       <td style='width:22px; padding-top:5px;padding-bottom:5px;'>
+                               {if $item.ICON != ""}
+                                       <div style="height:20px;width:20px; overflow:hidden">
+                                       <img class="center" src='?plug={$plug_id}&amp;send={$item.UNIQID}' alt='{t}Folder{/t}' class="center">
+                                       </div>
+                               {else}
+                                       <div style="height:20px;width:20px; overflow:hidden">
+                                       <img class="center" src='images/folder.png' alt='{t}Folder{/t}' class="center">
+                                       </div>
+                               {/if}
                        </td>
                        <td>
-                               {$item.NAME}
+                               <b>{$item.NAME}</b>
                        </td>
                        <td style='width:100px;text-align:right'>
 <!--
                </tr>
        {elseif $item.TYPE == "ENTRY"}
                <tr>
-                       <td style='width:20px; padding-top:5px;padding-bottom:5px;'>
-                               <img src='images/select_application.png' alt='{t}Entry{/t}'>
+                       <td style='width:22px; padding-top:5px;padding-bottom:5px;'>
+                               <div style="width:20px; overflow:hidden; text-align:center;">
+                                       <img src='images/select_application.png' alt='{t}Entry{/t}' class="center">
+                               </div>
                        </td>
                        <td>
                                {$item.NAME} {$item.INFO}
index 71ba96fb25d5561832a80e0cc940dfd24d6306f1..a49b70a678ed5778003347b5bb7480f27df492f2 100644 (file)
@@ -215,6 +215,15 @@ class appgroup2 extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if(isset($_GET['send'])){
+      $id = $_GET['send'];
+      $all = $this->_get_all_entries();
+      if(isset($all[$id])){
+        send_binary_content($all[$id]['ICON'],$id.".jpg","image/jpeg");
+        exit;
+      }
+    }
+
     if(isset($_GET['r']))
     $this->__construct($this->config,$this->dn);
 
@@ -243,6 +252,7 @@ class appgroup2 extends plugin
     }
 
     $smarty = get_smarty();
+    $smarty->assign("plug_id" , $_GET['plug']);
 
     /* Create application list */
     $div = new divSelectBox("appgroup");