[Rt-commit] rt branch, 5.0/show-custom-fields-col-layout, created. rt-5.0.1-323-ga101dcdff5
? sunnavy
sunnavy at bestpractical.com
Tue Apr 27 16:25:11 EDT 2021
The branch, 5.0/show-custom-fields-col-layout has been created
at a101dcdff5b4ce51475143b7ae0cd27952c1b832 (commit)
- Log -----------------------------------------------------------------
commit a101dcdff5b4ce51475143b7ae0cd27952c1b832
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Apr 28 04:10:34 2021 +0800
Use 2/10 col layout for custom fields only in transaction display
47ef9ca815 updated custom fields col layout to make them look nicer in
transaction display, but the change affects other components, where the
default 3/9 is more proper. E.g. the "Custom Fields" widget in ticket
metadata, and also the case where custom fields are put into default
groups like "Basics", "People", etc., that use 3/9 layout.
This commit makes the col layout configurable so we can use 2/10 for
transaction display and keep using 3/9 by default.
diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields
index 676164a230..eff8fba8e3 100644
--- a/share/html/Elements/ShowCustomFields
+++ b/share/html/Elements/ShowCustomFields
@@ -66,12 +66,12 @@
% $m->callback( CallbackName => 'ModifyFieldClasses', CustomField => $CustomField,
% Object => $Object, Classes => \@classes, Grouping => $Grouping );
<div class="form-row <% join(' ', @classes) %>" id="CF-<%$CustomField->id%>-ShowRow">
- <div class="label col-2"><% $CustomField->Name %>:
+ <div class="label col-<% $LabelCols %>"><% $CustomField->Name %>:
% if ( $CustomField->EntryHint ) {
<span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<% $CustomField->EntryHint %>"></span>
% }
</div>
- <div class="value col-10 <% $count ? '' : ' no-value' %>">
+ <div class="value col-<% $ValueCols %> <% $count ? '' : ' no-value' %>">
<span class="current-value">
% unless ( $count ) {
<&|/l&>(no value)</&>
@@ -156,4 +156,6 @@ $CustomFields => $Object->CustomFields
$Grouping => undef
$Table => 1
$HideEmpty => 0
+$LabelCols => 3
+$ValueCols => 9
</%ARGS>
diff --git a/share/html/Elements/ShowTransaction b/share/html/Elements/ShowTransaction
index ce2556cae6..a90c767338 100644
--- a/share/html/Elements/ShowTransaction
+++ b/share/html/Elements/ShowTransaction
@@ -75,7 +75,7 @@
<div class="content">
<%PERL>
-$m->comp('/Elements/ShowCustomFields', Object => $Transaction, HideEmpty => 1 ) if $HasTxnCFs;
+$m->comp('/Elements/ShowCustomFields', Object => $Transaction, HideEmpty => 1, LabelCols => 2, ValueCols => 10 ) if $HasTxnCFs;
$m->comp(
'ShowTransactionAttachments',
%ARGS,
-----------------------------------------------------------------------
More information about the rt-commit
mailing list