[Rt-commit] rt branch, 4.6/create-linked-ticket-style, created. rt-4.4.4-748-gcda913aa18

Jim Brandt jbrandt at bestpractical.com
Tue Feb 11 11:58:49 EST 2020


The branch, 4.6/create-linked-ticket-style has been created
        at  cda913aa18653a7a84ad46fcf1cc67be8e3e018e (commit)

- Log -----------------------------------------------------------------
commit 5f1f875b072114c0431837c5a22aa31cf3371c27
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Feb 11 11:44:02 2020 -0500

    Close container div before callback
    
    Previously all layout was done with tables, so the callback
    was positioned inside the table. Tables are no longer
    used for layout, so close the bootstrap container div
    before the callback to allow clean formatting inside
    the callback.

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 6c429f9a4d..4d3cbc04bf 100644
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<div>
+<div class="container">
 % for my $type (@display) {
   <div class="form-row <%$type%><% $clone{$type} || $Object->$type->Count ? q{} : q{ unset-field}%>">
     <div class="label col-md-3">
@@ -59,13 +59,11 @@
     </span></div>
   </div>
 % }
-
+</div>
 % # Allow people to add more rows to the table
 % $m->callback( %ARGS );
   <& /Elements/ShowCustomFields, Object => $Object, Grouping => 'Links', Table => 0 &>
 
-</div>
-
 % if ($Object->isa('RT::Ticket')) {
   <div class="form-row">
     <div class="col-md-12">

commit cda913aa18653a7a84ad46fcf1cc67be8e3e018e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Feb 11 11:48:38 2020 -0500

    Update layout and styling of create linked ticket
    
    Update the bootstrap styles to display the form elements
    in a single line. Also reposition the Create button at
    the end since the order of selecting options and clicking
    is more naturally left to right (for many languages).

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 4d3cbc04bf..87b0b065ba 100644
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -65,24 +65,35 @@
   <& /Elements/ShowCustomFields, Object => $Object, Grouping => 'Links', Table => 0 &>
 
 % if ($Object->isa('RT::Ticket')) {
+<div id="create-linked-ticket" class="container">
+  <form class="form-inline justify-content-center" action="<% RT->Config->Get('WebPath') ."/Helpers/SpawnLinkedTicket" %>" name="SpawnLinkedTicket">
   <div class="form-row">
-    <div class="col-md-12">
-      <form action="<% RT->Config->Get('WebPath') ."/Helpers/SpawnLinkedTicket" %>" name="SpawnLinkedTicket">
-        <input type="hidden" name="CloneTicket" value="<% $Object->id %>">
-        <input type="submit" value="<&|/l&>Create</&>" name="SpawnLinkedTicket" class="btn btn-primary">
-        <select name="LinkType" class="selectpicker">
-          <option value="DependsOn-new"><% loc('Depends on') %></option>
-          <option value="new-DependsOn"><% loc('Depended on by') %></option>
-          <option value="MemberOf-new"><% loc('Parents') %></option>
-          <option value="new-MemberOf"><% loc('Children') %></option>
-          <option value="RefersTo-new"><% loc('Refers to') %></option>
-          <option value="new-RefersTo"><% loc('Referred to by') %></option>
-        </select>
-        <&|/l&>Ticket in</&>
-        <& /Elements/SelectNewTicketQueue, Name => 'CloneQueue' &>
-      </form>
+    <input type="hidden" name="CloneTicket" value="<% $Object->id %>">
+    <div class="col-auto label">
+      <&|/l&>Create new</&>
+    </div>
+    <div class="col">
+      <select name="LinkType" class="selectpicker form-control">
+        <option value="DependsOn-new"><% loc('Depends on') %></option>
+        <option value="new-DependsOn"><% loc('Depended on by') %></option>
+        <option value="MemberOf-new"><% loc('Parents') %></option>
+        <option value="new-MemberOf"><% loc('Children') %></option>
+        <option value="RefersTo-new"><% loc('Refers to') %></option>
+        <option value="new-RefersTo"><% loc('Referred to by') %></option>
+      </select>
+    </div>
+    <div class="col-auto label">
+      <&|/l&>Ticket in</&>
+    </div>
+    <div class="col">
+      <& /Elements/SelectNewTicketQueue, Name => 'CloneQueue' &>
+    </div>
+    <div class="col">
+      <input type="submit" value="<&|/l&>Create</&>" name="SpawnLinkedTicket" class="form-control button btn mb-2 btn-primary">
     </div>
   </div>
+  </form>
+</div>
 % }
 <%INIT>
 my @display = qw(DependsOn DependedOnBy MemberOf Members RefersTo ReferredToBy);
diff --git a/share/static/css/elevator-light/ticket.css b/share/static/css/elevator-light/ticket.css
index 100891e72f..4925176040 100644
--- a/share/static/css/elevator-light/ticket.css
+++ b/share/static/css/elevator-light/ticket.css
@@ -148,3 +148,7 @@ ul.select-queue li a:visited {
 .ticket-merge-position {
     padding-left: 2em;
 }
+
+#create-linked-ticket {
+    padding-top: 15px;
+}

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


More information about the rt-commit mailing list