Merge pull request #13931 from snipe/features/nicer_icons_for_activity_report

Use updated icons for activity report
This commit is contained in:
snipe 2023-11-22 21:10:22 +00:00 committed by GitHub
commit 60517f811e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,22 +38,63 @@ class ActionlogPresenter extends Presenter
public function icon()
{
$itemicon = 'fas fa-paperclip';
// User related icons
if ($this->itemType() == 'user') {
if ($this->itemType() == 'asset') {
return 'fas fa-barcode';
} elseif ($this->itemType() == 'accessory') {
return 'far fa-keyboard';
} elseif ($this->itemType() == 'consumable') {
return 'fas fa-tint';
} elseif ($this->itemType() == 'license') {
return 'far fa-save';
} elseif ($this->itemType() == 'component') {
return 'far fa-hdd';
} elseif ($this->itemType() == 'user') {
return 'fa-solid fa-people-arrows';
if ($this->actionType()=='create new') {
return 'fa-solid fa-user-plus';
}
if ($this->actionType()=='merged') {
return 'fa-solid fa-people-arrows';
}
if ($this->actionType()=='delete') {
return 'fa-solid fa-user-minus';
}
if ($this->actionType()=='delete') {
return 'fa-solid fa-user-minus';
}
if ($this->actionType()=='update') {
return 'fa-solid fa-user-pen';
}
return 'fa-solid fa-user';
}
// Everything else
if ($this->actionType()=='create new') {
return 'fa-solid fa-plus';
}
if ($this->actionType()=='delete') {
return 'fa-solid fa-user-xmark';
}
if ($this->actionType()=='update') {
return 'fa-solid fa-pen';
}
if ($this->actionType()=='restore') {
return 'fa-solid fa-trash-arrow-up';
}
if ($this->actionType()=='upload') {
return 'fas fa-paperclip';
}
if ($this->actionType()=='checkout') {
return 'fa-solid fa-rotate-left';
}
if ($this->actionType()=='checkin from') {
return 'fa-solid fa-rotate-right';
}
return 'fa-solid fa-rotate-right';
}
public function actionType()