Skip to content

Commit 75fc552

Browse files
committed
Merge branch 'refs/heads/develop'
2 parents e1207e0 + 56adc67 commit 75fc552

File tree

17 files changed

+355
-356
lines changed

17 files changed

+355
-356
lines changed

app/controllers/admin/AssetsController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function postEdit($assetId = null)
273273

274274

275275
// Redirect to the asset management page with error
276-
return Redirect::to("assets/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error'));
276+
return Redirect::to("hardware/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error'));
277277

278278
}
279279

@@ -320,7 +320,7 @@ public function getCheckout($assetId)
320320
}
321321

322322
// Get the dropdown of users and then pass it to the checkout view
323-
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->lists('full_name', 'id');
323+
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
324324

325325
//print_r($users);
326326
return View::make('backend/hardware/checkout', compact('asset'))->with('users_list',$users_list);
@@ -386,7 +386,7 @@ public function postCheckout($assetId)
386386
}
387387

388388
// Redirect to the asset management page with error
389-
return Redirect::to("assets/$assetId/checkout")->with('error', Lang::get('admin/hardware/message.checkout.error'));
389+
return Redirect::to("hardware/$assetId/checkout")->with('error', Lang::get('admin/hardware/message.checkout.error'));
390390
}
391391

392392

app/controllers/admin/LicensesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public function getCheckout($seatId)
239239
}
240240

241241
// Get the dropdown of users and then pass it to the checkout view
242-
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->lists('full_name', 'id');
242+
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
243243

244244
//print_r($users);
245245
return View::make('backend/licenses/checkout', compact('licenseseat'))->with('users_list',$users_list);

app/controllers/admin/ModelsController.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public function getCreate()
4040
// Show the page
4141
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
4242
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
43-
$category_list = array('' => '') + DB::table('categories')->lists('name', 'id');
43+
$category_list = array('' => '') + DB::table('categories')->whereNull('deleted_at')->lists('name', 'id');
4444
$view = View::make('backend/models/edit');
4545
$view->with('category_list',$category_list);
4646
$view->with('depreciation_list',$depreciation_list);
4747
$view->with('manufacturer_list',$manufacturer_list);
48-
$view->with('model',new Model);
48+
$view->with('model',new Model);
4949
return $view;
5050
}
5151

@@ -81,7 +81,7 @@ public function postCreate()
8181
if($model->save())
8282
{
8383
// Redirect to the new model page
84-
return Redirect::to("assets/models")->with('success', Lang::get('admin/models/message.create.success'));
84+
return Redirect::to("hardware/models")->with('success', Lang::get('admin/models/message.create.success'));
8585
}
8686
}
8787
else
@@ -92,7 +92,7 @@ public function postCreate()
9292
}
9393

9494
// Redirect to the model create page
95-
return Redirect::to('assets/models/create')->with('error', Lang::get('admin/models/message.create.error'));
95+
return Redirect::to('hardware/models/create')->with('error', Lang::get('admin/models/message.create.error'));
9696

9797
}
9898

@@ -156,7 +156,7 @@ public function postEdit($modelId = null)
156156
if($model->save())
157157
{
158158
// Redirect to the new model page
159-
return Redirect::to("assets/models/$modelId/edit")->with('success', Lang::get('admin/models/message.update.success'));
159+
return Redirect::to("hardware/models/$modelId/edit")->with('success', Lang::get('admin/models/message.update.success'));
160160
}
161161
}
162162
else
@@ -167,7 +167,7 @@ public function postEdit($modelId = null)
167167
}
168168

169169
// Redirect to the model create page
170-
return Redirect::to("assets/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error'));
170+
return Redirect::to("hardware/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error'));
171171

172172
}
173173

@@ -183,19 +183,19 @@ public function getDelete($modelId)
183183
if (is_null($model = Model::find($modelId)))
184184
{
185185
// Redirect to the blogs management page
186-
return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.not_found'));
186+
return Redirect::to('hardware/models')->with('error', Lang::get('admin/models/message.not_found'));
187187
}
188188

189189
if ($model->assets->count() > 0) {
190190
// Throw an error that this model is associated with assets
191-
return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.assoc_users'));
191+
return Redirect::to('hardware/models')->with('error', Lang::get('admin/models/message.assoc_users'));
192192

193193
} else {
194194
// Delete the model
195195
$model->delete();
196196

197197
// Redirect to the models management page
198-
return Redirect::to('assets/models')->with('success', Lang::get('admin/models/message.delete.success'));
198+
return Redirect::to('hardware/models')->with('success', Lang::get('admin/models/message.delete.success'));
199199
}
200200
}
201201

app/models/Model.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Model extends Elegant {
77
'name' => 'required|alpha_space|min:3',
88
'modelno' => 'alpha_space|min:1',
99
'category_id' => 'required|integer',
10+
'manufacturer_id' => 'required|integer',
1011
);
1112

1213
public function assets()

app/views/backend/hardware/checkin.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
@else
6161
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
6262
@endif
63-
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i>@lang('general.checkin')</button>
63+
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i>@lang('general.checkin')</button>
6464
</div>
6565
</div>
6666

app/views/backend/hardware/checkout.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@
7777
@else
7878
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
7979
@endif
80-
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> Save</button>
80+
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> Save</button>
8181
</div>
8282
</div>
8383

84+
85+
8486
</form>
8587

8688
</div>

app/views/backend/hardware/edit.blade.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,12 @@
117117
</div>
118118
</div>
119119

120-
<!-- Depreciation -->
121-
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
122-
<label for="parent" class="col-md-2 control-label">Depreciation</label>
123-
<div class="col-md-7">
124-
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $asset->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
125-
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
126-
</div>
127-
</div>
128-
129-
130120
<!-- Status -->
131121
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
132-
<label for="parent" class="col-md-2 control-label">Status</label>
122+
<label for="status_id" class="col-md-2 control-label">Status</label>
133123
<div class="col-md-7">
134124
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2', 'style'=>'width:350px')) }}
135-
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
125+
{{ $errors->first('status_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
136126
</div>
137127
</div>
138128

0 commit comments

Comments
 (0)