mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 23:19:42 -08:00
Merge branch 'develop'
This commit is contained in:
commit
99205bf72e
|
@ -180,6 +180,7 @@ class AssetPresenter extends Presenter
|
||||||
"sortable" => true,
|
"sortable" => true,
|
||||||
"visible" => false,
|
"visible" => false,
|
||||||
"title" => trans('general.notes'),
|
"title" => trans('general.notes'),
|
||||||
|
|
||||||
], [
|
], [
|
||||||
"field" => "created_at",
|
"field" => "created_at",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
|
|
|
@ -117,6 +117,7 @@ class LicensePresenter extends Presenter
|
||||||
"sortable" => true,
|
"sortable" => true,
|
||||||
"visible" => false,
|
"visible" => false,
|
||||||
"title" => trans('general.notes'),
|
"title" => trans('general.notes'),
|
||||||
|
"formatter" => "notesFormatter"
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<th class="text-right" data-searchable="true" data-visible="true" data-sortable="true" data-field="asset_maintenance_time" data-footer-formatter="sumFormatter">{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}</th>
|
<th class="text-right" data-searchable="true" data-visible="true" data-sortable="true" data-field="asset_maintenance_time" data-footer-formatter="sumFormatter">{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}</th>
|
||||||
<th data-searchable="true" data-sortable="true" data-field="cost" class="text-right" data-footer-formatter="sumFormatter">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
<th data-searchable="true" data-sortable="true" data-field="cost" class="text-right" data-footer-formatter="sumFormatter">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||||
<th data-searchable="true" data-visible="true" data-sortable="true" data-field="user_id" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
<th data-searchable="true" data-visible="true" data-sortable="true" data-field="user_id" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
||||||
<th data-searchable="true" data-visible="true" data-sortable="true" data-field="notes">{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
<th data-searchable="true" data-visible="true" data-sortable="true" data-field="notes" data-formatter="notesFormatter">{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
||||||
@can('update', \App\Models\Asset::class)
|
@can('update', \App\Models\Asset::class)
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="maintenanceActions">{{ trans('table.actions') }}</th>
|
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="maintenanceActions">{{ trans('table.actions') }}</th>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
|
@ -252,6 +252,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Convert line breaks to <br>
|
||||||
|
function notesFormatter(value) {
|
||||||
|
if (value) {
|
||||||
|
return value.replace(/(?:\r\n|\r|\n)/g, '<br />');;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// We need a special formatter for license seats, since they don't work exactly the same
|
// We need a special formatter for license seats, since they don't work exactly the same
|
||||||
// Checkouts need the license ID, checkins need the specific seat ID
|
// Checkouts need the license ID, checkins need the specific seat ID
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue