mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -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 = [];
|
$header = [];
|
||||||
|
|
||||||
|
if ($request->filled('id')) {
|
||||||
|
$header[] = trans('general.id');
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->filled('company')) {
|
if ($request->filled('company')) {
|
||||||
$header[] = trans('general.company');
|
$header[] = trans('general.company');
|
||||||
|
@ -568,6 +571,10 @@ class ReportsController extends Controller
|
||||||
$header[] = trans('general.notes');
|
$header[] = trans('general.notes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->filled('notes')) {
|
||||||
|
$header[] = trans('admin/manufacturers/table.url');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($customfields as $customfield) {
|
foreach ($customfields as $customfield) {
|
||||||
if ($request->input($customfield->db_column_name()) == '1') {
|
if ($request->input($customfield->db_column_name()) == '1') {
|
||||||
|
@ -663,6 +670,10 @@ class ReportsController extends Controller
|
||||||
$count++;
|
$count++;
|
||||||
$row = [];
|
$row = [];
|
||||||
|
|
||||||
|
if ($request->filled('id')) {
|
||||||
|
$row[] = ($asset->id) ? $asset->id : '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->filled('company')) {
|
if ($request->filled('company')) {
|
||||||
$row[] = ($asset->company) ? $asset->company->name : '';
|
$row[] = ($asset->company) ? $asset->company->name : '';
|
||||||
}
|
}
|
||||||
|
@ -834,6 +845,10 @@ class ReportsController extends Controller
|
||||||
$row[] = ($asset->notes) ? $asset->notes : '';
|
$row[] = ($asset->notes) ? $asset->notes : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->filled('url')) {
|
||||||
|
$row[] = config('app.url').'/hardware/'.$asset->id ;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($customfields as $customfield) {
|
foreach ($customfields as $customfield) {
|
||||||
$column_name = $customfield->db_column_name();
|
$column_name = $customfield->db_column_name();
|
||||||
if ($request->filled($customfield->db_column_name())) {
|
if ($request->filled($customfield->db_column_name())) {
|
||||||
|
|
|
@ -37,6 +37,12 @@
|
||||||
{{ trans('general.select_all') }}
|
{{ trans('general.select_all') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('company', '1', '1', ['class' => 'minimal']) }}
|
{{ Form::checkbox('company', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
@ -135,7 +141,6 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('status', '1', '1', ['class' => 'minimal']) }}
|
{{ Form::checkbox('status', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
@ -203,6 +208,12 @@
|
||||||
{{ trans('general.notes') }}
|
{{ trans('general.notes') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('url', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
- {{ trans('admin/manufacturers/table.url') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- User fields -->
|
<!-- User fields -->
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
|
|
Loading…
Reference in a new issue