mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
a75fc8af7e
|
@ -188,7 +188,7 @@ class UsersController extends Controller
|
|||
$users = $users->OrderDepartment($order);
|
||||
break;
|
||||
case 'created_by':
|
||||
$users = $users->CreatedBy($order);
|
||||
$users = $users->OrderByCreatedBy($order);
|
||||
break;
|
||||
case 'company':
|
||||
$users = $users->OrderCompany($order);
|
||||
|
|
|
@ -705,7 +705,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeCreatedBy($query, $order)
|
||||
public function scopeOrderByCreatedBy($query, $order)
|
||||
{
|
||||
// Left join here, or it will only return results with parents
|
||||
return $query->leftJoin('users as admin_user', 'users.created_by', '=', 'admin_user.id')
|
||||
|
|
|
@ -289,7 +289,7 @@ class UserPresenter extends Presenter
|
|||
'field' => 'created_by',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.admin'),
|
||||
'title' => trans('general.created_by'),
|
||||
'visible' => false,
|
||||
'formatter' => 'usersLinkObjFormatter',
|
||||
],
|
||||
|
|
|
@ -65,7 +65,8 @@ return [
|
|||
'create' => 'Create New',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'created asset',
|
||||
'created_at' => 'Created at',
|
||||
'created_at' => 'Created At',
|
||||
'created_by' => 'Created By',
|
||||
'record_created' => 'Record Created',
|
||||
'updated_at' => 'Updated at',
|
||||
'currency' => '$', // this is deprecated
|
||||
|
|
|
@ -465,7 +465,7 @@
|
|||
{{ \App\Helpers\Helper::getFormattedDateObject($user->created_at, 'datetime')['formatted']}}
|
||||
|
||||
@if ($user->createdBy)
|
||||
by
|
||||
-
|
||||
@if ($user->createdBy->deleted_at=='')
|
||||
<a href="{{ route('users.show', ['user' => $user->created_by]) }}">{{ $user->createdBy->present()->fullName }}</a>
|
||||
@else
|
||||
|
|
Loading…
Reference in a new issue