Skip to content

Commit

Permalink
Replace all images to [FontAwesome icons](http://fontawesome.io/) (#2)
Browse files Browse the repository at this point in the history
Replace all icons with [FontAwesome icons](http://fontawesome.io/)
  • Loading branch information
Kirill authored and syncguru committed May 31, 2016
1 parent df2f908 commit a4e7cbf
Show file tree
Hide file tree
Showing 82 changed files with 118 additions and 200 deletions.
4 changes: 2 additions & 2 deletions account_sponsor_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
# summary
echo '<td>' . string_display_line( $t_bug->summary );
if( VS_PRIVATE == $t_bug->view_state ) {
printf( ' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) );
printf( ' <i class="fa fa-lock" alt="(%s)" title="%s"></i>', lang_get( 'private' ), lang_get( 'private' ) );
}
echo '</td>';

Expand Down Expand Up @@ -325,7 +325,7 @@
# summary
echo '<td>' . string_display_line( $t_bug->summary );
if( VS_PRIVATE == $t_bug->view_state ) {
printf( ' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) );
printf( ' <i class="fa fa-lock" alt="(%s)" title="%s"></i>', lang_get( 'private' ), lang_get( 'private' ) );
}
echo '</td>';

Expand Down
9 changes: 1 addition & 8 deletions admin/check/check_attachments_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,4 @@
$t_finfo !== false,
array( false => 'Ensure that the fileinfo_magic_db_file configuration value points to a valid magic.db file.' )
);
}

$t_file_type_icons = config_get( 'file_type_icons' );
foreach( $t_file_type_icons as $t_ext => $t_filename ) {
$t_file_path = dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'fileicons' . DIRECTORY_SEPARATOR . $t_filename;

check_print_test_row( "Testing icon for extension '$t_ext'...", file_exists( $t_file_path ), array( false => 'File not found: ' . $t_file_path ) );
}
}
74 changes: 0 additions & 74 deletions admin/test_icons.php

This file was deleted.

2 changes: 1 addition & 1 deletion bug_monitor_list_view_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
echo ($i > 0) ? ', ' : '';
print_user( $t_users[$i] );
if( $t_can_delete_others ) {
echo ' <a class="btn btn-xs btn-primary btn-white btn-round" href="' . helper_mantis_url( 'bug_monitor_delete.php' ) . '?bug_id=' . $f_bug_id . '&amp;user_id=' . $t_users[$i] . htmlspecialchars(form_security_param( 'bug_monitor_delete' )) . '">' . lang_get( 'delete_link' ) . '</a>';
echo ' <a class="btn btn-xs btn-primary btn-white btn-round" href="' . helper_mantis_url( 'bug_monitor_delete.php' ) . '?bug_id=' . $f_bug_id . '&amp;user_id=' . $t_users[$i] . htmlspecialchars(form_security_param( 'bug_monitor_delete' )) . '"><i class="fa fa-times"></i></a>';
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion bug_sponsorship_list_view_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<table class="width100" cellspacing="1">
<tr>
<td width="50" rowspan="3">
<img src="images/dollars.gif" alt="<?php echo lang_get( 'sponsor_verb' ) ?>" />
<i class="fa fa-usd" alt="<?php echo lang_get( 'sponsor_verb' ) ?>"></i>
</td>
<td class="form-title" colspan="2"><?php
collapse_icon( 'sponsorship' );
Expand Down
2 changes: 1 addition & 1 deletion changelog_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function print_version_header( $p_version_id ) {

echo '<div class="widget-body">';
echo '<div class="widget-toolbox padding-8 clearfix">';
echo '<div class="pull-left"><i class="fa fa-clock-o fa-lg"> </i> ' . $t_release_date . '</div>';
echo '<div class="pull-left"><i class="fa fa-calendar-o fa-lg"> </i> ' . $t_release_date . '</div>';
echo '<div class="btn-toolbar pull-right">';
echo '<a class="btn btn-xs btn-primary btn-white btn-round" ';
echo 'href="view_all_set.php?type=1&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id . '&' . filter_encode_field_and_value( FILTER_PROPERTY_FIXED_IN_VERSION, $t_version_name ) . '">';
Expand Down
152 changes: 76 additions & 76 deletions config_defaults_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3524,73 +3524,73 @@
* @global array $g_file_type_icons
*/
$g_file_type_icons = array(
'' => 'text.gif',
'7z' => 'zip.gif',
'ace' => 'zip.gif',
'arj' => 'zip.gif',
'bz2' => 'zip.gif',
'c' => 'cpp.gif',
'chm' => 'chm.gif',
'cpp' => 'cpp.gif',
'css' => 'css.gif',
'csv' => 'csv.gif',
'cxx' => 'cpp.gif',
'diff' => 'text.gif',
'doc' => 'doc.gif',
'docx' => 'doc.gif',
'dot' => 'doc.gif',
'eml' => 'eml.gif',
'htm' => 'html.gif',
'html' => 'html.gif',
'gif' => 'gif.gif',
'gz' => 'zip.gif',
'jpe' => 'jpg.gif',
'jpg' => 'jpg.gif',
'jpeg' => 'jpg.gif',
'log' => 'text.gif',
'lzh' => 'zip.gif',
'mhtml' => 'html.gif',
'mid' => 'mid.gif',
'midi' => 'mid.gif',
'mov' => 'mov.gif',
'msg' => 'eml.gif',
'one' => 'one.gif',
'patch' => 'text.gif',
'pcx' => 'pcx.gif',
'pdf' => 'pdf.gif',
'png' => 'png.gif',
'pot' => 'pot.gif',
'pps' => 'pps.gif',
'ppt' => 'ppt.gif',
'pptx' => 'ppt.gif',
'pub' => 'pub.gif',
'rar' => 'zip.gif',
'reg' => 'reg.gif',
'rtf' => 'doc.gif',
'tar' => 'zip.gif',
'tgz' => 'zip.gif',
'txt' => 'text.gif',
'uc2' => 'zip.gif',
'vsd' => 'vsd.gif',
'vsl' => 'vsl.gif',
'vss' => 'vsd.gif',
'vst' => 'vst.gif',
'vsu' => 'vsd.gif',
'vsw' => 'vsd.gif',
'vsx' => 'vsd.gif',
'vtx' => 'vst.gif',
'wav' => 'wav.gif',
'wbk' => 'wbk.gif',
'wma' => 'wav.gif',
'wmv' => 'mov.gif',
'wri' => 'wri.gif',
'xlk' => 'xls.gif',
'xls' => 'xls.gif',
'xlsx' => 'xls.gif',
'xlt' => 'xlt.gif',
'xml' => 'xml.gif',
'zip' => 'zip.gif',
'?' => 'generic.gif' );
'' => 'fa-file-text-o',
'7z' => 'fa-file-archive-o',
'ace' => 'fa-file-archive-o',
'arj' => 'fa-file-archive-o',
'bz2' => 'fa-file-archive-o',
'c' => 'fa-file-code-o',
'chm' => 'fa-file-o',
'cpp' => 'fa-file-code-o',
'css' => 'fa-file-code-o',
'csv' => 'fa-file-text-o',
'cxx' => 'fa-file-code-o',
'diff' => 'fa-file-text-o',
'doc' => 'fa-file-word-o',
'docx' => 'fa-file-word-o',
'dot' => 'fa-file-word-o',
'eml' => 'fa-envelope-o',
'htm' => 'fa-file-code-o',
'html' => 'fa-file-code-o',
'gif' => 'fa-file-image-o',
'gz' => 'fa-file-archive-o',
'jpe' => 'fa-file-image-o',
'jpg' => 'fa-file-image-o',
'jpeg' => 'fa-file-image-o',
'log' => 'fa-file-text-o',
'lzh' => 'fa-file-archive-o',
'mhtml' => 'fa-file-code-o',
'mid' => 'fa-file-audio-o',
'midi' => 'fa-file-audio-o',
'mov' => 'fa-file-movie-o',
'msg' => 'fa-envelope-o',
'one' => 'fa-file-o',
'patch' => 'fa-file-text-o',
'pcx' => 'fa-file-image-o',
'pdf' => 'fa-file-pdf-o',
'png' => 'fa-file-image-o',
'pot' => 'fa-file-word-o',
'pps' => 'fa-file-powerpoint-o',
'ppt' => 'fa-file-powerpoint-o',
'pptx' => 'fa-file-powerpoint-o',
'pub' => 'fa-file-o',
'rar' => 'fa-file-archive-o',
'reg' => 'fa-file',
'rtf' => 'fa-file-word-o',
'tar' => 'fa-file-archive-o',
'tgz' => 'fa-file-archive-o',
'txt' => 'fa-file-text-o',
'uc2' => 'fa-file-archive-o',
'vsd' => 'fa-file-o',
'vsl' => 'fa-file-o',
'vss' => 'fa-file-o',
'vst' => 'fa-file-o',
'vsu' => 'fa-file-o',
'vsw' => 'fa-file-o',
'vsx' => 'fa-file-o',
'vtx' => 'fa-file-o',
'wav' => 'fa-file-audio-o',
'wbk' => 'fa-file-word-o',
'wma' => 'fa-file-audio-o',
'wmv' => 'fa-file-movie-o',
'wri' => 'fa-file-word-o',
'xlk' => 'fa-file-excel-o',
'xls' => 'fa-file-excel-o',
'xlsx' => 'fa-file-excel-o',
'xlt' => 'fa-file-excel-o',
'xml' => 'fa-file-code-o',
'zip' => 'fa-file-archive-o',
'?' => 'fa-file-o' );

/**
*
Expand All @@ -3615,29 +3615,29 @@
*/
$g_status_icon_arr = array (
NONE => '',
LOW => 'priority_low_1.gif',
NORMAL => 'priority_normal.gif',
HIGH => 'priority_1.gif',
URGENT => 'priority_2.gif',
IMMEDIATE => 'priority_3.gif'
LOW => 'fa-chevron-down blue',
NORMAL => 'fa-minus blue',
HIGH => 'fa-chevron-up red',
URGENT => 'fa-angle-double-up fa-lg red',
IMMEDIATE => 'fa-exclamation-triangle red'
);

/**
* Sort direction to icon mapping
* @global array $g_sort_icon_arr
*/
$g_sort_icon_arr = array (
ASCENDING => 'up.gif',
DESCENDING => 'down.gif'
ASCENDING => 'fa-caret-up',
DESCENDING => 'fa-caret-down'
);

/**
* Read status to icon mapping
* @global array $g_unread_icon_arr
*/
$g_unread_icon_arr = array (
READ => 'mantis_space.gif',
UNREAD => 'unread.gif'
READ => '',
UNREAD => 'fa-circle'
);

####################
Expand Down
6 changes: 3 additions & 3 deletions core/collapse_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ function collapse_icon( $p_name, $p_section = '' ) {
global $g_open_collapse_section;

if( $g_open_collapse_section === true ) {
$t_icon = 'minus.png';
$t_icon = 'fa-minus-square-o';
$t_alt = '-';
$t_id = $p_name . '_open_link';
} else {
$t_icon = 'plus.png';
$t_icon = 'fa-plus-square-o';
$t_alt = '+';
$t_id = $p_name. '_closed_link';
}

echo '<a id="', $t_id, '" class="collapse-link"><img src="images/', $t_icon, '" alt="', $t_alt, '" /></a>';
echo '<a id="', $t_id, '" class="collapse-link"><i class="fa ', $t_icon, '" alt="', $t_alt, '"></i></a>';
}

/**
Expand Down
12 changes: 6 additions & 6 deletions core/columns_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ function print_column_title_view_state( $p_sort, $p_dir, $p_columns_target = COL
global $t_icon_path;
echo '<th class="column-view-state">';
$t_view_state_text = lang_get( 'view_status' );
$t_view_state_icon = '<img src="' . $t_icon_path . 'protected.gif" alt="' . $t_view_state_text . '" title="' . $t_view_state_text . '" />';
$t_view_state_icon = ' <i class="fa fa-lock" alt="' . $t_view_state_text . '" title="' . $t_view_state_text . '"></i>';
print_view_bug_sort_link( $t_view_state_icon, 'view_state', $p_sort, $p_dir, $p_columns_target );
print_sort_icon( $p_dir, $p_sort, 'view_state' );
echo '</th>';
Expand Down Expand Up @@ -993,7 +993,7 @@ function print_column_title_overdue( $p_sort, $p_dir, $p_columns_target = COLUMN
global $t_icon_path;
echo '<th class="column-overdue">';
$t_overdue_text = lang_get( 'overdue' );
$t_overdue_icon = '<img src="' . $t_icon_path . 'overdue.png" alt="' . $t_overdue_text . '" title="' . $t_overdue_text . '" />';
$t_overdue_icon = ' <i class="fa fa-times-circle-o" alt="' . $t_overdue_text . '" title="' . $t_overdue_text . '"></i>';
print_view_bug_sort_link( $t_overdue_icon, 'due_date', $p_sort, $p_dir, $p_columns_target );
print_sort_icon( $p_dir, $p_sort, 'due_date' );
echo '</th>';
Expand Down Expand Up @@ -1091,9 +1091,9 @@ function print_column_edit( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_V

if( !bug_is_readonly( $p_bug->id ) && access_has_bug_level( config_get( 'update_bug_threshold' ), $p_bug->id ) ) {
echo '<a href="' . string_get_bug_update_url( $p_bug->id ) . '">';
echo '<img width="16" height="16" src="' . $t_icon_path . 'update.png';
echo '<i class="fa fa-pencil fa-lg';
echo '" alt="' . lang_get( 'update_bug_button' ) . '"';
echo ' title="' . lang_get( 'update_bug_button' ) . '" /></a>';
echo ' title="' . lang_get( 'update_bug_button' ) . '"></i></a>';
} else {
echo '&#160;';
}
Expand Down Expand Up @@ -1531,7 +1531,7 @@ function print_column_view_state( BugData $p_bug, $p_columns_target = COLUMNS_TA

if( VS_PRIVATE == $p_bug->view_state ) {
$t_view_state_text = lang_get( 'private' );
echo '<img src="' . $t_icon_path . 'protected.gif" alt="' . $t_view_state_text . '" title="' . $t_view_state_text . '" />';
echo ' <i class="fa fa-lock" alt="' . $t_view_state_text . '" title="' . $t_view_state_text . '"></i>';
} else {
echo '&#160;';
}
Expand Down Expand Up @@ -1600,7 +1600,7 @@ function print_column_overdue( BugData $p_bug, $p_columns_target = COLUMNS_TARGE
bug_is_overdue( $p_bug->id ) ) {
$t_overdue_text = lang_get( 'overdue' );
$t_overdue_text_hover = sprintf( lang_get( 'overdue_since' ), date( config_get( 'short_date_format' ), $p_bug->due_date ) );
echo '<img src="' . $t_icon_path . 'overdue.png" alt="' . $t_overdue_text . '" title="' . string_display_line( $t_overdue_text_hover ) . '" />';
echo '<i class="fa fa-times-circle-o" alt="' . $t_overdue_text . '" title="' . string_display_line( $t_overdue_text_hover ) . '"></i>';
} else {
echo '&#160;';
}
Expand Down
2 changes: 1 addition & 1 deletion core/file_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function file_get_icon_url( $p_display_filename ) {
}

$t_name = $t_file_type_icons[$t_ext];
return array( 'url' => config_get( 'icon_path' ) . 'fileicons/' . $t_name, 'alt' => $t_ext );
return array( 'url' => $t_name, 'alt' => $t_ext );
}

/**
Expand Down
Loading

0 comments on commit a4e7cbf

Please sign in to comment.