Merge branch 'develop'

This commit is contained in:
snipe 2017-09-28 19:50:34 -07:00
commit cbdd05144a
4 changed files with 30 additions and 29 deletions

View file

@ -14,7 +14,7 @@ class XssProtectHeader
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
$mode = '1; mode=block'; $mode = '1;mode=block';
$response = $next($request); $response = $next($request);
$response->headers->set('X-XSS-Protection', $mode); $response->headers->set('X-XSS-Protection', $mode);
return $response; return $response;

View file

@ -1,2 +1,2 @@
User-agent: * User-agent: *
Disallow: Disallow: /

View file

@ -83,9 +83,8 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
@if ($snipeSettings->load_remote=='1') @if ($snipeSettings->load_remote=='1')
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js" integrity="sha384-qFIkRsVO/J5orlMvxK1sgAt2FXT67og+NyFTITYzvbIP1IJavVEKZM7YWczXkwpB" crossorigin="anonymous"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js" integrity="sha384-ZoaMbDF+4LeFxg6WdScQ9nnR1QC2MIRxA1O9KWEXQwns1G8UNyIEZIQidzb0T1fo" crossorigin="anonymous"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@else @else
<script src="{{ url(asset('js/html5shiv.js')) }}"></script> <script src="{{ url(asset('js/html5shiv.js')) }}"></script>

View file

@ -41,30 +41,32 @@
$totalCost = 0; $totalCost = 0;
?> ?>
@foreach ($assetMaintenances as $assetMaintenance) @foreach ($assetMaintenances as $assetMaintenance)
<tr> @if ($assetMaintenance->asset)
<td>{{ is_null($assetMaintenance->asset->company) ? '' : $assetMaintenance->asset->company->name }}</td> <tr>
<td>{{ $assetMaintenance->asset->asset_tag }}</td> <td>{{ ($assetMaintenance->asset->company) ? $assetMaintenance->asset->company->name : '' }}</td>
<td>{{ $assetMaintenance->asset->name }}</td> <td>{{ $assetMaintenance->asset->asset_tag }}</td>
<td>{{ $assetMaintenance->supplier->name }}</td> <td>{{ $assetMaintenance->asset->name }}</td>
<td>{{ $assetMaintenance->asset_maintenance_type }}</td> <td>{{ $assetMaintenance->supplier->name }}</td>
<td>{{ $assetMaintenance->title }}</td> <td>{{ $assetMaintenance->asset_maintenance_type }}</td>
<td>{{ $assetMaintenance->start_date }}</td> <td>{{ $assetMaintenance->title }}</td>
<td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td> <td>{{ $assetMaintenance->start_date }}</td>
@if (is_null($assetMaintenance->asset_maintenance_time)) <td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td>
<?php @if (is_null($assetMaintenance->asset_maintenance_time))
$assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date))); <?php
?> $assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date)));
@else ?>
<?php @else
$assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time); <?php
?> $assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time);
@endif ?>
<td>{{ $assetMaintenanceTime }}</td> @endif
<td> <td>{{ $assetMaintenanceTime }}</td>
{{ $snipeSettings->default_currency }} <td>
{{ number_format($assetMaintenance->cost,2) }} {{ $snipeSettings->default_currency }}
</td> {{ number_format($assetMaintenance->cost,2) }}
</tr> </td>
</tr>
@endif
<?php <?php
$totalDays += $assetMaintenanceTime; $totalDays += $assetMaintenanceTime;
$totalCost += floatval($assetMaintenance->cost); $totalCost += floatval($assetMaintenance->cost);