[Rt-commit] rt branch, 4.6-themes/admin-groups-pages, created. rt-4.4.4-225-g18c14d4ab
Michel Rodriguez
michel at bestpractical.com
Fri May 17 07:21:51 EDT 2019
The branch, 4.6-themes/admin-groups-pages has been created
at 18c14d4ab64b132dffdea7caf5247161c25e2fc9 (commit)
- Log -----------------------------------------------------------------
commit 18c14d4ab64b132dffdea7caf5247161c25e2fc9
Author: michel <michel at bestpractical.com>
Date: Fri May 17 13:21:06 2019 +0200
Converted /Admin/Groups to the elevator theme
diff --git a/share/html/Admin/Elements/MembershipsPage b/share/html/Admin/Elements/MembershipsPage
index 43cb2fe16..3077ee713 100644
--- a/share/html/Admin/Elements/MembershipsPage
+++ b/share/html/Admin/Elements/MembershipsPage
@@ -52,7 +52,7 @@
<form method="post" action="">
<input type="hidden" id="<% $id %>" />
-<h2><&|/l&>Groups the principal is member of (check box to delete)</&></h2>
+<&| /Widgets/TitleBox, title => loc( 'Groups the principal is member of (check box to delete)'), width => "100%", color=> "#333399", class=> 'user-group-member' &>
<& /Elements/CollectionList,
OrderBy => 'Name',
@@ -65,8 +65,9 @@
AllowSorting => 1,
PassArguments => [qw(Format Rows Page Order OrderBy id)],
&>
+</&>
-<h2><&|/l&>Groups the principal is not member of (check box to add)</&></h2>
+<&| /Widgets/TitleBox, title => loc( 'Groups the principal is not member of (check box to add)'), width => "100%", color=> "#333399", class=> 'user-group-member' &>
<& /Elements/CollectionList,
OrderBy => 'Name',
@@ -79,6 +80,7 @@
AllowSorting => 1,
PassArguments => [qw(Format Rows Page Order OrderBy id)],
&>
+</&>
<& /Elements/Submit, Label => loc('Update'), Name => 'Update' &>
diff --git a/share/html/Admin/Groups/GroupRights.html b/share/html/Admin/Groups/GroupRights.html
index 671126818..543eb168b 100644
--- a/share/html/Admin/Groups/GroupRights.html
+++ b/share/html/Admin/Groups/GroupRights.html
@@ -49,11 +49,13 @@
<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
+<div class="card">
<form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
<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.
my @results = ProcessACLs(\%ARGS);
diff --git a/share/html/Admin/Groups/Members.html b/share/html/Admin/Groups/Members.html
index e52c44a6b..00406e856 100644
--- a/share/html/Admin/Groups/Members.html
+++ b/share/html/Admin/Groups/Members.html
@@ -49,28 +49,21 @@
<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
+<div class="myrt-row">
<form action="<% RT->Config->Get('WebPath') %>/Admin/Groups/Members.html" method="post">
<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
<&| /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="container-fluid">
+ <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 +71,46 @@ my @users = map {$_->[1]}
map { [$_->Format, $_] }
@{ $Users->ItemsArrayRef };
</%perl>
-<ul>
% 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;
+ <div class="form-row">
+ <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>
+ </div>
% }
-</ul>
-<&|/l&>Groups</&>
-<ul>
+
+ <h4><&|/l&>Groups</&></h4>
+
% 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;
+ <div class="form-row">
+ <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>
+ </div>
% }
-</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>
+
+ <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..8f9fb1db6 100644
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -60,38 +60,38 @@
<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<table>
- <tr>
- <td valign="top" class="boxcontainer">
+ <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="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 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..aeea5267d 100644
--- a/share/html/Admin/Groups/index.html
+++ b/share/html/Admin/Groups/index.html
@@ -47,54 +47,84 @@
%# 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">
+ <div class="boxcontainer">
+ <&| /Widgets/TitleBox, title => $caption &>
+ <input type="hidden" name="GroupField" value="Name" />
+ <input type="hidden" name="GroupOp" value="LIKE" />
+ <div class="form-row">
+ <div class="col-md-2 label">
+ <&|/l&>Go to group</&>
+ </div>
+ <div class="col-md-9 value">
+ <input type="text" name="GroupString" class="form-control" 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>
</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,
+
+ <div class="form-row">
+ <div class="col-md-2 label">
+ <&|/l&>Find groups whose</&>
+ </div>
+ <& /Elements/SelectGroups,
+ GroupField => $GroupField,
+ GroupOp => $GroupOp,
+ GroupString => $GroupString,
+ &>
+ </div>
+ <div class="form-row">
+ <div class="col-md-2 label">
+ <&|/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-2 label">
+ <&|/l&>And groups whose</&>
+ </div>
+ <& /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>
+ <div class="form-row">
+ <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 align="right"><input type="submit" class="form-control btn btn-primary button" name="Go" value="<&|/l&>Go!</&>" /></div>
</form>
% unless ( $Groups->Count ) {
<em><&|/l&>No groups matching search criteria found.</&></em>
% } else {
-<p><&|/l&>Select a group</&>:</p>
+ <div class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc( 'Select a group') &>
<& /Elements/CollectionList,
OrderBy => 'Name',
@@ -106,8 +136,12 @@ jQuery(function(){
AllowSorting => 1,
PassArguments => [qw(Format Rows Page Order OrderBy GroupString GroupOp GroupField GroupString2 GroupOp2 GroupField2 GroupString3 GroupOp3 GroupField3 FindDisabledGroups)],
&>
+ </&>
+ </div>
% }
+ </div>
+
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
$Groups->LimitToUserDefinedGroups();
-----------------------------------------------------------------------
More information about the rt-commit
mailing list