diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:21:24 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:21:24 -0700 |
| commit | 679854b8bbc65d112071111bbd7f34a6a481fb30 (patch) | |
| tree | dda0862fdf7853f4f61e4cf155c8bbc93768c994 /rt/share/html/m/_elements | |
| parent | 9b328d940af56b9924a342192ebb0790478fa705 (diff) | |
RT 4.0.13
Diffstat (limited to 'rt/share/html/m/_elements')
| -rw-r--r-- | rt/share/html/m/_elements/footer | 56 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/full_site_link | 47 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/header | 70 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/login | 112 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/menu | 57 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/raw_style | 113 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/ticket_list | 58 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/ticket_menu | 47 | ||||
| -rw-r--r-- | rt/share/html/m/_elements/wrapper | 50 |
9 files changed, 566 insertions, 44 deletions
diff --git a/rt/share/html/m/_elements/footer b/rt/share/html/m/_elements/footer index e0c023c9a..662544e45 100644 --- a/rt/share/html/m/_elements/footer +++ b/rt/share/html/m/_elements/footer @@ -1 +1,55 @@ -<& /elements/footer.html &> +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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/Logo, ShowName => 1, OnlyCustom => 1 &> + <div id="bpscredits"> + <div id="copyright"> +<&|/l_unsafe, '', '', '2013', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&> +</div> +</div> +</body> +</html> diff --git a/rt/share/html/m/_elements/full_site_link b/rt/share/html/m/_elements/full_site_link index 7f43968e0..db23422d2 100644 --- a/rt/share/html/m/_elements/full_site_link +++ b/rt/share/html/m/_elements/full_site_link @@ -1 +1,48 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <a id="fullsite" href="<%RT->Config->Get('WebPath')%>/m/index.html?NotMobile=1"><&|/l&>Not using a mobile browser?</&></a> diff --git a/rt/share/html/m/_elements/header b/rt/share/html/m/_elements/header index 4af62996c..ca08ec314 100644 --- a/rt/share/html/m/_elements/header +++ b/rt/share/html/m/_elements/header @@ -1,29 +1,66 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <%args> -$title => undef +$title => loc('RT for [_1]', RT->Config->Get('rtname')) $show_home_button => 1 </%args> <%init> $r->headers_out->{'Pragma'} = 'no-cache'; $r->headers_out->{'Cache-control'} = 'no-cache'; - -my $head = ''; - -my $etc = ''; - </%init> -<& /elements/header.html, { - 'title' => $title, - 'head' => $head, - 'etc' => $etc, - 'nocss' => 1, - 'nobr' => 1, - 'mobile' => 1, -} &> -<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')|n%>/m/style.css"/> -% if ( 0 ) { # Disabled in favor of Freeside header <html> <head> +<& /Elements/Framekiller &> +<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')|n%>/m/style.css"/> <title><%$title%></title> +% my ($jquery) = grep { /^jquery-\d+\./ } RT->Config->Get('JSFiles'); +<script src="<% RT->Config->Get('WebPath') %>/NoAuth/js/<% $jquery %>"></script> +<meta name="viewport" content="width=device-width height=device-height user-scalable=yes"/> </head> <body> % if ($show_home_button) { @@ -35,4 +72,3 @@ my $etc = ''; % if ($title) { <h1><%$title%></h1> % } -% } # disabled diff --git a/rt/share/html/m/_elements/login b/rt/share/html/m/_elements/login new file mode 100644 index 000000000..f6213d0ca --- /dev/null +++ b/rt/share/html/m/_elements/login @@ -0,0 +1,112 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} +% $m->callback( %ARGS, CallbackName => 'Header' ); +<&| /m/_elements/wrapper, show_home_button => 0 &> +<style> +<& /m/_elements/raw_style &> +</style> +<h1><&|/l, RT->Config->Get('rtname') &>RT for [_1]</&></h1> +<div id="body" class="login-body"> + +<& /Elements/ListActions, + title => loc('Error'), + titlebox => { class => 'error', hideable => 0 }, + actions => $actions, +&> + +% $m->callback( %ARGS, CallbackName => 'BeforeForm' ); + +<div id="login-box"> +<&| /Widgets/TitleBox, title => loc('Login'), hideable => 0 &> + +<& /Elements/LoginRedirectWarning, %ARGS &> + +% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) { +<form id="login" name="login" method="post" action="<% RT->Config->Get("WebPath") %>/NoAuth/Login.html"> + +<div class="entry"> + <span class="label"><&|/l&>Username</&>:</span><span class="value"><input type="text" name="user" value="<%$user%>" id="user" /></span> +</div> + +<div class="entry"> + <span class="label"><&|/l&>Password</&>:</span><span class="value"><input type="password" name="pass"/></span> +</div> + +<& /Elements/Submit, Label => loc('Login')&> + +<input type="hidden" name="next" value="<% $next %>" /> +<input type="hidden" name="mobile" value="1" /> + +<script type="text/javascript"> +if (window.location.hash) { + var form = (document.getElementsByName("login"))[0]; + if (form) { + form.action = form.action + '#' + window.location.hash.replace(/^#/, ''); + } +} +</script> + +% $m->callback( %ARGS ); + +</form> +% } +</&> +</div><!-- #login-box --> + +% $m->callback( %ARGS, CallbackName => 'AfterForm' ); + +</div><!-- #login-body --> +<& /m/_elements/full_site_link &> +</&> +<%ARGS> +$user => "" +$pass => undef +$goto => undef +$actions => undef +$next => "" +</%ARGS> diff --git a/rt/share/html/m/_elements/menu b/rt/share/html/m/_elements/menu index 54e7fe9a3..94d72b103 100644 --- a/rt/share/html/m/_elements/menu +++ b/rt/share/html/m/_elements/menu @@ -1,3 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <&| /Widgets/TitleBox, class => 'menu'&> <ul class="menu"> % for my $item (@menu) { @@ -10,7 +57,6 @@ </ul> </&> <%init> -use RT::SavedSearches; my @menu = ( { html => '<form method="GET" id="search" action="' . RT->Config->Get('WebPath') @@ -42,7 +88,7 @@ my @menu = ( if ( $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', Object => $RT::System)) { - my @Objects = RT::SavedSearches->new( $session{CurrentUser} )->_PrivacyObjects; + my @Objects = RT::SavedSearch->new( $session{CurrentUser} )->ObjectsForLoading; push @Objects, RT::System->new( $session{'CurrentUser'} ) if $session{'CurrentUser'}->HasRight( Object => $RT::System, @@ -52,12 +98,13 @@ if ( $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', Object => $ foreach my $object (@Objects) { my @searches = $object->Attributes->Named('SavedSearch'); foreach my $search (@searches) { - next unless $search->SubValue("SearchType") eq 'Ticket'; + next if $search->SubValue("SearchType") && $search->SubValue("SearchType") ne 'Ticket'; push @menu, { label => $search->Description, url => '/m/tickets/search?query=' . $search->SubValue("Query").'&order='.$search->SubValue("Order").'&order_by='.$search->SubValue("OrderBy") }; } } } -push @menu, { label => loc("Logout"), url => '/m/logout', } - if !RT->Config->Get('WebExternalAuth'); +push @menu, { label => loc("Logout"), url => '/m/logout', } ; + +$m->callback( CallbackName => 'MassageMenu', Menu => \@menu ); </%init> diff --git a/rt/share/html/m/_elements/raw_style b/rt/share/html/m/_elements/raw_style index a34982958..9157bc595 100644 --- a/rt/share/html/m/_elements/raw_style +++ b/rt/share/html/m/_elements/raw_style @@ -1,7 +1,53 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} body { font-family: helvetica, arial, sans-serif; - /*background-color: #ccf;*/ - background-color: #f8f8f8; + background-color: #ccf; margin: 0; } @@ -10,8 +56,8 @@ h1 { padding-top: 0.5em; padding-left: 0.2em; display: block; - background-color: #f8f8f8; - + background-color: #fff; + margin: 0; } div.buttons { @@ -29,8 +75,7 @@ div.buttons { position: relative; display: inline-block; text-decoration: none; - /*background-color: #fff;*/ - background-color: #ccc; + background-color: #fff; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; border-radius: 0.25em; @@ -83,7 +128,7 @@ ul.menu li#active a color: #800000; } -div.titlebox, #bpscredits, .ticket_menu{ +div.titlebox, #bpscredits, #logo, .ticket_menu{ -moz-border-radius: 1em; -webkit-border-radius: 1em; border-radius: 1em; @@ -108,12 +153,16 @@ hr.clear { } -.label, .labeltop { +.label, .labeltop, .cflabel { font-weight: normal; } .value { font-weight: bold; - display:inline-block; + display: inline-block; +} + +div.value { + display: block; } ul.ticketlist { @@ -309,20 +358,20 @@ div#login-box input[type=text], div#login-box input[type=password] { width: 100%; } -#bpscredits img { - padding-bottom: 1em; -} - - - #bpscredits { float: right; + clear: right; text-align: right; width: auto; font-size: 0.8em; padding: 1em; } +#bpscredits #copyright { + padding-top: 4em; + background: white url(<%RT->Config->Get('WebPath')%>/NoAuth/images/bpslogo.png) no-repeat top right; +} + :focus { background-color: #ffc; @@ -367,6 +416,27 @@ form { color: #000; } +#logo { + float: right; + clear: right; + text-align: center; + padding: 1em; + padding-bottom: 0.5em; + margin: 0.25em 0.5em 0.25em 0.25em; +} + +#logo .rtname { + display: block; + font-size: 0.9em; +} + +#logo a img { + border: 0; + height: 2em; + width: auto !important; + padding-bottom: 0.5em; +} + div.txn-content { font-size:0.8em; @@ -379,7 +449,7 @@ div.txn-content { } -.label { +.label, .cflabel { text-align: left; width: 10em; color: #666; @@ -399,7 +469,7 @@ div.entry, tr.input-row { } -input, input[type=text], input[type=password], select { +input[type=text], input[type=password], select { width: 100%; } @@ -419,3 +489,12 @@ textarea { a#fullsite { padding-left: 1em; } + +div.error .titlebox-title { + background-color: #f00; + color: #fff; +} + +div.error div.error { + background-color: #fcc; +} diff --git a/rt/share/html/m/_elements/ticket_list b/rt/share/html/m/_elements/ticket_list index 822efe8d6..3c2932188 100644 --- a/rt/share/html/m/_elements/ticket_list +++ b/rt/share/html/m/_elements/ticket_list @@ -1,3 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <%args> $order => undef $order_by => undef @@ -5,9 +52,12 @@ $query => '' $page => 1 </%args> <%init> + +my $rows = 10; + my $collection = RT::Tickets->new($session{'CurrentUser'}); $collection->FromSQL($query); -$collection->RowsPerPage(10); +$collection->RowsPerPage($rows); $collection->GotoPage($page-1); # XXX: ->{'order_by'} is hacky, but there is no way to check if # collection is ordered or not @@ -30,7 +80,7 @@ if ($page > 1 && ! @{$collection->ItemsArrayRef||[]}) { </%init> <&| /m/_elements/wrapper, title => -loc("Found [quant,_1,ticket]",$collection->Count) &> +loc("Found [quant,_1,ticket]",$collection->CountAll) &> <&|/Widgets/TitleBox, class => 'search' &> <ul class="ticketlist"> @@ -48,6 +98,8 @@ loc("Found [quant,_1,ticket]",$collection->Count) &> % if ($ticket->Priority) { <div class="priority"><span class="label"><&|/l&>Priority</&>:</span> <%$ticket->Priority%></div> % } +<div class="bookmark"><span class="label"><&|/l&>Bookmark</&>:</span> <& /Ticket/Elements/Bookmark, id => $ticket->id &></div> + </div> </li> % } @@ -58,7 +110,9 @@ loc("Found [quant,_1,ticket]",$collection->Count) &> % } Page <%$page%> +% if ($collection->CountAll > $page * $rows) { <a href="<%RT->Config->Get('WebPath')%>/m/tickets/search?page=<%$page+1%>&query=<%$query%>&order=<%$order%>&order_by=<%$order_by%>">Next</a> +% } </div> </&> </&> diff --git a/rt/share/html/m/_elements/ticket_menu b/rt/share/html/m/_elements/ticket_menu index 257b066bc..fed142e25 100644 --- a/rt/share/html/m/_elements/ticket_menu +++ b/rt/share/html/m/_elements/ticket_menu @@ -1,3 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <%args> $ticket </%args> diff --git a/rt/share/html/m/_elements/wrapper b/rt/share/html/m/_elements/wrapper index 1891079bd..b8b433625 100644 --- a/rt/share/html/m/_elements/wrapper +++ b/rt/share/html/m/_elements/wrapper @@ -1,10 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# <sales@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 }}} <%args> $title => '' $show_home_button => 1 </%args> <%init> -if ($DECODED_ARGS->{'NotMobile'}) { - $session{'NotMobile'} = 1; +if ($session{'NotMobile'}) { RT::Interface::Web::Redirect(RT->Config->Get('WebURL')); $m->abort(); } |
