%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
%# This software is Copyright (c) 1996-2025 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 }}}
%# End of div#body from /Elements/PageLayout
  <hr class="clear" />
</div>
% $m->callback( %ARGS );
<div id="footer" title="Best Practical Solutions, LLC, copyright" class="row">
% # display 3 columns on login page
% # display 1 column center aligned once logged in, without the "For support and sales..." section
% my $cols = ( $Menu ? '12' : '4' );
  <div class="col-<% $cols %>">
    <p id="version" class="text-center <% $Menu ? 'pb-1' : 'text-md-start' %>">
%     if ($m->{'rt_base_time'}) {
        <span id="time"><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%> -</span>
%     }
      <span><&|/l_unsafe, $RT::VERSION, &>RT Version [_1]</&></span>
    </p>
  </div>
  <div class="col-<% $cols %>">
    <p id="bpscredits" class="text-center"><span><&|/l_unsafe, '2025', '&#187;&#124;&#171;', '<a href="https://bestpractical.com/about">Best Practical Solutions, LLC</a>', &>Copyright 1996-[_1] [_2] [_3].</&></span></p>
  </div>
% if (!$Menu) {
  <div class="col-4">
    <p id="legal" class="text-md-end text-center"><&|/l_unsafe, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>For support and sales inquiries, please contact [_1].</&></p>
  </div>
% }
</div>
% if ($Debug >= 2 ) {
% require Data::Dumper;
% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]);
<pre>
<%$d->Dump() %>
</pre>
% }
<script type="text/javascript">
window.RT ||= {};
RT.UserMessages = <% JSON( \%UserMessages ) |n%>;
</script>
    </div>
  </body>
</html>
<%init>
my %UserMessages;

# Check for any messages from the page processing stashed in notes.
# We'll write them to the page so growl can find and display them.

foreach my $note ( keys %{ $m->notes } ) {
    if ( my ($message) = $note =~ /^Message\:(\w+)/ ) {
        if ( my $user_message = RT->System->UserMessages->{$message} ) {
            $UserMessages{$message} = loc( $user_message );
        }
        else {
            RT->Logger->warning("Couldn't find user message for $message");
        }
    }
}
</%init>
<%ARGS>
$Debug => 0
$Menu => 1
</%ARGS>
