[Rt-commit] rt branch, create-action, updated. 949130538f55f9afc81f09b30e870858e965412c
sartak at bestpractical.com
sartak at bestpractical.com
Wed Nov 4 01:50:50 EST 2009
The branch, create-action has been updated
via 949130538f55f9afc81f09b30e870858e965412c (commit)
from c780e2d8dbe208e94a57fd8033ab9f0024253368 (commit)
Summary of changes:
lib/RT/View/{Ticket => SelfService}/Create.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
copy lib/RT/View/{Ticket => SelfService}/Create.pm (96%)
- Log -----------------------------------------------------------------
commit 949130538f55f9afc81f09b30e870858e965412c
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Nov 4 01:50:31 2009 -0500
RT::View::SelfService::Create using RT::Action::CreateTicket
diff --git a/lib/RT/View/SelfService/Create.pm b/lib/RT/View/SelfService/Create.pm
new file mode 100644
index 0000000..13875d1
--- /dev/null
+++ b/lib/RT/View/SelfService/Create.pm
@@ -0,0 +1,82 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+# <jesse 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/copyleft/gpl.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 }}}
+use warnings;
+use strict;
+
+package RT::View::SelfService::Create;
+use Jifty::View::Declare -base;
+
+__PACKAGE__->use_mason_wrapper;
+
+template 'create' => page { title => _('Create a new ticket') } content {
+ # If we have a create_ticket action, pluck the queue out, otherwise,
+ # check the regular queue query parameter
+ my $action = Jifty->web->request->action('create_ticket');
+ my $queue = $action ? $action->argument('queue') : get('queue');
+ $queue or die "Queue not specified";
+
+ render_mason('/Elements/Tabs', {
+ current_toptab => 'ticket/create',
+ title => _("Create a new ticket"),
+ });
+
+ my $create = new_action(
+ class => 'CreateTicket',
+ moniker => 'create_ticket',
+ );
+ $create->set_queue($queue);
+
+ form {
+ form_next_page url => '/SelfService/Display.html';
+ render_action($create);
+ $create->button(label => _('Create'));
+ };
+};
+
+1;
+
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list