|
| 1 | +@extends('frontend/layouts/account') |
| 2 | + |
| 3 | +{{-- Page title --}} |
| 4 | +@section('title') |
| 5 | +View Assets for {{{ $user->fullName() }}} :: |
| 6 | +@parent |
| 7 | +@stop |
| 8 | + |
| 9 | +{{-- Account page content --}} |
| 10 | +@section('account-content') |
| 11 | + |
| 12 | +<div class="row profile"> |
| 13 | + <!-- header --> |
| 14 | + <div class="row header"> |
| 15 | + <div class="col-md-9"> |
| 16 | + <img src="{{{ $user->gravatar() }}}" class="avatar img-circle"> |
| 17 | + <h3 class="name">{{{ $user->fullName() }}}</h3> |
| 18 | + <span class="area">{{{ $user->jobtitle }}}</span> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + |
| 22 | + <div class="row profile"> |
| 23 | + |
| 24 | + <!-- bio, new note & orders column --> |
| 25 | + <div class="col-md-10 bio"> |
| 26 | + <div class="profile-box"> |
| 27 | + |
| 28 | + @if ($user->deleted_at != NULL) |
| 29 | + |
| 30 | + <div class="col-md-12"> |
| 31 | + <div class="alert alert-danger"> |
| 32 | + <i class="icon-exclamation-sign"></i> |
| 33 | + <strong>Warning: </strong> |
| 34 | + This user has been deleted. You will have to restore this user to edit them or assign them new assets. |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + |
| 38 | + @endif |
| 39 | + |
| 40 | + |
| 41 | + <!-- checked out assets table --> |
| 42 | + @if (count($user->assets) > 0) |
| 43 | + <h4>Assets Checked Out to You</h4> |
| 44 | + <br> |
| 45 | + <table class="table table-hover"> |
| 46 | + <thead> |
| 47 | + <tr> |
| 48 | + <th class="col-md-3">Asset Type</th> |
| 49 | + <th class="col-md-2"><span class="line"></span>Asset Tag</th> |
| 50 | + <th class="col-md-2"><span class="line"></span>Name</th> |
| 51 | + </tr> |
| 52 | + </thead> |
| 53 | + <tbody> |
| 54 | + @foreach ($user->assets as $asset) |
| 55 | + <tr> |
| 56 | + <td> |
| 57 | + @if ($asset->physical=='1') {{{ $asset->model->name }}} |
| 58 | + @endif |
| 59 | + </td> |
| 60 | + <td>{{{ $asset->asset_tag }}}</td> |
| 61 | + <td>{{{ $asset->name }}}</td> |
| 62 | + </tr> |
| 63 | + @endforeach |
| 64 | + </tbody> |
| 65 | + </table> |
| 66 | + @endif |
| 67 | + |
| 68 | + |
| 69 | + <!-- checked out assets table --> |
| 70 | + @if (count($user->licenses) > 0) |
| 71 | + <h4>Software Checked Out to You</h4> |
| 72 | + <br> |
| 73 | + <table class="table table-hover"> |
| 74 | + <thead> |
| 75 | + <tr> |
| 76 | + <th class="col-md-4"><span class="line"></span>Name</th> |
| 77 | + <th class="col-md-4"><span class="line"></span>Serial</th> |
| 78 | + |
| 79 | + </tr> |
| 80 | + </thead> |
| 81 | + <tbody> |
| 82 | + @foreach ($user->licenses as $license) |
| 83 | + <tr> |
| 84 | + <td>{{{ $license->name }}}</td> |
| 85 | + <td>{{{ $license->serial }}}</td> |
| 86 | + </td> |
| 87 | + </tr> |
| 88 | + @endforeach |
| 89 | + </tbody> |
| 90 | + </table> |
| 91 | + @endif |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + <!-- checked out assets table --> |
| 97 | + <h4>History </h4> |
| 98 | + <br> |
| 99 | + @if (count($user->userlog) > 0) |
| 100 | + <table class="table table-hover"> |
| 101 | + <thead> |
| 102 | + <tr> |
| 103 | + <th class="col-md-3">Date</th> |
| 104 | + <th class="col-md-3"><span class="line"></span>Action</th> |
| 105 | + <th class="col-md-3"><span class="line"></span>Asset</th> |
| 106 | + <th class="col-md-3"><span class="line"></span>By</th> |
| 107 | + </tr> |
| 108 | + </thead> |
| 109 | + <tbody> |
| 110 | + @foreach ($user->userlog as $log) |
| 111 | + <tr> |
| 112 | + <td>{{{ $log->added_on }}}</td> |
| 113 | + <td>{{{ $log->action_type }}}</td> |
| 114 | + <td> |
| 115 | + @if ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at=='')) |
| 116 | + {{{ $log->assetlog->asset_tag }}} |
| 117 | + @elseif ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at!='')) |
| 118 | + <del>{{{ $log->assetlog->name }}}</del> (deleted) |
| 119 | + @endif |
| 120 | + </td> |
| 121 | + <td>{{{ $log->adminlog->fullName() }}}</td> |
| 122 | + </tr> |
| 123 | + @endforeach |
| 124 | + </tbody> |
| 125 | + </table> |
| 126 | + @endif |
| 127 | + |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + |
| 131 | +@stop |
| 132 | + |
0 commit comments