diff --git a/modules/itop-change-mgmt-1.0.0/images/change-approved.png b/modules/itop-change-mgmt-1.0.0/images/change-approved.png
new file mode 100644
index 000000000..a1014575b
Binary files /dev/null and b/modules/itop-change-mgmt-1.0.0/images/change-approved.png differ
diff --git a/modules/itop-change-mgmt-1.0.0/images/change-closed.png b/modules/itop-change-mgmt-1.0.0/images/change-closed.png
new file mode 100644
index 000000000..8f5ddf84e
Binary files /dev/null and b/modules/itop-change-mgmt-1.0.0/images/change-closed.png differ
diff --git a/modules/itop-change-mgmt-1.0.0/images/change-rejected.png b/modules/itop-change-mgmt-1.0.0/images/change-rejected.png
new file mode 100644
index 000000000..91b380dea
Binary files /dev/null and b/modules/itop-change-mgmt-1.0.0/images/change-rejected.png differ
diff --git a/modules/itop-change-mgmt-1.0.0/images/change.png b/modules/itop-change-mgmt-1.0.0/images/change.png
new file mode 100644
index 000000000..68e0cb3f0
Binary files /dev/null and b/modules/itop-change-mgmt-1.0.0/images/change.png differ
diff --git a/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php b/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php
index 4d7c9bfc3..73c7a0dd1 100644
--- a/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php
+++ b/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php
@@ -41,6 +41,7 @@ abstract class Change extends Ticket
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
+ "icon" => "../modules/itop-change-mgmt-1.0.0/images/change.png",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
@@ -296,6 +297,55 @@ abstract class Change extends Ticket
$sName = sprintf('C-%06d', $iKey);
$this->Set('ref', $sName);
}
+
+ /**
+ * Get the icon representing this object
+ * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
+ * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
+ */
+ public function GetIcon($bImgTag = true)
+ {
+ $sStatus = $this->Get('status');
+ switch($this->GetState())
+ {
+ case 'approved':
+ case 'implemented':
+ case 'monitored':
+ $sIconName = self::MakeIconFromName('change-approved.png');
+ break;
+
+ case 'rejected':
+ case 'notapproved':
+ $sIconName = self::MakeIconFromName('change-rejected.png');
+ break;
+
+ case 'closed':
+ $sIcon = self::MakeIconFromName('change-closed.png');
+ break;
+
+ default:
+ $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
+ }
+ return $sIcon;
+ }
+
+ protected static function MakeIconFromName($sIconName, $bImgTag = true)
+ {
+ $sIcon = '';
+ if ($sIconName != '')
+ {
+ $sPath = '../modules/itop-change-mgmt-1.0.0/images/'.$sIconName;
+ if ($bImgTag)
+ {
+ $sIcon = "
";
+ }
+ else
+ {
+ $sIcon = $sPath;
+ }
+ }
+ return $sIcon;
+ }
}
class RoutineChange extends Change
diff --git a/modules/itop-config-mgmt-1.0.0/images/switch.png b/modules/itop-config-mgmt-1.0.0/images/switch.png
index b32274acd..bca7e1988 100644
Binary files a/modules/itop-config-mgmt-1.0.0/images/switch.png and b/modules/itop-config-mgmt-1.0.0/images/switch.png differ
diff --git a/modules/itop-incident-mgmt-1.0.0/images/incident-closed.png b/modules/itop-incident-mgmt-1.0.0/images/incident-closed.png
new file mode 100644
index 000000000..264ce583d
Binary files /dev/null and b/modules/itop-incident-mgmt-1.0.0/images/incident-closed.png differ
diff --git a/modules/itop-incident-mgmt-1.0.0/images/incident-deadline.png b/modules/itop-incident-mgmt-1.0.0/images/incident-deadline.png
new file mode 100644
index 000000000..2b004f741
Binary files /dev/null and b/modules/itop-incident-mgmt-1.0.0/images/incident-deadline.png differ
diff --git a/modules/itop-incident-mgmt-1.0.0/images/incident-escalated.png b/modules/itop-incident-mgmt-1.0.0/images/incident-escalated.png
new file mode 100644
index 000000000..719a12802
Binary files /dev/null and b/modules/itop-incident-mgmt-1.0.0/images/incident-escalated.png differ
diff --git a/modules/itop-incident-mgmt-1.0.0/images/incident.png b/modules/itop-incident-mgmt-1.0.0/images/incident.png
new file mode 100644
index 000000000..237db0c76
Binary files /dev/null and b/modules/itop-incident-mgmt-1.0.0/images/incident.png differ
diff --git a/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php b/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php
index a2b2133c3..54e66c829 100644
--- a/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php
+++ b/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php
@@ -38,6 +38,7 @@ class Incident extends ResponseTicket
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
+ "icon" => "../modules/itop-incident-mgmt-1.0.0/images/incident.png",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
@@ -93,6 +94,93 @@ class Incident extends ResponseTicket
}
parent::OnInsert();
}
+
+ /**
+ * Get the icon representing this object
+ * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
+ * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
+ */
+ public function GetIcon($bImgTag = true)
+ {
+ $sStatus = $this->Get('status');
+ switch($this->GetState())
+ {
+
+ case 'escalated_tto':
+ case 'escalated_ttr':
+ $sIconName = self::MakeIconFromName('incident-escalated.png');
+ break;
+
+ case 'resolved':
+ case 'closed':
+ $sIcon = self::MakeIconFromName('incident-closed.png');
+ break;
+
+ case 'new':
+ $sIcon = self::MakeIconFromName('incident.png');
+ $oEscalationDeadline = $this->Get('tto_escalation_deadline');
+ if ($oEscalationDeadline != null)
+ {
+ // A SLA is running
+ $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
+ $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
+ $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
+ if ($ratio <= 0)
+ {
+ $sIcon = self::MakeIconFromName('incident-escalated.png');
+ }
+ else if ($ratio <= 0.25)
+ {
+ $sIcon = self::MakeIconFromName('incident-deadline.png');
+ }
+ }
+ break;
+
+ case 'assigned':
+ $sIcon = self::MakeIconFromName('incident.png');
+ $oEscalationDeadline = $this->Get('ttr_escalation_deadline');
+ if ($oEscalationDeadline != null)
+ {
+ // A SLA is running
+ $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
+ $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
+ $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
+ if ($ratio <= 0)
+ {
+ $sIcon = self::MakeIconFromName('incident-escalated.png');
+ }
+ else if ($ratio <= 0.25)
+ {
+ $sIcon = self::MakeIconFromName('incident-deadline.png');
+ }
+ }
+ break;
+
+
+ default:
+ $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
+ }
+ return $sIcon;
+ }
+
+ protected static function MakeIconFromName($sIconName, $bImgTag = true)
+ {
+ $sIcon = '';
+ if ($sIconName != '')
+ {
+ $sPath = '../modules/itop-incident-mgmt-1.0.0/images/'.$sIconName;
+ if ($bImgTag)
+ {
+ $sIcon = "
";
+ }
+ else
+ {
+ $sIcon = $sPath;
+ }
+ }
+ return $sIcon;
+ }
+
}
class lnkTicketToIncident extends cmdbAbstractObject
diff --git a/modules/itop-knownerror-mgmt-1.0.0/images/known-error.png b/modules/itop-knownerror-mgmt-1.0.0/images/known-error.png
new file mode 100644
index 000000000..0871dfbc0
Binary files /dev/null and b/modules/itop-knownerror-mgmt-1.0.0/images/known-error.png differ
diff --git a/modules/itop-knownerror-mgmt-1.0.0/model.itop-knownerror-mgmt.php b/modules/itop-knownerror-mgmt-1.0.0/model.itop-knownerror-mgmt.php
index 96965b936..991768512 100644
--- a/modules/itop-knownerror-mgmt-1.0.0/model.itop-knownerror-mgmt.php
+++ b/modules/itop-knownerror-mgmt-1.0.0/model.itop-knownerror-mgmt.php
@@ -46,6 +46,7 @@ class KnownError extends cmdbAbstractObject
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
+ "icon" => "../modules/itop-knownerror-mgmt-1.0.0/images/known-error.png",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
diff --git a/modules/itop-problem-mgmt-1.0.0/en.dict.itop-problem-mgmt.php b/modules/itop-problem-mgmt-1.0.0/en.dict.itop-problem-mgmt.php
index b9fd7481d..0c5e10966 100644
--- a/modules/itop-problem-mgmt-1.0.0/en.dict.itop-problem-mgmt.php
+++ b/modules/itop-problem-mgmt-1.0.0/en.dict.itop-problem-mgmt.php
@@ -107,7 +107,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:Problem/Attribute:impact/Value:2+' => '',
'Class:Problem/Attribute:impact/Value:3' => 'A Department',
'Class:Problem/Attribute:impact/Value:3+' => '',
- 'Class:Problem/Attribute:urgency' => 'urgency',
+ 'Class:Problem/Attribute:urgency' => 'Urgency',
'Class:Problem/Attribute:urgency+' => '',
'Class:Problem/Attribute:urgency/Value:1' => 'Low',
'Class:Problem/Attribute:urgency/Value:1+' => 'Low',
@@ -115,7 +115,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:Problem/Attribute:urgency/Value:2+' => 'Medium',
'Class:Problem/Attribute:urgency/Value:3' => 'High',
'Class:Problem/Attribute:urgency/Value:3+' => 'High',
- 'Class:Problem/Attribute:priority' => 'priority',
+ 'Class:Problem/Attribute:priority' => 'Priority',
'Class:Problem/Attribute:priority+' => '',
'Class:Problem/Attribute:priority/Value:1' => 'Low',
'Class:Problem/Attribute:priority/Value:1+' => '',
diff --git a/modules/itop-problem-mgmt-1.0.0/model.itop-problem-mgmt.php b/modules/itop-problem-mgmt-1.0.0/model.itop-problem-mgmt.php
index 50f00ff80..3c1261fc2 100644
--- a/modules/itop-problem-mgmt-1.0.0/model.itop-problem-mgmt.php
+++ b/modules/itop-problem-mgmt-1.0.0/model.itop-problem-mgmt.php
@@ -38,6 +38,7 @@ class Problem extends Ticket
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
+ "icon" => "../modules/itop-problem-mgmt-1.0.0/images/problem.png",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
diff --git a/modules/itop-request-mgmt-1.0.0/images/user-request-closed.png b/modules/itop-request-mgmt-1.0.0/images/user-request-closed.png
new file mode 100644
index 000000000..77ac9138b
Binary files /dev/null and b/modules/itop-request-mgmt-1.0.0/images/user-request-closed.png differ
diff --git a/modules/itop-request-mgmt-1.0.0/images/user-request-deadline.png b/modules/itop-request-mgmt-1.0.0/images/user-request-deadline.png
new file mode 100644
index 000000000..1fb42ec00
Binary files /dev/null and b/modules/itop-request-mgmt-1.0.0/images/user-request-deadline.png differ
diff --git a/modules/itop-request-mgmt-1.0.0/images/user-request-escalated.png b/modules/itop-request-mgmt-1.0.0/images/user-request-escalated.png
new file mode 100644
index 000000000..b891edff3
Binary files /dev/null and b/modules/itop-request-mgmt-1.0.0/images/user-request-escalated.png differ
diff --git a/modules/itop-request-mgmt-1.0.0/images/user-request.png b/modules/itop-request-mgmt-1.0.0/images/user-request.png
new file mode 100644
index 000000000..3dfd7dc9e
Binary files /dev/null and b/modules/itop-request-mgmt-1.0.0/images/user-request.png differ
diff --git a/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php b/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php
index a81637017..6bd86d55f 100644
--- a/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php
+++ b/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php
@@ -38,6 +38,7 @@ class UserRequest extends ResponseTicket
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
+ "icon" => "../modules/itop-request-mgmt-1.0.0/images/user-request.png",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
@@ -84,6 +85,92 @@ class UserRequest extends ResponseTicket
$this->Set('ref', $sName);
return parent::ComputeValues();
}
+
+ /**
+ * Get the icon representing this object
+ * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
+ * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
+ */
+ public function GetIcon($bImgTag = true)
+ {
+ $sStatus = $this->Get('status');
+ switch($this->GetState())
+ {
+
+ case 'escalated_tto':
+ case 'escalated_ttr':
+ $sIconName = self::MakeIconFromName('user-request-escalated.png');
+ break;
+
+ case 'resolved':
+ case 'closed':
+ $sIcon = self::MakeIconFromName('user-request-closed.png');
+ break;
+
+ case 'new':
+ $sIcon = self::MakeIconFromName('user-request.png');
+ $oEscalationDeadline = $this->Get('tto_escalation_deadline');
+ if ($oEscalationDeadline != null)
+ {
+ // A SLA is running
+ $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
+ $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
+ $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
+ if ($ratio <= 0)
+ {
+ $sIcon = self::MakeIconFromName('user-request-escalated.png');
+ }
+ else if ($ratio <= 0.25)
+ {
+ $sIcon = self::MakeIconFromName('user-request-deadline.png');
+ }
+ }
+ break;
+
+ case 'assigned':
+ $sIcon = self::MakeIconFromName('user-request.png');
+ $oEscalationDeadline = $this->Get('ttr_escalation_deadline');
+ if ($oEscalationDeadline != null)
+ {
+ // A SLA is running
+ $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
+ $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
+ $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
+ if ($ratio <= 0)
+ {
+ $sIcon = self::MakeIconFromName('user-request-escalated.png');
+ }
+ else if ($ratio <= 0.25)
+ {
+ $sIcon = self::MakeIconFromName('user-request-deadline.png');
+ }
+ }
+ break;
+
+
+ default:
+ $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
+ }
+ return $sIcon;
+ }
+
+ protected static function MakeIconFromName($sIconName, $bImgTag = true)
+ {
+ $sIcon = '';
+ if ($sIconName != '')
+ {
+ $sPath = '../modules/itop-request-mgmt-1.0.0/images/'.$sIconName;
+ if ($bImgTag)
+ {
+ $sIcon = "
";
+ }
+ else
+ {
+ $sIcon = $sPath;
+ }
+ }
+ return $sIcon;
+ }
}
$oMyMenuGroup = new MenuGroup('RequestManagement', 30 /* fRank */);
diff --git a/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php b/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php
index 50d11e41d..0316201e7 100644
--- a/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php
+++ b/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php
@@ -49,7 +49,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:Ticket/Attribute:ref+' => '',
'Class:Ticket/Attribute:title' => 'Title',
'Class:Ticket/Attribute:title+' => '',
- 'Class:Ticket/Attribute:description' => 'description',
+ 'Class:Ticket/Attribute:description' => 'Description',
'Class:Ticket/Attribute:description+' => '',
'Class:Ticket/Attribute:ticket_log' => 'Log',
'Class:Ticket/Attribute:ticket_log+' => '',
@@ -255,7 +255,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:ResponseTicket/Stimulus:ev_reassign+' => '',
'Class:ResponseTicket/Stimulus:ev_timeout' => 'Escalation',
'Class:ResponseTicket/Stimulus:ev_timeout+' => '',
- 'Class:ResponseTicket/Stimulus:ev_resolve' => 'Mark a resolved',
+ 'Class:ResponseTicket/Stimulus:ev_resolve' => 'Mark as resolved',
'Class:ResponseTicket/Stimulus:ev_resolve+' => '',
'Class:ResponseTicket/Stimulus:ev_close' => 'Close',
'Class:ResponseTicket/Stimulus:ev_close+' => '',