Code

Image is now loaded automatically
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Apr 2008 13:22:42 +0000 (13:22 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Apr 2008 13:22:42 +0000 (13:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10474 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/contrib/gosa.conf
gosa-core/html/images/acl.png [deleted file]
gosa-core/html/plugins/acl/images/plugin.png [new file with mode: 0644]
gosa-core/include/class_pluglist.inc

index 6f5c5e9ab24f780a50a41d778efe44d829fd7560..8e9edbc63c363bb46d0304af8d4b6508571485e4 100644 (file)
@@ -83,8 +83,7 @@
                                path="plugins/gofon/macro" />
                        <plugin acl="gofonconference" class="phoneConferenceManagment" icon="conference.png"
                                path="plugins/gofon/conference" />
-                       <plugin acl="acl" class="acl" icon="acl.png"
-                               path="plugins/admin/acl" />
+                       <plugin acl="acl" class="acl" path="plugins/admin/acl" />
                        <plugin acl="sudo" class="sudoManagement" icon="sudo.png"
                                path="plugins/admin/sudo" />
                </section>
diff --git a/gosa-core/html/images/acl.png b/gosa-core/html/images/acl.png
deleted file mode 100644 (file)
index 22a4ab2..0000000
Binary files a/gosa-core/html/images/acl.png and /dev/null differ
diff --git a/gosa-core/html/plugins/acl/images/plugin.png b/gosa-core/html/plugins/acl/images/plugin.png
new file mode 100644 (file)
index 0000000..40b868f
Binary files /dev/null and b/gosa-core/html/plugins/acl/images/plugin.png differ
index d014c96a2c12f14284e7fcb2e2c9a96823929958..9725b4b1486cbf06e5be7ae68b3eae9ea2f0e8aa 100644 (file)
@@ -158,9 +158,7 @@ class pluglist {
                                        $plHeadline= $vars['plHeadline'];
                                        $plDescription= $vars['plDescription'];
 
-
                                        $index= $this->get_index($info['PATH'],$info['CLASS']);
-                                       $image= get_template_path('images/'.$info['ICON']);
                                        $href= "main.php?plug=$index&amp;reset=1";
 
                                        if(!$vars){
@@ -181,15 +179,6 @@ class pluglist {
                                                        _($plHeadline)."</a></p>\n";
                                                }
 
-                                               /* Generate icon entry with description */
-                                               $current= '<table summary=\"\" class="menuitem" onClick=\'location.href="'.$href.'"\'><tr><td style="background-color:#F0F0F0;"><a href="'.$href.'"><img alt=\"\" border=0 src="'.$image.'"></a></td><td style="width:100%; vertical-align:top; text-align:justify; padding-left:10px;">';
-                                               if(session::get('js')){
-                                                       $current.= '<b>'._($plHeadline).'</b><br>'._($plDescription);
-                                               } else {
-                                                       $current.= '<a href="'.$href.'"><b>'._($plHeadline).'</b></a><br><a href="'.$href.'">'._($plDescription).'</a>';
-                                               }
-                                               $current.= '</td></tr></table>';
-                                               $this->menuparts[_($headline)][]= $current;
                                                if(!session::is_set('maxC')){
                                                        session::set('maxC',"RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP");
                                                }
@@ -287,8 +276,12 @@ class pluglist {
 
                                        if ($this->check_access($info['ACL'])){
 
-                                               /* Hm this looks doubled */
-                                               $image= get_template_path('images/'.$info['ICON']);
+                                               /* Load icon */
+                                               if (isset($info['ICON'])){
+                                                       $image= get_template_path('images/'.$info['ICON']);
+                                               } else {
+                                                       $image= get_template_path("plugins/".preg_replace("/^.*\//", "", $info['PATH'])."/images/plugin.png");
+                                               }
                                                if ($col > 5){
                                                        $entries= $entries."</tr><tr>";
                                                        $col = 1;