[Rt-commit] rt branch, 4.6-theme/admin-groups-pages, created. rt-4.4.4-225-g1b66219dd

Michel Rodriguez michel at bestpractical.com
Fri Jun 7 08:33:11 EDT 2019


The branch, 4.6-theme/admin-groups-pages has been created
        at  1b66219ddaa4564230aa3eeaccf7fb48af567c01 (commit)

- Log -----------------------------------------------------------------
commit 1b66219ddaa4564230aa3eeaccf7fb48af567c01
Author: michel <michel at bestpractical.com>
Date:   Fri May 17 13:21:06 2019 +0200

    Converted /Admin/Groups to the elevator theme
    Converted /Admin/Groups to the elevator theme

diff --git a/share/html/Admin/Elements/MembershipsPage b/share/html/Admin/Elements/MembershipsPage
index 43cb2fe16..e6044811f 100644
--- a/share/html/Admin/Elements/MembershipsPage
+++ b/share/html/Admin/Elements/MembershipsPage
@@ -66,7 +66,7 @@
     PassArguments => [qw(Format Rows Page Order OrderBy id)],
 &>
 
-<h2><&|/l&>Groups the principal is not member of (check box to add)</&></h2>
+<h2><&|/l&>Groups the principal is not member of (check box to delete)</&></h2>
 
 <& /Elements/CollectionList,
     OrderBy => 'Name',
diff --git a/share/html/Admin/Groups/Members.html b/share/html/Admin/Groups/Members.html
index e52c44a6b..3914e7569 100644
--- a/share/html/Admin/Groups/Members.html
+++ b/share/html/Admin/Groups/Members.html
@@ -54,23 +54,14 @@
 
 <&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Label) &>
 
-<table width="100%">
-<tr>
-<td>
-<h3><&|/l&>Current members</&></h3>
-</td>
-<td>
-<h3><&|/l&>Add members</&></h3>
-</td>
-</tr>
-
-<tr>
-<td valign="top">
+<div class="form-row">
+  <div class="col-md-6">
+    <h3><&|/l&>Current members</&></h3>
 
 % if ($Group->MembersObj->Count == 0 ) {
-<em><&|/l&>(No members)</&></em>
+      <em><&|/l&>(No members)</&></em>
 % } else {
-<&|/l&>Users</&>
+      <h4><&|/l&>Users</&></h4>
 % my $Users = $Group->UserMembersObj( Recursively => 0 );
 <%perl>
 my @users = map {$_->[1]}
@@ -78,33 +69,46 @@ my @users = map {$_->[1]}
             map { [$_->Format, $_] }
             @{ $Users->ItemsArrayRef };
 </%perl>
-<ul>
+      <ul class="list-group list-group-compact">
 % for my $user (@users) {
 % $UsersSeen{ $user->id } = 1 if $SkipSeenUsers;
-<li><input type="checkbox" class="checkbox" name="DeleteMember-<% $user->PrincipalObj->Id %>" value="1" />
-<& /Elements/ShowUser, User => $user &></li>
+% my $id= 'DeleteMember-' . $user->PrincipalObj->Id;
+        <li class="list-group-item">
+          <div class="custom-control custom-checkbox">
+            <input type="checkbox" class="checkbox custom-control-input" id="<% $id %>" name="<% $id %>" value="1" />
+            <label class="custom-control-label" for="<% $id %>"><& /Elements/ShowUser, User => $user &></label>
+          </div>
+        </li>
 % }
-</ul>
-<&|/l&>Groups</&>
-<ul>
+      </ul>
+      <h4><&|/l&>Groups</&></h4>
+      <ul class="list-group list-group-compact">
 % my $GroupMembers = $Group->MembersObj;
 % $GroupMembers->LimitToGroups();
 % while ( my $member = $GroupMembers->Next ) {
 % $GroupsSeen{ $member->MemberId } = 1 if $SkipSeenGroups;
-<li><input type="checkbox" class="checkbox" name="DeleteMember-<% $member->MemberId %>" value="1" />
-<a href="<% RT->Config->Get('WebPath') %>/Admin/Groups/Modify.html?id=<% $member->MemberObj->Object->id %>"><% $member->MemberObj->Object->Name %></a>
+% my $id= 'DeleteMember-' .  $member->MemberId;
+      <li class="list-group-item">
+        <div class="custom-control custom-checkbox">
+          <input type="checkbox" class="checkbox custom-control-input" id="<% $id%>" name="DeleteMember-<% $id%>" value="1" />
+          <label class="custom-control-label" for="<% $id %>">
+            <a href="<% RT->Config->Get('WebPath') %>/Admin/Groups/Modify.html?id=<% $member->MemberObj->Object->id %>"><% $member->MemberObj->Object->Name %></a>
+          </label>
+        </div>
+      </li>
 % }
-</ul>
+      </ul>
+      <em><&|/l&>(Check box to delete)</&></em>
 % }
-</td>
-<td valign="top">
-<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
-    SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &>
-</td>
-</tr>
-</table>
+
+    <div class="col-md-6"> 
+      <h3><&|/l&>Add members</&></h3>
+      <& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
+          SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &>
+    </div>
+  </div>
+</div>
 </&>
-<em><&|/l&>(Check box to delete)</&></em>
 <& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &>
 </form>
 
diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index 7b5e32a9d..e260bb7d0 100644
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -55,43 +55,47 @@
 <form action="<%RT->Config->Get('WebPath')%>/Admin/Groups/Modify.html" name="ModifyGroup" method="post" enctype="multipart/form-data">
 
 %unless ($Group->Id) {
-<input type="hidden" class="hidden" name="id" value="new" />
+  <input type="hidden" class="hidden" name="id" value="new" />
 % } else {
-<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+  <input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
 % }
 
-<table>
-  <tr>
-    <td valign="top" class="boxcontainer">
+  <div class="col-xl-6">
+    <div class="boxcontainer">
       <&| /Widgets/TitleBox, title => loc('Basics'), class => 'group-info-basics' &>
-        <table>
-          <tr>
-            <td align="right"><&|/l&>Name</&>:</td>
-            <td><input type="text" name="Name" value="<%$Group->Name||$Name||''%>" /></td>
-          </tr>
-          <tr>
-            <td align="right"><&|/l&>Description</&>:</td>
-            <td colspan="3"><input type="text" name="Description" value="<%$Group->Description||$Description||''%>" size="60" /></td>
-          </tr>
-          <& /Elements/EditCustomFields, Object => $Group, Grouping => 'Basics', InTable => 1 &>
-          <tr>
-            <td colspan="2">
-              <input type="hidden" class="hidden" name="SetEnabled" value="1" />
-              <input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
-              <label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this group)</&></label><br />
-            </td>
-          </tr>
-        </table>
-      </&>
-    </td>
-  </tr>
-  <tr>
-    <td>
+      <div class="form-row">
+        <div class="col-md-3 label">
+          <&|/l&>Name</&>:
+        </div>
+        <div class="col-md-9 value">
+          <input type="text" name="Name" class="form-control" value="<%$Group->Name||$Name||''%>" />
+        </div>
+      </div>
+      <div class="form-row">
+        <div class="col-md-3 label">
+          <&|/l&>Description</&>:
+        </div>
+        <div class="col-md-9 value">
+          <input type="text" name="Description" class="form-control" value="<%$Group->Description||$Description||''%>" size="60" />
+        </div>
+      </div>
+      <& /Elements/EditCustomFields, Object => $Group, Grouping => 'Basics', InTable => 1 &>
+      <div class="form-row">
+        <div class="value col-md-9 offset-md-3">
+          <div class="custom-control custom-checkbox">
+            <input type="hidden" class="hidden" name="SetEnabled" value="1" />
+            <input type="checkbox" id="Enabled" name="Enabled" class="custom-control-input" value="1" <%$EnabledChecked%> />
+            <label class="custom-control-label" for="Enabled"><&|/l&>Enabled (Unchecking this box disables this group)</&></label><br />
+          </div>
+        </div>
+      </div>
+    </div>
+    </&>
+    <div class="form-row">
       <& /Elements/EditCustomFieldCustomGroupings , Object => $Group, &>
-    </td>
-  </tr>
+    </div>
 % $m->callback( %ARGS, GroupObj => $Group, results => \@results );
-</table>
+  </div>
 
 % if ( $Create ) {
 <& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index 985912073..24968283d 100644
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -48,12 +48,13 @@
 <& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
 <& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
-
+<div class="card">
   <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
     <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
     <& /Admin/Elements/EditRights, Context => $GroupObj, Principals => \@principals &>
     <& /Elements/Submit, Label => loc('Save Changes') &>
   </form>
+</div>
 
 <%INIT>
 # Update the acls.
diff --git a/share/html/Admin/Groups/index.html b/share/html/Admin/Groups/index.html
index cef2ac9b9..123fba1d9 100644
--- a/share/html/Admin/Groups/index.html
+++ b/share/html/Admin/Groups/index.html
@@ -47,54 +47,98 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
+
 <h1><% $caption %></h1>
 
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Groups/index.html">
-<input type="hidden" name="GroupField" value="Name" />
-<input type="hidden" name="GroupOp" value="LIKE" />
-<&|/l&>Go to group</&>
-<input type="text" name="GroupString" value="" data-autocomplete="Groups" id="autocomplete-GroupString" />
-<script type="text/javascript">
-jQuery(function(){
-    // Jump directly to the page if a group is chosen
-    jQuery("#autocomplete-GroupString").on("autocompleteselect", function( event, ui ) {
-        document.location = RT.Config.WebPath + "/Admin/Groups/Modify.html?id=" + ui.item.id;
+  <input type="hidden" name="GroupField" value="Name" />
+  <input type="hidden" name="GroupOp" value="LIKE" />
+  <div class="row">
+    <div class="col-xl-6">
+
+      <div class="form-row">
+        <div class="col-md-3 label text-left">
+          <&|/l&>Go to group</&>
+        </div>
+        <div class="col-md-3 value">
+          <input type="text" class="form-control" name="GroupString" value="" data-autocomplete="Groups" id="autocomplete-GroupString" />
+          <script type="text/javascript">
+    jQuery(function(){
+        // Jump directly to the page if a group is chosen
+        jQuery("#autocomplete-GroupString").on("autocompleteselect", function( event, ui ) {
+            document.location = RT.Config.WebPath + "/Admin/Groups/Modify.html?id=" + ui.item.id;
+        });
     });
-});
-</script>
+          </script>
+        </div>
+      </div>
+    </div>
+  </div>
 </form>
 
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Groups/index.html" name="GroupsAdmin">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups,
-        GroupField      => $GroupField,
-        GroupOp         => $GroupOp,
-        GroupString     => $GroupString,
-&><br />
-<&|/l&>And groups whose</&> <& /Elements/SelectGroups,
-        SelectFieldName => 'GroupField2',
-        SelectOpName    => 'GroupOp2',
-        InputStringName => 'GroupString2',
-        GroupField      => $GroupField2,
-        GroupOp         => $GroupOp2,
-        GroupString     => $GroupString2,
-&><br />
-<&|/l&>And groups whose</&> <& /Elements/SelectGroups,
-        SelectFieldName => 'GroupField3',
-        SelectOpName    => 'GroupOp3',
-        InputStringName => 'GroupString3',
-        GroupField      => $GroupField3,
-        GroupOp         => $GroupOp3,
-        GroupString     => $GroupString3,
-&><br />
-<input type="checkbox" class="checkbox" id="FindDisabledGroups" name="FindDisabledGroups" value="1" <% $FindDisabledGroups? 'checked="checked"': '' |n %> />
-<label for="FindDisabledGroups"><&|/l&>Include disabled groups in listing.</&></label><br />
-<div align="right"><input type="submit" class="button" name="Go" value="<&|/l&>Go!</&>" /></div>
+
+  <div class="row">
+    <div class="col-xl-6">
+
+      <div class="form-row">
+        <div class="col-md-3 label text-left">
+          <&|/l&>Find groups whose</&> 
+        </div>
+        <& /Elements/SelectGroups,
+               GroupField      => $GroupField,
+               GroupOp         => $GroupOp,
+               GroupString     => $GroupString,
+        &>
+      </div>
+      <div class="form-row">
+        <div class="col-md-3 label text-left">
+          <&|/l&>And groups whose</&>
+        </div>
+          <& /Elements/SelectGroups,
+               SelectFieldName => 'GroupField2',
+               SelectOpName    => 'GroupOp2',
+               InputStringName => 'GroupString2',
+               GroupField      => $GroupField2,
+               GroupOp         => $GroupOp2,
+               GroupString     => $GroupString2,
+          &>
+      </div>
+      <div class="form-row">
+        <div class="col-md-3 label text-left">
+          <&|/l&>And groups whose</&>
+        </div>
+        <& /Elements/SelectGroups,
+          SelectFieldName => 'GroupField3',
+          SelectOpName    => 'GroupOp3',
+          InputStringName => 'GroupString3',
+          GroupField      => $GroupField3,
+          GroupOp         => $GroupOp3,
+          GroupString     => $GroupString3,
+        &>
+      </div>
+      <div class="form-row">
+        <div class="col-md-12">
+          <div class="custom-control custom-checkbox">
+            <input type="checkbox" class="checkbox custom-control-input" id="FindDisabledGroups" name="FindDisabledGroups" value="1" <% $FindDisabledGroups? 'checked="checked"': '' |n %> />
+            <label class="custom-control-label" for="FindDisabledGroups"><&|/l&>Include disabled groups in listing.</&></label><br />
+          </div>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="col-md-12 text-right">
+          <input type="submit" class="form-control btn btn-primary button" name="Go" value="<&|/l&>Go!</&>" />
+        </div>
+      </div>
+    </div>
+  </div>
 </form>
 
 % unless ( $Groups->Count ) {
 <em><&|/l&>No groups matching search criteria found.</&></em>
 % } else {
-<p><&|/l&>Select a group</&>:</p>
+  <p<&|/l&>Select a group</&></p>
 
 <& /Elements/CollectionList,
     OrderBy => 'Name',

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


More information about the rt-commit mailing list