[Rt-commit] rtir branch, 5.0-trunk, updated. 5.0.0-32-gaf4c18d1

Jim Brandt jbrandt at bestpractical.com
Mon Jan 11 16:35:52 EST 2021


The branch, 5.0-trunk has been updated
       via  af4c18d1354f8dbfc44fb6d3ef21a993cec0e36b (commit)
       via  b46556b60fa77a178664ec0a5fd75307d499062a (commit)
       via  0611b59e832e6ccfeb313c4865e3d06d07064567 (commit)
       via  ff01d4b88af24bbdd34ebeaa78b8365e6247470a (commit)
       via  55888211360406b114470b13b6d050f4c53c667b (commit)
      from  010b57200f739832911a0327401241c413177d00 (commit)

Summary of changes:
 docs/UPGRADING-5.0                                 |  14 ++
 etc/RTIR_Config.pm                                 |  21 ++
 html/RTIR/Display.html                             | 264 +++++++++++++++++----
 html/RTIR/Edit.html                                |   2 +-
 html/RTIR/Elements/AddWatchers                     |   3 +
 .../RTIR/Elements/{EditPeople => EditPeopleInline} | 109 +++++----
 html/RTIR/Elements/ShowIncidents                   |   3 +-
 html/RTIR/Incident/Display.html                    | 190 +++++++++++++--
 8 files changed, 485 insertions(+), 121 deletions(-)
 copy html/RTIR/Elements/{EditPeople => EditPeopleInline} (59%)

- Log -----------------------------------------------------------------
commit 0611b59e832e6ccfeb313c4865e3d06d07064567
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Nov 19 09:33:24 2020 -0500

    Add ARG for /RTIR/Elements/ShowIncidents to add classes when in a form
    
    When values are inside a form, the alignment of the label and value
    are adjusted with CSS. This means when we display the results of
    ShowIncidents during inline edit we need to add these CSS classes.
    
    This also fixes the alignment issue on the Edit.html page when showing
    no linked incidents (none).

diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index f2e515d8..401071b9 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -191,7 +191,7 @@
         <% loc("Incident") %>:
       </div>
       <div class="value col-9">
-        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket, InlineEdit => 0 &>
+        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket, InlineEdit => 0, InForm => 1 &>
       </div>
     </div>
     <div class="form-row">
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index 79f29037..ca179efe 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -133,7 +133,7 @@
         <%loc("Incident")%>:
       </div>
       <div class="value col-9">
-        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket, InlineEdit => 0 &>
+        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket, InlineEdit => 0, InForm => 1 &>
       </div>
     </div>
 % }
diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 69312785..e1a45e7b 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<span class="incidents">
+<span class="incidents <% $InForm ? 'current-value form-control' : '' %>">
 <& /RTIR/Search/Elements/ShowResults,
     Query         => $query,
     Rows          => 0,
@@ -111,4 +111,5 @@ if ( $show_unlink ) {
 <%ARGS>
 $Ticket => undef
 $InlineEdit => RT->Config->Get('InlineEdit', $session{CurrentUser})
+$InForm     => undef
 </%ARGS>

commit b46556b60fa77a178664ec0a5fd75307d499062a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jan 8 02:44:26 2021 +0800

    Document RTIR inline edit behavior

diff --git a/docs/UPGRADING-5.0 b/docs/UPGRADING-5.0
index 78b764c8..9a52392a 100644
--- a/docs/UPGRADING-5.0
+++ b/docs/UPGRADING-5.0
@@ -120,4 +120,18 @@ the create page.
 
 =back
 
+=head1 UPGRADING FROM RTIR 5.0.0 AND EARLIER
+
+=over 4
+
+=item *
+
+RTIR display pages now support inline edit, similar to the core RT feature.
+The configuration option C<%InlineEditPanelBehavior>, as documented in
+RT, allows you to set the edit behavior. To set different behavior for
+RTIR, you can use the key C<RTIR::Ticket> with the same format as that
+documented for C<RT::Ticket>.
+
+=back
+
 =cut
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 7cf91ead..50bb4d55 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -641,6 +641,27 @@ Set(%CustomFieldGroupings,
     ],
 );
 
+=item C<%InlineEditPanelBehavior>
+
+This configuration option is a core RT feature which accepts a
+custom key for RTIR. The options are the same as those documented
+in RT, but the key is C<RTIR::Ticket> as in this example:
+
+    Set(%InlineEditPanelBehavior,
+        'RTIR::Ticket' => {
+            '_default'          => 'click',
+
+            'Networking'        => 'link',
+            'Details'           => 'click',
+            'Dates'             => 'always',
+            'People'            => 'link',
+        },
+    );
+
+If no RTIR settings are defined, the settings for C<RT::Ticket>
+are used. See C<etc/RT_Config.pm> for more information about
+this configuration option.
+
 =item C<$RTIR_StrictDomainTLD>
 
 If true then RTIR will check if TLD is officially valid on domain

commit af4c18d1354f8dbfc44fb6d3ef21a993cec0e36b
Merge: 010b5720 b46556b6
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Jan 11 16:29:48 2021 -0500

    Merge branch '5.0/allow-inline-edit-on-ticket-display' into 5.0-trunk


-----------------------------------------------------------------------


More information about the rt-commit mailing list