コード例 #1
0
    function display_bug($p_event, $p_bug_id)
    {
        require_once 'Source.ViewAPI.php';
        $t_project_id = bug_get_field($p_bug_id, 'project_id');
        $t_view_threshold = config_get('plugin_Source_view_threshold');
        if (!access_has_project_level($t_view_threshold, $t_project_id)) {
            return;
        }
        $t_changesets = $this->changesets;
        if (count($t_changesets) < 1) {
            return;
        }
        collapse_open('Source');
        ?>
<br/>
<a name="changesets"/>
<table class="width100" cellspacing="1">

<tr>
	<td class="form-title"><?php 
        collapse_icon('Source');
        echo plugin_lang_get('related_changesets', 'Source');
        ?>
</td>
</tr>
		<?php 
        Source_View_Changesets($t_changesets);
        ?>
</table>
<?php 
        collapse_closed('Source');
        ?>
<br/>
<table class="width100" cellspacing="1">

<tr>
	<td class="form-title"><?php 
        collapse_icon('Source');
        echo plugin_lang_get('related_changesets', 'Source');
        ?>
</td>
</tr>

</table>
<?php 
        collapse_end('Source');
    }
コード例 #2
0
    ?>
			</td>
			<td class="small-caption">
				<?php 
    echo $t_item['raw'] ? string_display_line_links($t_item['change']) : $t_item['change'];
    ?>
			</td>
		</tr>
<?php 
}
# end for loop
?>
	</tbody>
</table>
<?php 
collapse_closed('history');
?>
<table class="width100" cellspacing="0">
<tr>
	<td class="form-title" colspan="4">
	<?php 
collapse_icon('history');
echo lang_get('bug_history');
?>
	</td>
</tr>
</table>

<?php 
collapse_end('history');
コード例 #3
0
ファイル: print_api.php プロジェクト: nextgens/mantisbt
/**
 * Prints information about a single attachment including download link, file
 * size, upload timestamp and an expandable preview for text and image file
 * types.
 * @param array $p_attachment An attachment arrray from within the array returned by the file_get_visible_attachments() function
 */
function print_bug_attachment($p_attachment)
{
    $t_show_attachment_preview = $p_attachment['preview'] && $p_attachment['exists'] && ($p_attachment['type'] == 'text' || $p_attachment['type'] == 'image');
    if ($t_show_attachment_preview) {
        $t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
        global $g_collapse_cache_token;
        $g_collapse_cache_token[$t_collapse_id] = false;
        collapse_open($t_collapse_id);
    }
    print_bug_attachment_header($p_attachment);
    if ($t_show_attachment_preview) {
        echo lang_get('word_separator');
        collapse_icon($t_collapse_id);
        if ($p_attachment['type'] == 'text') {
            print_bug_attachment_preview_text($p_attachment);
        } else {
            if ($p_attachment['type'] === 'image') {
                print_bug_attachment_preview_image($p_attachment);
            }
        }
        collapse_closed($t_collapse_id);
        print_bug_attachment_header($p_attachment);
        echo lang_get('word_separator');
        collapse_icon($t_collapse_id);
        collapse_end($t_collapse_id);
    }
}
コード例 #4
0
        echo '<input type="text" id="os_build" name="os_build" class="autocomplete" size="16" maxlength="16" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute($f_os_build) . '" />';
    }
    ?>
						</td>
					</tr>
			<?php 
    if (ON == config_get('use_javascript')) {
        ?>
			</table>
			<?php 
        collapse_closed('profile');
        collapse_icon('profile');
        echo lang_get('or_fill_in');
        ?>
			<?php 
        collapse_end('profile');
        ?>
		<?php 
    }
    ?>
		</td>
	</tr>
<?php 
}
if ($t_show_product_version) {
    $t_product_version_released_mask = VERSION_RELEASED;
    if (access_has_project_level(config_get('report_issues_for_unreleased_versions_threshold'))) {
        $t_product_version_released_mask = VERSION_ALL;
    }
    ?>
	<tr>
コード例 #5
0
ファイル: filter_api.php プロジェクト: vipjaven/mantisbt
/**
 * Mainly based on filter_draw_selection_area2() but adds the support for the collapsible
 * filter display.
 * @param integer $p_page_number Page number.
 * @param boolean $p_for_screen  Whether output is for screen view.
 * @return void
 * @see filter_draw_selection_area2
 */
function filter_draw_selection_area($p_page_number, $p_for_screen = true)
{
    collapse_open('filter');
    filter_draw_selection_area2($p_page_number, $p_for_screen, true);
    collapse_closed('filter');
    filter_draw_selection_area2($p_page_number, $p_for_screen, false);
    collapse_end('filter');
}
コード例 #6
0
/**
 * print HTML relationship form
 * @param integer $p_bug_id A bug identifier.
 * @return void
 */
function relationship_view_box($p_bug_id)
{
    ?>
<br/>

<?php 
    collapse_open('relationships');
    ?>
<table class="width100" cellspacing="1">
<tr class="row-2">
	<td width="15%" class="form-title" colspan="2">
		<?php 
    collapse_icon('relationships');
    echo lang_get('bug_relationships');
    if (ON == config_get('relationship_graph_enable')) {
        ?>
		<span class="small"><?php 
        print_bracket_link('bug_relationship_graph.php?bug_id=' . $p_bug_id . '&graph=relation', lang_get('relation_graph'));
        ?>
</span>
		<span class="small"><?php 
        print_bracket_link('bug_relationship_graph.php?bug_id=' . $p_bug_id . '&graph=dependency', lang_get('dependency_graph'));
        ?>
</span>
		<?php 
    }
    ?>
	</td>
</tr>
<?php 
    # bug not read-only and user authenticated
    if (!bug_is_readonly($p_bug_id)) {
        # user access level at least updater
        if (access_has_bug_level(config_get('update_bug_threshold'), $p_bug_id)) {
            ?>
<tr class="row-1">
	<th class="category"><?php 
            echo lang_get('add_new_relationship');
            ?>
</th>
	<td><?php 
            echo lang_get('this_bug');
            ?>
		<form method="post" action="bug_relationship_add.php">
		<?php 
            echo form_security_field('bug_relationship_add');
            ?>
		<input type="hidden" name="src_bug_id" value="<?php 
            echo $p_bug_id;
            ?>
" size="4" />
		<?php 
            relationship_list_box(config_get('default_bug_relationship'));
            ?>
		<input type="text" name="dest_bug_id" value="" />
		<input type="submit" name="add_relationship" class="button" value="<?php 
            echo lang_get('add_new_relationship_button');
            ?>
" />
		</form>
	</td></tr>
<?php 
        }
    }
    ?>
<tr>
	<td colspan="2"><?php 
    echo relationship_get_summary_html($p_bug_id);
    ?>
</td>
</tr>
</table>

<?php 
    collapse_closed('relationships');
    ?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title">
		<?php 
    collapse_icon('relationships');
    echo lang_get('bug_relationships');
    ?>
	</td>
</tr>
</table>

<?php 
    collapse_end('relationships');
}
コード例 #7
0
<tr class="spacer">
	<td colspan="2"></td>
</tr>
<?php 
}
# end for loop
event_signal('EVENT_VIEW_BUGNOTES_END', $f_bug_id);
?>
</table>
<?php 
if ($t_total_time > 0 && access_has_bug_level(config_get('time_tracking_view_threshold'), $f_bug_id)) {
    echo '<p class="time-tracking-total">', sprintf(lang_get('total_time_for_issue'), '<span class="time-tracked">' . db_minutes_to_hhmm($t_total_time) . '</span>'), '</p>';
}
collapse_closed('bugnotes');
?>

<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
collapse_icon('bugnotes');
?>
		<?php 
echo lang_get('bug_notes_title');
?>
	</td>
</tr>
</table>
<?php 
collapse_end('bugnotes');
コード例 #8
0
    ?>
</table>

<?php 
    collapse_closed('sponsorship');
    ?>

<table class="width100" cellspacing="1">
	<tr>
		<td class="form-title">
<?php 
    collapse_icon('sponsorship');
    echo lang_get('users_sponsoring_bug');
    $t_details_url = lang_get('sponsorship_process_url');
    if (!is_blank($t_details_url)) {
        echo '&#160;[<a href="' . $t_details_url . '" target="_blank">' . lang_get('sponsorship_more_info') . '</a>]';
    }
    if ($t_total_sponsorship > 0) {
        echo ' <span style="font-weight: normal;">(';
        echo sprintf(lang_get('total_sponsorship_amount'), sponsorship_format_amount($t_total_sponsorship));
        echo ')</span>';
    }
    ?>
		</td>
	</tr>
</table>

<?php 
    collapse_end('sponsorship');
}
# If sponsorship enabled
コード例 #9
0
    echo lang_get('total_time');
    ?>
		</td>
		<td class="small-caption bold">
			<?php 
    echo db_minutes_to_hhmm($t_sum_in_minutes);
    ?>
		</td>
	</tr>
</table>

<?php 
}
# end if
collapse_closed('bugnotestats');
?>

<table class="width100" cellspacing="0">
	<tr>
		<td class="form-title" colspan="4">
			<?php 
collapse_icon('bugnotestats');
echo lang_get('time_tracking');
?>
		</td>
	</tr>
</table>

<?php 
collapse_end('bugnotestats');
コード例 #10
0
        echo lang_get('add_user_to_monitor');
        ?>
" />
		</form>
		<?php 
    }
    ?>
	</td>
</tr>
</table>
<?php 
    collapse_closed('monitoring');
    ?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2"><?php 
    collapse_icon('monitoring');
    ?>
		<?php 
    echo lang_get('users_monitoring_bug');
    ?>
	</td>
</tr>
</table>
<?php 
    collapse_end('monitoring');
    ?>

<?php 
}
# show monitor list
コード例 #11
0
<tr class="row-1">
	<td class="category" width="15%">
		<?php echo lang_get( 'select_file' ) ?><br />
		<?php //FIXME: hard coded "k" in here. ?>
		<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
	</td>
	<td width="85%">
		<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
		<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
		<input name="file" type="file" size="40" />
		<input type="submit" class="button" value="<?php echo lang_get( 'upload_file_button' ) ?>" />
	</td>
</tr>
</table>
</form>
<?php
collapse_closed( 'upload_form' );
?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php
			collapse_icon( 'upload_form' );
			echo lang_get( 'upload_file' ) ?>
	</td>
</tr>
</table>

<?php
collapse_end( 'upload_form' );
コード例 #12
0
    ?>
<tr>
	<td class="center" colspan="2">
		<input type="submit" class="button" value="<?php 
    echo lang_get('add_bugnote_button');
    ?>
"  onclick="this.disabled=1;document.bugnoteadd.submit();" />
	</td>
</tr>
</table>
</form>
<?php 
    collapse_closed('bugnote_add');
    ?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
	<?php 
    collapse_icon('bugnote_add');
    echo lang_get('add_bugnote_title');
    ?>
	</td>
</tr>
</table>
<?php 
    collapse_end('bugnote_add');
    ?>

<?php 
    # Bugnote Add Form END
}
コード例 #13
0
ファイル: print_api.php プロジェクト: spring/spring-website
/**
 * Prints information about a single attachment including download link, file
 * size, upload timestamp and an expandable preview for text and image file
 * types.
 * If $p_security_token is null, a token will be generated with form_security_token().
 * If otherwise specified (i.e. not null), the parameter must contain
 * a valid security token, previously generated by form_security_token().
 * Use this to avoid performance issues when loading pages having many calls to
 * this function, such as print_bug_attachments_list().
 * @param array $p_attachment An attachment array from within the array returned by the file_get_visible_attachments() function.
 * @param mixed  $p_security_token Optional; null (default) or security token string.
 * @see form_security_token()
 * @return void
 */
function print_bug_attachment(array $p_attachment, $p_security_token = null)
{
    $t_show_attachment_preview = $p_attachment['preview'] && $p_attachment['exists'] && ($p_attachment['type'] == 'text' || $p_attachment['type'] == 'image');
    if ($t_show_attachment_preview) {
        $t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
        global $g_collapse_cache_token;
        $g_collapse_cache_token[$t_collapse_id] = false;
        collapse_open($t_collapse_id);
    }
    # The same token is used for both links in the collapse section
    if (null === $p_security_token) {
        $p_security_token = form_security_token('bug_file_delete');
    }
    print_bug_attachment_header($p_attachment, $p_security_token);
    if ($t_show_attachment_preview) {
        echo lang_get('word_separator');
        collapse_icon($t_collapse_id);
        if ($p_attachment['type'] == 'text') {
            print_bug_attachment_preview_text($p_attachment);
        } else {
            if ($p_attachment['type'] === 'image') {
                print_bug_attachment_preview_image($p_attachment);
            }
        }
        collapse_closed($t_collapse_id);
        print_bug_attachment_header($p_attachment, $p_security_token);
        echo lang_get('word_separator');
        collapse_icon($t_collapse_id);
        collapse_end($t_collapse_id);
    }
}
コード例 #14
0
						if( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
					?>
					<select id="os_build" name="os_build">
						<option value=""></option>
							<?php print_os_build_option_list( $f_os_build ); ?>
						</select>
					<?php
						} else {
							echo '<input type="text" id="os_build" name="os_build" class="autocomplete" size="16" maxlength="16" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute( $f_os_build ) . '" />';
						}
					?>
					</span>
					<span class="label-style"></span>
				</div>
			<?php collapse_closed( 'profile' );?>
			<?php collapse_end( 'profile' ); ?>
<?php } ?>
<?php
	if( $t_show_product_version ) {
		$t_product_version_released_mask = VERSION_RELEASED;

		if( access_has_project_level( config_get( 'report_issues_for_unreleased_versions_threshold' ) ) ) {
			$t_product_version_released_mask = VERSION_ALL;
		}
?>
			<div class="field-container">
				<label><span><?php echo lang_get( 'product_version' ) ?></span></label>
				<span class="select">
					<select <?php echo helper_get_tab_index() ?> id="product_version" name="product_version">
						<?php print_version_option_list( $f_product_version, $t_project_id, $t_product_version_released_mask ) ?>
					</select>
コード例 #15
0
		<!-- Submit Buttom -->
		<tr>
			<td class="center" colspan="2"><input type="submit" class="button"
				value="<?php 
echo lang_get('update_information_button');
?>
" />
				<input type="hidden" name="bug_id" value="<?php 
echo $f_bug_id;
?>
" size="4" />
				</td>
		</tr>
	</table>
</form>
<?php 
collapse_closed('medical_record_form');
?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
collapse_icon('medical_record_form');
echo lang_get('medical_record');
?>
	</td>
</tr>
</table>
<?php 
collapse_end('medical_record_form');
コード例 #16
0
ファイル: TimeTracking.php プロジェクト: Hacho25/timetracking
    /**
     * Show TimeTracking information when viewing bugs.
     * @param string Event name
     * @param int Bug ID
     */
    function view_bug_time($p_event, $p_bug_id)
    {
        $table = plugin_table('data');
        $t_user_id = auth_get_current_user_id();
        # Pull all Time-Record entries for the current Bug
        if (access_has_bug_level(plugin_config_get('view_others_threshold'), $p_bug_id)) {
            $query_pull_timerecords = "SELECT * FROM {$table} WHERE bug_id = {$p_bug_id} ORDER BY timestamp DESC";
        } else {
            if (access_has_bug_level(plugin_config_get('admin_own_threshold'), $p_bug_id)) {
                $query_pull_timerecords = "SELECT * FROM {$table} WHERE bug_id = {$p_bug_id} and user = {$t_user_id} ORDER BY timestamp DESC";
            } else {
                // User has no access
                return;
            }
        }
        $result_pull_timerecords = db_query($query_pull_timerecords);
        $num_timerecords = db_num_rows($result_pull_timerecords);
        # Get Sum for this bug
        $query_pull_hours = "SELECT SUM(hours) as hours FROM {$table} WHERE bug_id = {$p_bug_id}";
        $result_pull_hours = db_query($query_pull_hours);
        $row_pull_hours = db_fetch_array($result_pull_hours);
        ?>


   <a name="timerecord" id="timerecord" /><br />

<?php 
        collapse_open('timerecord');
        ?>
   <table class="width100" cellspacing="1">
   <tr>
      <td colspan="6" class="form-title">
<?php 
        collapse_icon('timerecord');
        echo plugin_lang_get('title');
        ?>
      </td>
   </tr>
   <tr class="row-category">
      <td><div align="center"><?php 
        echo plugin_lang_get('user');
        ?>
</div></td>
      <td><div align="center"><?php 
        echo plugin_lang_get('expenditure_date');
        ?>
</div></td>
      <td><div align="center"><?php 
        echo plugin_lang_get('hours');
        ?>
</div></td>
      <td><div align="center"><?php 
        echo plugin_lang_get('information');
        ?>
</div></td>
      <td><div align="center"><?php 
        echo plugin_lang_get('entry_date');
        ?>
</div></td>
      <td>&nbsp;</td>
   </tr>


<?php 
        if (access_has_bug_level(plugin_config_get('admin_own_threshold'), $p_bug_id)) {
            $current_date = explode("-", date("Y-m-d"));
            ?>


   <form name="time_tracking" method="post" action="<?php 
            echo plugin_page('add_record');
            ?>
" >
      <?php 
            echo form_security_field('plugin_TimeTracking_add_record');
            ?>

      <input type="hidden" name="bug_id" value="<?php 
            echo $p_bug_id;
            ?>
">

   <tr <?php 
            echo helper_alternate_class();
            ?>
>
     <td><?php 
            echo user_get_name(auth_get_current_user_id());
            ?>
</td>
     <td nowrap>
        <div align="center">
           <select tabindex="5" name="day"><?php 
            print_day_option_list($current_date[2]);
            ?>
</select>
           <select tabindex="6" name="month"><?php 
            print_month_option_list($current_date[1]);
            ?>
</select>
           <select tabindex="7" name="year"><?php 
            print_year_option_list($current_date[0]);
            ?>
</select>
        </div>
     </td>
     <td><div align="right"><input type="text" name="time_value" value="00:00" size="5"></div></td>
     <td><div align="center"><input type="text" name="time_info"></div></td>
     <td>&nbsp;</td>
     <td><input name="<?php 
            echo plugin_lang_get('submit');
            ?>
" type="submit" value="<?php 
            echo plugin_lang_get('submit');
            ?>
"></td>
   </tr>
</form>

<?php 
        }
        # END Access Control
        for ($i = 0; $i < $num_timerecords; $i++) {
            $row = db_fetch_array($result_pull_timerecords);
            ?>


   <tr <?php 
            echo helper_alternate_class();
            ?>
>
      <td><?php 
            echo user_get_name($row["user"]);
            ?>
</td>
      <td><div align="center"><?php 
            echo date(config_get("short_date_format"), strtotime($row["expenditure_date"]));
            ?>
 </div></td>
      <td><div align="right"><?php 
            echo db_minutes_to_hhmm($row["hours"] * 60);
            ?>
 </div></td>
      <td><div align="center"><?php 
            echo string_display_links($row["info"]);
            ?>
</div></td>
      <td><div align="center"><?php 
            echo date(config_get("complete_date_format"), strtotime($row["timestamp"]));
            ?>
 </div></td>

<?php 
            $user = auth_get_current_user_id();
            if ($user == $row["user"] && access_has_bug_level(plugin_config_get('admin_own_threshold'), $p_bug_id) || access_has_bug_level(plugin_config_get('admin_threshold'), $p_bug_id)) {
                ?>


      <td><a href="<?php 
                echo plugin_page('delete_record');
                ?>
&bug_id=<?php 
                echo $p_bug_id;
                ?>
&delete_id=<?php 
                echo $row["id"];
                echo form_security_param('plugin_TimeTracking_delete_record');
                ?>
"><?php 
                echo plugin_lang_get('delete');
                ?>
</a></td>

<?php 
            } else {
                ?>
      <td>&nbsp;</td>

<?php 
            }
            ?>
   </tr>


<?php 
        }
        # End for loop
        ?>


   <tr class="row-category">
      <td><?php 
        echo plugin_lang_get('sum');
        ?>
</td>
      <td>&nbsp;</td>
      <td><div align="right"><b><?php 
        echo db_minutes_to_hhmm($row_pull_hours['hours'] * 60);
        ?>
</b></div></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
   </tr>
</table>

<?php 
        collapse_closed('timerecord');
        ?>

<table class="width100" cellspacing="1">
<tr>
   <td class="form-title" colspan="2">
          <?php 
        collapse_icon('timerecord');
        ?>
          <?php 
        echo plugin_lang_get('title');
        ?>
	</td>
</tr>
</table>

<?php 
        collapse_end('timerecord');
    }