Compare commits

...

88 Commits

Author SHA1 Message Date
snipe ddabdaca02 Merge branch 'refs/heads/develop' 2013-11-28 20:59:05 -05:00
snipe 839d01a3af Fixed relationship method because fuck you ORM 2013-11-28 20:58:40 -05:00
snipe 4d421c9a50 Leftover method that's not used since the license/asset split 2013-11-28 20:58:15 -05:00
snipe 9fa826b2e7 Fixed assigned to id 2013-11-28 20:40:02 -05:00
snipe 7718e8d928 Checks that checkedout_to isn't 0 before trying to get fullName() 2013-11-28 20:28:09 -05:00
snipe 23374b7fc6 Another leftover from #88 2013-11-28 20:27:44 -05:00
snipe f0f07b578b Fixing pivot for users 2013-11-28 20:19:23 -05:00
snipe e23f1f10b7 Switched validation to alpha_space on notes 2013-11-28 20:02:11 -05:00
snipe 1b56c31a22 Fixed relationship between users/locations because fuck you ORM 2013-11-28 19:58:16 -05:00
snipe 9f7cbc8a4f Another fix related to #88, also accounts for users with invalid location_ids 2013-11-28 19:57:42 -05:00
snipe f504175578 Smaller char req for first/last name, longer req for password 2013-11-28 19:45:47 -05:00
snipe 103faca6ef Clearer display of current vs trashed 2013-11-28 19:45:25 -05:00
snipe 2fce4884d7 Cosmetic changes 2013-11-28 19:45:05 -05:00
snipe 4142629665 Layout tweaks for mobile - related to #54 2013-11-28 19:22:39 -05:00
snipe 03821838eb Merge branch 'refs/heads/develop' 2013-11-28 18:48:15 -05:00
snipe d2959e82a1 Redirect to /hardware to finish cleaning up re-routing from #88 2013-11-28 18:47:54 -05:00
snipe 6a5ccc89df Updated urls from #88 2013-11-28 18:44:20 -05:00
snipe 5858bfb99b Fixed language file paths caused by #88 2013-11-28 18:44:04 -05:00
snipe 3cce78c087 Weird layout 2013-11-28 18:43:30 -05:00
snipe 0d0d42f86a Merge branch 'refs/heads/develop' 2013-11-28 18:32:07 -05:00
snipe d9a37f3822 Fixes #88 2013-11-28 18:31:36 -05:00
snipe 4fcdf72ab6 Responsive design bug fixes, placeholder code for #64 (commented out) 2013-11-28 16:50:53 -05:00
snipe 8680d98bc3 Fixed status display bug 2013-11-28 16:46:34 -05:00
snipe b3bb2d4f11 Added soon-out-of-warranty example to test notifications 2013-11-28 16:37:24 -05:00
snipe 5c28089f2b RTD has to be 0, or it will conflict with the custom status labels 2013-11-28 16:37:05 -05:00
snipe c3769adf80 Merge branch 'refs/heads/develop' 2013-11-28 15:52:23 -05:00
snipe 9e189aa309 Fixes #80, also prevents the user from checking out an asset that is undeployable, etc 2013-11-28 15:52:00 -05:00
snipe 7a3d92522e Merge pull request #86 from peelman/develop
Cancel and back buttons on edit forms now take you back properly
2013-11-28 11:13:32 -08:00
Nick Peelman 54013cfd42 Cancel and back buttons on edit forms now take you back properly 2013-11-28 10:23:52 -05:00
snipe ccb7a5ddba Merge branch 'refs/heads/develop' 2013-11-28 01:16:05 -05:00
snipe 54d9d72549 Tweaks to example configs to prevent data leakage 2013-11-28 01:15:30 -05:00
snipe 819a606204 Changed modelno validator to alpha_space 2013-11-28 00:58:34 -05:00
snipe 33f81abcd3 Added a few more symbols for alpha_space 2013-11-28 00:58:08 -05:00
snipe fbb0b22522 vi or GTFO
:P
2013-11-28 00:57:40 -05:00
snipe 6b017d12c0 Merge pull request #85 from snipe/gitignore_clean
Replace enumeration of files with wildcard
2013-11-27 21:33:23 -08:00
Brady Wetherington 6691447624 Replace enumeration of files with wildcard 2013-11-27 19:26:53 -05:00
snipe 39cc0c6ad7 Merge pull request #83 from peelman/IgorningProductionConfigs
Igorning production configs
2013-11-27 16:22:10 -08:00
Nick Peelman cb87b16e28 its code, not a block quote...
i are stupid.
2013-11-27 19:22:04 -05:00
Nick Peelman 5be13d5eb5 Ignore production configs and sqlite files. Provide example files for renaming. Update install instructions in README accordingly. 2013-11-27 19:19:07 -05:00
snipe eb015b1e22 Merge branch 'refs/heads/develop' 2013-11-27 14:14:41 -05:00
snipe 012a889444 Corrected license seat count associated with license. Fixes #75 2013-11-27 14:13:29 -05:00
snipe e79d27c984 Merge branch 'refs/heads/develop' 2013-11-27 12:26:15 -05:00
snipe 6552401fd8 Fixes #77 2013-11-27 12:25:48 -05:00
snipe da96126445 Merge pull request #78 from peelman/ExpandManufacturer
Expand Manufacturer
2013-11-27 09:05:10 -08:00
Nick Peelman 301ef3fddb Add Manufacturer and Model info to asset page 2013-11-27 11:37:22 -05:00
Nick Peelman d6ba98252d Change N/A to Select One 2013-11-27 11:37:02 -05:00
snipe 9aa6b519c9 Wider display for address field in index blade 2013-11-27 10:34:51 -05:00
Nick Peelman 9f19792985 Save manufacturer ID 2013-11-27 10:32:50 -05:00
snipe e4d56dba92 Merge pull request #73 from peelman/EmailInputTypes
Email input types
2013-11-27 07:28:15 -08:00
snipe e49cb9eb85 Merge pull request #72 from peelman/AddAddressToLocation
Add address to location form
2013-11-27 07:27:45 -08:00
Nick Peelman b7579a1420 Copy/Paste Error 2013-11-27 10:25:25 -05:00
Nick Peelman 6f59617546 Add to controller's edit method too... 2013-11-27 10:23:11 -05:00
Nick Peelman 996458dde3 missing semicolon 2013-11-27 10:18:43 -05:00
Nick Peelman c2d889de12 Add necessary use statements, clean up the run-on return statement that was forming... 2013-11-27 10:18:15 -05:00
Nick Peelman b5a0da03a8 Add manufacturer to edit form 2013-11-27 10:06:36 -05:00
Nick Peelman 8d3d337820 Change input type to email where relevant (better mobile support) 2013-11-27 08:42:31 -05:00
Nick Peelman 1314a1ffea Add location address values to controller save methods... 2013-11-27 08:30:51 -05:00
Nick Peelman bed78dd935 Remove erroneous rule from address2 2013-11-27 08:28:00 -05:00
Nick Peelman 02e5333101 Add address fields to Location edit form 2013-11-27 08:21:12 -05:00
snipe 0aa3c676c2 Merge branch 'refs/heads/develop' 2013-11-27 03:40:21 -05:00
snipe acd9505597 Two-digit decimal for purchase_cost 2013-11-27 03:40:01 -05:00
snipe 65cd28aad3 Fixes #14 2013-11-27 03:39:28 -05:00
snipe 12684b214a Merge branch 'refs/heads/develop' 2013-11-27 02:57:21 -05:00
snipe 5c72aabdea Updated readme for DB migrations reminder 2013-11-27 02:57:02 -05:00
snipe a2b353fb6d Merge branch 'refs/heads/develop' 2013-11-27 02:41:04 -05:00
snipe aa38d83ba6 Fixes #63 and #70 2013-11-27 02:38:16 -05:00
snipe af69467bea Added notes to log table 2013-11-27 01:29:57 -05:00
snipe 432600ab7b Merge branch 'refs/heads/develop' 2013-11-27 01:21:19 -05:00
snipe b1aa67ddb7 Fixes #69
Removed problem migration file
2013-11-27 01:20:57 -05:00
snipe c16382e9d4 Merge branch 'refs/heads/develop' 2013-11-26 22:07:26 -05:00
snipe 9f9bb96076 Merge pull request #67 from abrahamvegh/patch-1
Patch 1
2013-11-26 18:56:54 -08:00
snipe f1e280ccde Merge pull request #68 from abrahamvegh/patch-2
Fix insecure content warnings
2013-11-26 18:55:14 -08:00
Abraham Vegh cfe28ad903 Update default.blade.php
Remove protocol from Google and jQuery CDN URLs, to fix insecure content warnings in SSL-only environments
2013-11-26 20:33:44 -05:00
Abraham Vegh bda827c590 Update User.php
Fix incorrect Gravatar domain name
2013-11-26 20:19:30 -05:00
Abraham Vegh ebc40857e4 Update AssetsController.php
Fix invalid SQL
2013-11-26 20:15:41 -05:00
snipe 69ede7f82c Merge branch 'refs/heads/develop' 2013-11-26 18:11:00 -05:00
snipe 0e3bcfecd0 Should be final fixes for mysql strict mode 2013-11-26 18:10:46 -05:00
snipe 96368444ac Default user id 2013-11-26 17:53:03 -05:00
snipe ec4172d41a Merge branch 'refs/heads/develop' 2013-11-26 17:49:51 -05:00
snipe 8eeae70313 Formatting cleanup 2013-11-26 17:48:51 -05:00
snipe a33435ee12 No seriously. Fuck you, MySQL strict. 2013-11-26 17:47:21 -05:00
snipe eb7801abf9 Fuck you, MySQL strict mode. Right in the eye. 2013-11-26 17:36:06 -05:00
snipe 42450d9cd6 Merge branch 'refs/heads/master' into develop 2013-11-26 17:24:05 -05:00
snipe 4c0af1eae1 Fixed typo causing failure with mysql strict 2013-11-26 17:22:40 -05:00
snipe 35e5df8bdc Merge branch 'refs/heads/develop' 2013-11-26 16:51:44 -05:00
snipe dfd374b875 Removed optional from db seed 2013-11-26 16:51:23 -05:00
snipe 7722c50312 Merge branch 'refs/heads/develop' 2013-11-26 16:37:09 -05:00
snipe 1527b88fd6 Fixes #61 2013-11-26 16:36:42 -05:00
66 changed files with 1266 additions and 588 deletions
+6 -49
View File
@@ -2,53 +2,10 @@
/vendor
composer.phar
.DS_Store
/app/storage/logs/log-apache2handler-2013-11-13.txt
/app/storage/logs/log-apache2handler-2013-11-15.txt
/app/storage/logs/log-apache2handler-2013-11-16.txt
/app/storage/logs/log-apache2handler-2013-11-17.txt
/app/storage/logs/log-apache2handler-2013-11-18.txt
/app/storage/logs/log-cli-2013-11-15.txt
/app/storage/logs/log-cli-2013-11-16.txt
/app/storage/logs/log-cli-2013-11-17.txt
/app/config/database.php
/app/config/mail.php
/app/database/*.sqlite
/app/storage/logs/*
/app/storage/meta/services.json
/app/storage/sessions/sess_2e8fff45812452223d364b3701c57599
/app/storage/views/074a6e3d45461743c9c70a430f24cb2f
/app/storage/views/0898d0a6e390c1e0936ed85aa00bceb4
/app/storage/views/0929c6954dff5de776b648f0b2b55d91
/app/storage/views/0dc4ec75184a1146d243b35fd8d1d021
/app/storage/views/1b5f399b4e32b64b23b481f67d30ddc5
/app/storage/views/23518861fe3abb3c5c057c78f23b753f
/app/storage/views/24eddb1a11f215387f0fa05d7921e1a9
/app/storage/views/30d1b9afa1342a177b8c64152c9f738c
/app/storage/views/340bc584ed2857c4811f8d9e4ed55a33
/app/storage/views/352ec637e6b79ee29be08ef818ed5f1d
/app/storage/views/37f1443261c8260dd7c911d9b8917825
/app/storage/views/3c4ca96328340990da1dc0a471dc79b0
/app/storage/views/40768d70f551f4516bd8a24fb88b8afd
/app/storage/views/48999d750f189d68ca608663076f97e0
/app/storage/views/49cbbff0cb8bb4a6f572e7e38d5db596
/app/storage/views/5986ecb5aca83df685042db5855d4dae
/app/storage/views/5be43cf2d633a60a5d1f0660233b7974
/app/storage/views/5c7b9f147de9946f763329aee3a41cd4
/app/storage/views/61c21173899f0c6480a2677300d494fe
/app/storage/views/63b6bd25c59d3397787af33458b46982
/app/storage/views/6469acf79871c5c8c654f8aed2d9fcc6
/app/storage/views/753f789108c3b45f2ec6f65ac851539c
/app/storage/views/76833349b6be4a848cfae6532d297f5b
/app/storage/views/840ff169b266f72943a78b16fde0fffd
/app/storage/views/88ce10ea8b4fc7eb9424e1ac29973566
/app/storage/views/8a09ff6951f92a1e85f23f6a1fddba52
/app/storage/views/9a3d299acb9a9a1b2e30136315085c8b
/app/storage/views/9d10051fa34809314499c21d6bb9bb6a
/app/storage/views/a19b88281da184faf892da4712b25309
/app/storage/views/b53f5ba729511e00a1b9d6834a7586bb
/app/storage/views/b53fae332b5d35fe1e61560b3313527f
/app/storage/views/bc9a5404610a0dd796dd1a8888d6c8e1
/app/storage/views/c40a92db96f64e54fa6054d57810b0aa
/app/storage/views/cb04f9bcd20531d048720218e0ade7a3
/app/storage/views/d08fe3bd6997060c2e567582871aa7a5
/app/storage/views/dcd5f5756492bf2673c48a3991e65740
/app/storage/views/ec0fde70340126123972825cebbffb49
/app/storage/views/ec4f837768ede927a321fc6ece6abbae
/app/storage/views/f72c29c1b97cb5dbad78efbe1198f1f2
/app/storage/sessions/*
/app/storage/views/*
+20 -3
View File
@@ -19,6 +19,17 @@ This isn't actually ready for anyone to use yet, as I'm still working out some o
-----
## Important Note on Updating
Whenever you pull down a new version from master or develop, when you grab the [latest official release](https://github.com/snipe/snipe-it/releases), make sure to run the following commands via command line:
php composer.phar dump-autoload
php artisan migrate
Forgetting to do this can mean your DB might end up out of sync with the new files you just pulled, or you may have some funky cached autoloader values. It's a good idea to get into the habit of running these every time you pull anything new down. If there are no database changes to migrate, it won't hurt anything to run migrations anyway.
-----
## How to Install
### 1) Downloading
@@ -48,13 +59,19 @@ This isn't actually ready for anyone to use yet, as I'm still working out some o
### 3) Setup Database
Create a database and update the file `app/config/database.php` with your database name and credentials.
Copy the file `app/config/database.php` to `database.php`, and update `database.php` with your database name and credentials
cp app/config/database.example.php app/config/database.php
vi app/config/database.example.php
-----
### 4) Setup Mail Settings
Now, you need to setup your mail settings by just opening and updating the following file `app/config/mail.php`.
Now, copy the file `app/config/mail.php` to `mail.php`, and update `mail.php` with your mail settings
cp app/config/mail.example.php app/config/mail.php
vi app/config/mail.example.php
This will be used to send emails to your users, when they register and they request a password reset.
@@ -95,7 +112,7 @@ The document root for the app should be set to the public directory. In a standa
-----
### 8) Optional: Seed the Database
### 8) Seed the Database
Loading up the sample data will give you an idea of how this should look, how your info should be structured, etc. It only pre-loads a handful of items, so you won't have to spend an hour deleting sample data.
+1 -1
View File
@@ -338,7 +338,7 @@ class AuthController extends BaseController {
Sentry::logout();
// Redirect to the users page
return Redirect::route('assets')->with('success', 'You have successfully logged out!');
return Redirect::route('home')->with('success', 'You have successfully logged out!');
}
}
+130 -43
View File
@@ -61,7 +61,7 @@ class AssetsController extends AdminController {
));
**/
return View::make('backend/assets/index', compact('assets'));
return View::make('backend/hardware/index', compact('assets'));
}
public function getReports()
@@ -85,7 +85,7 @@ class AssetsController extends AdminController {
// Grab the dropdown list of status
$statuslabel_list = array('' => 'Pending') + array('1' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
return View::make('backend/assets/edit')->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('depreciation_list',$depreciation_list)->with('asset',new Asset);
return View::make('backend/hardware/edit')->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('depreciation_list',$depreciation_list)->with('asset',new Asset);
}
@@ -108,26 +108,49 @@ class AssetsController extends AdminController {
if ($asset->validate($new))
{
if ( e(Input::get('status_id')) == '') {
$asset->status_id = NULL;
} else {
$asset->status_id = e(Input::get('status_id'));
}
if (e(Input::get('warranty_months')) == '') {
$asset->warranty_months = NULL;
} else {
$asset->warranty_months = e(Input::get('warranty_months'));
}
if (e(Input::get('purchase_cost')) == '') {
$asset->purchase_cost = NULL;
} else {
$asset->purchase_cost = e(Input::get('purchase_cost'));
}
if (e(Input::get('purchase_date')) == '') {
$asset->purchase_date = NULL;
} else {
$asset->purchase_date = e(Input::get('purchase_date'));
}
// Save the asset data
$asset->name = e(Input::get('name'));
$asset->serial = e(Input::get('serial'));
$asset->model_id = e(Input::get('model_id'));
$asset->purchase_date = e(Input::get('purchase_date'));
$asset->purchase_cost = e(Input::get('purchase_cost'));
$asset->order_number = e(Input::get('order_number'));
$asset->notes = e(Input::get('notes'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->status_id = e(Input::get('status_id'));
$asset->warranty_months = e(Input::get('warranty_months'));
$asset->user_id = Sentry::getId();
$asset->assigned_to = '0';
$asset->archived = '0';
$asset->physical = '1';
$asset->depreciate = '0';
// Was the asset created?
if($asset->save())
{
// Redirect to the asset listing page
return Redirect::to("admin")->with('success', Lang::get('admin/assets/message.create.success'));
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success'));
}
}
else
@@ -138,7 +161,7 @@ class AssetsController extends AdminController {
}
// Redirect to the asset create page with an error
return Redirect::to('assets/create')->with('error', Lang::get('admin/assets/message.create.error'));
return Redirect::to('assets/create')->with('error', Lang::get('admin/hardware/message.create.error'));
}
@@ -155,19 +178,19 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.does_not_exist'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
// Grab the dropdown list of models
$model_list = array('' => '') + Model::lists('name', 'id');
// Grab the dropdown list of status
$statuslabel_list = array('' => 'Pending') + array('1' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
$statuslabel_list = array('' => 'Pending') + array('0' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
// get depreciation list
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
return View::make('backend/assets/edit', compact('asset'))->with('model_list',$model_list)->with('depreciation_list',$depreciation_list)->with('statuslabel_list',$statuslabel_list);
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('depreciation_list',$depreciation_list)->with('statuslabel_list',$statuslabel_list);
}
@@ -183,17 +206,18 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.does_not_exist'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
// Declare the rules for the form validation
$rules = array(
'name' => 'required|min:3',
'asset_tag' => 'required|alpha_dash|min:3',
'asset_tag' => 'required|alpha_space|min:3',
'model_id' => 'required',
'serial' => 'required|alpha_space|min:3',
'warranty_months' => 'required|integer',
'warranty_months' => 'integer',
'notes' => 'alpha_space',
);
// Create a new validator instance from our validation rules
@@ -206,17 +230,37 @@ class AssetsController extends AdminController {
return Redirect::back()->withInput()->withErrors($validator);
}
if ( e(Input::get('status_id')) == '') {
$asset->status_id = NULL;
} else {
$asset->status_id = e(Input::get('status_id'));
}
if (e(Input::get('warranty_months')) == '') {
$asset->warranty_months = NULL;
} else {
$asset->warranty_months = e(Input::get('warranty_months'));
}
if (e(Input::get('purchase_cost')) == '') {
$asset->purchase_cost = NULL;
} else {
$asset->purchase_cost = e(Input::get('purchase_cost'));
}
if (e(Input::get('purchase_date')) == '') {
$asset->purchase_date = NULL;
} else {
$asset->purchase_date = e(Input::get('purchase_date'));
}
// Update the asset data
$asset->name = e(Input::get('name'));
$asset->serial = e(Input::get('serial'));
$asset->model_id = e(Input::get('model_id'));
$asset->purchase_date = e(Input::get('purchase_date'));
$asset->purchase_cost = e(Input::get('purchase_cost'));
$asset->order_number = e(Input::get('order_number'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->status_id = e(Input::get('status_id'));
$asset->warranty_months = e(Input::get('warranty_months'));
$asset->notes = e(Input::get('notes'));
$asset->physical = '1';
@@ -224,12 +268,12 @@ class AssetsController extends AdminController {
if($asset->save())
{
// Redirect to the new asset page
return Redirect::to("admin")->with('success', Lang::get('admin/assets/message.update.success'));
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.update.success'));
}
// Redirect to the asset management page with error
return Redirect::to("assets/$assetId/edit")->with('error', Lang::get('admin/assets/message.update.error'));
return Redirect::to("assets/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error'));
}
@@ -245,18 +289,18 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.not_found'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
}
if (isset($asset->assigneduser->id) && ($asset->assigneduser->id!=0)) {
// Redirect to the asset management page
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.assoc_users'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.assoc_users'));
} else {
// Delete the asset
$asset->delete();
// Redirect to the asset management page
return Redirect::to('admin')->with('success', Lang::get('admin/assets/message.delete.success'));
return Redirect::to('hardware')->with('success', Lang::get('admin/hardware/message.delete.success'));
}
@@ -272,17 +316,14 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.not_found'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
}
// Get the dropdown of users and then pass it to the checkout view
$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');
$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');
//print_r($users);
return View::make('backend/assets/checkout', compact('asset'))->with('users_list',$users_list);
return View::make('backend/hardware/checkout', compact('asset'))->with('users_list',$users_list);
}
@@ -295,7 +336,7 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.not_found'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
}
$assigned_to = e(Input::get('assigned_to'));
@@ -303,7 +344,8 @@ class AssetsController extends AdminController {
// Declare the rules for the form validation
$rules = array(
'assigned_to' => 'required|min:1'
'assigned_to' => 'required|min:1',
'note' => 'alpha_space',
);
// Create a new validator instance from our validation rules
@@ -321,7 +363,7 @@ class AssetsController extends AdminController {
if (is_null($assigned_to = User::find($assigned_to)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.user_does_not_exist'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.user_does_not_exist'));
}
// Update the asset data
@@ -336,18 +378,37 @@ class AssetsController extends AdminController {
$logaction->asset_type = 'hardware';
$logaction->location_id = $assigned_to->location_id;
$logaction->user_id = Sentry::getUser()->id;
$logaction->note = e(Input::get('note'));
$log = $logaction->logaction('checkout');
// Redirect to the new asset page
return Redirect::to("admin")->with('success', Lang::get('admin/assets/message.checkout.success'));
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.checkout.success'));
}
// Redirect to the asset management page with error
return Redirect::to("assets/$assetId/checkout")->with('error', Lang::get('admin/assets/message.checkout.error'));
return Redirect::to("assets/$assetId/checkout")->with('error', Lang::get('admin/hardware/message.checkout.error'));
}
/**
* Check the asset back into inventory
*
* @param int $assetId
* @return View
**/
public function getCheckin($assetId)
{
// Check if the asset exists
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
}
return View::make('backend/hardware/checkin', compact('asset'));
}
/**
* Check in the item so that it can be checked out again to someone else
*
@@ -360,7 +421,7 @@ class AssetsController extends AdminController {
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin')->with('error', Lang::get('admin/assets/message.not_found'));
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
}
if (!is_null($asset->assigned_to)) {
@@ -371,25 +432,25 @@ class AssetsController extends AdminController {
$logaction->checkedout_to = $asset->assigned_to;
// Update the asset data to null, since it's being checked in
$asset->assigned_to = '';
$asset->assigned_to = '0';
// Was the asset updated?
if($asset->save())
{
$logaction->asset_id = $asset->id;
$logaction->location_id = NULL;
$logaction->asset_type = 'hardware';
$logaction->note = e(Input::get('note'));
$logaction->user_id = Sentry::getUser()->id;
$log = $logaction->logaction('checkin from');
// Redirect to the new asset page
return Redirect::to("admin")->with('success', Lang::get('admin/assets/message.checkin.success'));
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.checkin.success'));
}
// Redirect to the asset management page with error
return Redirect::to("admin")->with('error', Lang::get('admin/assets/message.checkin.error'));
return Redirect::to("hardware")->with('error', Lang::get('admin/hardware/message.checkin.error'));
}
@@ -404,10 +465,10 @@ class AssetsController extends AdminController {
$asset = Asset::find($assetId);
if (isset($asset->id)) {
return View::make('backend/assets/view', compact('asset'));
return View::make('backend/hardware/view', compact('asset'));
} else {
// Prepare the error message
$error = Lang::get('admin/assets/message.does_not_exist', compact('id' ));
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id' ));
// Redirect to the user management page
return Redirect::route('assets')->with('error', $error);
@@ -415,6 +476,32 @@ class AssetsController extends AdminController {
}
/**
* Asset update.
*
* @param int $assetId
* @return View
*/
public function getClone($assetId = null)
{
// Check if the asset exists
if (is_null($asset = Asset::find($assetId)))
{
// Redirect to the asset management page
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
// Grab the dropdown list of models
$model_list = array('' => '') + Model::lists('name', 'id');
// Grab the dropdown list of status
$statuslabel_list = array('' => 'Pending') + array('0' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
// get depreciation list
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
return View::make('backend/hardware/clone', compact('asset'))->with('model_list',$model_list)->with('depreciation_list',$depreciation_list)->with('statuslabel_list',$statuslabel_list);
}
}
+51 -11
View File
@@ -201,17 +201,23 @@ class LicensesController extends AdminController {
// Check if the license exists
if (is_null($license = License::find($licenseId)))
{
// Redirect to the blogs management page
// Redirect to the license management page
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
}
if (count($license->assignedusers) > 0) {
// Redirect to the asset management page
if (($license->assignedcount()) && ($license->assignedcount() > 0)) {
// Redirect to the license management page
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.assoc_users'));
} else {
// Delete the license
// Delete the license and the associated license seats
$licenseseats = $license->licenseseats();
$licenseseats->delete();
$license->delete();
// Redirect to the licenses management page
return Redirect::to('admin/licenses')->with('success', Lang::get('admin/licenses/message.delete.success'));
}
@@ -258,7 +264,8 @@ class LicensesController extends AdminController {
// Declare the rules for the form validation
$rules = array(
'assigned_to' => 'required|integer|min:1'
'assigned_to' => 'required|integer|min:1',
'note' => 'alpha_space',
);
// Create a new validator instance from our validation rules
@@ -293,6 +300,7 @@ class LicensesController extends AdminController {
$logaction->location_id = $assigned_to->location_id;
$logaction->asset_type = 'software';
$logaction->user_id = Sentry::getUser()->id;
$logaction->note = e(Input::get('note'));
$log = $logaction->logaction('checkout');
// Redirect to the new asset page
@@ -303,6 +311,24 @@ class LicensesController extends AdminController {
return Redirect::to('admin/licenses/$assetId/checkout')->with('error', Lang::get('admin/licenses/message.create.error'))->with('license',new License);
}
/**
* Check the license back into inventory
**/
public function getCheckin($seatId)
{
// Check if the asset exists
if (is_null($licenseseat = LicenseSeat::find($seatId)))
{
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
}
return View::make('backend/licenses/checkin', compact('licenseseat'));
}
/**
* Check in the item so that it can be checked out again to someone else
**/
@@ -315,11 +341,27 @@ class LicensesController extends AdminController {
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
}
// Declare the rules for the form validation
$rules = array(
'note' => 'alpha_space',
'notes' => 'alpha_space',
);
// Create a new validator instance from our validation rules
$validator = Validator::make(Input::all(), $rules);
// If validation fails, we'll exit the operation now.
if ($validator->fails())
{
// Ooops.. something went wrong
return Redirect::back()->withInput()->withErrors($validator);
}
$logaction = new Actionlog();
$logaction->checkedout_to = $licenseseat->assigned_to;
// Update the asset data
$licenseseat->assigned_to = '';
$licenseseat->assigned_to = '0';
// Was the asset updated?
if($licenseseat->save())
@@ -327,14 +369,15 @@ class LicensesController extends AdminController {
$logaction->asset_id = $licenseseat->id;
$logaction->location_id = NULL;
$logaction->asset_type = 'software';
$logaction->note = e(Input::get('note'));
$logaction->user_id = Sentry::getUser()->id;
$log = $logaction->logaction('checkin from');
// Redirect to the new asset page
// Redirect to the license page
return Redirect::to("admin/licenses")->with('success', Lang::get('admin/licenses/message.checkin.success'));
}
// Redirect to the asset management page with error
// Redirect to the license page with error
return Redirect::to("admin/licenses")->with('error', Lang::get('admin/licenses/message.checkin.error'));
}
@@ -357,10 +400,7 @@ class LicensesController extends AdminController {
// Redirect to the user management page
return Redirect::route('licenses')->with('error', $error);
}
}
}
@@ -63,6 +63,8 @@ class LocationsController extends AdminController {
// Save the location data
$location->name = e(Input::get('name'));
$location->address = e(Input::get('address'));
$location->address2 = e(Input::get('address2'));
$location->city = e(Input::get('city'));
$location->state = e(Input::get('state'));
$location->country = e(Input::get('country'));
@@ -139,6 +141,8 @@ class LocationsController extends AdminController {
// Update the location data
$location->name = e(Input::get('name'));
$location->address = e(Input::get('address'));
$location->address2 = e(Input::get('address2'));
$location->city = e(Input::get('city'));
$location->state = e(Input::get('state'));
$location->country = e(Input::get('country'));
+17 -7
View File
@@ -9,6 +9,7 @@ use Setting;
use Sentry;
use DB;
use Depreciation;
use Manufacturer;
use Str;
use Validator;
use View;
@@ -38,8 +39,14 @@ class ModelsController extends AdminController {
{
// Show the page
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
$category_list = array('' => '') + DB::table('categories')->lists('name', 'id');
return View::make('backend/models/edit')->with('category_list',$category_list)->with('depreciation_list',$depreciation_list)->with('model',new Model);
$view = View::make('backend/models/edit');
$view->with('category_list',$category_list);
$view->with('depreciation_list',$depreciation_list);
$view->with('manufacturer_list',$manufacturer_list);
$view->with('model',new Model);
return $view;
}
@@ -65,6 +72,7 @@ class ModelsController extends AdminController {
$model->name = e(Input::get('name'));
$model->modelno = e(Input::get('modelno'));
$model->depreciation_id = e(Input::get('depreciation_id'));
$model->manufacturer_id = e(Input::get('manufacturer_id'));
$model->category_id = e(Input::get('category_id'));
$model->user_id = Sentry::getId();
@@ -99,13 +107,18 @@ class ModelsController extends AdminController {
// Check if the model exists
if (is_null($model = Model::find($modelId)))
{
// Redirect to the blogs management page
// Redirect to the model management page
return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.does_not_exist'));
}
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
$category_list = array('' => '') + DB::table('categories')->lists('name', 'id');
return View::make('backend/models/edit', compact('model'))->with('category_list',$category_list)->with('depreciation_list',$depreciation_list);
$view = View::make('backend/models/edit', compact('model'));
$view->with('category_list',$category_list);
$view->with('depreciation_list',$depreciation_list);
$view->with('manufacturer_list',$manufacturer_list);
return $view;
}
@@ -135,6 +148,7 @@ class ModelsController extends AdminController {
$model->name = e(Input::get('name'));
$model->modelno = e(Input::get('modelno'));
$model->depreciation_id = e(Input::get('depreciation_id'));
$model->manufacturer_id = e(Input::get('manufacturer_id'));
$model->category_id = e(Input::get('category_id'));
@@ -183,9 +197,6 @@ class ModelsController extends AdminController {
// Redirect to the models management page
return Redirect::to('assets/models')->with('success', Lang::get('admin/models/message.delete.success'));
}
}
@@ -213,5 +224,4 @@ class ModelsController extends AdminController {
}
}
+4 -4
View File
@@ -27,11 +27,11 @@ class UsersController extends AdminController {
* @var array
*/
protected $validationRules = array(
'first_name' => 'required|alpha_space|min:3',
'last_name' => 'required|alpha_space|min:3',
'first_name' => 'required|alpha_space|min:2',
'last_name' => 'required|alpha_space|min:2',
'email' => 'required|email|unique:users,email',
'password' => 'required|between:3,32',
'password_confirm' => 'required|between:3,32|same:password',
'password' => 'required|between:10,32',
'password_confirm' => 'required|between:10,32|same:password',
);
/**
@@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class DropCommentsPostsTables extends Migration {
class DropLicenseFromAssetsTable extends Migration {
/**
* Run the migrations.
@@ -11,8 +11,11 @@ class DropCommentsPostsTables extends Migration {
*/
public function up()
{
Schema::drop('posts');
Schema::drop('comments');
Schema::table('assets', function($table)
{
$table->dropColumn('license_name');
$table->dropColumn('license_email');
});
}
/**
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
class AddNoteToAssetLogsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::table('asset_logs', function($table)
{
$table->text('note')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::table('asset_logs', function($table)
{
$table->dropColumn('note');
});
}
}
+28 -24
View File
@@ -13,46 +13,50 @@ class ActionlogSeeder extends Seeder {
// Pending (status_id is null, assigned_to = 0)
$assetlog[] = array(
'user_id' => '1',
'user_id' => '1',
'action_type' => 'checkout',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => '3',
'added_on' => $date->modify('-10 day'),
'asset_type' => 'hardware',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => '3',
'added_on' => $date->modify('-10 day'),
'asset_type' => 'hardware',
'note' => NULL,
);
// Pending (status_id is null, assigned_to = 0)
$assetlog[] = array(
'user_id' => '1',
'user_id' => '1',
'action_type' => 'checkin from',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => NULL,
'added_on' => $date->modify('-10 day'),
'asset_type' => 'hardware',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => NULL,
'added_on' => $date->modify('-10 day'),
'asset_type' => 'hardware',
'note' => NULL,
);
// Pending (status_id is null, assigned_to = 0)
$assetlog[] = array(
'user_id' => '1',
'user_id' => '1',
'action_type' => 'checkout',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => '3',
'added_on' => $date->modify('-10 day'),
'asset_type' => 'software',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => '3',
'added_on' => $date->modify('-10 day'),
'asset_type' => 'software',
'note' => NULL,
);
// Pending (status_id is null, assigned_to = 0)
$assetlog[] = array(
'user_id' => '1',
'user_id' => '1',
'action_type' => 'checkin from',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => NULL,
'added_on' => $date->modify('-10 day'),
'asset_type' => 'software',
'asset_id' => '1',
'checkedout_to' => '3',
'location_id' => NULL,
'added_on' => $date->modify('-10 day'),
'asset_type' => 'software',
'note' => NULL,
);
+79 -24
View File
@@ -26,12 +26,15 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => NULL,
'status_id' => NULL,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Pending (status_id is null, assigned_to = 0)
$asset[] = array(
'name' => 'Michael MBP',
'asset_tag' => 'NNY28633396',
@@ -46,9 +49,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => NULL,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
@@ -67,9 +73,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// RTD (status_id =0, assigned_to = 0)
@@ -87,9 +96,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// RTD (status_id =0, assigned_to = 0)
@@ -107,9 +119,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
@@ -128,9 +143,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 2,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Deployed (status_id =0, assigned_to > 0)
@@ -148,9 +166,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 2,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Undeployable (status_id > 0, assigned_to = 0)
@@ -168,9 +189,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => '3',
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Undeployable (status_id > 0, assigned_to = 0)
@@ -188,9 +212,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => '2',
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Undeployable (status_id > 0, assigned_to = 0)
@@ -208,9 +235,12 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 1,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => '4',
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Undeployable (status_id > 0, assigned_to = 0)
@@ -228,11 +258,36 @@ class AssetsSeeder extends Seeder {
'assigned_to' => 0,
'physical' => 1,
'archived' => 1,
'license_name' => NULL,
'license_email' => NULL,
'status_id' => '3',
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => NULL,
'depreciate' => '0',
);
// Almost out of warranty example
$asset[] = array(
'name' => 'Noah MBP',
'asset_tag' => 'NNY98056775',
'model_id' => 2,
'serial' => 'WS909098888',
'purchase_date' => '2011-12-20',
'purchase_cost' => '699.99',
'order_number' => '657756',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 2,
'assigned_to' => 0,
'physical' => 1,
'archived' => 0,
'status_id' => 0,
'notes' => '',
'deleted_at' => NULL,
'archived' => '0',
'warranty_months' => '24',
'depreciate' => '0',
);
+5
View File
@@ -12,6 +12,7 @@ class CategoriesSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$date = new DateTime;
@@ -20,6 +21,7 @@ class CategoriesSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$date = new DateTime;
@@ -28,6 +30,7 @@ class CategoriesSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$date = new DateTime;
@@ -36,6 +39,7 @@ class CategoriesSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$date = new DateTime;
@@ -44,6 +48,7 @@ class CategoriesSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
+39 -18
View File
@@ -15,51 +15,72 @@ class LicenseSeatsSeeder extends Seeder {
$license_seats[] = array(
'license_id' => '1',
'assigned_to' => '1',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
$license_seats[] = array(
'license_id' => '1',
'assigned_to' => NULL,
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'assigned_to' => '0',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
$license_seats[] = array(
'license_id' => '1',
'assigned_to' => NULL,
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'assigned_to' => '0',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
$license_seats[] = array(
'license_id' => '1',
'assigned_to' => NULL,
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'assigned_to' => '0',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
$license_seats[] = array(
'license_id' => '1',
'assigned_to' => '2',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
$license_seats[] = array(
'license_id' => '2',
'assigned_to' => '1',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
// Pending (status_id is null, assigned_to = 0)
$license_seats[] = array(
'license_id' => '2',
'assigned_to' => NULL,
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'assigned_to' => '0',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'deleted_at' => NULL,
'notes' => '',
'user_id' => '1',
);
+30 -21
View File
@@ -13,33 +13,42 @@ class LicensesSeeder extends Seeder {
// Pending (status_id is null, assigned_to = 0)
$license[] = array(
'name' => 'Adobe Photoshop CS6',
'serial' => 'ZOMG-WtF-BBQ-SRSLY',
'purchase_date' => '2013-10-02',
'purchase_cost' => '2435.99',
'order_number' => '987698576946',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'seats' => 5,
'license_name' => NULL,
'license_email' => NULL,
'name' => 'Adobe Photoshop CS6',
'serial' => 'ZOMG-WtF-BBQ-SRSLY',
'purchase_date' => '2013-10-02',
'purchase_cost' => '2435.99',
'order_number' => '987698576946',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'seats' => 5,
'license_name' => '',
'license_email' => '',
'notes' => '',
'user_id' => 1,
'depreciation_id' => 2,
'deleted_at' => NULL,
'depreciate' => '0',
);
// Pending (status_id is null, assigned_to = 0)
$license[] = array(
'name' => 'Git Tower',
'serial' => '98049890394-340485934',
'purchase_date' => '2013-10-02',
'purchase_cost' => '2435.99',
'order_number' => '987698576946',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'seats' => 2,
'license_name' => 'Alison Gianotto',
'license_email' => 'snipe@snipe.net',
'name' => 'Git Tower',
'serial' => '98049890394-340485934',
'purchase_date' => '2013-10-02',
'purchase_cost' => '2435.99',
'order_number' => '987698576946',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'seats' => 2,
'license_name' => 'Alison Gianotto',
'license_email' => 'snipe@snipe.net',
'notes' => '',
'user_id' => 1,
'depreciation_id' => 2,
'deleted_at' => NULL,
'depreciate' => '0',
);
// Delete all the old data
DB::table('licenses')->truncate();
+44 -45
View File
@@ -11,63 +11,62 @@ class LocationsSeeder extends Seeder {
$date = new DateTime;
$location[] = array(
'name' => 'NY - Broad St',
'address' => '200 Broad Street',
'address2' => 'Suite 142',
'city' => 'New York',
'state' => 'NY',
'country' => 'US',
'zip' => '10004',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'name' => 'NY - Broad St',
'address' => '200 Broad Street',
'address2' => 'Suite 142',
'city' => 'New York',
'state' => 'NY',
'country' => 'US',
'zip' => '10004',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$location[] = array(
'name' => 'NY - Water St',
'address' => '200 Broad Street',
'address2' => 'Suite 142',
'city' => 'New York',
'state' => 'NY',
'country' => '10038',
'zip' => '10004',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'name' => 'NY - Water St',
'address' => '200 Broad Street',
'address2' => 'Suite 142',
'city' => 'New York',
'state' => 'NY',
'country' => 'US',
'zip' => '10004',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$location[] = array(
'name' => 'SF - Broadway',
'address' => '200 Broadway',
'address2' => 'Suite 142',
'city' => 'San Francisco',
'state' => 'CA',
'country' => 'US',
'zip' => '94111',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'name' => 'SF - Broadway',
'address' => '200 Broadway',
'address2' => 'Suite 142',
'city' => 'San Francisco',
'state' => 'CA',
'country' => 'US',
'zip' => '94111',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$location[] = array(
'name' => 'LA - Hollywood Blvd',
'address' => '6253 Hollywood Blvd',
'address2' => 'Suite 142',
'city' => 'Los Angeles',
'state' => 'CA',
'country' => 'US',
'zip' => '90028',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'name' => 'LA - Hollywood Blvd',
'address' => '6253 Hollywood Blvd',
'address2' => 'Suite 142',
'city' => 'Los Angeles',
'state' => 'CA',
'country' => 'US',
'zip' => '90028',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
// Delete all the old data
DB::table('locations')->truncate();
+23 -24
View File
@@ -7,36 +7,35 @@ class ManufacturersSeeder extends Seeder {
$date = date("Y-m-d");
$manufacturers[] = array(
'name' => 'Apple',
'created_at' => $date,
'user_id' => 1,
);
$manufacturers[] = array(
'name' => 'Microsoft',
'created_at' => $date,
'user_id' => 1,
);
$manufacturers[] = array(
'name' => 'ASUS',
'created_at' => $date,
'user_id' => 1,
);
$manufacturers[] = array(
'name' => 'Dell',
'created_at' => $date,
'user_id' => 1,
'name' => 'Apple',
'created_at' => $date,
'user_id' => 1,
'updated_at' => $date,
'deleted_at' => NULL,
);
$manufacturers[] = array(
'name' => 'Tower Software',
'created_at' => $date,
'user_id' => 1,
'name' => 'Microsoft',
'created_at' => $date,
'user_id' => 1,
'updated_at' => $date,
'deleted_at' => NULL,
);
$manufacturers[] = array(
'name' => 'Adobe',
'created_at' => $date,
'user_id' => 1,
'name' => 'ASUS',
'created_at' => $date,
'user_id' => 1,
'updated_at' => $date,
'deleted_at' => NULL,
);
$manufacturers[] = array(
'name' => 'Dell',
'created_at' => $date,
'user_id' => 1,
'updated_at' => $date,
'deleted_at' => NULL,
);
+2 -2
View File
@@ -13,8 +13,8 @@ class SettingsSeeder extends Seeder {
$setting[] = array(
'per_page' => '50',
'site_name' => 'Snipe IT Asset Management',
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'created_at' => $date,
'updated_at' => $date,
'user_id' => 1,
);
@@ -16,6 +16,7 @@ class StatuslabelsSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
@@ -24,6 +25,7 @@ class StatuslabelsSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
@@ -32,6 +34,7 @@ class StatuslabelsSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
$status[] = array(
@@ -39,6 +42,7 @@ class StatuslabelsSeeder extends Seeder {
'created_at' => $date->modify('-10 day'),
'updated_at' => $date->modify('-3 day'),
'user_id' => 1,
'deleted_at' => NULL,
);
+1
View File
@@ -7,6 +7,7 @@ return array(
'currency' => '$',
'save' => 'Save',
'checkout' => 'Checkout',
'checkin' => 'Checkin',
'cancel' => 'Cancel'
);
+2 -2
View File
@@ -7,7 +7,7 @@ class ActionLog extends Eloquent {
public function assetlog() {
return $this->belongsTo('Asset','asset_id');
return $this->belongsTo('Asset','asset_id')->withTrashed();
}
public function licenselog() {
@@ -19,7 +19,7 @@ class ActionLog extends Eloquent {
}
public function userlog() {
return $this->belongsTo('User','checkedout_to');
return $this->belongsTo('User','checkedout_to')->withTrashed();
}
+9 -3
View File
@@ -9,7 +9,9 @@ class Asset extends Elegant {
'asset_tag' => 'required|alpha_space|min:3|unique:assets',
'model_id' => 'required',
'serial' => 'required|alpha_dash|min:3',
'warranty_months' => 'integer|min:1',
'warranty_months' => 'integer',
'note' => 'alpha_space',
'notes' => 'alpha_space',
);
@@ -56,7 +58,7 @@ class Asset extends Elegant {
**/
public function assetloc()
{
return $this->assigneduser->hasOne('Location');
return $this->assigneduser->userloc();
}
/**
@@ -64,7 +66,7 @@ class Asset extends Elegant {
*/
public function assetlog()
{
return $this->hasMany('Actionlog','asset_id')->where('asset_type','=','hardware')->orderBy('added_on', 'desc');
return $this->hasMany('Actionlog','asset_id')->where('asset_type','=','hardware')->orderBy('added_on', 'desc')->withTrashed();
}
/**
@@ -143,5 +145,9 @@ class Asset extends Elegant {
return $this->belongsTo('Depreciation','id');
}
public function model()
{
return $this->belongsTo('Model','model_id');
}
}
+2 -7
View File
@@ -16,6 +16,8 @@ class License extends Elegant {
'serial' => 'required|alpha_dash|min:5',
'seats' => 'required|min:1|integer',
'license_email' => 'email',
'note' => 'alpha_space',
'notes' => 'alpha_space',
);
public function assignedusers()
@@ -24,13 +26,6 @@ class License extends Elegant {
}
/**
* Get the asset's location based on the assigned user
**/
public function assetloc()
{
return $this->assignedusers->hasOne('Location');
}
/**
* Get asset logs for this asset
+1
View File
@@ -2,6 +2,7 @@
class LicenseSeat extends Elegant {
protected $table = 'license_seats';
protected $softDelete = true;
public function license()
{
+3 -1
View File
@@ -7,10 +7,12 @@ class Location extends Elegant {
protected $table = 'locations';
protected $rules = array(
'name' => 'required|alpha_space|min:3',
'address' => 'required|alpha_space|min:5',
'address2' => 'alpha_space|min:5',
'city' => 'required|alpha_space|min:3',
'state' => 'required|alpha|min:2|max:2',
'country' => 'required|alpha|min:2|max:2',
'zip' => 'alpha_dash|min:5',
'zip' => 'alpha_dash|min:5',
);
public function has_users()
+1 -1
View File
@@ -5,7 +5,7 @@ class Model extends Elegant {
// Declare the rules for the form validation
protected $rules = array(
'name' => 'required|alpha_space|min:3',
'modelno' => 'alpha_dash|min:1',
'modelno' => 'alpha_space|min:1',
'category_id' => 'required|integer',
);
+5 -5
View File
@@ -33,18 +33,18 @@ class User extends SentryUserModel {
$gravatar = md5(strtolower(trim($this->gravatar)));
// Return the Gravatar url
return "//gravatar.org/avatar/{$gravatar}";
return "//gravatar.com/avatar/{$gravatar}";
}
public function assets()
{
return $this->hasMany('Asset', 'assigned_to');
return $this->hasMany('Asset', 'assigned_to')->withTrashed();
}
public function licenses()
{
return $this->belongsToMany('License', 'license_seats', 'assigned_to', 'license_id');
return $this->belongsToMany('License', 'license_seats', 'assigned_to', 'license_id')->withTrashed()->withPivot('id');
}
@@ -53,7 +53,7 @@ class User extends SentryUserModel {
*/
public function userlog()
{
return $this->hasMany('Actionlog','checkedout_to');
return $this->hasMany('Actionlog','checkedout_to')->withTrashed();
}
@@ -62,7 +62,7 @@ class User extends SentryUserModel {
**/
public function userloc()
{
return $this->hasOne('Location','id');
return $this->belongsTo('Location','location_id')->withTrashed();
}
}
+26 -21
View File
@@ -12,11 +12,27 @@
Route::when('admin/*', 'crsf', array('post'));
Route::when('assets/*', 'crsf', array('post'));
Route::when('hardware/*', 'crsf', array('post'));
Route::group(array('prefix' => 'assets'), function()
Route::group(array('prefix' => 'hardware'), function()
{
Route::get('/', array('as' => '', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
Route::get('/', array('as' => 'hardware', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
Route::get('create', array('as' => 'create/hardware', 'uses' => 'Controllers\Admin\AssetsController@getCreate'));
Route::post('create', 'Controllers\Admin\AssetsController@postCreate');
Route::get('{assetId}/edit', array('as' => 'update/hardware', 'uses' => 'Controllers\Admin\AssetsController@getEdit'));
Route::post('{assetId}/edit', 'Controllers\Admin\AssetsController@postEdit');
Route::get('{assetId}/clone', array('as' => 'clone/hardware', 'uses' => 'Controllers\Admin\AssetsController@getClone'));
Route::post('{assetId}/clone', 'Controllers\Admin\AssetsController@postCreate');
Route::get('{assetId}/delete', array('as' => 'delete/hardware', 'uses' => 'Controllers\Admin\AssetsController@getDelete'));
Route::get('{assetId}/checkout', array('as' => 'checkout/hardware', 'uses' => 'Controllers\Admin\AssetsController@getCheckout'));
Route::post('{assetId}/checkout', 'Controllers\Admin\AssetsController@postCheckout');
Route::get('{assetId}/checkin', array('as' => 'checkin/hardware', 'uses' => 'Controllers\Admin\AssetsController@getCheckin'));
Route::post('{assetId}/checkin', 'Controllers\Admin\AssetsController@postCheckin');
Route::get('{assetId}/view', array('as' => 'view/hardware', 'uses' => 'Controllers\Admin\AssetsController@getView'));
# Asset Model Management
Route::group(array('prefix' => 'models'), function()
{
@@ -29,19 +45,6 @@ Route::group(array('prefix' => 'assets'), function()
Route::get('{modelId}/view', array('as' => 'view/model', 'uses' => 'Controllers\Admin\ModelsController@getView'));
});
Route::get('/', array('as' => 'assets', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
Route::get('create', array('as' => 'create/asset', 'uses' => 'Controllers\Admin\AssetsController@getCreate'));
Route::post('create', 'Controllers\Admin\AssetsController@postCreate');
Route::get('{assetId}/edit', array('as' => 'update/asset', 'uses' => 'Controllers\Admin\AssetsController@getEdit'));
Route::post('{assetId}/edit', 'Controllers\Admin\AssetsController@postEdit');
Route::get('{assetId}/delete', array('as' => 'delete/asset', 'uses' => 'Controllers\Admin\AssetsController@getDelete'));
Route::get('{assetId}/checkout', array('as' => 'checkout/asset', 'uses' => 'Controllers\Admin\AssetsController@getCheckout'));
Route::post('{assetId}/checkout', 'Controllers\Admin\AssetsController@postCheckout');
Route::get('{assetId}/checkin', array('as' => 'checkin/asset', 'uses' => 'Controllers\Admin\AssetsController@postCheckin'));
Route::get('{assetId}/view', array('as' => 'view/asset', 'uses' => 'Controllers\Admin\AssetsController@getView'));
});
@@ -70,15 +73,12 @@ Route::group(array('prefix' => 'admin'), function()
Route::get('{licenseId}/delete', array('as' => 'delete/license', 'uses' => 'Controllers\Admin\LicensesController@getDelete'));
Route::get('{licenseId}/checkout', array('as' => 'checkout/license', 'uses' => 'Controllers\Admin\LicensesController@getCheckout'));
Route::post('{licenseId}/checkout', 'Controllers\Admin\LicensesController@postCheckout');
Route::get('{licenseId}/checkin', array('as' => 'checkin/license', 'uses' => 'Controllers\Admin\LicensesController@postCheckin'));
Route::get('{licenseId}/checkin', array('as' => 'checkin/license', 'uses' => 'Controllers\Admin\LicensesController@getCheckin'));
Route::post('{licenseId}/checkin', 'Controllers\Admin\LicensesController@postCheckin');
Route::get('{licenseId}/view', array('as' => 'view/license', 'uses' => 'Controllers\Admin\LicensesController@getView'));
});
// default admin screen until we get a fancy dashboard up
Route::get('/', array('as' => 'assets', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
# Admin Settings Routes (for categories, maufactureres, etc)
Route::group(array('prefix' => 'settings'), function()
{
@@ -257,6 +257,11 @@ Route::group(array('prefix' => 'account'), function()
|
*/
// Redirect requests to / to the hardware section until we get a fancy dashboard set up
Route::get('/', function()
{
return Redirect::to('hardware');
});
Route::get('/', array('as' => 'home', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
Route::get('reports', array('as' => 'reports', 'uses' => 'Controllers\Admin\AssetsController@getReports'));
+1 -1
View File
@@ -2,5 +2,5 @@
Validator::extend('alpha_space', function($attribute,$value,$parameters)
{
return preg_match("/^[-_,. a-zA-Z0-9]+$/",$value);
return preg_match("/^[-+:?'()_,!. a-zA-Z0-9]+$/",$value);
});
@@ -0,0 +1,63 @@
@extends('backend/layouts/default')
{{-- Page title --}}
@section('title')
@if ($asset->id)
Checkin Asset ::
@else
Checkin Asset ::
@endif
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('hardware') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3> Checkin Asset </h3>
</div>
<form class="form-horizontal" method="post" action="" autocomplete="off">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<!-- Asset Tag -->
<div class="control-group">
<label class="control-label" for="asset_tag">Asset Tag</label>
<div class="controls">
<input class="span4" readonly="readonly" type="text" name="asset_tag" id="asset_tag" value="{{ $asset->asset_tag }}" />
</div>
</div>
<!-- Asset Name -->
<div class="control-group">
<label class="control-label" for="name">Asset Name</label>
<div class="controls">
<input class="span4" readonly="readonly" type="text" name="name" id="asset_name" value="{{ $asset->name }}" />
</div>
</div>
<!-- Notes -->
<div class="control-group {{ $errors->has('note') ? 'error' : '' }}">
<label class="control-label" for="note">Notes</label>
<div class="controls">
<input class="span6" type="text" name="note" id="note" value="{{ Input::old('note', $asset->note) }}" />
{{ $errors->first('note', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('hardware') }}">@lang('general.cancel')</a>
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i>@lang('general.checkin')</button>
</div>
</div>
</form>
@stop
@@ -13,16 +13,17 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('hardware') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
@if ($asset->id)
Checkout Asset to User
Checkout Asset to User
@else
Create Asset
Create Asset
@endif
<div class="pull-right">
<a href="{{ route('assets') }}" class="btn btn-small btn-inverse"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -62,12 +63,21 @@
</div>
</div>
<!-- Notes -->
<div class="control-group {{ $errors->has('note') ? 'error' : '' }}">
<label class="control-label" for="note">Notes</label>
<div class="controls">
<input class="span6" type="text" name="note" id="note" value="{{ Input::old('notes', $asset->note) }}" />
{{ $errors->first('note', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('assets') }}">@lang('general.cancel')</a>
<a class="btn btn-link" href="{{ route('hardware') }}">@lang('general.cancel')</a>
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i>@lang('general.checkout')</button>
</div>
</div>
+143
View File
@@ -0,0 +1,143 @@
@extends('backend/layouts/default')
{{-- Page title --}}
@section('title')
Clone Asset
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('hardware') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>Clone Asset</h3>
</div>
<form class="form-horizontal" method="post" action="" autocomplete="off">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<!-- Asset Tag -->
<div class="control-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
<label class="control-label" for="asset_tag">Asset Tag</label>
<div class="controls">
<input class="span4" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag') }}" />
{{ $errors->first('asset_tag', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Asset Title -->
<div class="control-group {{ $errors->has('name') ? 'error' : '' }}">
<label class="control-label" for="name">Asset Name</label>
<div class="controls">
<input class="span4" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
{{ $errors->first('name', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Serial -->
<div class="control-group {{ $errors->has('serial') ? 'error' : '' }}">
<label class="control-label" for="serial">Serial</label>
<div class="controls">
<input class="span4" type="text" name="serial" id="serial" value="{{ Input::old('serial', $asset->serial) }}" />
{{ $errors->first('serial', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Order Number -->
<div class="control-group {{ $errors->has('order_number') ? 'error' : '' }}">
<label class="control-label" for="order_number">Order Number</label>
<div class="controls">
<input class="span4" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $asset->order_number) }}" />
{{ $errors->first('order_number', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Model -->
<div class="control-group {{ $errors->has('model_id') ? 'error' : '' }}">
<label class="control-label" for="parent">Model</label>
<div class="controls">
{{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2', 'style'=>'min-width:350px')) }}
{{ $errors->first('model_id', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Purchase Date -->
<div class="control-group input-append {{ $errors->has('purchase_date') ? 'error' : '' }}" >
<label class="control-label" for="purchase_date">Purchase Date</label>
<div class="controls">
<input type="text" class="datepicker span2" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $asset->purchase_date) }}">
{{ $errors->first('purchase_date', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Purchase Cost -->
<div class="control-group {{ $errors->has('purchase_cost') ? 'error' : '' }}">
<label class="control-label" for="purchase_cost">Purchase Cost</label>
<div class="controls">
<div class="input-prepend">
<span class="add-on">$</span>
<input class="span2" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', $asset->purchase_cost) }}" />
{{ $errors->first('purchase_cost', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
</div>
<!-- Warrantee -->
<div class="control-group {{ $errors->has('warranty_months') ? 'error' : '' }}">
<label class="control-label" for="serial">Warranty</label>
<div class="controls">
<input class="span1" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" /> months
{{ $errors->first('warranty_months', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Depreciation -->
<div class="control-group {{ $errors->has('depreciation_id') ? 'error' : '' }}">
<label class="control-label" for="parent">Depreciation</label>
<div class="controls">
<div class="field-box">
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $asset->depreciation_id), array('class'=>'select2', 'style'=>'width:250px')) }}
{{ $errors->first('depreciation_id', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
</div>
<!-- Status -->
<div class="control-group {{ $errors->has('status_id') ? 'error' : '' }}">
<label class="control-label" for="parent">Status</label>
<div class="controls">
<div class="field-box">
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2', 'style'=>'width:250px')) }}
{{ $errors->first('depreciation_id', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
</div>
<!-- Notes -->
<div class="control-group {{ $errors->has('notes') ? 'error' : '' }}">
<label class="control-label" for="notes">Notes</label>
<div class="controls">
<input class="span6" type="text" name="notes" id="notes" value="{{ Input::old('notes', $asset->notes) }}" />
{{ $errors->first('notes', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> Save</button>
</div>
</div>
</form>
@stop
@@ -13,16 +13,23 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
@if ($asset->id)
<a href="{{ route('view/hardware',$asset->id) }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
@else
<a href="{{ route('hardware') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
@endif
</div>
<h3>
@if ($asset->id)
Asset Update
Asset Update
@else
Create Asset
Create Asset
@endif
<div class="pull-right">
<a href="{{ route('assets') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -125,7 +132,7 @@
</div>
</div>
<!-- Depreciation -->
<!-- Status -->
<div class="control-group {{ $errors->has('status_id') ? 'error' : '' }}">
<label class="control-label" for="parent">Status</label>
<div class="controls">
@@ -154,7 +161,12 @@
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('assets') }}">Cancel</a>
@if ($asset->id)
<a class="btn btn-link" href="{{ route('view/hardware', $asset->id) }}">Cancel</a>
@else
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
@endif
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> Save</button>
</div>
</div>
@@ -23,7 +23,11 @@ Assets ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
<div class="pull-right">
<a href="{{ route('create/hardware') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
<h3>
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD') || Input::get('Deployed'))
@if (Input::get('Pending'))
Pending
@@ -37,19 +41,8 @@ Assets ::
@else
All
@endif
Assets
<div class="pull-right">
<a class="btn-flat white" href="{{ URL::to('admin?Deployed=true') }}">Deployed</a>
<a class="btn-flat white" href="{{ URL::to('admin?RTD=true') }}">Ready to Deploy</a>
<a class="btn-flat white" href="{{ URL::to('admin?Pending=true') }}">Pending</a>
<a class="btn-flat white" href="{{ URL::to('admin?Undeployable=true') }}">Un-Deployable</a>
<a class="btn-flat white" href="{{ URL::to('admin') }}">Show All</a>
<a href="{{ route('create/asset') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
</h3>
</div>
@@ -59,17 +52,17 @@ Assets ::
<table id="example">
<thead>
<tr role="row">
<th class="span2" bSortable="true">@lang('admin/assets/table.asset_tag')</th>
<th class="span2" bSortable="true"><span class="line"></span>@lang('admin/assets/table.title')</th>
<th class="span2" bSortable="true"><span class="line"></span>@lang('admin/assets/table.serial')</th>
<th class="span2" bSortable="true">@lang('admin/hardware/table.asset_tag')</th>
<th class="span2" bSortable="true"><span class="line"></span>@lang('admin/hardware/table.title')</th>
<th class="span2" bSortable="true"><span class="line"></span>@lang('admin/hardware/table.serial')</th>
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
<th class="span2" bSortable="true">Status</th>
@else
<th class="span2" bSortable="true">@lang('admin/assets/table.checkoutto')</th>
<th class="span2" bSortable="true">@lang('admin/assets/table.location')</th>
<th class="span2" bSortable="true">@lang('admin/hardware/table.checkoutto')</th>
<th class="span2" bSortable="true">@lang('admin/hardware/table.location')</th>
@endif
<th class="span1">@lang('admin/assets/table.change')</th>
<th class="span1">@lang('admin/hardware/table.change')</th>
<th class="span2" bSortable="false">@lang('table.actions')</th>
</tr>
</thead>
@@ -77,8 +70,8 @@ Assets ::
@foreach ($assets as $asset)
<tr>
<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><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->asset_tag }}</a></td>
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->name }}</a></td>
<td>{{ $asset->serial }}</td>
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
<td>
@@ -115,14 +108,14 @@ Assets ::
<td>
@if ($asset->assigned_to != 0)
<a href="{{ route('checkin/asset', $asset->id) }}" class="btn-flat info">Checkin</a>
<a href="{{ route('checkin/hardware', $asset->id) }}" class="btn-flat info">Checkin</a>
@else
<a href="{{ route('checkout/asset', $asset->id) }}" class="btn-flat success">Checkout</a>
<a href="{{ route('checkout/hardware', $asset->id) }}" class="btn-flat success">Checkout</a>
@endif
</td>
<td nowrap="nowrap">
<a href="{{ route('update/asset', $asset->id) }}" class="btn-flat white">@lang('button.edit')</a>
<a data-html="false" class="btn-flat danger delete-asset" data-toggle="modal" href="{{ route('delete/asset', $asset->id) }}" data-content="Are you sure you wish to delete this asset?" data-title="Delete {{ htmlspecialchars($asset->asset_tag) }}?" onClick="return false;">@lang('button.delete')</a>
<a href="{{ route('update/hardware', $asset->id) }}" class="btn-flat white">@lang('button.edit')</a>
<a data-html="false" class="btn-flat danger delete-asset" data-toggle="modal" href="{{ route('delete/hardware', $asset->id) }}" data-content="Are you sure you wish to delete this asset?" data-title="Delete {{ htmlspecialchars($asset->asset_tag) }}?" onClick="return false;">@lang('button.delete')</a>
</td>
</tr>
@endforeach
@@ -10,30 +10,73 @@ View Asset {{ $asset->asset_tag }} ::
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@if ($asset->status_id == 1)
@if ($asset->assigned_to != 0)
<li><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn-flat info">Checkin</a></li>
@endif
@elseif ($asset->status_id == 0)
<li><a href="{{ route('checkout/hardware', $asset->id) }}" class="btn-flat success">Checkout</a></li>
@endif
<li><a href="{{ route('update/hardware', $asset->id) }}">Edit Asset</a></li>
<li><a href="{{ route('clone/hardware', $asset->id) }}">Clone Asset</a></li>
</ul>
</div>
<h3 class="name">History for {{ $asset->asset_tag }} ({{ $asset->name }})
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@if ($asset->assigned_to != 0)
<li><a href="{{ route('checkin/asset', $asset->id) }}" class="btn-flat info">Checkin</a></li>
@else
<li><a href="{{ route('checkout/asset', $asset->id) }}" class="btn-flat success">Checkout</a></li>
@endif
<li><a href="{{ route('update/asset', $asset->id) }}">Edit Asset</a></li>
</ul>
</div>
</h3>
<div class="row-fluid profile">
<!-- bio, new note & orders column -->
<div class="span9 bio">
<div class="profile-box">
<!-- details snapshot box -->
<div class="row-fluid show-grid">
<div class="span9"></div>
@if ($asset->model->manufacturer)
<div class="span4"><strong>Manufacturer: </strong> {{ $asset->model->manufacturer->name }} </div>
<div class="span6"><strong>Model:</strong> {{ $asset->model->name }} / {{ $asset->model->modelno }}</div>
@endif
@if ($asset->purchase_date)
<div class="span4"><strong>Purchased On: </strong>{{ $asset->purchase_date }} </div>
@endif
@if ($asset->purchase_cost)
<div class="span4"><strong>Purchase Cost:</strong> ${{ number_format($asset->purchase_cost,2) }} </div>
@endif
@if ($asset->order_number)
<div class="span4"><strong>Order #:</strong> {{ $asset->order_number }} </div>
@endif
@if ($asset->warranty_months)
<div class="span4"><strong>Warranty:</strong> {{ $asset->warranty_months }} months</div>
<div class="span4"><strong>Expires:</strong> {{ $asset->warrantee_expires() }}</div>
@endif
@if ($asset->depreciation)
<div class="span4"><strong>Depreciation: </strong>{{ $asset->depreciation->name }}
({{ $asset->depreciation->months }} months)</div>
<div class="span4"><strong>Depreciates On: </strong>{{ $asset->depreciated_date() }} </div>
<div class="span4"><strong>Fully Depreciated: </strong>{{ $asset->months_until_depreciated()->m }} months,
{{ $asset->months_until_depreciated()->y }} years</div>
@endif
</div>
<br>
<!-- checked out assets table -->
@@ -42,9 +85,10 @@ View Asset {{ $asset->asset_tag }} ::
<tr>
<th class="span1"></th>
<th class="span3"><span class="line"></span>Date</th>
<th class="span3"><span class="line"></span>Admin</th>
<th class="span3"><span class="line"></span>Action</th>
<th class="span3"><span class="line"></span>User</th>
<th class="span2"><span class="line"></span>Admin</th>
<th class="span2"><span class="line"></span>Action</th>
<th class="span2"><span class="line"></span>User</th>
<th class="span3"><span class="line"></span>Note</th>
</tr>
</thead>
<tbody>
@@ -63,7 +107,6 @@ View Asset {{ $asset->asset_tag }} ::
@endif
</td>
<td>{{ $log->action_type }}</td>
<td>
@if (isset($log->checkedout_to))
<a href="{{ route('view/user', $log->checkedout_to) }}">
@@ -71,6 +114,11 @@ View Asset {{ $asset->asset_tag }} ::
</a>
@endif
</td>
<td>
@if ($log->note)
{{ $log->note }}
@endif
</td>
</tr>
@endforeach
@endif
@@ -86,8 +134,7 @@ View Asset {{ $asset->asset_tag }} ::
</td>
<td>created asset</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
@@ -98,33 +145,6 @@ View Asset {{ $asset->asset_tag }} ::
<!-- side address column -->
<div class="span3 address pull-right">
<h6><br>More Info:</h6>
<ul>
@if ($asset->purchase_date)
<li>Purchased On: {{ $asset->purchase_date }} </li>
@endif
@if ($asset->purchase_cost)
<li>Purchase Cost: ${{ number_format($asset->purchase_cost) }} </li>
@endif
@if ($asset->order_number)
<li>Order #: {{ $asset->order_number }} </li>
@endif
@if ($asset->warranty_months)
<li>Warranty: {{ $asset->warranty_months }} months</li>
<li>Expires: {{ $asset->warrantee_expires() }}</li>
@endif
@if ($asset->depreciation)
<li>Depreciation: {{ $asset->depreciation->name }} ({{ $asset->depreciation->months }} months)</li>
<li>Depreciates On: {{ $asset->depreciated_date() }} </li>
<li>Fully Depreciated: {{ $asset->months_until_depreciated()->m }} months, {{ $asset->months_until_depreciated()->y }} years</li>
@endif
</ul>
@if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0)))
<h6><br>Checked Out To:</h6>
<ul>
@@ -145,10 +165,6 @@ View Asset {{ $asset->asset_tag }} ::
@endif
@if (isset($asset->assigneduser->email))
<li><br /><i class="icon-envelope-alt"></i> <a href="mailto:{{ $asset->assigneduser->email }}">{{ $asset->assigneduser->email }}</a></li>
@endif
@@ -157,14 +173,38 @@ View Asset {{ $asset->asset_tag }} ::
<li><i class="icon-phone"></i> {{ $asset->assigneduser->phone }}</li>
@endif
<li><br /><a href="{{ route('checkin/asset', $asset->id) }}" class="btn-flat large info ">Checkin Asset</a></li>
<li><br /><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn-flat large info ">Checkin Asset</a></li>
</ul>
@elseif (($asset->status_id ) && ($asset->status_id > 1))
@if ($asset->assetstatus)
<h6><br>{{ $asset->assetstatus->name }} Asset</h6>
<div class="col-md-6">
<div class="alert alert-warning alert-block">
<i class="icon-warning-sign"></i>
<strong>Warning: </strong> This asset has been marked <strong>{{ $asset->assetstatus->name }}</strong> and is currently undeployable.
If this status has changed, please update the asset status.
</div>
</div>
@endif
@elseif ($asset->status_id == NULL)
<h6><br>Pending Asset</h6>
<div class="col-md-6">
<div class="alert alert-info alert-block">
<i class="icon-info-sign"></i>
<strong>Warning: </strong> This asset has been marked as pending and is currently undeployable.
If this status has changed, please update the asset status.
</div>
</div>
@else
<h6><br>Checkout Asset</h6>
<ul>
<li><br><br />This asset is not currently assigned to anyone. You may check it into inventory
using the button below.</li>
<li><br><br /><a href="{{ route('checkout/asset', $asset->id) }}" class="btn-flat large success">Checkout Asset</a></li>
<li>This asset is not checked out to anyone yet. Use the button below to check it out now.</li>
<li><br><br /><a href="{{ route('checkout/hardware', $asset->id) }}" class="btn-flat large success">Checkout Asset</a></li>
</ul>
@endif
</div>
+53 -16
View File
@@ -41,13 +41,13 @@
<!-- open sans font -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- lato font -->
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Lato:300,400,700,900,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
@@ -86,6 +86,37 @@
<!-- <li class="hidden-phone">
<input class="search" type="text" />
</li> -->
<!--
<li class="notification-dropdown hidden-phone">
<a href="#" class="trigger">
<i class="icon-warning-sign"></i>
<span class="count">8</span>
</a>
<div class="pop-dialog">
<div class="pointer right">
<div class="arrow"></div>
<div class="arrow_border"></div>
</div>
<div class="body">
<a href="#" class="close-icon"><i class="icon-remove-sign"></i></a>
<div class="notifications">
<h3>You have 2 new notifications</h3>
<a href="#" class="item">
<i class="icon-signin"></i> (these are placeholder)
<span class="time"><i class="icon-time"></i> 13 min.</span>
</a>
<a href="#" class="item">
<i class="icon-signin"></i> Warranty expiring!
<span class="time"><i class="icon-time"></i> 18 min.</span>
</a>
<div class="footer">
<a href="#" class="logout">View all notifications</a>
</div>
</div>
</div>
</div>
</li> -->
<li class="dropdown">
<a href="#" class="dropdown-toggle hidden-phone" data-toggle="dropdown">
@@ -114,7 +145,7 @@
</li>
</ul>
</li>
<li class="dropdown{{ (Request::is('admin/users*|admin/groups*') ? ' active' : '') }}">
<li class="dropdown{{ (Request::is('admin/users*|admin/groups*') ? ' active' : '') }} hidden-phone">
<a class="dropdown-toggle" data-toggle="dropdown" href="{{ URL::to('admin/users') }}">
<i class="icon-wrench icon-white"></i> Admin <span class="caret"></span>
</a>
@@ -165,19 +196,24 @@
<div id="sidebar-nav">
<ul id="dashboard-menu">
<li{{ (Request::is('admin') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
<a href="{{ URL::to('admin') }}">
<li{{ (Request::is('hardware') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
<a href="#" class="dropdown-toggle">
<i class="icon-barcode"></i>
<span>Assets</span>
<i class="icon-chevron-down"></i>
</a>
<ul class="submenu{{ (Request::is('hardware*') ? ' active' : '') }}">
<li><a href="{{ URL::to('hardware?Deployed=true') }}" {{ (Request::query('Deployed') ? ' class="active"' : '') }} >Deployed</a></li>
<li><a href="{{ URL::to('hardware?RTD=true') }}" {{ (Request::query('RTD') ? ' class="active"' : '') }} >Ready to Deploy</a></li>
<li><a href="{{ URL::to('hardware?Pending=true') }}" {{ (Request::query('Pending') ? ' class="active"' : '') }} >Pending</a></li>
<li><a href="{{ URL::to('hardware?Undeployable=true') }}" {{ (Request::query('Undeployable') ? ' class="active"' : '') }} >Un-Deployable</a></li>
<li><a href="{{ URL::to('hardware') }}">List All</a></li>
<li><a href="{{ URL::to('hardware/models') }}" {{ (Request::is('hardware/models*') ? ' class="active"' : '') }} >Asset Models</a></li>
</ul>
</li>
<li{{ (Request::is('assets/models*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
<a href="{{ URL::to('assets/models') }}">
<i class="icon-th-list"></i>
<span>Models</span>
</a>
</li>
<li{{ (Request::is('admin/licenses*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
<a href="{{ URL::to('admin/licenses') }}">
<i class="icon-certificate"></i>
@@ -214,7 +250,7 @@
<div class="row-fluid stats-row">
<div class="span3 stat">
<div class="data">
<a href="{{ URL::to('admin') }}">
<a href="{{ URL::to('hardware') }}">
<span class="number">{{ number_format(Asset::assetcount()) }}</span>
<span style="color:black">total assets</span>
</a>
@@ -222,7 +258,7 @@
</div>
<div class="span3 stat">
<div class="data">
<a href="{{ URL::to('admin?RTD=true') }}">
<a href="{{ URL::to('hardware?RTD=true') }}">
<span class="number">{{ number_format(Asset::availassetcount()) }}</span>
<span style="color:black">assets available</span>
</a>
@@ -281,7 +317,7 @@
<!-- scripts -->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="{{ asset('assets/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('assets/js/jquery-ui-1.10.2.custom.min.js') }}"></script>
<!-- knob -->
@@ -292,6 +328,7 @@
<script src="{{ asset('assets/js/jquery.uniform.min.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap.datepicker.js') }}"></script>
<script src="{{ asset('assets/js/jquery.dataTables.js') }}"></script>
<script src="{{ asset('assets/js/theme.js') }}"></script>
<script type="text/javascript">
$(function () {
@@ -0,0 +1,69 @@
@extends('backend/layouts/default')
{{-- Page title --}}
@section('title')
Checkin License
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('licenses') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>Checkin License</h3>
</div>
<form class="form-horizontal" method="post" action="" autocomplete="off">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<!-- Asset Tag -->
<div class="control-group">
<label class="control-label" for="asset_tag">Asset Tag</label>
<div class="controls">
<input class="span4" readonly="readonly" type="text" name="asset_tag" id="asset_tag" value="{{ $licenseseat->license->asset_tag }}" />
</div>
</div>
<!-- Asset Name -->
<div class="control-group">
<label class="control-label" for="name">Asset Name</label>
<div class="controls">
<input class="span4" readonly="readonly" type="text" name="name" id="asset_name" value="{{ $licenseseat->license->name }}" />
</div>
</div>
<!-- Serial -->
<div class="control-group">
<label class="control-label" for="serial">Serial</label>
<div class="controls">
<input class="span4" readonly="readonly" type="text" name="serial" id="serial" value="{{ $licenseseat->license->serial }}" />
</div>
</div>
<!-- Notes -->
<div class="control-group {{ $errors->has('note') ? 'error' : '' }}">
<label class="control-label" for="note">Notes</label>
<div class="controls">
<input class="span6" type="text" name="note" id="note" value="{{ Input::old('note', $licenseseat->note) }}" />
{{ $errors->first('note', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('licenses') }}">@lang('general.cancel')</a>
<button type="submit" class="btn-flat success">@lang('general.checkin')</button>
</div>
</div>
</form>
@stop
+21 -20
View File
@@ -9,24 +9,19 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('licenses') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>Checkout License to User</h3>
<div class="pull-right">
<a href="{{ route('assets') }}" class="btn btn-small btn-inverse"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
<form class="form-horizontal" method="post" action="" autocomplete="off">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<!-- Tabs Content -->
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<!-- Asset Tag -->
<div class="control-group">
<label class="control-label" for="asset_tag">Asset Tag</label>
@@ -42,7 +37,7 @@
<input class="span4" readonly="readonly" type="text" name="name" id="asset_name" value="{{ $licenseseat->license->name }}" />
</div>
</div>
<!-- Asset Name -->
<!-- Serial -->
<div class="control-group">
<label class="control-label" for="serial">Serial</label>
<div class="controls">
@@ -50,7 +45,6 @@
</div>
</div>
<!-- User -->
<div class="control-group {{ $errors->has('assigned_to') ? 'error' : '' }}">
<label class="control-label" for="parent">Checkout to</label>
@@ -60,15 +54,22 @@
</div>
</div>
</div>
<!-- Notes -->
<div class="control-group {{ $errors->has('note') ? 'error' : '' }}">
<label class="control-label" for="note">Notes</label>
<div class="controls">
<input class="span6" type="text" name="note" id="note" value="{{ Input::old('notes', $licenseseat->note) }}" />
{{ $errors->first('note', '<span class="help-inline"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('licenses') }}">@lang('general.cancel')</a>
<button type="submit" class="btn-flat success">@lang('general.checkout')</button>
</div>
</div>
<!-- Form actions -->
<div class="control-group">
<div class="controls">
<a class="btn btn-link" href="{{ route('licenses') }}">@lang('general.cancel')</a>
<button type="submit" class="btn-flat success">@lang('general.checkout')</button>
</div>
</div>
</form>
+14 -3
View File
@@ -13,6 +13,15 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
@if ($license->id)
<a href="{{ route('view/license',$license->id) }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
@else
<a href="{{ route('licenses') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
@endif
</div>
<h3>
@if ($license->id)
Update License
@@ -20,9 +29,7 @@
Create License
@endif
<div class="pull-right">
<a href="{{ route('licenses') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -117,7 +124,11 @@
<!-- Form actions -->
<div class="control-group">
<div class="controls">
@if ($license->id)
<a class="btn btn-link" href="{{ route('view/license', $license->id) }}">@lang('general.cancel')</a>
@else
<a class="btn btn-link" href="{{ route('licenses') }}">@lang('general.cancel')</a>
@endif
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
</div>
</div>
+4 -6
View File
@@ -8,13 +8,11 @@ Licenses ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Software Licenses
<div class="pull-right">
<a href="{{ route('create/licenses') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
<div class="pull-right">
<a href="{{ route('create/licenses') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
<h3>Software Licenses</h3>
</div>
<table id="example">
+27 -23
View File
@@ -10,25 +10,24 @@ View License {{ $license->name }} ::
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<h3 class="name">History for ({{ $license->name }})
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@if ($license->assigned_to != 0)
<li><a href="{{ route('checkin/license', $license->id) }}" class="btn-flat info">Checkin</a></li>
@else
<li><a href="{{ route('checkout/license', $license->id) }}" class="btn-flat success">Checkout</a></li>
@endif
<li><a href="{{ route('update/license', $license->id) }}">Edit License</a></li>
</ul>
</div>
@if ($license->assigned_to != 0)
<li><a href="{{ route('checkin/license', $license->id) }}" class="btn-flat info">Checkin</a></li>
@else
<li><a href="{{ route('checkout/license', $license->id) }}" class="btn-flat success">Checkout</a></li>
@endif
<li><a href="{{ route('update/license', $license->id) }}">Edit License</a></li>
</ul>
</div>
</h3>
<h3 class="name">History for ({{ $license->name }})</h3>
<div class="row-fluid profile">
<!-- bio, new note & orders column -->
@@ -56,7 +55,7 @@ View License {{ $license->name }} ::
<td>Seat {{ $count }} </td>
<td>
@if ($licensedto->assigned_to)
<a href="{{ route('view/user', $licensedto->id) }}">
<a href="{{ route('view/user', $licensedto->assigned_to) }}">
{{ $licensedto->user->fullName() }}
</a>
@endif
@@ -87,7 +86,8 @@ View License {{ $license->name }} ::
<th class="span3"><span class="line"></span>Date</th>
<th class="span3"><span class="line"></span>Admin</th>
<th class="span3"><span class="line"></span>Action</th>
<th class="span3"><span class="line"></span>User</th>
<th class="span3"><span class="line"></span>User</th>
<th class="span3"><span class="line"></span>Note</th>
</tr>
</thead>
<tbody>
@@ -108,13 +108,16 @@ View License {{ $license->name }} ::
<td>{{ $log->action_type }}</td>
<td>
@if (isset($log->checkedout_to))
@if (($log->checkedout_to) && ($log->checkedout_to > 0 ))
<a href="{{ route('view/user', $log->checkedout_to) }}">
{{ $log->userlog->fullName() }}
{{ $log->userlog->fullName() }}
</a>
@endif
</td>
<td>
@if ($log->note)
{{ $log->note }}
@endif
</td>
</tr>
@endforeach
@@ -131,6 +134,7 @@ View License {{ $license->name }} ::
</td>
<td>created asset</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
@@ -157,7 +161,7 @@ View License {{ $license->name }} ::
<li>Purchase Date: {{ $license->purchase_date }} </li>
@endif
@if ($license->purchase_cost)
<li>Purchase Cost: ${{ number_format($license->purchase_cost) }} </li>
<li>Purchase Cost: ${{ number_format($license->purchase_cost,2) }} </li>
@endif
@if ($license->order_number)
<li>Order #: {{ $license->order_number }} </li>
+20 -3
View File
@@ -15,6 +15,11 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('locations') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
@if ($location->id)
Update Location
@@ -22,9 +27,7 @@
Create Location
@endif
<div class="pull-right">
<a href="{{ route('locations') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -45,6 +48,20 @@
{{ $errors->first('name', '<span class="help-inline">:message</span>') }}
</div>
</div>
<div class="control-group {{ $errors->has('address') ? 'error' : '' }}">
<label class="control-label" for="address">Street Address 1</label>
<div class="controls">
<input class="span4" type="text" name="address" id="address" value="{{ Input::old('address', $location->address) }}" />
{{ $errors->first('address', '<span class="help-inline">:message</span>') }}
</div>
</div>
<div class="control-group {{ $errors->has('address2') ? 'error' : '' }}">
<label class="control-label" for="address2">Street Address 2</label>
<div class="controls">
<input class="span4" type="text" name="address2" id="address2" value="{{ Input::old('address2', $location->address2) }}" />
{{ $errors->first('address2', '<span class="help-inline">:message</span>') }}
</div>
</div>
<div class="control-group {{ $errors->has('city') ? 'error' : '' }}">
<label class="control-label" for="name">City</label>
<div class="controls">
+7 -8
View File
@@ -9,21 +9,20 @@ Locations ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Locations
<div class="pull-right">
<a href="{{ route('create/location') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
<div class="pull-right">
<a href="{{ route('create/location') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
<h3>Locations</h3>
</div>
<div class="row-fluid table">
<table id="example">
<thead>
<tr role="row">
<th class="span4">@lang('admin/locations/table.name')</th>
<th class="span2">Address</th>
<th class="span3">@lang('admin/locations/table.name')</th>
<th class="span3">Address</th>
<th class="span2">@lang('admin/locations/table.city'),
@lang('admin/locations/table.state')
@lang('admin/locations/table.country')</th>
@@ -13,6 +13,11 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('manufacturers') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
@if ($manufacturer->id)
Update Manufacturer
@@ -20,9 +25,6 @@
Create manufacturer
@endif
<div class="pull-right">
<a href="{{ route('manufacturers') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -9,13 +9,12 @@ Asset Manufacturers ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Asset Manufacturers
<div class="pull-right">
<a href="{{ route('create/manufacturer') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
<div class="pull-right">
<a href="{{ route('create/manufacturer') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
<h3>Asset Manufacturers</h3>
</div>
@@ -23,8 +22,8 @@ Asset Manufacturers ::
<table id="example">
<thead>
<tr role="row">
<th class="span10">@lang('admin/manufacturers/table.title')</th>
<th class="span2">@lang('table.actions')</th>
<th class="span6">@lang('admin/manufacturers/table.title')</th>
<th class="span3">@lang('table.actions')</th>
</tr>
</thead>
<tbody>
+12 -4
View File
@@ -13,16 +13,16 @@
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('models') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
@if ($model->id)
Update Model
@else
Create New Model
@endif
<div class="pull-right">
<a href="{{ route('models') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -50,6 +50,14 @@
</div>
</div>
<!-- Manufacturer -->
<div class="control-group {{ $errors->has('manufacturer_id') ? 'error' : '' }}">
<label class="control-label" for="parent">Manufacturer</label>
<div class="controls">
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:250px')) }}
{{ $errors->first('manufacturer_id', '<span class="help-inline">:message</span>') }}
</div>
</div>
<!-- Depreciation -->
<div class="control-group {{ $errors->has('depreciation_id') ? 'error' : '' }}">
+3 -4
View File
@@ -9,13 +9,12 @@ Asset Models ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Asset Models
<div class="pull-right">
<div class="pull-right">
<a href="{{ route('create/model') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
<h3>Asset Models</h3>
</div>
<table id="example">
+11 -11
View File
@@ -10,17 +10,17 @@ View Model {{ $model->model_tag }} ::
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<h3 class="name">History for {{ $model->name }}
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="{{ route('update/model', $model->id) }}">Edit Asset</a></li>
</ul>
</div>
</h3>
<div class="btn-group pull-right">
<button class="btn glow">Actions</button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="{{ route('update/model', $model->id) }}">Edit Asset</a></li>
</ul>
</div>
<h3 class="name">History for {{ $model->name }} </h3>
<div class="row-fluid profile">
+10 -12
View File
@@ -11,10 +11,8 @@ Depreciation Report
<div class="page-header">
<h3>
Depreciation Report
<div class="pull-right">
<div class="pull-right">
<div class="btn-group settings">
<button class="btn glow"><i class="icon-download-alt"></i></button>
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
@@ -27,7 +25,7 @@ Depreciation Report
</div>
</div>
</h3>
<h3>Depreciation Report</h3>
</div>
@@ -35,14 +33,14 @@ Depreciation Report
<table id="example">
<thead>
<tr role="row">
<th class="span2">@lang('admin/assets/table.asset_tag')</th>
<th class="span2">@lang('admin/assets/table.title')</th>
<th class="span2">@lang('admin/assets/table.serial')</th>
<th class="span3">@lang('admin/assets/table.checkoutto')</th>
<th class="span2">@lang('admin/assets/table.location')</th>
<th class="span2">@lang('admin/assets/table.purchase_date')</th>
<th class="span1">@lang('admin/assets/table.purchase_cost')</th>
<th class="span1">@lang('admin/assets/table.book_value')</th>
<th class="span2">@lang('admin/hardware/table.asset_tag')</th>
<th class="span2">@lang('admin/hardware/table.title')</th>
<th class="span2">@lang('admin/hardware/table.serial')</th>
<th class="span3">@lang('admin/hardware/table.checkoutto')</th>
<th class="span2">@lang('admin/hardware/table.location')</th>
<th class="span2">@lang('admin/hardware/table.purchase_date')</th>
<th class="span1">@lang('admin/hardware/table.purchase_cost')</th>
<th class="span1">@lang('admin/hardware/table.book_value')</th>
<th class="span1">Diff</th>
</tr>
</thead>
+3 -3
View File
@@ -10,12 +10,12 @@
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<h3 class="name">Update Settings
<div class="pull-right">
<div class="pull-right">
<a href="{{ route('app') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
<h3 class="name">Update Settings</h3>
<div class="row-fluid profile">
+7 -5
View File
@@ -10,11 +10,13 @@ Settings ::
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<h3 class="name">Settings
<div class="pull-right">
<a href="{{ route('edit/settings') }}" class="btn-flat white"> @lang('button.edit') Settings</a>
</div>
</h3>
<div class="pull-right">
<a href="{{ route('edit/settings') }}" class="btn-flat white"> @lang('button.edit') Settings</a>
</div>
<h3 class="name">Settings</h3>
<div class="row-fluid profile">
@@ -14,17 +14,16 @@
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<div class="pull-right">
<a href="{{ route('statuslabels') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3 class="name">
@if ($statuslabel->id)
Update Status Label
@else
Create New Status Label
@endif
<div class="pull-right">
<a href="{{ route('statuslabels') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
@@ -10,11 +10,11 @@ Status Labels
@section('content')
<div id="pad-wrapper" class="user-profile">
<!-- header -->
<h3 class="name">Status Labels
<div class="pull-right">
<div class="pull-right">
<a href="{{ route('create/statuslabel') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
</h3>
<h3 class="name">Status Labels</h3>
<div class="row-fluid profile">
+6 -5
View File
@@ -9,12 +9,13 @@ Create a User ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<div class="pull-right">
<a href="{{ route('users') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
Create a New User
<div class="pull-right">
<a href="{{ route('users') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
</h3>
</div>
@@ -83,7 +84,7 @@ Create a User ::
<div class="control-group {{ $errors->has('email') ? 'error' : '' }}">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="{{ Input::old('email') }}" />
<input type="email" name="email" id="email" value="{{ Input::old('email') }}" />
{{ $errors->first('email', '<span class="help-inline">:message</span>') }}
</div>
</div>
+3 -3
View File
@@ -9,12 +9,12 @@ Update User {{ $user->fullName() }} ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Update User {{ $user->fullName() }}
<div class="pull-right">
<a href="{{ route('users') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
</div>
<h3>
Update User {{ $user->fullName() }}
</h3>
</div>
@@ -84,7 +84,7 @@ Update User {{ $user->fullName() }} ::
<div class="control-group {{ $errors->has('email') ? 'error' : '' }}">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="{{ Input::old('email', $user->email) }}" />
<input type="email" name="email" id="email" value="{{ Input::old('email', $user->email) }}" />
{{ $errors->first('email', '<span class="help-inline">:message</span>') }}
</div>
</div>
+21 -7
View File
@@ -9,17 +9,31 @@ User Management ::
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
User Management
<div class="pull-right">
<a href="{{ route('create/user') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> Create New</a>
</div>
<div class="pull-right">
@if (Input::get('onlyTrashed'))
<a class="btn-flat white" href="{{ URL::to('admin/users') }}">Show Current Users</a>
@else
<a class="btn-flat white" href="{{ URL::to('admin/users?onlyTrashed=true') }}">Show Deleted Users</a>
@endif
<a href="{{ route('create/user') }}" class="btn-flat success"><i class="icon-plus-sign icon-white"></i> New User</a>
</div>
<h3>
@if (Input::get('onlyTrashed'))
Deleted
@else
Current
@endif
Users
</h3>
</div>
<a class="btn-flat white" href="{{ URL::to('admin/users?withTrashed=true') }}">Include Deleted Users</a>
<a class="btn-flat white" href="{{ URL::to('admin/users?onlyTrashed=true') }}">Include Only Deleted Users</a>
<br><br>
@if ($users->getTotal() > 10)
+11 -12
View File
@@ -20,9 +20,6 @@ View User {{ $user->fullName() }} ::
<a href="{{ route('update/user', $user->id) }}" class="btn-flat white large pull-right edit"><i class="icon-pencil"></i> @lang('button.edit') This User</a>
</div>
<div class="row-fluid profile">
<!-- bio, new note & orders column -->
<div class="span9 bio">
@@ -52,10 +49,10 @@ View User {{ $user->fullName() }} ::
Software
@endif
</td>
<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><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->asset_tag }}</a></td>
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->name }}</a></td>
<td> <a href="{{ route('checkin/asset', $asset->id) }}" class="btn-flat info">Checkin</a></td>
<td> <a href="{{ route('checkin/hardware', $asset->id) }}" class="btn-flat info">Checkin</a></td>
</tr>
@endforeach
</tbody>
@@ -95,8 +92,8 @@ View User {{ $user->fullName() }} ::
</td>
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->serial }}</a></td>
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->name }}</a></td>
<td> <a href="{{ route('checkin/license', $license->id) }}" class="btn-flat info">Checkin</a></td>
<td> <a href="{{ route('checkin/license', $license->pivot->id) }}" class="btn-flat info">Checkin</a>
</td>
</tr>
@endforeach
</tbody>
@@ -133,7 +130,7 @@ View User {{ $user->fullName() }} ::
<td>{{ $log->action_type }}</td>
<td>
@if ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at==''))
<a href="{{ route('view/asset', $log->asset_id) }}">{{ $log->assetlog->name }}</a>
<a href="{{ route('view/hardware', $log->asset_id) }}">{{ $log->assetlog->name }}</a>
@elseif ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at!=''))
<del>{{ $log->assetlog->name }}</del> (deleted)
@else
@@ -164,12 +161,14 @@ View User {{ $user->fullName() }} ::
<h6>Contact {{ $user->first_name }}</h6>
@if (isset($user->location_id))
@if ($user->location_id)
<iframe width="300" height="133" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&amp;q={{ $user->userloc->address }},{{ $user->userloc->city }},{{ $user->userloc->state }},{{ $user->userloc->country }}&amp;output=embed"></iframe>
@endif
<ul>
<li>{{ $user->userloc->address }} {{ $user->userloc->address2 }}</li>
<li>{{ $user->userloc->city }}, {{ $user->userloc->state }} {{ $user->userloc->zip }}<br /><br /></li>
@if ($user->location_id)
<li>{{ $user->userloc->address }} {{ $user->userloc->address2 }}</li>
<li>{{ $user->userloc->city }}, {{ $user->userloc->state }} {{ $user->userloc->zip }}<br /><br /></li>
@endif
@if ($user->phone)
<li><i class="icon-phone"></i>{{ $user->phone }}</li>
@endif
@@ -22,7 +22,7 @@ Change your Email
<div class="control-group{{ $errors->first('email', ' error') }}">
<label class="control-label" for="email">New Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="" />
<input type="email" name="email" id="email" value="" />
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
</div>
</div>
@@ -31,7 +31,7 @@ Change your Email
<div class="control-group{{ $errors->first('email_confirm', ' error') }}">
<label class="control-label" for="email_confirm">Confirm New Email</label>
<div class="controls">
<input type="text" name="email_confirm" id="email_confirm" value="" />
<input type="email" name="email_confirm" id="email_confirm" value="" />
{{ $errors->first('email_confirm', '<span class="help-block">:message</span>') }}
</div>
</div>
@@ -90,7 +90,7 @@ Change your Password
<div class="control-group{{ $errors->first('email', ' error') }}">
<label class="control-label" for="email">New Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="" />
<input type="email" name="email" id="email" value="" />
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
</div>
</div>
@@ -99,7 +99,7 @@ Change your Password
<div class="control-group{{ $errors->first('email_confirm', ' error') }}">
<label class="control-label" for="email_confirm">Confirm New Email</label>
<div class="controls">
<input type="text" name="email_confirm" id="email_confirm" value="" />
<input type="email" name="email_confirm" id="email_confirm" value="" />
{{ $errors->first('email_confirm', '<span class="help-block">:message</span>') }}
</div>
</div>
@@ -19,7 +19,7 @@ Forgot Password ::
<div class="control-group{{ $errors->first('email', ' error') }}">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="{{ Input::old('email') }}" />
<input type="email" name="email" id="email" value="{{ Input::old('email') }}" />
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
</div>
</div>
+1 -1
View File
@@ -20,7 +20,7 @@ Account Sign in ::
<div class="control-group{{ $errors->first('email', ' error') }}">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="{{ Input::old('email') }}" />
<input type="email" name="email" id="email" value="{{ Input::old('email') }}" />
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
</div>
</div>
+2 -2
View File
@@ -38,7 +38,7 @@ Account Sign up ::
<div class="control-group{{ $errors->first('email', ' error') }}">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" value="{{ Input::old('email') }}" />
<input type="email" name="email" id="email" value="{{ Input::old('email') }}" />
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
</div>
</div>
@@ -47,7 +47,7 @@ Account Sign up ::
<div class="control-group{{ $errors->first('email_confirm', ' error') }}">
<label class="control-label" for="email_confirm">Confirm Email</label>
<div class="controls">
<input type="text" name="email_confirm" id="email_confirm" value="{{ Input::old('email_confirm') }}" />
<input type="email" name="email_confirm" id="email_confirm" value="{{ Input::old('email_confirm') }}" />
{{ $errors->first('email_confirm', '<span class="help-block">:message</span>') }}
</div>
</div>