123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- angular.module('luticate')
- .controller('UsersController', ['$scope', 'luticateAuthUsers', 'luticateAuthCache',
- function($scope, luticateAuthUsers, luticateAuthCache) {
-
- $scope.luTable = {
- columns: [
- {
- name: "Username",
- width: 3,
- getValue: function (item) {
- return item.Username;
- }
- }, {
- name: "Email",
- width: 3,
- getValue: function (item) {
- return item.Email;
- }
- }, {
- name: "Firstname",
- width: 3,
- getValue: function (item) {
- return item.Firstname;
- }
- }, {
- name: "Lastname",
- width: 3,
- getValue: function (item) {
- return item.Lastname;
- }
- }
- ],
-
- canAdd: 'LU_USER_ADD',
-
- canDel: 'LU_USER_DEL',
-
- canEdit: function()
- {
- return true;
- },
-
- getLoadPagePromise: function (page, perPage, query, promise) {
- return luticateAuthUsers.getAll({page: page, perPage: perPage, query: query}, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthUsers.del({user_id: id}, promise);
- },
-
- getEditController: function () {
- return "UserEdit";
- },
-
- perPage: luticateAuthCache.getEffectiveSettingValue("LU_USERS_PER_PAGE")
- };
- }]);
|