View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009550 | mantisbt | administration | public | 2008-08-19 08:57 | 2019-11-01 09:57 |
| Reporter | rumo | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Product Version | 1.1.1 | ||||
| Summary | 0009550: manage_proj_edit_page.php: Add description to versions table | ||||
| Description | For me it is helpful when the versions' descriptions are displayed in the versions table when managing a project. Therefore I modified manage_proj_edit_page.php" and added the column "description" to the versions table. The description is truncated to max. 30 chars to fit in the table. I am using MANTIS 1.1.1. Attached you find my modifications (lines 368-440) for the file identified by the following ID. Maybe it is worthwhile to be integrated into the official development branch. $Id: manage_proj_edit_page.php,v 1.104.2.2 2007-10-19 07:25:59 vboctor Exp $ | ||||
| Tags | No tags attached. | ||||
| Attached Files | manage_proj_edit_page.php (1,946 bytes)
<!-- Title -->
<tr>
<td class="form-title" colspan="3">
<?php echo lang_get( 'versions' ) ?>
</td>
</tr>
<?php
$t_versions = version_get_all_rows( $f_project_id );
if ( count( $t_versions ) > 0 ) {
?>
<tr class="row-category">
<td>
<?php echo lang_get( 'version' ) ?>
</td>
<td class="center">
<?php echo lang_get( 'released' ) ?>
</td>
<td class="center">
<?php echo lang_get( 'timestamp' ) ?>
</td>
<td class="center">
<?php echo lang_get( 'description' ) ?>
</td>
<td class="center">
<?php echo lang_get( 'actions' ) ?>
</td>
</tr>
<?php
}
<!-- This constant should be moved to a more suitable place. -->
$MAX_LEN_DESCRIPTION = 30;
foreach ( $t_versions as $t_version ) {
$t_name = $t_version['version'];
$t_released = $t_version['released'];
$t_date_order = $t_version['date_order'];
$t_date_formatted = string_format_complete_date( $t_version['date_order'] );
$t_description = $t_version['description'];
if (strlen($t_description) > $MAX_LEN_DESCRIPTION) {
$t_description = substr($t_description, 0, $MAX_LEN_DESCRIPTION) . '...';
}
?>
<!-- Repeated Info Rows -->
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo string_display( $t_name ) ?>
</td>
<td class="center">
<?php echo trans_bool( $t_released ) ?>
</td>
<td class="center">
<?php echo $t_date_formatted ?>
</td>
<td class="center">
<?php echo $t_description ?>
</td>
<td class="center">
<?php
$t_version_id = version_get_id( $t_name, $f_project_id );
print_button( 'manage_proj_ver_edit_page.php?version_id=' . $t_version_id, lang_get( 'edit_link' ) );
echo ' ';
print_button( 'manage_proj_ver_delete.php?version_id=' . $t_version_id, lang_get( 'delete_link' ) );
?>
</td>
</tr>
<?php
} # end for loop
?>
manage_proj_edit_page-02.php (3,209 bytes)
<!-- PROJECT VERSIONS -->
<a name="versions" />
<table class="width75" cellspacing="1">
<!-- Title -->
<tr>
<td class="form-title" colspan="5">
<?php echo lang_get( 'versions' ) ?>
</td>
</tr>
<?php
$t_versions = version_get_all_rows( $f_project_id );
if ( count( $t_versions ) > 0 ) {
?>
<tr class="row-category">
<td width="10%">
<?php echo lang_get( 'version' ) ?>
</td>
<td width="10%" class="center">
<?php echo lang_get( 'released' ) ?>
</td>
<td width="20%" class="center">
<?php echo lang_get( 'timestamp' ) ?>
</td>
<td width="40%" class="center">
<?php echo lang_get( 'description' ) ?>
</td>
<td width="20%" class="center">
<?php echo lang_get( 'actions' ) ?>
</td>
</tr>
<?php
}
// This constant should be moved to a more suitable place.
$MAX_LEN_DESCRIPTION = 40;
foreach ( $t_versions as $t_version ) {
$t_name = $t_version['version'];
$t_released = $t_version['released'];
$t_date_order = $t_version['date_order'];
$t_date_formatted = string_format_complete_date( $t_version['date_order'] );
$t_description = $t_version['description'];
if (strlen($t_description) > $MAX_LEN_DESCRIPTION) {
$t_description = substr($t_description, 0, $MAX_LEN_DESCRIPTION) . '...';
}
?>
<!-- Repeated Info Rows -->
<tr <?php echo helper_alternate_class() ?>>
<td>
<?php echo string_display( $t_name ) ?>
</td>
<td class="center">
<?php echo trans_bool( $t_released ) ?>
</td>
<td class="center">
<?php echo $t_date_formatted ?>
</td>
<td class="center">
<?php echo $t_description ?>
</td>
<td class="center">
<?php
$t_version_id = version_get_id( $t_name, $f_project_id );
print_button( 'manage_proj_ver_edit_page.php?version_id=' . $t_version_id, lang_get( 'edit_link' ) );
echo ' ';
print_button( 'manage_proj_ver_delete.php?version_id=' . $t_version_id, lang_get( 'delete_link' ) );
?>
</td>
</tr>
<?php
} # end for loop
?>
<!-- Version Add Form -->
<tr>
<td class="left" colspan="5">
<form method="post" action="manage_proj_ver_add.php">
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<input type="text" name="version" size="32" maxlength="64" />
<input type="submit" name="add_version" class="button" value="<?php echo lang_get( 'add_version_button' ) ?>" />
<input type="submit" name="add_and_edit_version" class="button" value="<?php echo lang_get( 'add_and_edit_version_button' ) ?>" />
</form>
</td>
</tr>
<tr>
<td class="left" colspan="5">
<form method="post" action="manage_proj_ver_copy.php">
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id">
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_versions_from' ) ?>" />
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_versions_to' ) ?>" />
</form>
</td>
</tr>
</table>
</div>
| ||||