[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-214-g93c8dcc

Shawn Moore sartak at bestpractical.com
Wed Aug 4 15:56:42 EDT 2010


The branch, 3.9-trunk has been updated
       via  93c8dccfb6f40ed2214f766e18a3101c2c09238c (commit)
      from  7942a451c0dd15820877d87c8f8ca6960e5cebf3 (commit)

Summary of changes:
 share/html/Ticket/Elements/Tabs |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

- Log -----------------------------------------------------------------
commit 93c8dccfb6f40ed2214f766e18a3101c2c09238c
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Aug 4 15:54:10 2010 -0400

    Only show modify tabs if you have ModifyTicket

diff --git a/share/html/Ticket/Elements/Tabs b/share/html/Ticket/Elements/Tabs
index ebadf64..2a97012 100755
--- a/share/html/Ticket/Elements/Tabs
+++ b/share/html/Ticket/Elements/Tabs
@@ -115,6 +115,8 @@ if ($Ticket) {
         current_subtab => $current_subtab
     };
 
+    my %can = ( ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'), );
+
     my $ticket_page_tabs = {
         _A => {
             title => loc('Display'),
@@ -125,29 +127,30 @@ if ($Ticket) {
             title => loc('History'),
             path  => "Ticket/History.html?id=" . $id,
         },
-        _B => {
+    };
+
+    if ($can{ModifyTicket}) {
+        $ticket_page_tabs->{_B} = {
             title => loc('Basics'),
             path  => "Ticket/Modify.html?id=" . $id,
-        },
-
-        _C => {
+        };
+        $ticket_page_tabs->{_C} = {
             title => loc('Dates'),
             path  => "Ticket/ModifyDates.html?id=" . $id,
-        },
-        _D => {
+        };
+        $ticket_page_tabs->{_D} = {
             title => loc('People'),
             path  => "Ticket/ModifyPeople.html?id=" . $id,
-        },
-        _E => {
+        };
+        $ticket_page_tabs->{_E} = {
             title => loc('Links'),
             path  => "Ticket/ModifyLinks.html?id=" . $id,
-        },
-        _X => {
+        };
+        $ticket_page_tabs->{_X} = {
             title => loc('Jumbo'),
             path  => "Ticket/ModifyAll.html?id=" . $id,
-        },
-
-    };
+        };
+    }
 
     if ( RT->Config->Get('EnableReminders') ) {
         $ticket_page_tabs->{_F} = {
@@ -167,8 +170,6 @@ if ($Ticket) {
     $tabs->{'this'}->{"subtabs"} = $ticket_page_tabs;
     $current_tab = "Ticket/Display.html?id=" . $id;
 
-    my %can = ( ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'), );
-
     if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('ReplyToTicket') )
     {
         $actions->{'F'} = {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list