Skip to content

Commit

Permalink
Merge pull request #10129 from snipe/features/improved_mobile_ux
Browse files Browse the repository at this point in the history
Features/improved mobile ux
  • Loading branch information
snipe authored Sep 24, 2021
2 parents d480084 + decc771 commit 03e3c21
Show file tree
Hide file tree
Showing 93 changed files with 29,826 additions and 4,971 deletions.
32 changes: 16 additions & 16 deletions app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -900,33 +900,33 @@ public static function filetype_icon($filename)

$allowedExtensionMap = [
// Images
'jpg' => 'fa fa-file-image-o',
'jpeg' => 'fa fa-file-image-o',
'gif' => 'fa fa-file-image-o',
'png' => 'fa fa-file-image-o',
'jpg' => 'far fa-image',
'jpeg' => 'far fa-image',
'gif' => 'far fa-image',
'png' => 'far fa-image',
// word
'doc' => 'fa fa-file-word-o',
'docx' => 'fa fa-file-word-o',
'doc' => 'far fa-file-word',
'docx' => 'far fa-file-word',
// Excel
'xls' => 'fa fa-file-excel-o',
'xlsx' => 'fa fa-file-excel-o',
'xls' => 'far fa-file-excel',
'xlsx' => 'far fa-file-excel',
// archive
'zip' => 'fa fa-file-archive-o',
'rar' => 'fa fa-file-archive-o',
'zip' => 'fas fa-file-archive',
'rar' => 'fas fa-file-archive',
//Text
'txt' => 'fa fa-file-text-o',
'rtf' => 'fa fa-file-text-o',
'xml' => 'fa fa-file-text-o',
'txt' => 'far fa-file-alt',
'rtf' => 'far fa-file-alt',
'xml' => 'far fa-file-alt',
// Misc
'pdf' => 'fa fa-file-pdf-o',
'lic' => 'fa fa-file-floppy-o',
'pdf' => 'far fa-file-pdf',
'lic' => 'far fa-save',
];

if ($extension && array_key_exists($extension, $allowedExtensionMap)) {
return $allowedExtensionMap[$extension];
}

return 'fa fa-file-o';
return 'far fa-file';
}

public static function show_file_inline($filename)
Expand Down
11 changes: 5 additions & 6 deletions app/Presenters/ActionlogPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ public function icon()
$itemicon = 'fa fa-paperclip';

if ($this->itemType() == 'asset') {
$itemicon = 'fa fa-barcode';
return 'fa fa-barcode';
} elseif ($this->itemType() == 'accessory') {
$itemicon = 'fa fa-keyboard-o';
return 'far fa-keyboard';
} elseif ($this->itemType() == 'consumable') {
$itemicon = 'fa fa-tint';
return 'fa fa-tint';
} elseif ($this->itemType() == 'license') {
$itemicon = 'fa fa-floppy-o';
return 'far fa-save';
} elseif ($this->itemType() == 'component') {
$itemicon = 'fa fa-hdd-o';
return 'far fa-hdd';
}

return $itemicon;
}

public function actionType()
Expand Down
6 changes: 3 additions & 3 deletions app/Presenters/CompanyPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static function dataTableLayout()
'searchable' => false,
'sortable' => true,
'visible' => true,
'title' => ' <span class="hidden-xs"><i class="fa fa-floppy-o"></i></span><span class="hidden-md hidden-lg">'.trans('general.licenses').'</span>',
'title' => ' <span class="hidden-xs"><i class="far fa-save"></i></span><span class="hidden-md hidden-lg">'.trans('general.licenses').'</span>',
], [
'field' => 'accessories_count',
'searchable' => false,
'sortable' => true,
'visible' => true,
'title' => ' <span class="hidden-xs"><i class="fa fa-keyboard-o"></i></span><span class="hidden-md hidden-lg">'.trans('general.accessories').'</span>',
'title' => ' <span class="hidden-xs"><i class="far fa-keyboard"></i></span><span class="hidden-md hidden-lg">'.trans('general.accessories').'</span>',
], [
'field' => 'consumables_count',
'searchable' => false,
Expand All @@ -74,7 +74,7 @@ public static function dataTableLayout()
'searchable' => false,
'sortable' => true,
'visible' => true,
'title' => ' <span class="hidden-xs"><i class="fa fa-hdd-o"></i></span><span class="hidden-md hidden-lg">'.trans('general.components').'</span>',
'title' => ' <span class="hidden-xs"><i class="far fa-hdd"></i></span><span class="hidden-md hidden-lg">'.trans('general.components').'</span>',
], [
'field' => 'updated_at',
'searchable' => false,
Expand Down
4 changes: 2 additions & 2 deletions app/Presenters/ManufacturerPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function dataTableLayout()
'sortable' => true,
'switchable' => true,
'title' => ' <span class="hidden-md hidden-lg">Licenses</span>'
.'<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>',
.'<span class="hidden-xs"><i class="far fa-save fa-lg"></i></span>',
'visible' => true,
],
[
Expand All @@ -112,7 +112,7 @@ public static function dataTableLayout()
'sortable' => true,
'switchable' => true,
'title' => ' <span class="hidden-md hidden-lg">Accessories</span>'
.'<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>',
.'<span class="hidden-xs"><i class="far fa-keyboard fa-lg"></i></span>',
'visible' => true,
],
[
Expand Down
Loading

0 comments on commit 03e3c21

Please sign in to comment.