[Bps-public-commit] r20156 - in RT-BugTracker/html: Callbacks/BugTracker/Ticket/Create.html Ticket/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Wed Nov 25 22:51:49 EST 2009
Author: ruz
Date: Wed Nov 25 22:51:49 2009
New Revision: 20156
Added:
RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/Default
Removed:
RT-BugTracker/html/Ticket/Create.html
Modified:
RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/FormStart
RT-BugTracker/html/Ticket/Elements/ShowQueue
Log:
* turn Create.html into callbacks
we were overriding it mostly because of the title. In the
latest RT we pass title into a callback.
RT 3.8's Create.html aborts too earlier for us to show a note
when queue is disabled.
Added: RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/Default
==============================================================================
--- (empty file)
+++ RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/Default Wed Nov 25 22:51:49 2009
@@ -0,0 +1,15 @@
+<%args>
+$QueueObj
+$title => undef
+</%args>
+<%init>
+if ( $QueueObj->Disabled ) {
+ $m->comp('/Dist/Elements/ErrorDisabled', Queue => $QueueObj );
+ $m->abort;
+}
+
+if ( $title ) {
+ $$title = loc("Report a new bug in [_1]", $QueueObj->Name || ('#'.$QueueObj->id) );
+}
+
+</%init>
Modified: RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/FormStart
==============================================================================
--- RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/FormStart (original)
+++ RT-BugTracker/html/Callbacks/BugTracker/Ticket/Create.html/FormStart Wed Nov 25 22:51:49 2009
@@ -1,18 +1,6 @@
-<%args>
-$ARGSRef
-</%args>
-<%init>
-my $Queue = $ARGSRef->{Queue}
- or return;
-
-my $QueueObj = RT::Queue->new($session{CurrentUser});
-$QueueObj->Load($Queue);
-
-if ( $QueueObj->Disabled ) {
- $m->comp('/Dist/Elements/ErrorDisabled', Queue => $QueueObj );
- $m->abort;
-}
-</%init>
+<%ARGS>
+$QueueObj
+</%ARGS>
<& /Dist/Elements/ShowNotes, Queue => $QueueObj &>
Modified: RT-BugTracker/html/Ticket/Elements/ShowQueue
==============================================================================
--- RT-BugTracker/html/Ticket/Elements/ShowQueue (original)
+++ RT-BugTracker/html/Ticket/Elements/ShowQueue Wed Nov 25 22:51:49 2009
@@ -1,8 +1,8 @@
%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%#
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
%# <jesse at bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -47,10 +47,12 @@
%# END BPS TAGGED BLOCK }}}
%# This is probably fine to leave as an overriding template. The 3.6 and 3.8
%# have no real logic to them.
-<a href="<% $RT::WebPath %>/Dist/Display.html?Queue=<% $name |uhn %>"><% $name %></a>
+<a href="<% $RT::WebPath %>/Dist/Display.html?Queue=<% $value |uhn %>"><% $name %></a>
<%ARGS>
$QueueObj
</%ARGS>
<%INIT>
-my $name = $QueueObj->Name;
+my $name = my $value = $QueueObj->Name;
+$name = '#'. ($value = $QueueObj->id)
+ unless defined $value && length $value;
</%INIT>
More information about the Bps-public-commit
mailing list