[Bps-public-commit] RT-BugTracker-Public branch, 5.0-updates, created. 1.00-38-g46e16e8
Jim Brandt
jbrandt at bestpractical.com
Thu Feb 25 10:38:17 EST 2021
The branch, 5.0-updates has been created
at 46e16e882a41c1727620cf4ee73a2f287853c2b9 (commit)
- Log -----------------------------------------------------------------
commit 6984830aa33ec298f2f78d0df7d25efc624a174e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed Feb 24 16:31:48 2021 -0500
Remove tables for bootstrap div layout
diff --git a/html/Public/Bug/Elements/ShowSummary b/html/Public/Bug/Elements/ShowSummary
index 62192c1..b252e55 100755
--- a/html/Public/Bug/Elements/ShowSummary
+++ b/html/Public/Bug/Elements/ShowSummary
@@ -45,42 +45,44 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%" class="ticket-summary">
-<tr>
- <td valign="top" class="boxcontainer">
- <&| /Widgets/TitleBox, title => loc('The Basics'),
+<div class="row ticket-summary">
+ <div class="boxcontainer col-md-6">
+% $m->callback( %ARGS, CallbackName => 'LeftColumnTop' );
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
class => 'ticket-info-basics',
&>
- <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
+ <div class="inline-edit-display">
+ <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
+ </div>
</&>
+% $m->callback( %ARGS, CallbackName => 'AfterBasics' );
- <&| /Widgets/TitleBox, title => loc('People'),
+ <&| /Widgets/TitleBox, title => loc('People'),
class => 'ticket-info-people',
&>
- <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
- </&>
+ <div class="inline-edit-display">
+ <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
+ </div>
+</&>
+% $m->callback( %ARGS, CallbackName => 'AfterPeople' );
% $m->callback( %ARGS, CallbackName => 'LeftColumn' );
+ </div>
+ <div class="boxcontainer col-md-6">
+% $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
- </td>
- <td valign="top" class="boxcontainer">
-
-% if ($Ticket->CustomFields->First) {
- <&| /Widgets/TitleBox, title => loc('Bug Information'),
- class => 'ticket-info-cfs',
- &>
- <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
- </&>
-% }
-
- <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
+<& /Elements/ShowCustomFieldCustomGroupings,
+ Object => $Ticket,
+ InlineEdit => 0,
+ &>
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments, Count => RT->Config->Get('AttachmentListCount') &>
+% $m->callback( %ARGS, CallbackName => 'AfterAttachments' );
% $m->callback( %ARGS, CallbackName => 'RightColumn' );
-
- </td>
-</tr>
-</table>
+ </div>
+</div>
<%ARGS>
$Ticket => undef
$Attachments => undef
+$InlineEdit => 0
</%ARGS>
commit 5293495338b62f8045916fff3a62dfde3ab52b01
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Thu Feb 25 10:23:24 2021 -0500
Remove tables from custom Report page
diff --git a/html/Public/Bug/Report.html b/html/Public/Bug/Report.html
index 535581a..a9f0275 100755
--- a/html/Public/Bug/Report.html
+++ b/html/Public/Bug/Report.html
@@ -99,86 +99,60 @@ public and indexed by search engines.
<form action="<% RT->Config->Get('WebPath') %>/Public/Bug/Report.html" method="POST" enctype="multipart/form-data" name="TicketCreate">
<input type="hidden" class="hidden" name="id" value="new" />
<input type="hidden" class="hidden" name="Status" value="new" />
-<div id="Ticket-Create-basics">
+
+<div id="Ticket-Create-basics" class="form-group">
<a name="basics"></a>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td class="label"><&|/l&>Distribution</&>:</td>
-<td class="value"><% $QueueObj->Name %>
+
+<div class="form-row">
+ <div class="label form-group col-3"><&|/l&>Distribution</&>:</div>
+ <div class="value form-group col-9"><% $QueueObj->Name %></div>
+</div>
<input type="hidden" class="hidden" name="Queue" Value="<%$QueueObj->Name%>">
-</td>
-<tr>
-<td class="label">
-<&|/l&>Your email address</&>:
-</td>
-<td class="value" colspan="5">
-<input name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" size="40">
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Subject</&>:
-</td>
-<td class="value" colspan="5">
-<input name="Subject" size="60" maxsize="100" value="<%$ARGS{Subject} || ''%>">
-</td>
-</tr>
-<tr>
-<td colspan="6">
- <& /Elements/EditCustomFields,
- Object => $ticket,
- CustomFields => $CFs,
- InTable => 1,
- KeepValue => 1,
- &>
-</td>
-</tr>
-% if ($TxnCFs->Count) {
-% while (my $CF = $TxnCFs->Next()) {
-<tr>
-<td align="RIGHT"><% $CF->Name %>:</td>
-<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td>
-</td></tr>
-% }
-% }
-<tr>
-% if (exists $session{'Attachments'}) {
-<td class="label">
-<&|/l&>Attached file</&>:
-</td>
-<td colspan="5">
-<&|/l&>Check box to delete</&><br/>
-% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><br />
-% } # end of foreach
-</td>
-</tr>
-<tr>
-% } # end of if
-<td>
-<&|/l&>Attach file</&>:
-</td>
-<td class="value" colspan="5">
-<input type="FILE" name="Attach">
-<input type="SUBMIT" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>">
-</td>
-</tr>
-<tr>
-<td colspan="6">
-<&|/l&>Describe the issue below</&>:<br/>
+
+<div class="form-row">
+ <div class="label form-group col-3"><&|/l&>Your email address</&>:</div>
+ <div class="value form-group col-9"><input class="form-control" name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" size="80" maxsize="200"></div>
+</div>
+
+<div class="form-row">
+ <div class="form-group label col-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="form-group value col-9">
+ <input class="form-control" type="text" name="Subject" size="80" maxsize="200" value="<%$ARGS{Subject} || ''%>" />
+% $m->callback( %ARGS, CallbackName => 'AfterSubject' );
+ </div>
+</div>
+
+<& /Elements/EditCustomFields,
+ Object => $ticket,
+ CustomFields => $CFs,
+ InTable => 1,
+ KeepValue => 1,
+ ForCreation => 1,
+&>
+
+<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
+<p></p>
+<div class="form-group">
+% $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'BeforeMessageBox' );
% if (exists $ARGS{Content}) {
-<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &>
+ <& /Elements/MessageBox, QueueObj => $QueueObj, Default => $ARGS{Content}, IncludeSignature => 0, IncludeDefaultArticle => 0 &>
+% } elsif ( $QuoteTransaction ) {
+ <& /Elements/MessageBox, QueueObj => $QueueObj, QuoteTransaction => $QuoteTransaction, IncludeDefaultArticle => 0 &>
% } else {
-<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
+ <& /Elements/MessageBox, QueueObj => $QueueObj, IncludeDefaultArticle => 1 &>
%}
-</td>
-</tr>
-<tr>
-<td align="RIGHT" colspan="2">
-</td>
-</tr>
-</table>
-<& /Elements/Submit, Label => loc("Create")&>
+% $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'AfterMessageBox' );
+</div>
+
+<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
+<div class="form-row">
+ <div class="col-12">
+ <& /Elements/Submit, Label => loc("Create"), Name => 'SubmitTicket', id => 'SubmitTicket' &>
+ </div>
+</div>
+
</div>
</form>
diff --git a/static/css/bugtracker-public.css b/static/css/bugtracker-public.css
index 3962274..48b9bd6 100644
--- a/static/css/bugtracker-public.css
+++ b/static/css/bugtracker-public.css
@@ -20,13 +20,3 @@
clear: both;
}
}
-
-#reporting-a-bug .edit-custom-field {
- /* we're in a thinner column most of the time, make room for the default margin */
- width: 45%;
-}
-
-#reporting-a-bug .edit-custom-field:first-child {
- display: block;
- float: none;
-}
commit 947885eeeef5ae238b7b841d30d94176e09cb064
Author: Dianne Skoll <dianne at bestpractical.com>
Date: Tue Feb 23 15:18:14 2021 -0500
Update variable name - it changed case to upper-case
diff --git a/lib/RT/BugTracker/Public.pm b/lib/RT/BugTracker/Public.pm
index a206d6d..95b1383 100644
--- a/lib/RT/BugTracker/Public.pm
+++ b/lib/RT/BugTracker/Public.pm
@@ -235,8 +235,8 @@ sub RedirectToPublic {
}
require RT::Interface::Web;
-%RT::Interface::Web::is_whitelisted_component = (
- %RT::Interface::Web::is_whitelisted_component,
+%RT::Interface::Web::IS_WHITELISTED_COMPONENT = (
+ %RT::Interface::Web::IS_WHITELISTED_COMPONENT,
"/Public/Browse.html" => 1,
"/Public/Dist/BeginsWith.html" => 1,
"/Public/Dist/Browse.html" => 1,
commit 5a128e292285d93767d20bb6521921ec29ca8c66
Author: Dianne Skoll <dianne at bestpractical.com>
Date: Tue Feb 23 15:18:56 2021 -0500
Update Makefile for modern Perl and RT 5.0
diff --git a/Makefile.PL b/Makefile.PL
index 6081b5b..4091cc8 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,8 +1,9 @@
+use lib ".";
use inc::Module::Install;
RTx('RT-BugTracker-Public');
requires_rt('4.2.0');
-rt_too_new('4.6.0');
+rt_too_new('5.2.0');
WriteAll();
commit 46e16e882a41c1727620cf4ee73a2f287853c2b9
Author: Dianne Skoll <dianne at bestpractical.com>
Date: Tue Feb 23 16:25:05 2021 -0500
Move custom public user format out of Mason and into RT::User
In core RT, ac4a4a38f6 moved username format methods from
Mason into lib/RT/User.pm. Update the custom public format
to align with that change.
diff --git a/html/Elements/ShowUserPublic b/html/Elements/ShowUserPublic
deleted file mode 100644
index 437a8b7..0000000
--- a/html/Elements/ShowUserPublic
+++ /dev/null
@@ -1,68 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2017 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 }}}
-<% $Address || $User->RealName || $User->Name %>\
-<%ARGS>
-$User => undef
-$Address => undef
-</%ARGS>
-<%INIT>
-if ( !$User && $Address ) {
- $User = RT::User->new( $session{'CurrentUser'} );
- $User->LoadByEmail( $Address->address );
- if ( $User->Id ) {
- $Address = '';
- } else {
- $Address = $Address->address;
- }
-} else {
- $Address = $User->EmailAddress;
-}
-if ( $Address && RT::BugTracker::Public->IsPublicUser ) {
- $Address =~ s/@/ [...] /;
-}
-</%INIT>
diff --git a/lib/RT/BugTracker/Public.pm b/lib/RT/BugTracker/Public.pm
index 95b1383..b043220 100644
--- a/lib/RT/BugTracker/Public.pm
+++ b/lib/RT/BugTracker/Public.pm
@@ -296,6 +296,36 @@ sub GetArticleContent {
return;
}
+# "public" UsernameFormat
+package RT::User;
+
+sub _FormatUserPublic
+{
+ my $self = shift;
+ my %args = @_;
+ my $session = \%HTML::Mason::Commands::session;
+
+ if (!$args{User} && $args{Address}) {
+ $args{User} = RT::User->new( $session->{'CurrentUser'} );
+ $args{User}->LoadByEmail($args{Address}->address);
+ if ($args{User}->Id) {
+ $args{Address} = '';
+ } else {
+ $args{Address} = $args{Address}->address;
+ }
+ } else {
+ $args{Address} = $args{User}->EmailAddress;
+ }
+ if ( $args{Address} && RT::BugTracker::Public->IsPublicUser ) {
+ $args{Address} =~ s/@/ [...] /;
+ }
+
+ return $args{Address} || $args{User}->RealName || $args{User}->Name;
+}
+
+# Switch back to original package
+package RT::BugTracker::Public;
+
=head1 AUTHOR
Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list