[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-321-g4bd1d61
Ruslan Zakirov
ruz at bestpractical.com
Wed Dec 1 19:23:53 EST 2010
The branch, 3.9-trunk has been updated
via 4bd1d614d6117c7a9c6fc6acf12326ee471c1189 (commit)
via 3c434924103b9316e042d0bf229d15e2ae331225 (commit)
via 63e85896c945d27a226da20cdceba40116cc3014 (commit)
via 65cba426a7bcf8f4f82ff558c023eb18048fd977 (commit)
via 28a783a697d5a3a51d3ea0c9a043dc825c001018 (commit)
from 0ff0c5ad35831949642a47f11d4507e11e41231e (commit)
Summary of changes:
sbin/rt-test-dependencies.in | 2 +-
share/html/Elements/ShowCustomFields | 4 ++++
share/html/Ticket/Elements/ShowSummary | 4 ++--
share/html/Widgets/TitleBox | 8 ++++++--
4 files changed, 13 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 4bd1d614d6117c7a9c6fc6acf12326ee471c1189
Merge: 0ff0c5a 3c43492
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Dec 2 03:23:42 2010 +0300
Merge branch 'hide_empty_in_title_box' into 3.9-trunk
Conflicts:
share/html/Ticket/Elements/ShowSummary
diff --cc share/html/Elements/ShowCustomFields
index 6e3ea83,5b97ab9..3e8190a
--- a/share/html/Elements/ShowCustomFields
+++ b/share/html/Elements/ShowCustomFields
@@@ -83,12 -80,15 +83,16 @@@ $m->callback
CustomFields => $CustomFields,
);
+ # don't print anything if there is no custom fields
+ return unless $CustomFields->First;
+ $CustomFields->GotoFirstItem;
+
my $print_value = sub {
my ($cf, $value) = @_;
- my $linked = $cf->LinkValueTo;
- if ( $linked ) {
- $m->out('<a href="'. $value->LinkValueTo .'" target="_new">');
+ my $linked = $value->LinkValueTo;
+ if ( defined $linked && length $linked ) {
+ my $linked = $m->interp->apply_escapes( $linked, 'h' );
+ $m->out('<a href="'. $linked .'" target="_new">');
}
my $comp = "ShowCustomField". $cf->Type;
$m->callback(
diff --cc share/html/Ticket/Elements/ShowSummary
index 6d0871e,33f992a..363e1fa
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@@ -43,61 -43,70 +43,61 @@@
%# 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 }}}
- <table width="100%" class="ticket-summary">
- <tr>
- <td valign="top" class="boxcontainer">
- <&| /Widgets/TitleBox, title => loc('The Basics'),
- title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
- class => 'ticket-info-basics' &>
- <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
- </&>
-
- <&| /Widgets/TitleBox, title => loc('Custom Fields'),
- title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
- class => 'ticket-info-cfs',
- hide_empty => 1 &>
- <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
- </&>
-
- <&| /Widgets/TitleBox, title => loc('People'),
- title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id,
- class => 'ticket-info-people' &>
- <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
- </&>
-
- <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
-
- <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
+<table width="100%" class="ticket-summary">
+<tr>
+ <td valign="top" class="boxcontainer">
+% $m->callback( %ARGS, CallbackName => 'LeftColumnTop' );
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
+ (($can_modify || $can_modify_cf) ? (title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id) : ()),
+ class => 'ticket-info-basics',
+ &><& /Ticket/Elements/ShowBasics, Ticket => $Ticket &></&>
- % if ($Ticket->CustomFields->First) {
+ <&| /Widgets/TitleBox, title => loc('Custom Fields'),
+ (($can_modify || $can_modify_cf) ? (title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id) : ()),
+ class => 'ticket-info-cfs',
++ hide_empty => 1,
+ &><& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &></&>
- % }
+
+ <&| /Widgets/TitleBox, title => loc('People'),
+ (($can_modify || $can_modify_owner) ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id) : ()),
+ class => 'ticket-info-people',
+ &><& /Ticket/Elements/ShowPeople, Ticket => $Ticket &></&>
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
+ <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
% $m->callback( %ARGS, CallbackName => 'LeftColumn' );
- </td>
- <td valign="top" class="boxcontainer">
+ </td>
+ <td valign="top" class="boxcontainer">
+% $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
% if ( RT->Config->Get('EnableReminders') ) {
- <&|/Widgets/TitleBox, title => loc("Reminders"),
- title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id,
- class => 'ticket-info-reminders' &>
- <table>
- <tr>
- <td>
+ <&|/Widgets/TitleBox, title => loc("Reminders"),
+ title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id,
+ class => 'ticket-info-reminders',
+ &>
+ <table><tr><td>
<form action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
- <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &>
- <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div>
+ <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &>
+ <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div>
</form>
- </td>
- </tr>
- </table>
- </&>
+ </td></tr></table>
+ </&>
% }
- <&| /Widgets/TitleBox, title => loc("Dates"),
- title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id,
- class => 'ticket-info-dates' &>
- <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
- </&>
+ <&| /Widgets/TitleBox, title => loc("Dates"),
+ ($can_modify ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id) : ()),
+ class => 'ticket-info-dates',
+ &><& /Ticket/Elements/ShowDates, Ticket => $Ticket &></&>
% my (@extra);
% push @extra, titleright_raw => '<a href="'. RT->Config->Get('WebPath'). '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->Config->Get('DisableGraphViz');
- <&| /Widgets/TitleBox, title => loc('Links'),
- title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id,
- class => 'ticket-info-links', @extra &>
- <& /Elements/ShowLinks, Ticket => $Ticket &>
- </&>
+% $m->callback( %ARGS, CallbackName => 'LinksExtra', extra => \@extra );
+ <&| /Widgets/TitleBox, title => loc('Links'),
+ ($can_modify ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id) : ()),
+ class => 'ticket-info-links',
+ @extra,
+ &><& /Elements/ShowLinks, Ticket => $Ticket &></&>
% $m->callback( %ARGS, CallbackName => 'RightColumn' );
-
- </td>
- </tr>
- </table>
+ </td>
+</tr>
+</table>
<%ARGS>
$Ticket => undef
$Attachments => undef
diff --cc share/html/Widgets/TitleBox
index 3903d56,c7c7983..9906f3f
--- a/share/html/Widgets/TitleBox
+++ b/share/html/Widgets/TitleBox
@@@ -43,10 -43,10 +43,10 @@@
%# 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 }}}
<div class="<% $class %>">
- <& TitleBoxStart, %ARGS &><% $m->content | n %><& TitleBoxEnd &>
+ <& TitleBoxStart, %ARGS &><% $content | n %><& TitleBoxEnd &>
</div>
<%ARGS>
$class => ''
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list