Skip to content

Commit

Permalink
Tweaks based on review comments & fix travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
syncguru committed Sep 6, 2019
1 parent 9d1356b commit cc9c8ad
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 24 deletions.
8 changes: 4 additions & 4 deletions bug_report_page.php
Expand Up @@ -376,8 +376,8 @@
<?php print_profile_option_list( auth_get_current_user_id(), $f_profile_id ) ?>
</select>
<?php } ?>
<?php collapse_open( 'profile' ); collapse_icon( 'profile' ); ?>
<?php echo lang_get( 'or_fill_in' ); ?>
<?php collapse_open( 'profile' ); ?>
<?php echo lang_get( 'or_fill_in' ); collapse_icon( 'profile' ); ?>
<table class="table-bordered table-condensed">
<tr>
<th class="category" width="30%">
Expand Down Expand Up @@ -433,8 +433,8 @@
</td>
</tr>
</table>
<?php collapse_closed( 'profile' ); collapse_icon( 'profile' ); ?>
<?php echo lang_get( 'or_fill_in' ); ?>
<?php collapse_closed( 'profile' ); ?>
<?php echo lang_get( 'or_fill_in' ); collapse_icon( 'profile' ); ?>
<?php collapse_end( 'profile' ); ?>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions bug_view_inc.php
Expand Up @@ -892,8 +892,8 @@ function bug_view_relationship_get_details( $p_bug_id, BugRelationshipData $p_re
# add delete link if bug not read only and user has access level
if( !bug_is_readonly( $p_bug_id ) && !current_user_is_anonymous() && ( $p_html_preview == false ) ) {
if( access_has_bug_level( config_get( 'update_bug_threshold' ), $p_bug_id ) ) {
$t_relationship_info_html .= ' <a class="noprint"
href="bug_relationship_delete.php?bug_id=' . $p_bug_id . '&amp;rel_id=' . $p_relationship->id . htmlspecialchars( form_security_param( 'bug_relationship_delete' ) ) . '"><i class="ace-icon fa fa-trash-o"></i></a>';
$t_relationship_info_html .= ' <a class="red noprint zoom-130"
href="bug_relationship_delete.php?bug_id=' . $p_bug_id . '&amp;rel_id=' . $p_relationship->id . htmlspecialchars( form_security_param( 'bug_relationship_delete' ) ) . '"><i class="ace-icon fa fa-trash-o bigger-115"></i></a>';
}
}

Expand Down
2 changes: 1 addition & 1 deletion bugnote_update.php
Expand Up @@ -74,7 +74,7 @@
trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
}

$f_bugnote_text = trim( $f_bugnote_text ) . "\n\n";
$f_bugnote_text = trim( $f_bugnote_text ) . "\n";

bugnote_set_text( $f_bugnote_id, $f_bugnote_text );
bugnote_set_time_tracking( $f_bugnote_id, $f_time_tracking );
Expand Down
4 changes: 0 additions & 4 deletions bugnote_view_inc.php
Expand Up @@ -312,10 +312,6 @@
echo string_display_links( $t_activity['note']->note );
$t_add_space = true;
}

if( $t_add_space && isset( $t_activity['attachments'] ) && count( $t_activity['attachments'] ) > 0 ) {
echo '<br /><br />';
}
} else {
if ( !$t_security_token_attachments_delete ) {
$t_security_token_attachments_delete = form_security_token( 'bug_file_delete' );
Expand Down
4 changes: 2 additions & 2 deletions core/collapse_api.php
Expand Up @@ -114,7 +114,7 @@ function collapse_closed( $p_name, $p_section = '', $p_css_class = '' ) {
}

/**
* Marks the location where a +/- icon is placed in output
* Marks the location where a down/up-arrow icon is placed in output
* for the user to toggle the collapse block status.
* This should appear in both the open and closed phase of a block.
* @param string $p_name Collapse block name.
Expand All @@ -134,7 +134,7 @@ function collapse_icon( $p_name, $p_section = '' ) {
$t_id = $p_name. '_closed_link';
}

echo '<a id="', $t_id, '" class="collapse-link noprint"><i class="fa ', $t_icon, '" title="', $t_alt, '"></i></a>';
echo '&nbsp;&nbsp;<a id="', $t_id, '" class="collapse-link noprint"><i class="fa ', $t_icon, '" title="', $t_alt, '"></i></a>';
}

/**
Expand Down
10 changes: 4 additions & 6 deletions core/print_api.php
Expand Up @@ -1877,11 +1877,12 @@ function print_bug_attachments_list( $p_bug_id, $p_security_token ) {
* @return void
*/
function print_bug_attachment( array $p_attachment, $p_security_token ) {
echo '<div class="well well-xs">';
if( $p_attachment['preview'] ) {
$t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
global $g_collapse_cache_token;
$g_collapse_cache_token[$t_collapse_id] = $p_attachment['type'] == 'image';
collapse_open( $t_collapse_id, '', 'well well-sm' );
collapse_open( $t_collapse_id, '');
}

print_bug_attachment_header( $p_attachment, $p_security_token );
Expand All @@ -1894,14 +1895,13 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) {
} else if( $p_attachment['type'] === 'image' ) {
print_bug_attachment_preview_image( $p_attachment );
}
collapse_closed( $t_collapse_id, '', 'well well-sm' );
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 );
} else {
echo '<br />';
}
echo '</div>';
}

/**
Expand All @@ -1917,7 +1917,6 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) {
* @return void
*/
function print_bug_attachment_header( array $p_attachment, $p_security_token ) {
echo "\n";
if( $p_attachment['exists'] ) {
if( $p_attachment['can_download'] ) {
echo '<a href="' . string_attribute( $p_attachment['download_url'] ) . '">';
Expand Down Expand Up @@ -1947,7 +1946,6 @@ function print_bug_attachment_header( array $p_attachment, $p_security_token ) {
form_security_param( 'bug_file_delete', $p_security_token ) . '">
<i class="1 ace-icon fa fa-trash-o bigger-115"></i></a>';
}

}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/tag_api.php
Expand Up @@ -951,8 +951,8 @@ function tag_display_link( array $p_tag_row, $p_bug_id = 0 ) {
if( $p_bug_id > 0 && access_has_bug_level( $t_detach, $p_bug_id ) ) {
$t_tooltip = string_html_specialchars( sprintf( lang_get( 'tag_detach' ), string_display_line( $p_tag_row['name'] ) ) );
$t_href = 'tag_detach.php?bug_id=' . $p_bug_id . '&amp;tag_id=' . $p_tag_row['id'] . $s_security_token;
echo ' <a class="noprint red zoom-130" title="' . $t_tooltip . '" href="' . $t_href . '">';
echo '<i class="ace-icon fa fa-trash-o bigger-115"></i>';
echo ' <a class="btn btn-xs btn-primary btn-white btn-round" title="' . $t_tooltip . '" href="' . $t_href . '">';
echo '<i class="fa fa-times"></i>';
echo '</a>';
}

Expand Down
6 changes: 5 additions & 1 deletion css/ace-mantis.css
Expand Up @@ -327,7 +327,11 @@ textarea.input-xs, select.input-xs[multiple] {
-ms-transform: scale(1.3);
transform: scale(1.3);
}

.well-xs {
padding: 4px 9px;
border-radius: 3px;
margin-bottom: 10px;
}
.table-condensed2 > thead > tr > th,
.table-condensed2 > tbody > tr > th,
.table-condensed2 > tfoot > tr > th,
Expand Down
4 changes: 2 additions & 2 deletions tests/Mantis/PrepareTest.php
Expand Up @@ -91,8 +91,8 @@ public function providerEmailLink() {
$t_email = self::EMAIL;
$t_text = 'Link Text';
$t_tooltip = 'Tooltip';
$t_button_classes = 'class="btn btn-primary btn-white btn-round btn-xs"';
$t_button_text = sprintf( '<i class="fa fa-envelope-o"></i>&nbsp;%s', $t_text );
$t_button_classes = 'class="noprint blue zoom-130"';
$t_button_text = sprintf( '<i class="fa fa-envelope-o bigger-115"></i>&nbsp;%s', $t_text );

$t_test_data = array(
'Basic' => array(
Expand Down

0 comments on commit cc9c8ad

Please sign in to comment.