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


PHP print_custom_field_value函数代码示例

本文整理汇总了PHP中print_custom_field_value函数的典型用法代码示例。如果您正苦于以下问题:PHP print_custom_field_value函数的具体用法?PHP print_custom_field_value怎么用?PHP print_custom_field_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: custom_function_default_print_column_value

/**
 * Print the value of the custom field (if the field is applicable to the project of
 * the specified issue and the current user has read access to it.
 * see custom_function_default_print_column_title() for rules about column names.
 * @param string  $p_column         Name of field to show in the column.
 * @param BugData $p_bug            Bug object.
 * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php.
 * @return void
 */
function custom_function_default_print_column_value($p_column, BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    if (COLUMNS_TARGET_CSV_PAGE == $p_columns_target) {
        $t_column_start = '';
        $t_column_end = '';
        $t_column_empty = '';
    } else {
        $t_column_start = '<td class="column-%s">';
        $t_column_end = '</td>';
        $t_column_empty = '&#160;';
    }
    $t_custom_field = column_get_custom_field_name($p_column);
    if ($t_custom_field !== null) {
        printf($t_column_start, 'custom-' . $t_custom_field);
        $t_field_id = custom_field_get_id_from_name($t_custom_field);
        if ($t_field_id === false) {
            echo '@', $t_custom_field, '@';
        } else {
            $t_issue_id = $p_bug->id;
            $t_project_id = $p_bug->project_id;
            if (custom_field_is_linked($t_field_id, $t_project_id)) {
                $t_def = custom_field_get_definition($t_field_id);
                print_custom_field_value($t_def, $t_field_id, $t_issue_id);
            } else {
                # field is not linked to project
                echo $t_column_empty;
            }
        }
        echo $t_column_end;
    } else {
        $t_plugin_columns = columns_get_plugin_columns();
        if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
            $t_function = 'print_column_' . $p_column;
        } else {
            $t_function = 'csv_format_' . $p_column;
        }
        if (function_exists($t_function)) {
            if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
                $t_function($p_bug, $p_columns_target);
            } else {
                $t_function($p_bug);
            }
        } else {
            if (isset($t_plugin_columns[$p_column])) {
                $t_column_object = $t_plugin_columns[$p_column];
                print_column_plugin($t_column_object, $p_bug, $p_columns_target);
            } else {
                printf($t_column_start, $p_column);
                if (isset($p_bug->{$p_column})) {
                    echo string_display_line($p_bug->{$p_column}) . $t_column_end;
                } else {
                    echo '@' . $p_column . '@' . $t_column_end;
                }
            }
        }
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:66,代码来源:custom_function_api.php

示例2: custom_field_get_definition

    # has read access
    $t_custom_fields_found = true;
    $t_def = custom_field_get_definition($t_id);
    ?>
	<tr <?php 
    echo helper_alternate_class();
    ?>
>
		<td class="category">
			<?php 
    echo string_display(lang_get_defaulted($t_def['name']));
    ?>
		</td>
		<td colspan="5">
		<?php 
    print_custom_field_value($t_def, $t_id, $f_bug_id);
    ?>
		</td>
	</tr>
<?php 
}
# foreach
?>

<?php 
if ($t_custom_fields_found) {
    ?>
<!-- spacer -->
<tr class="spacer">
	<td colspan="6"></td>
</tr>
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:bug_view_advanced_page.php

示例3: custom_function_default_print_column_value

function custom_function_default_print_column_value($p_column, $p_issue_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    if (COLUMNS_TARGET_CSV_PAGE == $p_columns_target) {
        $t_column_start = '';
        $t_column_end = '';
        $t_column_empty = '';
    } else {
        $t_column_start = '<td>';
        $t_column_end = '</td>';
        $t_column_empty = '&nbsp;';
    }
    if (strpos($p_column, 'custom_') === 0) {
        echo $t_column_start;
        $t_custom_field = substr($p_column, 7);
        $t_field_id = custom_field_get_id_from_name($t_custom_field);
        if ($t_field_id === false) {
            echo '@', $t_custom_field, '@';
        } else {
            $t_issue_id = $p_issue_row['id'];
            $t_project_id = $p_issue_row['project_id'];
            if (custom_field_is_linked($t_field_id, $t_project_id)) {
                $t_def = custom_field_get_definition($t_field_id);
                print_custom_field_value($t_def, $t_field_id, $t_issue_id);
            } else {
                // field is not linked to project
                echo $t_column_empty;
            }
        }
        echo $t_column_end;
    } else {
        if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
            $t_function = 'print_column_' . $p_column;
        } else {
            $t_function = 'csv_format_' . $p_column;
        }
        if (function_exists($t_function)) {
            if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
                $t_function($p_issue_row, $p_columns_target);
            } else {
                $t_function($p_issue_row[$p_column]);
            }
        } else {
            if (isset($p_issue_row[$p_column])) {
                echo $t_column_start . $p_issue_row[$p_column] . $t_column_end;
            } else {
                echo $t_column_start . '@' . $p_column . '@' . $t_column_end;
            }
        }
    }
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:50,代码来源:custom_function_api.php

示例4: custom_function_override_print_column_value

function custom_function_override_print_column_value($p_column, $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    if (COLUMNS_TARGET_CSV_PAGE == $p_columns_target) {
        $t_column_start = '';
        $t_column_end = '';
        $t_column_empty = '';
    } else {
        $t_column_start = '<td class="center">';
        $t_column_end = '</td>';
        $t_column_empty = '&#160;';
    }
    $t_custom_field = column_get_custom_field_name($p_column);
    if ($t_custom_field !== null) {
        echo $t_column_start;
        $t_field_id = custom_field_get_id_from_name($t_custom_field);
        if ($t_field_id === false) {
            echo '@', $t_custom_field, '@';
        } else {
            $t_issue_id = $p_bug->id;
            $t_project_id = $p_bug->project_id;
            if (custom_field_is_linked($t_field_id, $t_project_id)) {
                $t_def = custom_field_get_definition($t_field_id);
                if (strpos($p_column, 'custom_Deadline') === 0 && $t_def['type'] == CUSTOM_FIELD_TYPE_DATE) {
                    $deadline_date = custom_field_get_value($t_field_id, $t_issue_id);
                    if ($p_issue_row['status'] < 80) {
                        $current_date = strtotime(date("Y-m-d"));
                        if ($current_date >= $deadline_date) {
                            echo '<b><font color="red">';
                            print_custom_field_value($t_def, $t_field_id, $t_issue_id);
                            echo '</font></b>';
                        } else {
                            print_custom_field_value($t_def, $t_field_id, $t_issue_id);
                        }
                    } elseif ($deadline_date) {
                        if (lang_get_current() == 'german') {
                            echo '<b>ERLEDIGT!</b>';
                        } else {
                            echo '<b>DONE!</b>';
                        }
                    }
                } else {
                    print_custom_field_value($t_def, $t_field_id, $t_issue_id);
                }
            } else {
                // field is not linked to project
                echo $t_column_empty;
            }
        }
        echo $t_column_end;
    } else {
        $t_plugin_columns = columns_get_plugin_columns();
        if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
            if ($p_column == 'summary') {
                $t_function = 'print_column_summary_BFE';
            } else {
                $t_function = 'print_column_' . $p_column;
            }
        } else {
            $t_function = 'csv_format_' . $p_column;
        }
        if (function_exists($t_function)) {
            if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
                $t_function($p_bug, $p_columns_target);
            } else {
                $t_function($p_bug);
            }
        } else {
            if (isset($t_plugin_columns[$p_column])) {
                $t_column_object = $t_plugin_columns[$p_column];
                print_column_plugin($t_column_object, $p_bug, $p_columns_target);
            } else {
                if (isset($p_bug->{$p_column})) {
                    echo $t_column_start . string_display_line($p_bug->{$p_column}) . $t_column_end;
                } else {
                    echo $t_column_start . '@' . $p_column . '@' . $t_column_end;
                }
            }
        }
    }
}
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:80,代码来源:custom_functions_inc.php

示例5: custom_field_get_linked_ids

</tr>
<?php 
        $t_related_custom_field_ids = custom_field_get_linked_ids($v_project_id);
        foreach ($t_related_custom_field_ids as $t_id) {
            $t_def = custom_field_get_definition($t_id);
            ?>
<tr class="print">
	<td class="print-category">
		<?php 
            echo lang_get_defaulted($t_def['name']);
            ?>
:
	</td>
	<td class="print" colspan="5">
		<?php 
            print_custom_field_value($t_def, $t_id, $v_id);
            ?>
	</td>
</tr>
<?php 
        }
        // foreach
        ?>
<tr>
	<td class="print-spacer" colspan="6">
		<hr size="1" width="100%" />
	</td>
</tr>
<tr class="print">
	<td class="print-category">
		<?php 
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:print_all_bug_page_word.php

示例6: string_display

                    echo '<td class="custom_field pad1 center" title="', string_display(lang_get_defaulted($t_def['name'])), '">', print_custom_field_value($t_def, $t_id, $t_bug->id), '</td>';
                }
            }
        }
    } else {
        foreach ($g_show_only_custom_fields as $t_display_id) {
            foreach ($t_related_custom_field_ids as $key => $t_id) {
                if (!custom_field_has_read_access($t_id, $t_bug->id)) {
                    continue;
                }
                # has read access #d8d8d8
                $t_custom_fields_found = true;
                $t_def = custom_field_get_definition($t_id);
                $t_def_custom = 'custom_' . strtolower($t_def['name']);
                if ($key + 1 === $t_display_id) {
                    echo '<td class="custom_field pad1 center" title="', string_display(lang_get_defaulted($t_def['name'])), '">', print_custom_field_value($t_def, $t_id, $t_bug->id), '</td>';
                }
            }
        }
    }
    echo '</tr>';
    if ($t_custom_fields_found) {
        # spacer
        echo '<tr class="custom_spacer"><td colspan="20"></td></tr>';
    }
    # custom fields found
    #*********
    ?>
</tr>
</tr>
<?php 
开发者ID:khinT,项目名称:mantisbt-master,代码行数:31,代码来源:my_view_inc.php

示例7: string_display_line

	<td class="print">
		<?php echo string_display_line( $t_bug->target_version ) ?>
	</td>
	<td class="print" colspan="2">&#160;</td>
</tr>
<?php
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
foreach( $t_related_custom_field_ids as $t_custom_field_id ) {
	$t_def = custom_field_get_definition( $t_custom_field_id );
?>
<tr class="print">
	<td class="print-category">
		<?php echo sprintf( lang_get( 'label' ), lang_get_defaulted( $t_def['name'] ) ) ?>
	</td>
	<td class="print" colspan="5">
		<?php print_custom_field_value( $t_def, $t_custom_field_id, $t_id ); ?>
	</td>
</tr>
<?php
}       // foreach
?>
<tr>
	<td class="print-spacer" colspan="6">
		<hr />
	</td>
</tr>
<tr class="print">
	<td class="print-category">
		<?php echo sprintf( lang_get( 'label' ), $t_lang_summary ) ?>
	</td>
	<td class="print" colspan="5">
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:print_all_bug_page_word.php


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