mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed #8928 - add URL and ID to custom asset report
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f66df4d468
commit
637604dfaf
|
@ -422,6 +422,9 @@ class ReportsController extends Controller
|
|||
|
||||
$header = [];
|
||||
|
||||
if ($request->filled('id')) {
|
||||
$header[] = trans('general.id');
|
||||
}
|
||||
|
||||
if ($request->filled('company')) {
|
||||
$header[] = trans('general.company');
|
||||
|
@ -568,6 +571,10 @@ class ReportsController extends Controller
|
|||
$header[] = trans('general.notes');
|
||||
}
|
||||
|
||||
if ($request->filled('notes')) {
|
||||
$header[] = trans('admin/manufacturers/table.url');
|
||||
}
|
||||
|
||||
|
||||
foreach ($customfields as $customfield) {
|
||||
if ($request->input($customfield->db_column_name()) == '1') {
|
||||
|
@ -662,7 +669,11 @@ class ReportsController extends Controller
|
|||
foreach ($assets as $asset) {
|
||||
$count++;
|
||||
$row = [];
|
||||
|
||||
|
||||
if ($request->filled('id')) {
|
||||
$row[] = ($asset->id) ? $asset->id : '';
|
||||
}
|
||||
|
||||
if ($request->filled('company')) {
|
||||
$row[] = ($asset->company) ? $asset->company->name : '';
|
||||
}
|
||||
|
@ -834,6 +845,10 @@ class ReportsController extends Controller
|
|||
$row[] = ($asset->notes) ? $asset->notes : '';
|
||||
}
|
||||
|
||||
if ($request->filled('url')) {
|
||||
$row[] = config('app.url').'/hardware/'.$asset->id ;
|
||||
}
|
||||
|
||||
foreach ($customfields as $customfield) {
|
||||
$column_name = $customfield->db_column_name();
|
||||
if ($request->filled($customfield->db_column_name())) {
|
||||
|
|
|
@ -37,6 +37,12 @@
|
|||
{{ trans('general.select_all') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('id', '1', '1', ['class' => 'minimal']) }}
|
||||
{{ trans('general.id') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('company', '1', '1', ['class' => 'minimal']) }}
|
||||
|
@ -135,7 +141,6 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('status', '1', '1', ['class' => 'minimal']) }}
|
||||
|
@ -203,6 +208,12 @@
|
|||
{{ trans('general.notes') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('url', '1', '1', ['class' => 'minimal']) }}
|
||||
- {{ trans('admin/manufacturers/table.url') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- User fields -->
|
||||
<div class="checkbox col-md-12">
|
||||
|
|
Loading…
Reference in a new issue