示例#1
0
 /**
  * Show config menu
  */
 function showMenu()
 {
     global $CFG_GLPI;
     $validation = new PluginConsumablesValidation();
     $request = new PluginConsumablesRequest();
     if (!$this->canView()) {
         return false;
     }
     echo "<div align='center'>";
     echo "<table class='tab_cadre' cellpadding='5' height='150'>";
     echo "<tr>";
     echo "<th colspan='5'>" . __("Consumable request", "consumables") . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1' style='background-color:white;'>";
     // Consumable request
     if ($request->canRequest()) {
         echo "<td class='center consumables_menu_item'>";
         echo "<a  class='consumables_menu_a' href=\"./wizard.form.php?action=consumablerequest\">";
         echo "<img class='consumables_menu_img' src='" . $CFG_GLPI["root_doc"] . "/plugins/consumables/pics/consumablerequest.png' alt=\"" . __("Consumable request", "consumables") . "\">";
         echo "<br>" . __("Consumable request", "consumables") . "<br></a>";
         echo "</td>";
     }
     // Consumable validation
     echo "<td class='center consumables_menu_item'>";
     echo "<a  class='consumables_menu_a' href=\"./wizard.form.php?action=consumablevalidation\">";
     echo "<img class='consumables_menu_img' src='" . $CFG_GLPI["root_doc"] . "/plugins/consumables/pics/consumablevalidation.png' alt=\"" . __("Consumable validation", "consumables") . "\">";
     echo "<br>" . __("Consumable validation", "consumables") . "</a>";
     echo "</td>";
     echo "</tr>";
     echo "</table></div>";
 }