[Rt-commit] rt branch, 4.6/create_ticket_link_in_menu, created. rt-5.0.0alpha1-2-g1fdffd9a7

Aaron Trevena ast at bestpractical.com
Fri Feb 21 11:18:52 EST 2020


The branch, 4.6/create_ticket_link_in_menu has been created
        at  1fdffd9a79616066f9bfeb99bccbf73830a318c2 (commit)

- Log -----------------------------------------------------------------
commit ac07d7942a0e2f0eafdcb4eb48899ce9db5956ee
Author: Aaron Trevena <aaron at aarontrevena.co.uk>
Date:   Tue Nov 26 20:20:49 2019 +0000

    Add Create Ticket link in Menu
    
    Adds create ticket item to the home submenu that pops-up modal dialog to select queue and takes you to create ticket page in same way as button
    Added new Ticket/CreateInQueue.html page that matches behaviour of Asset/CreatetInCatalog allowing right-click of menu item to open in new window/tab
    Implements: I#221613

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 5ce829c46..37b805580 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -92,6 +92,9 @@ sub BuildMainNav {
     }
 
     my $home = $top->child( home => title => loc('Homepage'), path => '/' );
+    $home->child( createticket => title => loc("Create Ticket"),
+                  path => "/Ticket/CreateInQueue.html" );
+
     unless ($HTML::Mason::Commands::session{'dashboards_in_menu'}) {
         my $dashboards_in_menu = $current_user->UserObj->Preferences(
             'DashboardsInMenu',
diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index e488c572c..22f67d8cd 100644
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
+<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="<% $FormName %>" id="<% $FormName %>" \
 % $m->callback(CallbackName => 'InFormElement');
 >
 
diff --git a/share/html/Elements/CreateTicket b/share/html/Ticket/CreateInQueue.html
similarity index 66%
copy from share/html/Elements/CreateTicket
copy to share/html/Ticket/CreateInQueue.html
index e488c572c..c2f3117bb 100644
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Ticket/CreateInQueue.html
@@ -45,37 +45,8 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
-% $m->callback(CallbackName => 'InFormElement');
->
 
-% if ($IncludeExplanation) {
-<p><&|/l&>Select a queue for your new ticket.</&></p>
-% }
-
-% my $button_start = '<input type="submit" class="button btn btn-primary form-control" value="';
-% my $button_end = '" />';
-% my $queue_selector = $m->scomp('/Elements/SelectNewTicketQueue', AutoSubmit => 1, SendTo => $SendTo, Placeholder => loc('Queue'), Hyperlink => $Hyperlink );
-
-% if ($Hyperlink) {
-<% $queue_selector |n %>
-% }
-
-<div class="create-wide">
-<&|/l_unsafe, $button_start, $button_end &>[_1]Create new ticket[_2]</&>
-</div>
-<div class="create-medium">
-<&|/l_unsafe, $button_start, $button_end &>[_1]Create[_2]</&>
-</div>
-<div class="create-narrow">
-<&|/l_unsafe, $button_start, $button_end &>[_1]+[_2]</&>
-</div>
-
-% $m->callback(CallbackName => 'BeforeFormEnd');
-
-</form>
-<%ARGS>
-$SendTo => '/Ticket/Create.html',
-$IncludeExplanation => 0
-$Hyperlink => undef
-</%ARGS>
+<& /Elements/Header,
+    Title => loc("Create new Ticket") &>
+<& /Elements/Tabs &>
+<& /Elements/CreateInQueue &>

commit 1fdffd9a79616066f9bfeb99bccbf73830a318c2
Author: Aaron Trevena <ast at bestpractical.com>
Date:   Fri Feb 21 16:17:40 2020 +0000

    Add Create Ticket link in Menu updates
    
    Updated ticket creation menu, removing obselete parts replaced by new logic
    allowing creation of tickets without queues

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 37b805580..f6166821d 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -93,7 +93,7 @@ sub BuildMainNav {
 
     my $home = $top->child( home => title => loc('Homepage'), path => '/' );
     $home->child( createticket => title => loc("Create Ticket"),
-                  path => "/Ticket/CreateInQueue.html" );
+                  path => "/Ticket/Create.html" );
 
     unless ($HTML::Mason::Commands::session{'dashboards_in_menu'}) {
         my $dashboards_in_menu = $current_user->UserObj->Preferences(
diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index 22f67d8cd..e488c572c 100644
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="<% $FormName %>" id="<% $FormName %>" \
+<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
 % $m->callback(CallbackName => 'InFormElement');
 >
 
diff --git a/share/html/Ticket/CreateInQueue.html b/share/html/Ticket/CreateInQueue.html
deleted file mode 100644
index c2f3117bb..000000000
--- a/share/html/Ticket/CreateInQueue.html
+++ /dev/null
@@ -1,52 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
-%#                                          <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-
-<& /Elements/Header,
-    Title => loc("Create new Ticket") &>
-<& /Elements/Tabs &>
-<& /Elements/CreateInQueue &>

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


More information about the rt-commit mailing list