Skip to content

Commit

Permalink
Fixes #937 - bug in which type of asset
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 25, 2015
1 parent 59b739c commit cf3619d
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions app/views/backend/users/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@
@foreach ($userlog as $log)
<tr>
<td class="text-center">
@if ($log->assetlog)
@if (($log->assetlog) && ($log->asset_type=="hardware"))
<i class="fa fa-barcode"></i>
@elseif ($log->accessorylog)
@elseif (($log->accessorylog) && ($log->asset_type=="accessory"))
<i class="fa fa-keyboard-o"></i>
@elseif ($log->consumablelog)
@elseif (($log->consumablelog) && ($log->asset_type=="consumable"))
<i class="fa fa-tint"></i>
@elseif ($log->licenselog)
@elseif (($log->licenselog) && ($log->asset_type=="software"))
<i class="fa fa-certificate"></i>
@else
<i class="fa fa-times"></i>
Expand All @@ -341,7 +341,9 @@
<td>{{{ $log->action_type }}}</td>
<td>

@if ($log->assetlog)
@if ($log->assetlog)

@if (($log->assetlog) && ($log->asset_type=="hardware"))

@if ($log->assetlog->deleted_at=='')
<a href="{{ route('view/hardware', $log->asset_id) }}">
Expand All @@ -351,22 +353,8 @@
<del>{{{ $log->assetlog->showAssetName() }}}</del> (deleted)
@endif

@elseif ($log->accessorylog)
@if ($log->accessorylog->deleted_at=='')
<a href="{{ route('view/accessory', $log->accessory_id) }}">{{{ $log->accessorylog->name }}}</a>
@else
<del>{{{ $log->accessorylog->name }}}</del> (deleted)
@endif

@elseif ($log->consumablelog)

@if ($log->consumablelog->deleted_at=='')
<a href="{{ route('view/consumable', $log->consumable_id) }}">{{{ $log->consumablelog->name }}}</a>
@else
<del>{{{ $log->consumablelog->name }}}</del> (deleted)
@endif
@elseif (($log->licenselog) && ($log->asset_type=="software"))

@elseif ($log->licenselog)
@if ($log->licenselog->deleted_at=='')
<a href="{{ route('view/license', $log->license_id) }}">
{{{ $log->licenselog->name }}}
Expand All @@ -375,10 +363,27 @@
<del>{{{ $log->licenselog->name }}}</del> (deleted)
@endif

@else
@lang('general.bad_data')
@elseif (($log->consumablelog) && ($log->asset_type=="consumable"))

@if ($log->consumablelog->deleted_at=='')
<a href="{{ route('view/consumable', $log->consumable_id) }}">{{{ $log->consumablelog->name }}}</a>
@else
<del>{{{ $log->consumablelog->name }}}</del> (deleted)
@endif

@elseif (($log->accessorylog) && ($log->asset_type=="accessory"))
@if ($log->accessorylog->deleted_at=='')
<a href="{{ route('view/accessory', $log->accessory_id) }}">{{{ $log->accessorylog->name }}}</a>
@else
<del>{{{ $log->accessorylog->name }}}</del> (deleted)
@endif

@else
@lang('general.bad_data')
@endif

@endif

</td>
<td>{{{ $log->adminlog->fullName() }}}</td>
</tr>
Expand Down

0 comments on commit cf3619d

Please sign in to comment.