diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 101cfe1fa6..e59c5cea78 100644 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -273,7 +273,7 @@ class AssetsController extends AdminController { // Redirect to the asset management page with error - return Redirect::to("assets/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error')); + return Redirect::to("hardware/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error')); } @@ -386,7 +386,7 @@ class AssetsController extends AdminController { } // Redirect to the asset management page with error - return Redirect::to("assets/$assetId/checkout")->with('error', Lang::get('admin/hardware/message.checkout.error')); + return Redirect::to("hardware/$assetId/checkout")->with('error', Lang::get('admin/hardware/message.checkout.error')); } diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index 038c104bfc..dbc82ce7d5 100644 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -45,7 +45,7 @@ class ModelsController extends AdminController { $view->with('category_list',$category_list); $view->with('depreciation_list',$depreciation_list); $view->with('manufacturer_list',$manufacturer_list); - $view->with('model',new Model); + $view->with('model',new Model); return $view; } @@ -156,7 +156,7 @@ class ModelsController extends AdminController { if($model->save()) { // Redirect to the new model page - return Redirect::to("assets/models/$modelId/edit")->with('success', Lang::get('admin/models/message.update.success')); + return Redirect::to("hardware/models/$modelId/edit")->with('success', Lang::get('admin/models/message.update.success')); } } else @@ -167,7 +167,7 @@ class ModelsController extends AdminController { } // Redirect to the model create page - return Redirect::to("assets/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error')); + return Redirect::to("hardware/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error')); } @@ -183,19 +183,19 @@ class ModelsController extends AdminController { if (is_null($model = Model::find($modelId))) { // Redirect to the blogs management page - return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.not_found')); + return Redirect::to('hardware/models')->with('error', Lang::get('admin/models/message.not_found')); } if ($model->assets->count() > 0) { // Throw an error that this model is associated with assets - return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.assoc_users')); + return Redirect::to('hardware/models')->with('error', Lang::get('admin/models/message.assoc_users')); } else { // Delete the model $model->delete(); // Redirect to the models management page - return Redirect::to('assets/models')->with('success', Lang::get('admin/models/message.delete.success')); + return Redirect::to('hardware/models')->with('success', Lang::get('admin/models/message.delete.success')); } } diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index 2a1dbe4a23..0e863ea24f 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -117,16 +117,6 @@ - -
- -
- {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $asset->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {{ $errors->first('depreciation_id', ' :message') }} -
-
- -
diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index 7611405eb3..8da1a4ec77 100644 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -8,201 +8,203 @@ View Asset {{ $asset->asset_tag }} :: {{-- Page content --}} @section('content') -
- -

History for {{ $asset->asset_tag }} ({{ $asset->name }}) -
- - -

-
- -
-
+ @if ($asset->status_id == 1) + @if ($asset->assigned_to != 0) +
  • Checkin
  • + @endif + @elseif ($asset->status_id == 0) +
  • Checkout
  • + @endif +
  • Edit Asset
  • +
  • Clone Asset
  • + +
    +

    +

    History for {{ $asset->asset_tag }} ({{ $asset->name }}) +

    +
    +
    - -
    -
    + - - -
    - - @if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0))) -

    Checked Out To:
    -
      - -


    • -
    • {{ $asset->assigneduser->fullName() }}
    • + + + + + + + + + + + + + @if (count($asset->assetlog) > 0) + @foreach ($asset->assetlog as $log) + + + + + + + + + @endforeach + @endif + + + + + + + + + +
      DateAdminActionUserNote
      + @if ((isset($log->checkedout_to)) && ($log->checkedout_to == $asset->assigned_to)) + + @endif + {{ $log->added_on }} + @if (isset($log->user_id)) + {{ $log->adminlog->fullName() }} + @endif + {{ $log->action_type }} + @if (isset($log->checkedout_to)) + + {{ $log->userlog->fullName() }} + + @endif + + @if ($log->note) + {{ $log->note }} + @endif +
      {{ $asset->created_at }} + @if ($asset->adminuser->id) + {{ $asset->adminuser->fullName() }} + @else + Unknown Admin + @endif + created asset
      - @if (isset($asset->assetloc->address)) -
    • {{ $asset->assetloc->address }} - @if (isset($asset->assetloc->address2)) - {{ $asset->assetloc->address2 }} - @endif -
    • - @if (isset($asset->assetloc->city)) -
    • {{ $asset->assetloc->city }}, {{ $asset->assetloc->state }} {{ $asset->assetloc->zip }}
    • - @endif +
    - @endif + +
    - @if (isset($asset->assigneduser->email)) -

  • {{ $asset->assigneduser->email }}
  • - @endif + @if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0))) +

    Checked Out To:
    + - @elseif (($asset->status_id ) && ($asset->status_id > 1)) + @if (isset($asset->assetloc->address)) +
  • {{ $asset->assetloc->address }} + @if (isset($asset->assetloc->address2)) + {{ $asset->assetloc->address2 }} + @endif +
  • + @if (isset($asset->assetloc->city)) +
  • {{ $asset->assetloc->city }}, {{ $asset->assetloc->state }} {{ $asset->assetloc->zip }}
  • + @endif - @if ($asset->assetstatus) -

    {{ $asset->assetstatus->name }} Asset
    + @endif -
    -
    - - Warning: This asset has been marked {{ $asset->assetstatus->name }} and is currently undeployable. - If this status has changed, please update the asset status. -
    -
    - @endif + @if (isset($asset->assigneduser->email)) +

  • {{ $asset->assigneduser->email }}
  • + @endif - @elseif ($asset->status_id == NULL) -

    Pending Asset
    -
    -
    - - Warning: This asset has been marked as pending and is currently undeployable. - If this status has changed, please update the asset status. -
    -
    + @if (isset($asset->assigneduser->phone)) +
  • {{ $asset->assigneduser->phone }}
  • + @endif - @else -

    Checkout Asset
    -
      -
    • This asset is not checked out to anyone yet. Use the button below to check it out now.
    • -


    • Checkout Asset
    • -
    - @endif -
    +

  • Checkin Asset
  • + + + @elseif (($asset->status_id ) && ($asset->status_id > 1)) + + @if ($asset->assetstatus) +

    {{ $asset->assetstatus->name }} Asset
    + +
    +
    + + Warning: This asset has been marked {{ $asset->assetstatus->name }} and is currently undeployable. + If this status has changed, please update the asset status. +
    +
    + @endif + + @elseif ($asset->status_id == NULL) +

    Pending Asset
    +
    +
    + + Warning: This asset has been marked as pending and is currently undeployable. + If this status has changed, please update the asset status. +
    +
    + + @else +

    Checkout Asset
    +
      +
    • This asset is not checked out to anyone yet. Use the button below to check it out now.
    • +


    • Checkout Asset
    • +
    + @endif +
    +
    +
    @stop \ No newline at end of file