[Rt-commit] rtir branch, 5.0/allow-inline-edit-on-ticket-display, repushed
Craig Kaiser
craig at bestpractical.com
Thu Nov 19 09:43:18 EST 2020
The branch 5.0/allow-inline-edit-on-ticket-display was deleted and repushed:
was 67a22c6753c2e02545a6ea5117c7bd022a7c499b
now d6e735d34ef9bb7a5b74feeddbd1288c710dfd7f
1: eb85c167 ! 1: 2ef5dd7f Add inline edit to RTIR Display.html page
@@ -27,11 +27,9 @@
+ title => loc("The Basics"),
title_href => RT::IR->HREFTo("Edit.html?id=".$Ticket->Id),
- class => 'ticket-info-basics',
-+ class => 'ticket-info-basics',
-+ data => { 'inline-edit-behavior' => 1 },
++ class => (join " ", 'ticket-info-basics', ($modify_behavior eq 'always' ? 'editing' : ())),
++ data => { 'inline-edit-behavior' => $modify_behavior },
+ (($can_modify || $can_modify_cf) && $modify_behavior =~ /^(link|click)$/ ? (titleright_raw => $modify_basics) : ()),
-+ class => (join " ", ($modify_behavior eq 'always' ? 'editing' : ())),
-+ data => { 'inline-edit-behavior' => $modify_behavior },
&>
- <div>
+% unless ($modify_behavior eq 'always') {
@@ -249,9 +247,9 @@
- class => 'ticket-info-people',
+ title => loc('People'),
+ title_href => RT->Config->Get('WebPath')."/RTIR/Edit.html?id=".$Ticket->Id,
-+ class => (join " ", 'ticket-info-people', ($people_behavior eq 'always' ? 'editing' : ())),
++ class => (join " ", 'ticket-info-people', ($people_behavior eq 'always' ? 'editing' : ())),
++ data => { 'inline-edit-behavior' => $people_behavior },
+ (($can_modify || $can_modify_people) && $people_behavior =~ /^(link|click)$/ ? (titleright_raw => $people_inline) : ()),
-+ data => { 'inline-edit-behavior' => $people_behavior },
&>
+
+% unless ($people_behavior eq 'always') {
@@ -273,19 +271,20 @@
</&>
- <&| /Widgets/TitleBox, title => loc("Dates"),
- title_href => RT::IR->HREFTo("Edit.html?id=". $Ticket->Id),
+- class => 'ticket-info-dates',
+
+<%PERL>
-+ my $dates_url = RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id;
-+ my $dates_inline = sprintf( $modify_inline, $m->interp->apply_escapes( $dates_url, 'h' ) );
++ my $dates_url = RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id;
++ my $dates_inline = sprintf( $modify_inline, $m->interp->apply_escapes( $dates_url, 'h' ) );
+ my $dates_behavior = $inline_edit_behavior{Dates} || $inline_edit_behavior{_default} || 'link';
+</%PERL>
+
+ <&| /Widgets/TitleBox,
+ title => loc("Dates"),
++ class => (join " ", 'ticket-info-dates', ($modify_behavior eq 'always' ? 'editing' : ())),
++ data => { 'inline-edit-behavior' => $dates_behavior },
+ ($can_modify ? (title_href => $dates_url) : ()),
- class => 'ticket-info-dates',
+ ($can_modify && $dates_behavior =~ /^(link|click)$/ ? (titleright_raw => $dates_inline) : ()),
-+ data => { 'inline-edit-behavior' => $dates_behavior },
&>
- <& /RTIR/Elements/ShowDates, Ticket => $Ticket &>
+% unless ($modify_behavior eq 'always') {
2: 67a22c67 ! 2: 82028fd6 Add inline edit to Incidents/Display.html page
@@ -10,32 +10,27 @@
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'LeftColumnStart' );
+<%PERL>
-+my $edit_label = $m->interp->apply_escapes( loc("Edit"), 'h' );
-+my $cancel_label = $m->interp->apply_escapes( loc("Cancel"), 'h' );
-+
-+my $modify_url = RT->Config->Get('WebPath')."/RTIR/Incident/Display.html?id=".$TicketObj->Id;
-+my $modify_inline
-+ = '<a class="inline-edit-toggle edit" href="%s">'
-+ . qq{<span class="fas fa-pencil-alt icon-bordered fa-2x" alt="$edit_label" data-toggle="tooltip" data-placement="top" data-original-title="$edit_label"></span>}
-+ . '</a>'
-+ . '<a class="inline-edit-toggle cancel hidden" href="#">'
-+ . qq{<span class="fas fa-times icon-bordered fa-2x" alt="$cancel_label" data-toggle="tooltip" data-placement="top" data-original-title="$cancel_label"></span>}
-+ . '</a>';
-+my $modify_basics = sprintf( $modify_inline, $m->interp->apply_escapes( $modify_url, 'h' ) );
-+my $modify_behavior = $inline_edit_behavior{Basics} || $inline_edit_behavior{_default} || 'link';
++ my $modify_url = RT->Config->Get('WebPath')."/RTIR/Incident/Display.html?id=".$TicketObj->Id;
++ my $modify_inline
++ = '<a class="inline-edit-toggle edit" href="%s">'
++ . qq{<span class="fas fa-pencil-alt icon-bordered fa-2x" alt="$edit_label" data-toggle="tooltip" data-placement="top" data-original-title="$edit_label"></span>}
++ . '</a>'
++ . '<a class="inline-edit-toggle cancel hidden" href="#">'
++ . qq{<span class="fas fa-times icon-bordered fa-2x" alt="$cancel_label" data-toggle="tooltip" data-placement="top" data-original-title="$cancel_label"></span>}
++ . '</a>';
++ my $modify_basics = sprintf( $modify_inline, $m->interp->apply_escapes( $modify_url, 'h' ) );
++ my $modify_behavior = $inline_edit_behavior{Basics} || $inline_edit_behavior{_default} || 'link';
+</%PERL>
+
<&| /Widgets/TitleBox,
- title => loc('Incident #[_1]', $id),
- title_href => RT::IR->HREFTo("Edit.html?id=".$id),
- class=> 'ticket-info-basics',
-+ title => loc('Incident #[_1]', $id),
++ title => loc('Incident #[_1]', $id),
+ title_href => RT::IR->HREFTo("Edit.html?id=".$TicketObj->Id),
-+ class => 'ticket-info-basics',
-+ data => { 'inline-edit-behavior' => 1 },
++ class => (join " ", 'ticket-info-basics', ($modify_behavior eq 'always' ? 'editing' : ())),
++ data => { 'inline-edit-behavior' => $modify_behavior },
+ (($can_modify || $can_modify_cf) && $modify_behavior =~ /^(link|click)$/ ? (titleright_raw => $modify_basics) : ()),
-+ class => (join " ", ($modify_behavior eq 'always' ? 'editing' : ())),
-+ data => { 'inline-edit-behavior' => $modify_behavior },
&>
- <div>
-% if (my $constituency = RT::IR->ConstituencyFor($TicketObj)) {
@@ -175,8 +170,8 @@
&>
+<%PERL>
-+ my $dates_url = RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$TicketObj->Id;
-+ my $dates_inline = sprintf( $modify_inline, $m->interp->apply_escapes( $dates_url, 'h' ) );
++ my $dates_url = RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$TicketObj->Id;
++ my $dates_inline = sprintf( $modify_inline, $m->interp->apply_escapes( $dates_url, 'h' ) );
+ my $dates_behavior = $inline_edit_behavior{Dates} || $inline_edit_behavior{_default} || 'link';
+</%PERL>
+
@@ -186,11 +181,11 @@
- class => 'ticket-info-dates',
-&>
-<& /RTIR/Elements/ShowDates, Ticket => $TicketObj &>
-+ title => loc("Dates"),
-+ title_href =>RT::IR->HREFTo("Edit.html?id=".$id),
-+ class => 'ticket-info-dates',
++ title => loc("Dates"),
++ title_href => RT::IR->HREFTo("Edit.html?id=".$id),
++ class => (join " ", 'ticket-info-dates', ($modify_behavior eq 'always' ? 'editing' : ())),
++ data => { 'inline-edit-behavior' => $dates_behavior },
+ ($can_modify && $dates_behavior =~ /^(link|click)$/ ? (titleright_raw => $dates_inline) : ()),
-+ data => { 'inline-edit-behavior' => $dates_behavior },
+ &>
+% unless ($modify_behavior eq 'always') {
+ <div class="inline-edit-display">
@@ -215,6 +210,8 @@
$TicketObj = LoadTicket( $id );
}
++my $edit_label = $m->interp->apply_escapes( loc("Edit"), 'h' );
++my $cancel_label = $m->interp->apply_escapes( loc("Cancel"), 'h' );
+
+my %inline_edit_behavior;
+if (RT->Config->Get('InlineEditPanelBehavior')) {
@@ -235,3 +232,4 @@
}
if ( $ARGS{'BulkLink'} || $Child ) {
+
-: ------- > 3: d6e735d3 Add ARG for /RTIR/Elements/ShowIncidents to add classes when in a form
More information about the rt-commit
mailing list