Skip to content

Allow custom status to overwrite owner color on rowview #1582

@guillaume-philippon

Description

@guillaume-philippon

It's not a bug but a enhancement request.

It would be usefull to have ability to create a custom status that can overwrite owner color on rowview like 'Reserved' status do. Especially during decommissionning phase where you need to know which device is allready out-of-production.

Currently we do it by a manual patch on rowview.php [1] but not sure that it's a good way to do it (I mean it is for our workflow but not sure that's the case for all opendcim users).

[1]

diff -u rowview.php.20241211 rowview.php
--- rowview.php.20241211	2024-12-11 08:39:10.913451475 +0100
+++ rowview.php	2024-12-11 08:30:04.086717709 +0100
@@ -33,7 +33,7 @@
 	foreach($dsList as $stat){
 		if($stat->ColorCode != "#FFFFFF"){
 			$stName=str_replace(' ','_',$stat->Status);
-			$important=($stName == 'Reserved')?' !important':'';
+			$important=($stName == 'Reserved' || $stName == 'Disposed')?' !important':'';
 
 			$head.="\t\t\t.$stName {background-color: {$stat->ColorCode}$important;}\n";
 		}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions