--- AgentCompose.pm.org	2004-02-11 22:32:30.000000000 +0100
+++ AgentCompose.pm	2004-02-11 22:42:10.000000000 +0100
@@ -90,13 +90,10 @@
     my $Output;
     my %Error = ();
     # -- 
-    # start with page ...
-    # --
-    $Output .= $Self->{LayoutObject}->Header(Area => 'Agent', Title => 'Compose');
-    # -- 
     # check needed stuff
     # --
     if (!$Self->{TicketID}) {
+        $Output .= $Self->{LayoutObject}->Header(Area => 'Agent', Title => 'Compose');
         $Output .= $Self->{LayoutObject}->Error(
                 Message => "Got no TicketID!",
                 Comment => 'System Error!',
@@ -108,6 +105,18 @@
     # get ticket data
     # --
     my %Ticket = $Self->{TicketObject}->GetTicket(TicketID => $Self->{TicketID});
+    # --
+    # Check if ticket is locked and owned by current user
+    # --
+    my $BgColor = "";
+    if($Self->{TicketObject}->IsTicketLocked(TicketID => $Self->{TicketID}) && $Ticket{OwnerID} == $Self->{UserID}) {
+        $BgColor = $Self->{ConfigObject}->Get('LockedTicketBackground');
+    }
+
+    # -- 
+    # start with page ...
+    # --
+    $Output .= $Self->{LayoutObject}->Header(Area => 'Agent', Title => 'Compose', BgColor => $BgColor);
     if ($Self->{ConfigObject}->Get('AgentCanBeCustomer') && $Ticket{CustomerUserID} && $Ticket{CustomerUserID} eq $Self->{UserLogin}) {
         # --
         # redirect
