本文整理汇总了PHP中get_status_option_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_status_option_list函数的具体用法?PHP get_status_option_list怎么用?PHP get_status_option_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_status_option_list函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: kanban_ajax_button_bug_change_status
/**
* Print Change Status to: AJAXified button
* This code is similar to button_bug_change_status except that the
* button is AJAXified.
* Uses projax.php
*
* @param int $p_bug_id
* @param int $t_project_id
* @param int $t_user_id
* @return null
*/
function kanban_ajax_button_bug_change_status($p_bug_id, $t_project_id, $t_user_id)
{
global $g_projax;
$t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
$t_bug_current_state = bug_get_field($p_bug_id, 'status');
$t_current_access = access_get_project_level($t_bug_project_id);
$t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'), $t_bug_project_id);
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo "<div id=\"ajax_statuschange\"><form method=\"post\" id=\"ajax_status_form\" action=\"xmlhttprequest.php\">";
# CSRF protection not required here - form does not result in modifications
echo "<input type=\"hidden\" name=\"project_id\" id=\"project_id\" value=\"{$t_project_id}\" />";
echo "<input type=\"hidden\" name=\"user_id\" id=\"user_id\" value=\"{$t_user_id}\" />";
echo "<input type=\"hidden\" name=\"entrypoint\" id=\"entrypoint\" value=\"bug_update_status\" />";
$t_button_text = lang_get('bug_status_to_button');
// AJAX button options
$options = array('url' => plugin_page('kanban_ajax_request'), 'with' => true, 'confirm' => lang_get('confirm_change_status'), 'success' => 'location.reload()', 'failure' => 'alert("Error: " ' + request . status + ')');
echo $g_projax->submit_to_remote('ajax_status', $t_button_text, $options);
echo " <select name=\"new_status\">";
# space at beginning of line is important
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\" ";
check_selected($key, $t_default);
echo ">{$val}</option>";
}
echo '</select>';
$t_bug_id = string_attribute($p_bug_id);
echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
echo "</form></div>\n";
}
}
开发者ID:aberad,项目名称:MantisKanban,代码行数:46,代码来源:kanban_api.php
示例2: print_status_option_list
function print_status_option_list($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = ALL_PROJECTS)
{
$t_current_auth = access_get_project_level($p_project_id);
$t_enum_list = get_status_option_list($t_current_auth, $p_current_value, true, $p_allow_close, $p_project_id);
if (count($t_enum_list) > 1) {
# resort the list into ascending order
ksort($t_enum_list);
reset($t_enum_list);
echo '<select ' . helper_get_tab_index() . ' id="' . $p_select_label . '" name="' . $p_select_label . '">';
foreach ($t_enum_list as $key => $val) {
echo '<option value="' . $key . '"';
check_selected($key, $p_current_value);
echo '>' . string_html_specialchars($val) . '</option>';
}
echo '</select>';
} else {
if (count($t_enum_list) == 1) {
echo array_pop($t_enum_list);
} else {
echo MantisEnum::getLabel(lang_get('status_enum_string'), $p_current_value);
}
}
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:23,代码来源:print_api.php
示例3: lang_get
if ($t_show_status) {
?>
<tr>
<th class="category">
<label for="status"><?php
echo lang_get('status');
?>
</label>
</th>
<td>
<select <?php
echo helper_get_tab_index();
?>
name="status">
<?php
$t_resolution_options = get_status_option_list(access_get_project_level($t_project_id), config_get('bug_submit_status'), true, ON == config_get('allow_reporter_close'), $t_project_id);
foreach ($t_resolution_options as $t_key => $t_value) {
?>
<option value="<?php
echo $t_key;
?>
" <?php
check_selected($t_key, config_get('bug_submit_status'));
?>
>
<?php
echo $t_value;
?>
</option>
<?php
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_report_page.php
示例4: html_button_bug_change_status
function html_button_bug_change_status($p_bug_id)
{
$t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
$t_bug_current_state = bug_get_field($p_bug_id, 'status');
$t_current_access = access_get_project_level($t_bug_project_id);
$t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'));
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo "<form method=\"post\" action=\"bug_change_status_page.php\">";
$t_button_text = lang_get('bug_status_to_button');
echo "<input type=\"submit\" class=\"button\" value=\"{$t_button_text}\" />";
echo " <select name=\"new_status\">";
# space at beginning of line is important
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\" ";
check_selected($key, $t_default);
echo ">{$val}</option>";
}
echo '</select>';
$t_bug_id = string_attribute($p_bug_id);
echo "<input type=\"hidden\" name=\"bug_id\" value=\"{$t_bug_id}\" />\n";
echo "</form>\n";
}
}
开发者ID:amjadtbssm,项目名称:website,代码行数:28,代码来源:html_api.php
示例5: html_button_bug_change_status
/**
* Print Change Status to: button
* This code is similar to print_status_option_list except
* there is no masking, except for the current state
*
* @param BugData $p_bug Bug object
* @return null
*/
function html_button_bug_change_status($p_bug)
{
$t_current_access = access_get_project_level($p_bug->project_id);
# User must have rights to change status to use this button
if (!access_has_bug_level(config_get('update_bug_status_threshold'), $p_bug->id)) {
return;
}
$t_enum_list = get_status_option_list($t_current_access, $p_bug->status, false, bug_is_user_reporter($p_bug->id, auth_get_current_user_id()) && access_has_bug_level(config_get('report_bug_threshold'), $p_bug->id) && ON == config_get('allow_reporter_close'), $p_bug->project_id);
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo "<form method=\"post\" action=\"bug_change_status_page.php\">";
# CSRF protection not required here - form does not result in modifications
$t_button_text = lang_get('bug_status_to_button');
echo "<input type=\"submit\" class=\"button\" value=\"{$t_button_text}\" />";
echo " <select name=\"new_status\">";
# space at beginning of line is important
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\" ";
check_selected($key, $t_default);
echo ">{$val}</option>";
}
echo '</select>';
$t_bug_id = string_attribute($p_bug->id);
echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
echo "</form>\n";
}
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:39,代码来源:html_api.php
示例6: write_bug_rows
function write_bug_rows($p_rows)
{
$user_array = get_user_array();
$alive_user_ids = array();
$issues_array_html = '';
$allowed_statuses_html = '';
print '<div id="taskodrome_data" hidden="true">
';
$users = '';
$user_number = count($user_array);
for ($i = 0; $i != $user_number; $i++) {
$users .= '<p hidden="true" class="user_data" ';
$users .= 'name="' . $user_array[$i]->name . '" ';
$users .= 'id="' . $user_array[$i]->id . '"';
$users .= '></p>';
$alive_user_ids[$user_array[$i]->id] = 1;
}
print $users;
$t_rows = count($p_rows);
for ($i = 0; $i < $t_rows; $i++) {
$t_row = $p_rows[$i];
$handler_id = $t_row->handler_id;
if (!array_key_exists($t_row->handler_id, $alive_user_ids)) {
$handler_id = 0;
}
$issues_array_html .= '<p hidden="true" class="issue_data" ';
$issues_array_html .= 'id="' . $t_row->id . '" ';
$issues_array_html .= 'summary="' . htmlentities($t_row->summary) . '" ';
$issues_array_html .= 'status="' . $t_row->status . '" ';
$issues_array_html .= 'handler_id="' . $handler_id . '" ';
$issues_array_html .= 'topColor="#0000FF" ';
$issues_array_html .= 'bottomColor="#FF0000" ';
$issues_array_html .= 'updateTime="' . $t_row->last_updated . '"';
$issues_array_html .= '></p>';
$t_all_statuses = get_status_option_list(access_get_project_level($t_row->project_id), $t_row->status, true, false, $t_row->project_id);
$allowed_statuses_html .= '<p hidden="true" class="status_pair" ';
$allowed_statuses_html .= 'id="' . $t_row->id . '" ';
$src_status_str = '';
$dst_status_str = '';
foreach ($t_all_statuses as $src_status => $src_st) {
$src_status_str .= $src_status . ';';
$t_enum_list = get_status_option_list(access_get_project_level($t_row->project_id), $src_status, true, bug_is_user_reporter($t_row->id, auth_get_current_user_id()) && access_has_bug_level(config_get('report_bug_threshold'), $t_row->id) && ON == config_get('allow_reporter_close'), $t_row->project_id);
foreach ($t_enum_list as $dst_status => $dst_st) {
$dst_status_str .= $dst_status . ',';
}
$dst_status_str .= ';';
}
$allowed_statuses_html .= 'src_status="' . $src_status_str . '" ';
$allowed_statuses_html .= 'dst_status="' . $dst_status_str . '"';
$allowed_statuses_html .= '></p>';
}
print $issues_array_html;
print $allowed_statuses_html;
$status_order = null;
foreach (plugin_config_get("status_board_order") as $t_value) {
$status_order .= $t_value . ';';
}
print '<p hidden="true" class="status_board_order" value="' . $status_order . '"></p>';
print '<p hidden="true" id="cooldown_period_days" value="' . plugin_config_get("cooldown_period_days") . '"></p>';
print '<p hidden="true" id="cooldown_period_hours" value="' . plugin_config_get("cooldown_period_hours") . '"></p>';
print '</div>';
print '<section class="tabs">
<br>
<input type="radio" id="radio_dg" name="group" >
<input type="radio" id="radio_sg" name="group" >
[ <label id="label_dg" class="radio_label" for="radio_dg" >' . plugin_lang_get("assignment_board") . '</label> ]
[ <label id="label_sg" class="radio_label" for="radio_sg" >' . plugin_lang_get("status_board") . '</label> ]
<div class="tabs_cont">
<div id="tab_c1">
';
print '<div id="dev-grid" class="grid">
<canvas id="panel">
</canvas>
</div>
';
print '</div>';
print '<div id="tab_c2">
<div id="st-grid" class="grid">
<canvas id="panel_st">
</canvas>
</div>
';
html_page_bottom();
print '</div>';
print '</div>
</section>
';
}
开发者ID:AuthenticEshkinKot,项目名称:Taskodrome,代码行数:91,代码来源:main.php
示例7: html_button_bug_change_status
/**
* Print Change Status to: button
* This code is similar to print_status_option_list except
* there is no masking, except for the current state
*
* @param BugData $p_bug A valid bug object.
* @return void
*/
function html_button_bug_change_status(BugData $p_bug)
{
$t_current_access = access_get_project_level($p_bug->project_id);
# User must have rights to change status to use this button
if (!access_has_bug_level(config_get('update_bug_status_threshold'), $p_bug->id)) {
return;
}
$t_enum_list = get_status_option_list($t_current_access, $p_bug->status, false, bug_is_user_reporter($p_bug->id, auth_get_current_user_id()) && access_has_bug_level(config_get('report_bug_threshold'), $p_bug->id) && ON == config_get('allow_reporter_close'), $p_bug->project_id);
if (count($t_enum_list) > 0) {
# resort the list into ascending order after noting the key from the first element (the default)
$t_default_arr = each($t_enum_list);
$t_default = $t_default_arr['key'];
ksort($t_enum_list);
reset($t_enum_list);
echo '<form method="post" action="bug_change_status_page.php">';
# CSRF protection not required here - form does not result in modifications
$t_button_text = lang_get('bug_status_to_button');
echo '<input type="submit" class="button" value="' . $t_button_text . '" />';
echo ' <select name="new_status">';
# space at beginning of line is important
foreach ($t_enum_list as $t_key => $t_val) {
echo '<option value="' . $t_key . '" ';
check_selected($t_key, $t_default);
echo '>' . $t_val . '</option>';
}
echo '</select>';
$t_bug_id = string_attribute($p_bug->id);
echo '<input type="hidden" name="id" value="' . $t_bug_id . '" />' . "\n";
echo '<input type="hidden" name="change_type" value="' . BUG_UPDATE_TYPE_CHANGE_STATUS . '" />' . "\n";
echo '</form>' . "\n";
}
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:40,代码来源:html_api.php
示例8: print_status_option_list
function print_status_option_list($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = null)
{
$t_current_auth = access_get_project_level($p_project_id);
$t_enum_list = get_status_option_list($t_current_auth, $p_current_value, true, $p_allow_close);
if (count($t_enum_list) > 0) {
# resort the list into ascending order
ksort($t_enum_list);
reset($t_enum_list);
echo '<select ', helper_get_tab_index(), ' name="' . $p_select_label . '">';
foreach ($t_enum_list as $key => $val) {
echo "<option value=\"{$key}\"";
check_selected($key, $p_current_value);
echo ">{$val}</option>";
}
echo '</select>';
} else {
echo get_enum_to_string('status_enum_string', $p_current_value);
}
}
开发者ID:jin255ff,项目名称:company_website,代码行数:19,代码来源:print_api.php
注:本文中的get_status_option_list函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论