当前位置: 首页>>代码示例>>PHP>>正文


PHP Ticket::dropdownStatus方法代码示例

本文整理汇总了PHP中Ticket::dropdownStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::dropdownStatus方法的具体用法?PHP Ticket::dropdownStatus怎么用?PHP Ticket::dropdownStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ticket的用法示例。


在下文中一共展示了Ticket::dropdownStatus方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayCriteriaSelectPattern

 /**
  * Display item used to select a pattern for a criteria
  *
  * @param $name      criteria name
  * @param $ID        the given criteria
  * @param $condition condition used
  * @param $value     the pattern (default '')
  * @param $test      Is to test rule ? (false by default)
  **/
 function displayCriteriaSelectPattern($name, $ID, $condition, $value = "", $test = false)
 {
     $crit = $this->getCriteria($ID);
     $display = false;
     $tested = false;
     if (isset($crit['type']) && ($test || in_array($condition, array(self::PATTERN_IS, self::PATTERN_IS_NOT, self::PATTERN_NOT_UNDER, self::PATTERN_UNDER)))) {
         switch ($crit['type']) {
             case "yesonly":
                 Dropdown::showYesNo($name, $crit['table'], 0);
                 $display = true;
                 break;
             case "yesno":
                 Dropdown::showYesNo($name, $crit['table']);
                 $display = true;
                 break;
             case "dropdown":
                 $param = array('name' => $name, 'value' => $value);
                 if (isset($crit['condition'])) {
                     $param['condition'] = $crit['condition'];
                 }
                 Dropdown::show(getItemTypeForTable($crit['table']), $param);
                 $display = true;
                 break;
             case "dropdown_users":
                 User::dropdown(array('value' => $value, 'name' => $name, 'right' => 'all'));
                 $display = true;
                 break;
             case "dropdown_tracking_itemtype":
                 Dropdown::showItemTypes($name, array_keys(Ticket::getAllTypesForHelpdesk()));
                 $display = true;
                 break;
             case "dropdown_urgency":
                 Ticket::dropdownUrgency(array('name' => $name, 'value' => $value));
                 $display = true;
                 break;
             case "dropdown_impact":
                 Ticket::dropdownImpact(array('name' => $name, 'value' => $value));
                 $display = true;
                 break;
             case "dropdown_priority":
                 Ticket::dropdownPriority(array('name' => $name, 'value' => $value));
                 $display = true;
                 break;
             case "dropdown_status":
                 Ticket::dropdownStatus(array('name' => $name, 'value' => $value));
                 $display = true;
                 break;
             case "dropdown_tickettype":
                 Ticket::dropdownType($name, array('value' => $value));
                 $display = true;
                 break;
         }
         $tested = true;
     }
     //Not a standard condition
     if (!$tested) {
         $display = $this->displayAdditionalRuleCondition($condition, $crit, $name, $value, $test);
     }
     if ($condition == self::PATTERN_EXISTS || $condition == self::PATTERN_DOES_NOT_EXISTS) {
         echo "<input type='hidden' name='{$name}' value='1'>";
         $display = true;
     }
     if (!$display && ($rc = getItemForItemtype($this->rulecriteriaclass))) {
         Html::autocompletionTextField($rc, "pattern", array('name' => $name, 'value' => $value, 'size' => 70));
     }
 }
开发者ID:pvasener,项目名称:glpi,代码行数:75,代码来源:rule.class.php

示例2: getCentral


//.........这里部分代码省略.........
         if (($ID || $values['itilcategories_id']) && $tt->isMandatoryField("itilcategories_id") && $ticket->fields["itilcategories_id"] > 0) {
             $opt['display_emptychoice'] = false;
         }
         switch ($ticket->fields["type"]) {
             case Ticket::INCIDENT_TYPE:
                 $opt['condition'] .= "`is_incident`='1'";
                 break;
             case Ticket::DEMAND_TYPE:
                 $opt['condition'] .= "`is_request`='1'";
                 break;
             default:
                 break;
         }
         echo "<span id='show_category_by_type'>";
         ITILCategory::dropdown($opt);
         echo "</span>";
     } else {
         echo Dropdown::getDropdownName("glpi_itilcategories", $ticket->fields["itilcategories_id"]);
     }
     echo "</td>";
     echo "</tr>";
     if (!$ID) {
         echo "</table>";
         $ticket->showActorsPartForm($ID, $values);
         echo "<table class='tab_cadre_fixe' id='mainformtable3'>";
     }
     echo "<tr class='tab_bg_1'>";
     echo "<th width='{$colsize1}%'>" . $tt->getBeginHiddenFieldText('status');
     printf(__('%1$s%2$s'), __('Status'), $tt->getMandatoryMark('status'));
     echo $tt->getEndHiddenFieldText('status') . "</th>";
     echo "<td width='{$colsize2}%'>";
     echo $tt->getBeginHiddenFieldValue('status');
     if ($canstatus) {
         Ticket::dropdownStatus(array('value' => $ticket->fields["status"], 'showtype' => 'allowed'));
     } else {
         echo Ticket::getStatus($ticket->fields["status"]);
     }
     echo $tt->getEndHiddenFieldValue('status', $ticket);
     echo "</td>";
     echo "<th width='{$colsize3}%'>" . $tt->getBeginHiddenFieldText('requesttypes_id');
     printf(__('%1$s%2$s'), __('Request source'), $tt->getMandatoryMark('requesttypes_id'));
     echo $tt->getEndHiddenFieldText('requesttypes_id') . "</th>";
     echo "<td width='{$colsize4}%'>";
     echo $tt->getBeginHiddenFieldValue('requesttypes_id');
     if ($canupdate) {
         RequestType::dropdown(array('value' => $ticket->fields["requesttypes_id"]));
     } else {
         echo Dropdown::getDropdownName('glpi_requesttypes', $ticket->fields["requesttypes_id"]);
     }
     echo $tt->getEndHiddenFieldValue('requesttypes_id', $ticket);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<th>" . $tt->getBeginHiddenFieldText('urgency');
     printf(__('%1$s%2$s'), __('Urgency'), $tt->getMandatoryMark('urgency'));
     echo $tt->getEndHiddenFieldText('urgency') . "</th>";
     echo "<td>";
     if ($canupdate && $canpriority || !$ID || $canupdate_descr) {
         // Only change during creation OR when allowed to change priority OR when user is the creator
         echo $tt->getBeginHiddenFieldValue('urgency');
         $idurgency = Ticket::dropdownUrgency(array('value' => $ticket->fields["urgency"]));
         echo $tt->getEndHiddenFieldValue('urgency', $ticket);
     } else {
         $idurgency = "value_urgency" . mt_rand();
         echo "<input id='{$idurgency}' type='hidden' name='urgency' value='" . $ticket->fields["urgency"] . "'>";
         echo Ticket::getUrgencyName($ticket->fields["urgency"]);
开发者ID:geldarr,项目名称:hack-space,代码行数:67,代码来源:survey.class.php

示例3: displayActionSelectPattern

 /**
  * @param $options   array
  **/
 function displayActionSelectPattern($options = array())
 {
     $display = false;
     $param['value'] = '';
     if (isset($options['value'])) {
         $param['value'] = $options['value'];
     }
     switch ($options["action_type"]) {
         //If a regex value is used, then always display an autocompletiontextfield
         case "regex_result":
         case "append_regex_result":
             Html::autocompletionTextField($this, "value", $param);
             break;
         case 'fromuser':
         case 'fromitem':
             Dropdown::showYesNo("value", $param['value'], 0);
             $display = true;
             break;
         default:
             $actions = Rule::getActionsByType($options["sub_type"]);
             if (isset($actions[$options["field"]]['type'])) {
                 switch ($actions[$options["field"]]['type']) {
                     case "dropdown":
                         $table = $actions[$options["field"]]['table'];
                         $param['name'] = "value";
                         if (isset($actions[$options["field"]]['condition'])) {
                             $param['condition'] = $actions[$options["field"]]['condition'];
                         }
                         Dropdown::show(getItemTypeForTable($table), $param);
                         $display = true;
                         break;
                     case "dropdown_tickettype":
                         Ticket::dropdownType('value', $param);
                         $display = true;
                         break;
                     case "dropdown_assign":
                         $param['name'] = 'value';
                         $param['right'] = 'own_ticket';
                         User::dropdown($param);
                         $display = true;
                         break;
                     case "dropdown_users":
                         $param['name'] = 'value';
                         $param['right'] = 'all';
                         User::dropdown($param);
                         $display = true;
                         break;
                     case "dropdown_urgency":
                         $param['name'] = 'value';
                         Ticket::dropdownUrgency($param);
                         $display = true;
                         break;
                     case "dropdown_impact":
                         $param['name'] = 'value';
                         Ticket::dropdownImpact($param);
                         $display = true;
                         break;
                     case "dropdown_priority":
                         if ($_POST["action_type"] != 'compute') {
                             $param['name'] = 'value';
                             Ticket::dropdownPriority($param);
                         }
                         $display = true;
                         break;
                     case "dropdown_status":
                         $param['name'] = 'value';
                         Ticket::dropdownStatus($param);
                         $display = true;
                         break;
                     case "yesonly":
                         Dropdown::showYesNo("value", $param['value'], 0);
                         $display = true;
                         break;
                     case "yesno":
                         Dropdown::showYesNo("value", $param['value']);
                         $display = true;
                         break;
                     case "dropdown_management":
                         $param['name'] = 'value';
                         $param['management_restrict'] = 2;
                         $param['withtemplate'] = false;
                         Dropdown::showGlobalSwitch(0, $param);
                         $display = true;
                         break;
                     case "dropdown_users_validate":
                         $used = array();
                         if ($item = getItemForItemtype($options["sub_type"])) {
                             $rule_data = getAllDatasFromTable('glpi_ruleactions', "`action_type` = 'add_validation'\n                                                           AND `field` = 'users_id_validate'\n                                                           AND `" . $item->getRuleIdField() . "`\n                                                            = '" . $options[$item->getRuleIdField()] . "'");
                             foreach ($rule_data as $data) {
                                 $used[] = $data['value'];
                             }
                         }
                         $param['name'] = 'value';
                         $param['right'] = array('validate_incident', 'validate_request');
                         $param['used'] = $used;
                         User::dropdown($param);
                         $display = true;
//.........这里部分代码省略.........
开发者ID:stweil,项目名称:glpi,代码行数:101,代码来源:ruleaction.class.php

示例4: showEquals

 public function showEquals($searchopt, $value, $edit = true)
 {
     $inputname = $searchopt['linkfield'];
     switch ($searchopt['table'] . "." . $searchopt['linkfield']) {
         case "glpi_tickets.status":
             if ($edit) {
                 Ticket::dropdownStatus($inputname, $value, 1);
             } else {
                 echo Ticket::getStatus($value);
             }
             break;
         case "glpi_tickets.priority":
             if ($edit) {
                 Ticket::dropdownPriority($inputname, $value, true, true);
             } else {
                 echo Ticket::getPriorityName(trim($value));
             }
             break;
         case "glpi_tickets.impact":
             if ($edit) {
                 Ticket::dropdownImpact($inputname, $value, true);
             } else {
                 echo Ticket::getImpactName($value);
             }
             break;
         case "glpi_tickets.urgency":
             if ($edit) {
                 Ticket::dropdownUrgency($inputname, $value, true);
             } else {
                 echo Ticket::getUrgencyName($value);
             }
             break;
         case "glpi_tickets.global_validation":
             if ($edit) {
                 TicketValidation::dropdownStatus($inputname, array('value' => $value, 'all' => 1));
             } else {
                 TicketValidation::getStatus($value);
             }
             break;
         case "glpi_users.name":
             if ($edit) {
                 User::dropdown(array('name' => $inputname, 'value' => $value, 'comments' => false, 'all' => -1, 'right' => 'all'));
             } else {
                 echo getUserName($value);
             }
             break;
         case "glpi_ticketvalidations.status":
             if ($edit) {
                 TicketValidation::dropdownStatus($inputname, array('value' => $value, 'all' => 1));
             } else {
                 echo TicketValidation::getStatus($value);
             }
             break;
     }
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:55,代码来源:item.class.php

示例5: switch

         case "Ticket.users_id_recipient":
         case "Ticket.users_id":
             User::dropdownForTicket($inputname, $_REQUEST['value'], $searchopt['linkfield']);
             $display = true;
             break;
         case "Ticket.users_id_assign":
             User::dropdown(array('name' => $inputname, 'value' => $_REQUEST['value'], 'right' => 'own_ticket', 'all' => 1));
             $display = true;
             break;
     }
 }
 if (!$display && isset($searchopt['field'])) {
     // Specific cases
     switch ($searchopt['table'] . "." . $searchopt['field']) {
         case "glpi_tickets.status":
             Ticket::dropdownStatus($inputname, $_REQUEST['value'], 1);
             $display = true;
             break;
         case "glpi_tickets.priority":
             Ticket::dropdownPriority($inputname, $_REQUEST['value'], true, true);
             $display = true;
             break;
         case "glpi_tickets.impact":
             Ticket::dropdownImpact($inputname, $_REQUEST['value'], true);
             $display = true;
             break;
         case "glpi_tickets.urgency":
             Ticket::dropdownUrgency($inputname, $_REQUEST['value'], true);
             $display = true;
             break;
         case "glpi_tickets.global_validation":
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:31,代码来源:searchoptionvalue.php

示例6: displayActionSelectPattern

 /**
  * @param $options   array
  **/
 function displayActionSelectPattern($options = array())
 {
     $display = false;
     switch ($_POST["action_type"]) {
         //If a regex value is used, then always display an autocompletiontextfield
         case "regex_result":
         case "append_regex_result":
             Html::autocompletionTextField($this, "value");
             break;
         case 'fromuser':
         case 'fromitem':
             Dropdown::showYesNo("value", 0, 0);
             $display = true;
             break;
         default:
             $actions = Rule::getActionsByType($options["sub_type"]);
             if (isset($actions[$options["field"]]['type'])) {
                 switch ($actions[$options["field"]]['type']) {
                     case "dropdown":
                         $table = $actions[$options["field"]]['table'];
                         $param = array('name' => "value");
                         if (isset($actions[$options["field"]]['condition'])) {
                             $param['condition'] = $actions[$options["field"]]['condition'];
                         }
                         Dropdown::show(getItemTypeForTable($table), $param);
                         $display = true;
                         break;
                     case "dropdown_tickettype":
                         Ticket::dropdownType('value');
                         $display = true;
                         break;
                     case "dropdown_assign":
                         User::dropdown(array('name' => 'value', 'right' => 'own_ticket'));
                         $display = true;
                         break;
                     case "dropdown_users":
                         User::dropdown(array('name' => 'value', 'right' => 'all'));
                         $display = true;
                         break;
                     case "dropdown_urgency":
                         Ticket::dropdownUrgency(array('name' => 'value'));
                         $display = true;
                         break;
                     case "dropdown_impact":
                         Ticket::dropdownImpact(array('name' => 'value'));
                         $display = true;
                         break;
                     case "dropdown_priority":
                         if ($_POST["action_type"] != 'compute') {
                             Ticket::dropdownPriority(array('name' => 'value'));
                         }
                         $display = true;
                         break;
                     case "dropdown_status":
                         Ticket::dropdownStatus(array('name' => "value"));
                         $display = true;
                         break;
                     case "yesonly":
                         Dropdown::showYesNo("value", 0, 0);
                         $display = true;
                         break;
                     case "yesno":
                         Dropdown::showYesNo("value");
                         $display = true;
                         break;
                     case "dropdown_management":
                         Dropdown::showGlobalSwitch(0, array('name' => 'value', 'management_restrict' => 2, 'withtemplate' => false));
                         $display = true;
                         break;
                     case "dropdown_users_validate":
                         User::dropdown(array('name' => "value", 'right' => array('validate_incident', 'validate_request')));
                         $display = true;
                         break;
                     default:
                         if ($rule = getItemForItemtype($options["sub_type"])) {
                             $display = $rule->displayAdditionalRuleAction($actions[$options["field"]]);
                         }
                         break;
                 }
             }
             if (!$display) {
                 Html::autocompletionTextField($this, "value");
             }
     }
 }
开发者ID:gaforeror,项目名称:glpi,代码行数:88,代码来源:ruleaction.class.php

示例7: array

 case "glpi_consumableitems.alarm_threshold":
     Dropdown::showInteger($search["linkfield"], 0, -1, 100);
     break;
 case "glpi_contracts.duration":
 case "glpi_contracts.notice":
     Dropdown::showInteger($search["field"], 0, 0, 120);
     echo " " . $LANG['financial'][57];
     break;
 case "glpi_softwarelicenses.number":
     Dropdown::showInteger($search["linkfield"], 0, 1, 1000, 1, array(-1 => $LANG['software'][4]));
     break;
 case "glpi_contracts.alert":
     Contract::dropdownAlert($search["linkfield"], 0);
     break;
 case "glpi_tickets.status":
     Ticket::dropdownStatus($search["linkfield"]);
     break;
 case "glpi_tickets.type":
     Ticket::dropdownType($search["linkfield"]);
     break;
 case "glpi_tickets.priority":
     Ticket::dropdownPriority($search["linkfield"]);
     break;
 case "glpi_tickets.impact":
     Ticket::dropdownImpact($search["linkfield"]);
     break;
 case "glpi_tickets.urgency":
     Ticket::dropdownUrgency($search["linkfield"]);
     break;
 case "glpi_tickets.global_validation":
     TicketValidation::dropdownStatus($search["linkfield"]);
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:dropdownMassiveActionField.php


注:本文中的Ticket::dropdownStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。