Skip to content

Commit abd0acb

Browse files
committed
Add username to user's list view
1 parent 3719f9a commit abd0acb

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

app/config/version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
return array (
3-
'app_version' => 'v2.0-117',
4-
'hash_version' => 'v2.0-117-gc6b6ccc',
3+
'app_version' => 'v2.0-118',
4+
'hash_version' => 'v2.0-118-gf9dc576',
55
);

app/controllers/admin/UsersController.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,9 @@ public function getDatatable($status = null) {
876876
return '';
877877
}
878878
})
879+
->addColumn('username', function($users) {
880+
return $users->username;
881+
})
879882
->addColumn('manager', function($users) {
880883
if ($users->manager) {
881884
return '<a title="' . $users->manager->fullName() . '" href="users/' . $users->manager->id . '/view">' . $users->manager->fullName() . '</a>';
@@ -906,8 +909,8 @@ public function getDatatable($status = null) {
906909
return $group_names;
907910
})
908911
->addColumn($actions)
909-
->searchColumns('name', 'email', 'manager', 'activated', 'groups', 'location')
910-
->orderColumns('name', 'email', 'manager', 'activated', 'licenses', 'assets', 'accessories', 'consumables', 'groups', 'location')
912+
->searchColumns('name', 'email', 'username', 'manager', 'activated', 'groups', 'location')
913+
->orderColumns('name', 'email', 'username', 'manager', 'activated', 'licenses', 'assets', 'accessories', 'consumables', 'groups', 'location')
911914
->make();
912915
}
913916

@@ -1043,13 +1046,13 @@ public function getLDAP() {
10431046
// Selected permissions
10441047
$selectedPermissions = Input::old('permissions', array('superuser' => -1));
10451048
$this->encodePermissions($selectedPermissions);
1046-
1049+
10471050
$location_list = locationsList();
1048-
1051+
10491052
// Show the page
10501053
return View::make('backend/users/ldap', compact('groups', 'selectedGroups', 'permissions', 'selectedPermissions'))
10511054
->with('location_list', $location_list);
1052-
1055+
10531056
}
10541057

10551058
/**
@@ -1064,7 +1067,7 @@ public function getLDAP() {
10641067
'username' => 'required|min:2|unique:users,username',
10651068
'email' => 'email|unique:users,email',
10661069
);
1067-
1070+
10681071
/**
10691072
* Declare the rules for the form validation.
10701073
*
@@ -1083,14 +1086,14 @@ public function getLDAP() {
10831086
public function postLDAP() {
10841087

10851088
$location_id = Input::get('location_id');
1086-
1089+
10871090
$formValidator = Validator::make(Input::all(), $this->ldapFormInputValidationRules);
10881091
// If validation fails, we'll exit the operation now.
10891092
if ($formValidator->fails()) {
10901093
// Ooops.. something went wrong
10911094
return Redirect::back()->withInput()->withErrors($formValidator);
10921095
}
1093-
1096+
10941097
$ldap_version = Config::get('ldap.version');
10951098
$url = Config::get('ldap.url');
10961099
$username = Config::get('ldap.username');

app/views/backend/users/index.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
->addColumn('<div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div>',
4545
Lang::get('admin/users/table.name'),
4646
'<i class="fa fa-envelope fa-lg"></i>',
47+
Lang::get('admin/users/table.username'),
4748
Lang::get('admin/users/table.manager'),
4849
Lang::get('admin/users/table.location'),
4950
'<i class="fa fa-barcode fa-lg"></i>',

0 commit comments

Comments
 (0)