Change table display based on filters

This commit is contained in:
snipe
2013-11-22 05:43:40 -05:00
parent 9249786a25
commit a356dbd73d
+30 -11
View File
@@ -40,8 +40,13 @@ Assets ::
<th class="span2">@lang('admin/assets/table.asset_tag')</th>
<th class="span2"><span class="line"></span>@lang('admin/assets/table.title')</th>
<th class="span2"><span class="line"></span>@lang('admin/assets/table.serial')</th>
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
<th class="span2"><span class="line"></span>Status</th>
@else
<th class="span2"><span class="line"></span>@lang('admin/assets/table.checkoutto')</th>
<th class="span2"><span class="line"></span>@lang('admin/assets/table.location')</th>
@endif
<th class="span1"><span class="line"></span>@lang('admin/assets/table.change')</th>
<th class="span2"><span class="line"></span>@lang('table.actions')</th>
</tr>
@@ -53,18 +58,32 @@ Assets ::
<td><a href="{{ route('view/asset', $asset->id) }}">{{ $asset->asset_tag }}</a></td>
<td><a href="{{ route('view/asset', $asset->id) }}">{{ $asset->name }}</a></td>
<td>{{ $asset->serial }}</td>
<td>
@if ($asset->assigneduser)
<a href="{{ route('view/user', $asset->assigned_to) }}">
{{ $asset->assigneduser->fullName() }}
</a>
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
<td>
@if (Input::get('Pending'))
Pending
@elseif (Input::get('RTD'))
Ready to Deploy
@elseif (Input::get('Undeployable'))
Undeployable
@endif
</td>
@else
<td>
@if ($asset->assigneduser)
<a href="{{ route('view/user', $asset->assigned_to) }}">
{{ $asset->assigneduser->fullName() }}
</a>
@endif
</td>
<td>
@if ($asset->assigneduser && $asset->assetloc)
{{ $asset->assetloc->name }}
@endif
</td>
@endif
</td>
<td>
@if ($asset->assigneduser && $asset->assetloc)
{{ $asset->assetloc->name }}
@endif
</td>
<td>
@if ($asset->assigned_to != 0)
<a href="{{ route('checkin/asset', $asset->id) }}" class="btn-flat info">Checkin</a>