[Rt-commit] rt branch, 4.6/align-merge-box, created. rt-4.4.4-715-gcbb462ef7d
Michel Rodriguez
michel at bestpractical.com
Wed Jan 22 15:46:21 EST 2020
The branch, 4.6/align-merge-box has been created
at cbb462ef7d2c0ea157c6744cf5bc964045021160 (commit)
- Log -----------------------------------------------------------------
commit cbb462ef7d2c0ea157c6744cf5bc964045021160
Author: michel <michel at bestpractical.com>
Date: Wed Jan 22 21:44:32 2020 +0100
Add WideMode parameter to display ticket merge row in full-width context.
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 3893341819..65dfb33eb4 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -360,7 +360,7 @@ $cfs->SetContextObject( values %$seen_queues ) if keys %$seen_queues == 1;
</&>
<&| /Widgets/TitleBox, title => loc('Merge'), color => '#336633' &>
-<& /Ticket/Elements/EditMerge, Tickets => $Tickets, %ARGS &>
+<& /Ticket/Elements/EditMerge, Tickets => $Tickets, WideMode => 1, %ARGS &>
</&>
<div class="form-row">
diff --git a/share/html/Ticket/Elements/EditMerge b/share/html/Ticket/Elements/EditMerge
index 99290bd9fa..033c9d5dac 100644
--- a/share/html/Ticket/Elements/EditMerge
+++ b/share/html/Ticket/Elements/EditMerge
@@ -51,8 +51,8 @@
<div>
<div class="form-row">
- <div class="label col-md-3"><&|/l&>Merge into</&>:</div>
- <div class="value col-md-9"><input type="text" class="form-control" name="<% $Name %>" value="<% $Default || '' %>" data-autocomplete="Tickets" data-autocomplete-exclude="<% join( ' ', @excludes) || '' %>" /></div>
+ <div class="<% $label_class %>"><&|/l&>Merge into</&>:</div>
+ <div class="<% $input_class %>"><input type="text" class="form-control" name="<% $Name %>" value="<% $Default || '' %>" data-autocomplete="Tickets" data-autocomplete-exclude="<% join( ' ', @excludes) || '' %>" /></div>
</div>
</div>
@@ -69,6 +69,7 @@ elsif ( $Tickets ) {
}
}
$Default ||= $ARGS{$Name};
+my ( $label_class, $input_class ) = $WideMode ? ( 'col-md-1', 'value col-md-11' ) : ( 'label col-md-3', 'value col-md-9' );
</%INIT>
<%ARGS>
@@ -76,4 +77,6 @@ $Ticket => undef
$Tickets => undef
$Name => ''
$Default => ''
+# alignments change depending on whether the widget is displayed full-width or half-width (under the other link boxes)
+$WideMode => 0
</%ARGS>
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 0a2ce9cabd..140e4ad7fa 100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -88,7 +88,7 @@
<br />
<&| /Widgets/TitleBox, title => loc('Merge'), class=>'ticket-info-merge' &>
-<& Elements/EditMerge, Ticket => $Ticket, %ARGS &>
+<& Elements/EditMerge, Ticket => $Ticket, WideMode => 1, %ARGS &>
</&>
<br />
diff --git a/share/html/Ticket/ModifyLinks.html b/share/html/Ticket/ModifyLinks.html
index 4361deeaa5..3c45ff8caf 100644
--- a/share/html/Ticket/ModifyLinks.html
+++ b/share/html/Ticket/ModifyLinks.html
@@ -62,7 +62,7 @@
</&>
<&| /Widgets/TitleBox, title => loc('Merge'), class=>'ticket-info-merge' &>
-<& Elements/EditMerge, Ticket => $Ticket, %ARGS &>
+<& Elements/EditMerge, Ticket => $Ticket, WideMode => 1, %ARGS &>
</&>
<& /Elements/Submit, Name => 'SubmitTicket', Label => loc('Save Changes') &>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list