Skip to content

Commit 5979a18

Browse files
committed
Merge branch 'develop'
# Conflicts: # config/version.php
2 parents b934d2e + 5efb803 commit 5979a18

File tree

8 files changed

+71
-54
lines changed

8 files changed

+71
-54
lines changed

app/Http/Controllers/AssetsController.php

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,70 +1081,73 @@ public function postBulkEdit(Request $request)
10811081
* @internal param array $assets
10821082
* @since [v2.0]
10831083
*/
1084-
public function postBulkSave()
1084+
public function postBulkSave(Request $request)
10851085
{
10861086
$this->authorize('update', Asset::class);
1087-
if (Input::has('ids')) {
1088-
$assets = Input::get('ids');
1089-
if ((Input::has('purchase_date'))
1090-
|| (Input::has('purchase_cost'))
1091-
|| (Input::has('supplier_id'))
1092-
|| (Input::has('order_number'))
1093-
|| (Input::has('warranty_months'))
1094-
|| (Input::has('rtd_location_id'))
1095-
|| (Input::has('requestable'))
1096-
|| (Input::has('company_id'))
1097-
|| (Input::has('status_id'))
1098-
|| (Input::has('model_id'))
1087+
1088+
\Log::debug($request->input('ids'));
1089+
1090+
if (($request->has('ids')) && (count($request->input('ids') > 0))) {
1091+
$assets = $request->input('ids');
1092+
if (($request->has('purchase_date'))
1093+
|| ($request->has('purchase_cost'))
1094+
|| ($request->has('supplier_id'))
1095+
|| ($request->has('order_number'))
1096+
|| ($request->has('warranty_months'))
1097+
|| ($request->has('rtd_location_id'))
1098+
|| ($request->has('requestable'))
1099+
|| ($request->has('company_id'))
1100+
|| ($request->has('status_id'))
1101+
|| ($request->has('model_id'))
10991102
) {
11001103
foreach ($assets as $key => $value) {
11011104
$update_array = array();
11021105

1103-
if (Input::has('purchase_date')) {
1104-
$update_array['purchase_date'] = e(Input::get('purchase_date'));
1106+
if ($request->has('purchase_date')) {
1107+
$update_array['purchase_date'] = $request->input('purchase_date');
11051108
}
1106-
if (Input::has('purchase_cost')) {
1107-
$update_array['purchase_cost'] = Helper::ParseFloat(e(Input::get('purchase_cost')));
1109+
if ($request->has('purchase_cost')) {
1110+
$update_array['purchase_cost'] = Helper::ParseFloat($request->input('purchase_cost'));
11081111
}
1109-
if (Input::has('supplier_id')) {
1110-
$update_array['supplier_id'] = e(Input::get('supplier_id'));
1112+
if ($request->has('supplier_id')) {
1113+
$update_array['supplier_id'] = $request->input('supplier_id');
11111114
}
1112-
if (Input::has('model_id')) {
1113-
$update_array['model_id'] = e(Input::get('model_id'));
1115+
if ($request->has('model_id')) {
1116+
$update_array['model_id'] = $request->input('model_id');
11141117
}
1115-
if (Input::has('company_id')) {
1116-
if (Input::get('company_id')=="clear") {
1118+
if ($request->has('company_id')) {
1119+
if ($request->input('company_id')=="clear") {
11171120
$update_array['company_id'] = null;
11181121
} else {
1119-
$update_array['company_id'] = e(Input::get('company_id'));
1122+
$update_array['company_id'] = $request->input('company_id');
11201123
}
11211124
}
1122-
if (Input::has('order_number')) {
1123-
$update_array['order_number'] = e(Input::get('order_number'));
1125+
if ($request->has('order_number')) {
1126+
$update_array['order_number'] = $request->input('order_number');
11241127
}
1125-
if (Input::has('warranty_months')) {
1126-
$update_array['warranty_months'] = e(Input::get('warranty_months'));
1128+
if ($request->has('warranty_months')) {
1129+
$update_array['warranty_months'] = $request->input('warranty_months');
11271130
}
1128-
if (Input::has('rtd_location_id')) {
1129-
$update_array['rtd_location_id'] = e(Input::get('rtd_location_id'));
1131+
if ($request->has('rtd_location_id')) {
1132+
$update_array['rtd_location_id'] = $request->input('rtd_location_id');
11301133
}
1131-
if (Input::has('status_id')) {
1132-
$update_array['status_id'] = e(Input::get('status_id'));
1134+
if ($request->has('status_id')) {
1135+
$update_array['status_id'] = $request->input('status_id');
11331136
}
1134-
if (Input::has('requestable')) {
1135-
$update_array['requestable'] = e(Input::get('requestable'));
1137+
if ($request->has('requestable')) {
1138+
$update_array['requestable'] = $request->input('requestable');
11361139
}
11371140

11381141
DB::table('assets')
11391142
->where('id', $key)
11401143
->update($update_array);
11411144
} // endforeach
1142-
return redirect()->to("hardware")->with('success', trans('admin/hardware/message.update.success'));
1145+
return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.update.success'));
11431146
// no values given, nothing to update
11441147
}
1145-
return redirect()->to("hardware")->with('info', trans('admin/hardware/message.update.nothing_updated'));
1148+
return redirect()->route("hardware.index")->with('warning', trans('admin/hardware/message.update.nothing_updated'));
11461149
} // endif
1147-
return redirect()->to("hardware");
1150+
return redirect()->route("hardware.index")->with('warning', trans('No assets selected, so nothing was updated.'));
11481151
}
11491152

11501153
/**

app/Models/CustomField.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ public function db_column_name()
160160
public function getFormatAttribute($value)
161161
{
162162
foreach (self::$PredefinedFormats as $name => $pattern) {
163-
\Log::debug($name.'=>'.$pattern);
164163
if ($pattern === $value) {
165164
return $name;
166165
}

app/Presenters/LocationPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function viewUrl()
4040

4141
public function glyph()
4242
{
43-
return '<i class="fa fa-globe"></i>';
43+
return '<i class="fa fa-map-marker"></i>';
4444
}
4545

4646
public function fullName() {

app/Presenters/UserPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,6 @@ public function viewUrl()
352352

353353
public function glyph()
354354
{
355-
return '<i class="fa fa-users"></i>';
355+
return '<i class="fa fa-user"></i>';
356356
}
357357
}

config/version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
return array (
3-
'app_version' => 'v4.1.6-pre',
4-
'full_app_version' => 'v4.1.6-pre - build 2963-g83c8449',
3+
'app_version' => 'v4.1.6',
4+
'full_app_version' => 'v4.1.6 - build 2963-g83c8449',
55
'build_version' => '2963',
66
'prerelease_version' => '',
77
'hash_version' => 'g83c8449',
8-
'full_hash' => 'v4.1.5-57-g83c8449',
8+
'full_hash' => 'v4.1.5-76-gb934d2e',
99
'branch' => 'master',
1010
);

resources/views/hardware/bulk.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id'])
5353

5454
<!-- Default Location -->
55-
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'location_id'])
55+
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'rtd_location_id'])
5656

5757

5858
<!-- Purchase Cost -->

resources/views/hardware/view.blade.php

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,23 @@
8282
<tr>
8383
<td>{{ trans('general.status') }}</td>
8484
<td>
85-
@if ($asset->assetstatus->color)
86-
<span class="label label-default" style="background-color: {{ e($asset->assetstatus->color) }};">
87-
&nbsp; &nbsp;</span>
88-
</span>
85+
86+
@if (($asset->assignedTo) && ($asset->deleted_at==''))
87+
<i class="fa fa-circle text-blue"></i> {{ trans('general.deployed') }} <i class="fa fa-long-arrow-right" aria-hidden="true"></i> {!! $asset->assignedTo->present()->glyph() !!}
88+
{!! $asset->assignedTo->present()->nameUrl() !!}
89+
@else
90+
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
91+
<i class="fa fa-circle text-green"></i>
92+
@elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1'))
93+
<i class="fa fa-circle text-orange"></i>
94+
@elseif (($asset->assetstatus) && ($asset->assetstatus->archived=='1'))
95+
<i class="fa fa-times text-red"></i>
96+
@endif
97+
<a href="{{ route('statuslabels.show', $asset->assetstatus->id) }}">
98+
{{ $asset->assetstatus->name }}</a>
99+
<label class="label label-default">{{ $asset->present()->statusMeta }}</label>
100+
89101
@endif
90-
<a href="{{ route('statuslabels.show', $asset->assetstatus->id) }}">{{ $asset->assetstatus->name }}</a>
91-
<label class="label label-default">{{ $asset->present()->statusMeta }}</label>
92102
</td>
93103
</tr>
94104
@endif
@@ -233,9 +243,15 @@
233243
@endif
234244
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
235245

236-
@if ($asset->order_number)
237-
(Order #{{ $asset->order_number }})
238-
@endif
246+
247+
</td>
248+
</tr>
249+
@endif
250+
@if ($asset->order_number)
251+
<tr>
252+
<td>{{ trans('general.order_number') }}</td>
253+
<td>
254+
#{{ $asset->order_number }}
239255
</td>
240256
</tr>
241257
@endif

resources/views/partials/bootstrap-table.blade.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ function customFieldsFormatter(value, row) {
371371
return '<a href="mailto:' + row.custom_fields[field_column_plain].value + '">' + row.custom_fields[field_column_plain].value + '</a>';
372372
}
373373
}
374-
console.log('NOT a URL!');
375374
return row.custom_fields[field_column_plain].value;
376375
377376
}

0 commit comments

Comments
 (0)