File tree Expand file tree Collapse file tree 2 files changed +81
-8
lines changed
Expand file tree Collapse file tree 2 files changed +81
-8
lines changed Original file line number Diff line number Diff line change 9898}
9999
100100if (count ($ req_filtered ) > 0 ) {
101- echo "<h5>Pending Requests</h5> " ;
102- echo "<table> " ;
101+ echo "" ;
102+ echo "
103+ <h5>Pending Requests</h5>
104+ <table id='pi-request-table' class='stripe compact hover'>
105+ <thead>
106+ <tr>
107+ <th>Group Owner Name</th>
108+ <th>Group ID</th>
109+ <th>Group Owner Mail</th>
110+ <th>Requested On</th>
111+ <th>Actions</th>
112+ </tr>
113+ </thead>
114+ <tbody>
115+ " ;
103116 foreach ($ req_filtered as $ request ) {
104117 $ requested_account = new UnityGroup (
105118 $ request ["request_for " ],
127140 echo "</td> " ;
128141 echo "</tr> " ;
129142 }
143+ echo "</tbody> " ;
130144 echo "</table> " ;
131145
132146 if (count ($ PIGroupGIDs ) > 0 ) {
153167}
154168
155169echo "
156- <table id='pi-table'>
170+ <table id='pi-table' class='stripe compact hover' >
157171 <thead>
158172 <tr>
159173 <th>Name</th>
245259 }
246260 }
247261 );
262+ $('#pi-request-table').DataTable(
263+ {
264+ responsive: true,
265+ columns: [
266+ {responsivePriority: 1}, // owner name
267+ {responsivePriority: 2}, // gid
268+ {responsivePriority: 2}, // PI mail
269+ {responsivePriority: 2}, // requested on
270+ {responsivePriority: 1}, // actions
271+ ],
272+ layout: {
273+ topStart: {
274+ buttons: [
275+ {
276+ extend: 'colvis',
277+ columns: ':not(.noVis)',
278+ popoverTitle: 'Column visibility selector'
279+ }
280+ ]
281+ }
282+ }
283+ }
284+ );
248285 });
249286</script>
250287
Original file line number Diff line number Diff line change 8888 }
8989}
9090
91- echo "<h5>Users in Group</h5> " ;
92-
93- echo "<table> " ;
94-
91+ echo "
92+ <h5>Users in Group</h5>
93+ <table id='users-table' class='stripe compact hover'>
94+ <thead>
95+ <tr>
96+ <th>Actions</th>
97+ <th>Name</th>
98+ <th>Username</th>
99+ <th>Mail</th>
100+ </tr>
101+ </thead>
102+ <tbody>
103+ " ;
95104foreach ($ assocs as $ assoc ) {
96105 if ($ assoc ->uid == $ USER ->uid ) {
97106 continue ;
119128 echo "<td> " . $ assoc ->getMail () . "</td> " ;
120129 echo "</tr> " ;
121130}
122-
131+ echo " </tbody> " ;
123132echo "</table> " ;
124133?>
125134
135+ <script>
136+ $(document).ready(() => {
137+ $('#users-table').DataTable(
138+ {
139+ responsive: true,
140+ columns: [
141+ {responsivePriority: 1}, // actions
142+ {responsivePriority: 2}, // name
143+ {responsivePriority: 1}, // username
144+ {responsivePriority: 2}, // mail
145+ ],
146+ layout: {
147+ topStart: {
148+ buttons: [
149+ {
150+ extend: 'colvis',
151+ columns: ':not(.noVis)',
152+ popoverTitle: 'Column visibility selector'
153+ }
154+ ]
155+ }
156+ }
157+ }
158+ );
159+ });
160+ </script>
161+
126162<?php require $ LOC_FOOTER ; ?>
You can’t perform that action at this time.
0 commit comments