[Rt-commit] rt branch, 5.0/fix-find-user-component-width, updated. rt-5.0.0-8-g56430d0eff
Aaron Trevena
ast at bestpractical.com
Fri Aug 21 10:40:40 EDT 2020
The branch, 5.0/fix-find-user-component-width has been updated
via 56430d0eff901d30e1e0aae760de8a6754b47ee8 (commit)
from c712d57a138423e8279c123137536a6237854a07 (commit)
Summary of changes:
share/html/Elements/FindGroup | 2 +-
share/html/Elements/GotoGroup | 21 +++++++++++++++++++--
2 files changed, 20 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 56430d0eff901d30e1e0aae760de8a6754b47ee8
Author: Aaron Trevena <ast at bestpractical.com>
Date: Fri Aug 21 15:40:00 2020 +0100
Update Find a group component layout in sidebar
When the find group component was in a side bar the search field
was small and squashed, making it hard to use. Use new in_sidebar ARG
to style differently in a sidebar
diff --git a/share/html/Elements/FindGroup b/share/html/Elements/FindGroup
index 5d891e1e50..627c3629d6 100644
--- a/share/html/Elements/FindGroup
+++ b/share/html/Elements/FindGroup
@@ -46,5 +46,5 @@
%#
%# END BPS TAGGED BLOCK }}}
<&|/Widgets/TitleBox, title => loc('Find a group')&>
-<& /Elements/GotoGroup &>
+<& /Elements/GotoGroup, %ARGS &>
</&>
diff --git a/share/html/Elements/GotoGroup b/share/html/Elements/GotoGroup
index 7df1d1f2b8..9c9db7cb7b 100644
--- a/share/html/Elements/GotoGroup
+++ b/share/html/Elements/GotoGroup
@@ -55,14 +55,31 @@ jQuery(function(){
</script>
<form name="GroupSearch" method="post" action="<% RT->Config->Get('WebPath') %>/Group/Search.html">
<div class="form-row justify-content-center">
- <div class="col-4">
+ <div class="col-<% $ValueCols %>">
<input type="text" class="form-control" name="GroupString" value="<% $Default %>" data-autocomplete="Groups" data-autocomplete-return="Name" id="autocomplete-GroupString" />
</div>
+% if ($in_sidebar) {
+ </div>
+ <div class="form-row">
+ <div class="col-12">
+ <div class="submit">
+ <input type="submit" name="UserSearch" value="<&|/l&>Search</&>" class="button btn btn-primary form-control" />
+ </div>
+ </div>
+ </div>
+% }
+% else {
<div class="col-auto">
<input type="submit" name="GroupSearch" value="<&|/l&>Search</&>" class="form-control btn btn-primary button" />
</div>
- </div>
+</div>
+%}
</form>
<%ARGS>
$Default => ''
+$in_sidebar => 0
</%ARGS>
+<%INIT>
+my $ValueCols = ($in_sidebar) ? 12 : 4;
+</%INIT>
+
-----------------------------------------------------------------------
More information about the rt-commit
mailing list