Fixes #3092 - user location not being exported correctly

This commit is contained in:
snipe 2016-12-22 15:53:34 -08:00
parent 323c3807fa
commit 2fe984013b
4 changed files with 4 additions and 3 deletions

View file

@ -1250,7 +1250,7 @@ class UsersController extends Controller
$user->username,
$user->email,
($user->manager) ? $user->manager->fullName() : '',
($user->location) ? $user->location->name : '',
($user->userloc) ? $user->userloc->name : '',
$user->assets->count(),
$user->licenses->count(),
$user->accessories->count(),

View file

@ -287,6 +287,7 @@ return [
'Form' => 'Collective\Html\FormFacade',
'Html' => 'Collective\Html\HtmlFacade',
'Google2FA' => PragmaRX\Google2FA\Vendor\Laravel\Facade::class,
'Debugbar' => Barryvdh\Debugbar\Facade::class,
],

View file

@ -29,7 +29,7 @@
<a class="btn btn-default pull-right" href="{{ route('users.index', ['status' => 'deleted']) }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_deleted') }}</a>
@endif
@can('view', \App\Models\User::class)
<a class="btn btn-default pull-right" href="{{ url('admin/users/export') }}" style="margin-right: 5px;">Export</a>
<a class="btn btn-default pull-right" href="{{ route('users.export') }}" style="margin-right: 5px;">Export</a>
@endcan
@stop

View file

@ -7,7 +7,7 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['web','auth']], function ()
Route::post('ldap', 'UsersController@postLDAP');
Route::get('import', [ 'as' => 'import/user', 'uses' => 'UsersController@getImport' ]);
Route::post('import', [ 'uses' => 'UsersController@postImport' ]);
Route::get('export', [ 'uses' => 'UsersController@getExportUserCsv' ]);
Route::get('export', [ 'as' => 'users.export', 'uses' => 'UsersController@getExportUserCsv' ]);
Route::get('{userId}/clone', [ 'as' => 'clone/user', 'uses' => 'UsersController@getClone' ]);
Route::post('{userId}/clone', [ 'uses' => 'UsersController@postCreate' ]);
Route::get('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'UsersController@getRestore' ]);