add state to list users

This commit is contained in:
Usman Nasir
2020-01-21 00:44:56 +05:00
parent 6214586eec
commit 732e362d06
3 changed files with 14 additions and 1 deletions

View File

@@ -1685,6 +1685,10 @@ app.controller('listTableUsers', function ($scope, $http) {
};
$scope.controlUserState = function (state) {
alert(state);
}
});

View File

@@ -34,6 +34,7 @@
<th>{% trans "Disk Usage" %}</th>
<th>{% trans "ACL" %}</th>
<th>{% trans "Owner" %}</th>
<th>{% trans "State" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
@@ -44,7 +45,14 @@
<td ng-bind="record.diskUsage"></td>
<td ng-bind="record.acl"></td>
<td ng-bind="record.owner"></td>
<td ng-bind="record.state"></td>
<td>
<a ng-show="record.state=='ACTIVE'"
class="btn btn-border btn-alt border-red btn-link font-red" href="#"
ng-click="controlUserState('SUSPEND')" title=""><span>{% trans 'Suspend' %}</span></a>
<a ng-show="record.state=='SUSPENDED'"
class="btn btn-border btn-alt border-green btn-link font-green" href="#"
ng-click="controlUserState('ACTIVATE')" title=""><span>{% trans 'Activate' %}</span></a>
<a data-toggle="modal" data-target="#settings"
ng-click="editInitial(record.name)"
class="btn btn-border btn-alt border-purple btn-link font-purple" href="#"

View File

@@ -989,7 +989,8 @@ def fetchTableUsers(request):
'owner': owner.userName,
'acl': items.acl.name,
'diskUsage': '%sMB' % str(diskUsage),
'websites': items.initWebsitesLimit
'websites': items.initWebsitesLimit,
'state': items.state
}
if checker == 0: