Compare commits
322 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d47e2aab76 | |||
| c7399b0c4f | |||
| 086b13c17e | |||
| 2620da186b | |||
| 3689a52894 | |||
| 725a9320cb | |||
| 12996cafac | |||
| 859c53e975 | |||
| 1322d81d64 | |||
| 3ab828a4cd | |||
| 5ca572b914 | |||
| 1bc7ff9941 | |||
| b855f2fa2b | |||
| 114e6ec6cc | |||
| be4230af81 | |||
| 390de7ae36 | |||
| 588f0a23ba | |||
| d40129bdae | |||
| 54f3c65624 | |||
| 8e18218652 | |||
| bf9aba3f20 | |||
| 7e554a3c59 | |||
| 91ac9bd485 | |||
| f16122070a | |||
| 4803bc71ec | |||
| f0a589f150 | |||
| 32591d4ca0 | |||
| d1bcee0dfa | |||
| e4dfb188fa | |||
| 4f057bfe5e | |||
| 8bbaf2e52f | |||
| cf5fcdf9d7 | |||
| 2333d4e933 | |||
| e1be3efd82 | |||
| 97f97e3590 | |||
| 701c16f4e6 | |||
| 59c203b6ae | |||
| d84479d9fc | |||
| 480f0ef13b | |||
| 6020de6321 | |||
| 796866fd54 | |||
| ef58de5e8c | |||
| 7e07c7dee3 | |||
| 9dc57ff673 | |||
| dea95f9f5b | |||
| 23431fafd9 | |||
| 2cf566422c | |||
| b85d624f08 | |||
| e69eddeef8 | |||
| 061e0d4cdb | |||
| 64b1355393 | |||
| 2cf169a64a | |||
| 6d810a9b0d | |||
| 4a9701af71 | |||
| 0890a22bdb | |||
| f9c66917bd | |||
| 311cccbb1e | |||
| ca27ef6741 | |||
| 0dfa0d9c45 | |||
| 90442c720b | |||
| e228577936 | |||
| 9a18312ab1 | |||
| fc4863837f | |||
| 9bb2ffcf9a | |||
| a78874d986 | |||
| 458f413c61 | |||
| 503f9145a4 | |||
| 04233336aa | |||
| e5b2163ffe | |||
| 9f899ee878 | |||
| 03caa85396 | |||
| f1a4608faf | |||
| c66fe3d4d2 | |||
| 855b3809d0 | |||
| 2d4dee2f72 | |||
| 8667964e3c | |||
| 72a2ee6ea4 | |||
| 6a638f131f | |||
| ab5ff0f709 | |||
| 36fd4ab7c5 | |||
| 98db6fe9df | |||
| 20fd420690 | |||
| 771e21d9f7 | |||
| 3fd9df62f4 | |||
| 1b1a733043 | |||
| e70dab64a2 | |||
| f121766037 | |||
| 9563cf4614 | |||
| 2d56240408 | |||
| 00bb511506 | |||
| fb1dd29059 | |||
| 0896ca6517 | |||
| 9a84497fb0 | |||
| e4cb237bfe | |||
| 28b89f3ddb | |||
| 9ad9e1d5a5 | |||
| 39f40a3f6d | |||
| 0d3a4813ce | |||
| 51e480661d | |||
| 77632cdfb0 | |||
| 19d6f33770 | |||
| c779034e41 | |||
| 8ff7a6ce21 | |||
| 1908499379 | |||
| 348c8f62d1 | |||
| 7da0ffc325 | |||
| 33b05b071d | |||
| f98b4095a2 | |||
| b30edfd9d6 | |||
| b16ea61da8 | |||
| a5e2e7e285 | |||
| 456e586e02 | |||
| 4c4e0ce5c5 | |||
| 8ea23e6773 | |||
| c9feff0757 | |||
| f1b2ba5c51 | |||
| 76220b7884 | |||
| bb88b85a02 | |||
| dad816ba25 | |||
| 4037200fad | |||
| 326d0cc764 | |||
| 9800786485 | |||
| ce6b2f2e5f | |||
| 3e2fc13af5 | |||
| 73317f14a0 | |||
| 6bc2af6e71 | |||
| 962e7531a6 | |||
| e8e8e8f4f3 | |||
| 2982cffc3a | |||
| 218fe72e16 | |||
| 2b13641661 | |||
| 66fe626d51 | |||
| ca9ab681b9 | |||
| 0f07f12d35 | |||
| 03efe0b3e2 | |||
| d7b91d88d6 | |||
| 298a938db2 | |||
| 6c389298f8 | |||
| d4685ec037 | |||
| 602501b4a3 | |||
| e93aebc27b | |||
| e392c87250 | |||
| 2707742518 | |||
| 738dc1fdf0 | |||
| 6f04cf9f61 | |||
| 4be3f2700c | |||
| 4cb0e40abb | |||
| ad144e127c | |||
| 2f4e54c8a6 | |||
| 7c06cba647 | |||
| 5eb506b9c3 | |||
| 4aa376826f | |||
| 1d9e014bfa | |||
| 506af72d83 | |||
| 1ce205a579 | |||
| a7a82e5fbc | |||
| 23da312fff | |||
| faf2e464fa | |||
| 79c5d3f7d6 | |||
| 2888103d1a | |||
| f89176d500 | |||
| 5eb95272ee | |||
| 6c7e265921 | |||
| 76955ec064 | |||
| de9a15a33b | |||
| f9cf2b2558 | |||
| e4627cee96 | |||
| 36eb51d6e4 | |||
| 689832036e | |||
| 8cfcb2aed8 | |||
| 27962d5439 | |||
| f4af607d1a | |||
| 90340a7111 | |||
| 8742bf26b4 | |||
| 8eb31a9a82 | |||
| aeeb273d4c | |||
| 5f6ba2a148 | |||
| 0cb3a9265e | |||
| 96a5f437f2 | |||
| 4b92cdf684 | |||
| 50be3eed4a | |||
| 3b7da8f379 | |||
| 90b00b02cc | |||
| 9eee73d2e5 | |||
| 6639bc1300 | |||
| e272cab82f | |||
| 5967dbae64 | |||
| f42a3c8918 | |||
| d3b3ed0d16 | |||
| 0484924490 | |||
| 894579314c | |||
| b76f014669 | |||
| f03d1cd4cc | |||
| a0db241ac8 | |||
| 0c27717c20 | |||
| ce1565a545 | |||
| ac5527e7d3 | |||
| 865468d091 | |||
| b20f4d245e | |||
| 927c368235 | |||
| eacd4ee2b0 | |||
| 8dab50edc6 | |||
| ee097dd1da | |||
| 775ea95458 | |||
| 73f0a19adb | |||
| a68cbcf767 | |||
| 5c698d7cfd | |||
| efc06f4b31 | |||
| bac1b313f6 | |||
| cac254ded6 | |||
| e217d354dc | |||
| e1837069da | |||
| eb83d9c486 | |||
| 25338c00e5 | |||
| 599ea20d65 | |||
| 72f3b459c5 | |||
| c34c9438da | |||
| 3d8733c612 | |||
| cab1642ead | |||
| 6aa3e21b4c | |||
| b1e48b7054 | |||
| 2686dd640c | |||
| bb7b8f3964 | |||
| 5bed0bd7ed | |||
| be3c8e4515 | |||
| 784d1995d8 | |||
| 7802af837b | |||
| 6f8a76246e | |||
| 66e9203b97 | |||
| b41461698d | |||
| 8cdb032a14 | |||
| 3417d833ba | |||
| aff7b99d91 | |||
| 3944553bfc | |||
| 3dc79197c3 | |||
| f1b00853c6 | |||
| 7f46a48173 | |||
| ae8c9f420d | |||
| aa385571cf | |||
| 9920cb2744 | |||
| 179f96c8e8 | |||
| 7562552f7a | |||
| 5f9d5ae836 | |||
| 639d6214d8 | |||
| dad492d131 | |||
| 6e78fc0a2d | |||
| e98020fa89 | |||
| 6ec4f605f4 | |||
| e88f5629df | |||
| 475fc4855c | |||
| edb2a0b1b7 | |||
| e81fe52aa8 | |||
| 74ed75dd24 | |||
| 17e681ba7c | |||
| 4e065e8df7 | |||
| 9e0f7089c4 | |||
| c22dcdafa4 | |||
| e5cc6d32d1 | |||
| 54655faf83 | |||
| 3b42738a2d | |||
| 65feb00ea4 | |||
| 82a3560f27 | |||
| e8ca98a37d | |||
| 9316af7ed8 | |||
| bbdb576519 | |||
| 43c26f853b | |||
| 1cd7f10f10 | |||
| e4ceddd6ce | |||
| bb83a14707 | |||
| fffc8ed644 | |||
| c6db29e6c4 | |||
| 948e9c2a2b | |||
| 62fe4b8cd3 | |||
| 9b46a5b0f6 | |||
| 8158c12242 | |||
| 36ecf3032f | |||
| 19820db0cc | |||
| fc06caded5 | |||
| a44c56c937 | |||
| 2accfab79e | |||
| 418be7f5de | |||
| beeb28bf09 | |||
| 92410ba054 | |||
| 078750726f | |||
| 7d2ae0d10d | |||
| d8a9d2d3eb | |||
| b925c5766f | |||
| 6bedaa903a | |||
| 4f3cdc20f5 | |||
| 1efb1f7038 | |||
| 6708911d5d | |||
| 3bbcbf5f47 | |||
| 989ce59a5b | |||
| 774b1cb28b | |||
| 10086479b7 | |||
| c0e988b6b1 | |||
| 93cf37336d | |||
| 924f61fce9 | |||
| c6f8d3e6f2 | |||
| a212abee1d | |||
| 4508225d65 | |||
| e3ec2ae3ec | |||
| d653126a2a | |||
| 31c4a63ec0 | |||
| a8e686cdf7 | |||
| 6d365157e7 | |||
| 3a99136f73 | |||
| 50170dd774 | |||
| 5e1bec71f2 | |||
| d73134f32d | |||
| a955d57c20 | |||
| 63eca44789 | |||
| a67951fbce | |||
| 0f6de6a477 | |||
| 5890d26545 | |||
| 20c35fd0bb | |||
| bdc0619016 | |||
| 273d838a42 | |||
| 22ea008bb4 | |||
| 86c620df3d | |||
| 4b68efb80b | |||
| 2645acd827 |
@@ -0,0 +1,31 @@
|
||||
#### Expected Behavior (or desired behavior if a feature request)
|
||||
|
||||
(what you expect to happen goes here)
|
||||
|
||||
-----
|
||||
|
||||
#### Actual Behavior
|
||||
|
||||
(what actually happens goes here)
|
||||
|
||||
-----
|
||||
|
||||
#### Please confirm you have done the following before posting your bug report:
|
||||
|
||||
- [ ] I have enabled debug mode
|
||||
- [ ] I have read [checked the Common Issues page](http://docs.snipeitapp.com/common-issues.html)
|
||||
|
||||
-----
|
||||
#### Please provide answers to these questions before posting your bug report:
|
||||
|
||||
- Version of Snipe-IT you're running
|
||||
- What OS and web server you're running Snipe-IT on
|
||||
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
|
||||
- If you're getting an error in your browser, include that error
|
||||
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
|
||||
- If a stacktrace is provided in the error, include that too.
|
||||
- Any errors that appear in your browser's error console.
|
||||
- Confirm whether the error is [reproduceable on the demo](https://snipeitapp.com/demo).
|
||||
- Include any additional information you can find in `app/storage/logs` and your webserver's logs.
|
||||
- Include what you've done so far in the installation, and if you got any error messages along the way.
|
||||
- Indicate whether or not you've manually edited any data directly in the database
|
||||
+183
-61
@@ -1,5 +1,132 @@
|
||||
|
||||
|
||||
### v2.1.0-pre - Released Dec 31, 2015 12:32:16
|
||||
#### This is a pre-release
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3a99136f73ec5589c9b9e0bae29a16e6418f62a7">view</a> • More documentation fixes
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/989ce59a5b63eea0e25a2bb7917b44c14d0f6235">view</a> • Fixes #1399 - Import LDAP config into database
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3bbcbf5f47e95ef031d521ff840a0ba7197356ed">view</a> • Merge branch 'hotfixes/ldap_settings' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b925c5766f15d678702ad2ae245cc76a66b235ec">view</a> • Set company_id to null if no logged in user to fix seeder
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/078750726fd5f1f2d8ea35e25b366a95d15d7075">view</a> • Set default value for company_id to fix seeder
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/beeb28bf09a36604820ae111b3e171aec3746444">view</a> • Fix routes for custom fields, fix admin access. Helps with #1397
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/418be7f5dee1224526bf9037cc6d3ab464cacca2">view</a> • Fix to adding same custom field twice. Helps with #1397. Requires PR #1408 to be merged first.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/2accfab79ede9fd3905d0ed383b5a50999340944">view</a> • Fixes #1413 - wrong link for manufacturers delete
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a44c56c93713a8de20981e0a876b579b5845f6ff">view</a> • Merge branch 'hotfixes/fix_1413' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fc06caded5c6d8c2554146f986752ad1fe2e1e5a">view</a> • Fixes #1406 - Fixes link to suppliers delete
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/19820db0cc41086971c9458dc5c8f0ca37a90777">view</a> • Fixes #1406 - Fixes link to suppliers delete
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/36ecf3032f0bd9e37054898912469c6efd83529a">view</a> • Fixes #1402 - remoe warranty date from EOL calc
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8158c12242b5f2f37488a5db9cffefd0b5ec52ef">view</a> • Merge branch 'hotfixes/EOL' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9b46a5b0f6f19543d4799dd88673695445317650">view</a> • Fixes #1403 - hide checkout on asset model listing assets when nt deployable
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/62fe4b8cd391cadf690be4a27ec4bd7eea017165">view</a> • Merge branch 'hotfixes/1403' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/bb83a1470744fe94fa8793f6b1af3bfee8613042">view</a> • Fix incorrect routes for update and delete
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e4ceddd6ce246d5864b075a1dd0c1f891ef2f8b1">view</a> • Fix for merge conflict on routes
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/bbdb576519ab8f73a24ca6082c9172ddafdca665">view</a> • Merge branch 'hotfixes/remove_fk' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e8ca98a37d744a899dcd77360b9590ae99950301">view</a> • Fixes issue with assets without a model (which should never happen, but can occur from imports)
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/82a3560f276353a2eccdb6be69f559ff9908f2c5">view</a> • Merge branch 'hotfixes/image_fix' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9e0f7089c46dcec72d0b24f35f2ef4ef96c6823c">view</a> • Fixes #1415 - Added CSRF token to backup form
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/17e681ba7c72647288f0777daeaf6a96a1e72767">view</a> • Merge branch 'hotfixes/backup_CSRF' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/74ed75dd24fbaa69589e7bb8e89f68a8fce28a66">view</a> • Fixes #1426 - use Asset class for asset maintenances
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e81fe52aa8b60c13d8d477db1fa6df6d6690ff0d">view</a> • Merge branch 'hotfixes/asset_maintenances_create' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/dad492d131b2fb4c9ac83433661706addd92d623">view</a> • Fixed back/cancel urls for #1397
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7f46a48173c2a65f2aee5aae0af22bab3e8714f8">view</a> • Attempting to fix #1430 - commented out FK drop to prevent collisions, remove FK creation for new installs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3dc79197c3140528f2443107c7f3757ede66d7c2">view</a> • Fix for LDAP error if username is wrong
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8cdb032a14b92b79f52514d0c806d602cc47db12">view</a> • Fixes error messages, and re-filling old input on failed asset create
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b41461698ddc316d80fde921a7be0d69ae4df909">view</a> • Fix for error on asset create
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6f8a76246ec014457452109ac07c6aa98b478996">view</a> • LDAP fix for local users
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7802af837b2894b04c8ad690aeb7053f632f7767">view</a> • One more fix for LDAP and local users working together
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/be3c8e451522988bfd6f19767061a538dcc248e2">view</a> • Fixes #1440 - make employee number searchable/sortable
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5bed0bd7ed3415a58833218b59a81b061712671a">view</a> • Fixes #1437 - set expected checkout correctly
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/72f3b459c5172fb30865c6d708ecd57d0ff1eee8">view</a> • Merge branch 'hotfixes/user_import_company_id' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/599ea20d65695e3e3cd5dfd929003c3c39620968">view</a> • Fixes #1449 - full link to order number
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/25338c00e50d854a62ee86240489cf23d178302b">view</a> • Fixes #1456 - email notification when asset requested
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e1837069da97f1dfcbbd0007c2eda0ddd1ee3d2e">view</a> • Allow bulk model update for #1462, fixes #1442
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e217d354dc3b5d078a91cff7a9d6e9ba11bd55c8">view</a> • Fixed bug in strict mode for fieldsets
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cac254ded6685ef1e087b803e28cd14ff93047ca">view</a> • Fixes #1371 - problem saving new models with non-latin characters
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5c698d7cfd4e0bb93e1c1483e41504057397a2c5">view</a> • Fixes #1469 - don't require currency at model level
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a68cbcf7674a315268ec082386db30199e97f211">view</a> • Fixes #1472 - only fire DB seeder if the user inputs 'y'
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/73f0a19adbf595f82e6110dec7eb685181dc0993">view</a> • Fixes #1459 - fieldset_id error if null
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/775ea9545824c2bf1bc55b0e7a5423dcec66caa1">view</a> • Fix inability to edit models (unique constraint)
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8dab50edc64a59cbdae2c424fb36678ea4852324">view</a> • Fixes #1498 - better regex for characters in custom field name
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/eacd4ee2b09b21b465947b0acae2292cf54e1982">view</a> • Fix for bad data in asset report
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/927c36823526e68a83e2898033fea1ebe0112b4a">view</a> • Fix for weird location info in asset report
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b20f4d245e39d640aac3de9b34c2c79b855f06f4">view</a> • Fixes #1494 - uncommented mac_address fields
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/865468d0910a39d0a891de3225e383e6afd08ead">view</a> • Fix for location error
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ac5527e7d30c3df805302a92c3d8d48bf54c6cb5">view</a> • Merge branch 'hotfixes/custom_reports_fix' into develop
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/f03d1cd4ccc1d47b4b6297b7a2c6bcbbfc686e87">view</a> • Simplified currency display until we can fix it on a broader level
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6639bc1300163f5e4c079101682b27a5ef33f8e6">view</a> • Fix overwriting of username if no first/last name
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3b7da8f379ca9e57a07c968bcf0917b4dae7daa4">view</a> • Fix consumable count in categories. This adds new methods to Category, consumables consumablesCount and a generic count. It also refactors CatgoriesController to use the count method rather than having it determine the category type.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/50be3eed4abce136af1e244402893f7cff389e3f">view</a> • Fix Two issues with Asset Maintenance.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/4b92cdf684cf64958bc2b1f1194fa6ad2a67dcd7">view</a> • Use the same values/calculations in the view as the index. Should fix #1140 I believe
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0cb3a9265e0eb46294f2bd534e672dc226ce11ca">view</a> • Fix PHPDocs that contained incorrect params tags.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5f6ba2a1480a9383c10c5222e368b6c219f4bd2c">view</a> • Clear the expected checkin and last checkout dates when checking an item back in. Fixes #1531
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8eb31a9a820ce2033a585b35d7d17d618e6aa831">view</a> • Merge pull request #1523 from thehereward/fix-up-some-php-docs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/90340a71119ab72b45c34a4a328877d363cabae1">view</a> • Merge pull request #1535 from dmeltzer/fix-1531-proper
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/27962d5439ccd587dfbb945149693cf81a6cb944">view</a> • Merge branch 'develop' into docker_fix_2
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8cfcb2aed8a69070686f2d23f8b6c7fcf4596797">view</a> • Merge pull request #1544 from snipe/docker_fix_2
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/36eb51d6e484586c9da3b90dc86fac6774e22218">view</a> • Fixed typo in string
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5eb95272eeac1183fe47972e7d8cf01976efe3a0">view</a> • Merge pull request #1546 from snipe/docker_fix_2
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/79c5d3f7d69ac34e98e1b4e925ced54b1ab2f612">view</a> • Fixes #1537 and #1524
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/faf2e464faff6fb2ac8decd3889d1c60bfcf954f">view</a> • Fixes #1526
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a7a82e5fbcab028c618b40d839a121325508490e">view</a> • Fixes #1541
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1ce205a5798be9b69d8750af9bb0fa7c96752a1e">view</a> • Fixes #1502 - load tableexport and jquery base64 locally
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7c06cba6477dc7e7902841b48ffb3089bd198a8e">view</a> • More LDAP login fixes
|
||||
|
||||
|
||||
### v2.0.6 - Released Nov 25, 2015 11:50:08
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ac44140d835da40b44193ddfdbe2af0539a6aa5d">view</a> • fix edit blades
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/999910f31fac58f1d7b1e5b45de296e911c88e6e">view</a> • Fix 'use' used with non-compound
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6478425be6fa02322aac276bd31c0bc6472b7fd3">view</a> • Fix dashboard shows all companies
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0a97c626e7955af7240b8084f90b249daf53a5e7">view</a> • Fix $inout used when undefined
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8fb7d82babd8deb136e71734e3a7fa37d2b05b08">view</a> • Fix no admin/consumables route
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/08781a561b828198b62cf14a8f2608f23a52c3ef">view</a> • Fix: use global scope for companies support
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/dbdc2c8e64b8d27ac3111d2308c0582b05992561">view</a> • Fix some typos (e.g: companayable)
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fe44846c1ba583156358de48fefe3ed3e63ef8f6">view</a> • Fix: only super users can change multiple companies support option
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e91a22fce0232ffd24976c214b12a7ff784d60ff">view</a> • Fix assumeng Setting::getSettings() is not null in Company
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e82ede5d44000ee337fad329cf5ac18052cfe52b">view</a> • Fix: some Company functions throw when seeding the DB
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/67a58221eb93ffb6a1e827ab1dc745c27e8d81fe">view</a> • Fixes #1368 - typos in installer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cc930fc5b8bcfdf972b35fb9460c0b2c82a1e9d0">view</a> • Fixed links to getting help and common issues
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/01b574069af2ae8cda5ab9716de58d8e39a3da79">view</a> • Fixes #1362 - status labels losing type on edit
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7a03a5649863bc44af2459abf1d9fcfe0ffad21a">view</a> • Fix: company field required
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/4b926f015b5b69c4e3180e996ab489e179589be5">view</a> • fixed typo in installer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/318b4b48c64e2dbfcbbbf9f024e9f6b20bc7a0db">view</a> • Fixes null value for LDAP settings
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9ec132acde7238963ffb3cb042e65e49e929eb7c">view</a> • Small fixed for LDAP in settings table
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/120c8394bbc0141a2ca6d2cd7124d8fbad459073">view</a> • Fixes #1380 - groups pagination
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/716c459985c78301998fe60fc8c274edb4f945c0">view</a> • Fix ident
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b99c138cb040c92e6988c40307bd871514fb39f8">view</a> • Fixes #1369 - fixed searching/sorting on location
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a777499c0bec415566c9360b6239600c9d6d0f74">view</a> • Fixes #1376 - added new fields to consumables view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6d42d2c6142075124c453b75315db1b0fca0fdc9">view</a> • Fixed bootstrap class for button
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a3dbd87f9ffacc0ac1f48f758f87316bab831fe6">view</a> • Fixed weird company table styles
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/2a28c73845e5e90947e207392c4b7b12e7e91e7c">view</a> • Importer fixes - check for asset before inserting
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/c8c755f8c35983adaad6a3ba1868021acb2e3583">view</a> • Fixed filename renaming
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/29bb6a3c4f839e96f79d02473221673aed401898">view</a> • Fixed issue where deleted asset tags could not be re-used
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/535263788dac198cf79562efe7df4671fd1e755b">view</a> • Fixed dumb indenting
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/4be046a6753315fb88858ea264acec10d66b4938">view</a> • Fixes #1387 - adds server-side compound search
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/406e077c1e1a279c588e1506c2ce75f1e79dbbb1">view</a> • Fixed indenting
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/67e968b03276d563a920a09cd4cec5258e62d016">view</a> • Fixed attach() timestamps
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b39c53a5ea355c91d5ef4adf1a03a342697039ae">view</a> • Closes #1375 - More data in consumables detail view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/d8b43215b0109ab7f548a0dc46dee3d12a271a77">view</a> • Fix for missing admin ID
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/c6c6bd02bb32a22da7d30a0cca81516f99a9f5b0">view</a> • Possible fix for weird UTF-8 issues
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/99391d01796bfe6b1e63e8e979fa010397405236">view</a> • Fixes #1332 - added location to accessories
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/632fa92f9239d7f701efd29461ebf24746246be8">view</a> • Fixes #1333 - hide checkout button if asset status is not deployable
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/20490986c634c7fa260fd952a7311ca18aae8605">view</a> • Fixes #1325 - zenbra striping and borders on table for money value clarity
|
||||
|
||||
|
||||
### v2.0.5 - Released Nov 18, 2015 10:29:53
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/67e0e14a12d49fc190daae553332a6c008f89314">view</a> • License importer, small fixes for asset imporer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5df26f9b0ae7708e2f221ee873126bf1d7cd91dc">view</a> • Fixed the ubuntu install portion that i broke
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/958672dfd36d220ea242d7772626916c748063e3">view</a> • Fixed missing vars and typos
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0d1544c3d65bf27a3e64e8ec258fb8dfaf961438">view</a> • Fixing some package issues and syntax errors
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/56b50468d2bc14d33dbad17357664cd68937ee00">view</a> • fixed packages for centos6
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/62cee46a83d9d9dcf9e12884563918bab0adb61a">view</a> • update webdir for debian and fix the error logs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ca1384504a6a3802cea8bacc7fce2413f65a3681">view</a> • fixed tzone variable assignment
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a47a4e83e2fb90fb7e6d55c34ca9d515f4316c7e">view</a> • fixed issues with sed command and /
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9f43b6af9f355f6d8de6b5b9689ffdb6904fd5eb">view</a> • fixed apache config file
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/306d8ebaf72076cbccadae7d214eed68276d65f5">view</a> • Fixes #1317 - regression issue in bulk delete
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a8da68d3fda0be7d8533dcecadbe758d24bacf12">view</a> • Fixes #1320 - added name for cookie table
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b9c36f863833188bd0462d809985bd876f36c6d7">view</a> • Fixes #1335 - editing maintenance
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/aa05d041bd7abd193ea580c0928326d4855b522f">view</a> • Fixes #1324 - missing $inout variable when if/else not met
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/2b26fd7e20e0636cee068a7804eb82ece780f5a2">view</a> • Fixed string in gh-changelog
|
||||
|
||||
|
||||
### v2.0.5-pre - Released Nov 04, 2015 11:42:37
|
||||
#### This is a pre-release
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/679b9f6def461ae5e2c0fa1223368d5838ac2945">view</a> • Small EOL fix
|
||||
@@ -91,6 +218,8 @@
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/46fb12f5dcd5a37e8aecdf585ee892c6816f2bb0">view</a> • Fixed acceptance suite yaml to make it work for travis-ci as well as local testing
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/33178adeedb37773c7b830582b167d1b5063127c">view</a> • Fixed issue in travis yaml file
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1fadabaf2f4a15ffdd26d426fb814d970b7e62f4">view</a> • Fixed stupid mistake in the travis yaml file
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1bed711f0e7462d5b4875b8c014d15690648049d">view</a> • Another tweak getting closer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/41c257829ed8d7019b5fe4761fcdf7560167cc74">view</a> • Another tweak - getting close
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1927f131aa1e59f81caf35999eaaab2bd0dc1f14">view</a> • Fix broken Docker build
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/49e898fd263cc1fb7fb80dcb7aa11058c305ed21">view</a> • Merge pull request #1122 from irasnyd/docker-fixes
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/dd2b9e15a60c402be914747979e27ca8a7c1c496">view</a> • Fix #1109 - Asset names are missing when viewing user history
|
||||
@@ -100,6 +229,8 @@
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/00aba507f7a4f5daaa57b9ccd5e7730bb5e9f63d">view</a> • Fixed acceptance suite yaml to make it work for travis-ci as well as local testing
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/be402a9d7d3d039666f1c8110b8d1e1697d28092">view</a> • Fixed issue in travis yaml file
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b1d6d4da3777505d51310780fe393a874a24358e">view</a> • Fixed stupid mistake in the travis yaml file
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/f836f88e38fb4bb0b682d301081254bb59923bf6">view</a> • Another tweak getting closer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/309ce7d0bd6758c186d9f002ebc9924b72542f4f">view</a> • Another tweak - getting close
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7bd5ddc516cc3130f4eb5e7ac53a7c9d4e67be87">view</a> • Fixes incorrect title for unaccepted assets report
|
||||
|
||||
|
||||
@@ -562,67 +693,6 @@
|
||||
|
||||
|
||||
### v1.2.0 - Released Jan 22, 2015 09:24:01
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8699a90093bd27c0502dcc25f6e7d55344d54a3b">view</a> • Fixed changelog
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cff24309a1514f9ea991881ca72898c7a6358562">view</a> • Possibly fixes #343
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b2d5dc9ec5460ff1f02db6c1a31ea87d224de4c9">view</a> • Fix #342
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/74ae2fceea68d18514e87edc008cb3016361beee">view</a> • Fix class on th
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fc2d472ed350d7d63fb97942d00a97b62d4bed55">view</a> • Fixed english language string
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/89c7159c56f88bcf8459a5eb02d79d636335cb28">view</a> • Fix array check for empty rows
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7ddc6d497af13e7894031ac763939be9863889a4">view</a> • Fix Report Langs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/13b173409fcd5b5ce8e79566b5110eadcf51c233">view</a> • Fix License form langs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b73ae3147a60b29ac455063ecf419a609cce2cac">view</a> • Fixes #362, reduced asset name to 2 char min
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/637009054cc74b17e2dd226c6f8c467eed5b0962">view</a> • Fixed typo in english
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6905d82fc48998f9c95c454c8bf37a34e30c002e">view</a> • Fixes #374 to keep the requirement to PHP 5.4
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/102481631330fbed894bf72510845bff6c88e59e">view</a> • Fix #377 - Checkout users last_name, first_name
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/d6a0249c60cbb026b2e3190285d50723a76f22ee">view</a> • Fixed #373 - added ability to auto-increment asset tags
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1b41c974cf67c550b2cae39eeec8f90cb2da79e0">view</a> • Fixes #348 - remove constraints on license keys
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/89a2b87e42c18b308835ef71d196b91002b451ef">view</a> • Fixes #367 - added model number to dropdown
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/64c16a0bacfcde7c4d92971f2129f1b1aeac2c0e">view</a> • Fixes #386 and #273 - altered column type to text
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/daefc86e5878a21f9909806599f22198360c1f9b">view</a> • Formattig fixes for #386
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/73dd339772fcc35e50603ded115f67714620da69">view</a> • Fix #388 - License not showing checked out in view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0663ccb99fa926ff944dded330ba1f0cd95abbb3">view</a> • Check if ->adminuser->id isset before trying to print the fullName so we can catch when a user that created an asset has been deleted. Fixes #349
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/533be7f942cb6dfccd1e8a79c043d61791e4c54b">view</a> • fixed #435. using namespace with route groups to increase the readability
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e434616db83a8d693af63b4705e1b24476fc3c17">view</a> • Merge pull request #436 from rashivkp/fix-435
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5e496672c66428a1bbd37772aabd44f8bb1cb0fa">view</a> • Fixes #469
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3c141e8f5017e8f161b6fd1fb82b288283b8450c">view</a> • Fixes #467
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/548de1a1a217e6b5c6fcbbf6cd4918f078e64542">view</a> • Fixes #468 - updated ordering on license checkout
|
||||
|
||||
|
||||
### v1.1 - Released Nov 06, 2014 02:16:26
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fafd03f00f49cb9ffe81d50aa9ca3d1f1fa1d043">view</a> • Added DB Prefix to Migrations
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/309772e67d62989f1f60141a4a10d724a44c6baa">view</a> • Fixed operator for setting bool display
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/22f81912e416cfe1227a08b5d8b6323e32e1ef36">view</a> • Fixes #299
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/86b7b6946f1e1bd404127e228c615e4abe0b20fb">view</a> • Fixes #316 - added model name back to view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9e85dcb9fcb4cc932ecddd23caa6b51e83110543">view</a> • Fixes #315 - add EOL as display option in settings (run migrations)
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ee35948980c22f9256241c02d7febd90275f6229">view</a> • fix div issues
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0022389463e251e73402450cfbc280cb05633bd1">view</a> • Fix dropdown menu position
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/343798d241172707145ef365445062db9bb6b99a">view</a> • Merge pull request #322 from madd15/fix-js-delete-asset
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1078dbf5c5f6a5bec1a2ef864cebfcc7883d31e6">view</a> • Fixes #324
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6b2d3efe3e76429c9c2f5de78f04c4f7e2748a3d">view</a> • Fixes #237 - reporting-only group
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e04cc806d9209b54a1833172ebb66ab55b5f0c06">view</a> • Fixes #327
|
||||
|
||||
|
||||
### v1.0 - Released Oct 16, 2014 09:46:47
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a4b220d6c31c97f6504023f0b52527825a4cd897">view</a> • Fixed #191 - allow admins to assign a user during asset creation
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/dc1033025a0bc1b2d657e06c89058c3ab95f2c59">view</a> • Fixed #151 - more complete translations
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/56d619b218794b43d8c6b182c89c75f83af9dcd9">view</a> • Fixed missing language string
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/69fca5d1eda0e5f26d2085f7eebc08fafd84a3ae">view</a> • Fixed #58
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8197e6174e9f12bcfddd94c6bf606ee36e6801bf">view</a> • Fixes #200
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cb8369e9de96aaf1cf9108e22f4038fa6486b881">view</a> • Initial QA Patch to fix errors Add License Add Asset Show Deleted Users License Assign
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/62a3ed671bbd957075563933f49e8a5445042737">view</a> • DB migration, layout and clone fixes
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9ccc7d756f9361757eafc1dce9684ee9f5ecc1c3">view</a> • A0.4.2: Added asset, license, user, model cloning and fixed some bugs.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/652f1c746c4757dce9d33d7bd90a9357822c4656">view</a> • Fixes Travis CI build
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/363d084bd623f778cd72ca7d385a4fb2f67ef474">view</a> • Fixed DB name in travis CI
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/49c5607e1c8a82a3111123ad84b537644546ebb3">view</a> • Fixes #222
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/96e40d72b9ac3f74b94b0e39b6f296f0f0b2a1f4">view</a> • fix typo: artisand -> artisan
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e978038cc044f60c2eca71b6319063009a57886f">view</a> • Merge pull request #234 from burlito/typo-fix
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a829fcf52f933d087c3776993b42311ec9a8988e">view</a> • fix: Use the old asset tag when cloning
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ee7d9bec7082dc2e60a4797dea84a0b7443c8090">view</a> • Fixes #279 - QR checkbox not staying checked
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/bf1e07555160ede517d41f649d6b1d0911f89dd2">view</a> • Fixes #87 - made datatables responsive
|
||||
|
||||
|
||||
### v0.3.11-alpha - Released Jul 19, 2014 05:16:53
|
||||
#### This is a pre-release
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/14972f894bb0e761e2d0170a2c93c9aac4edfca6">view</a> • fixed typo
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/79da13dff767d57f6f4fbb12f195e25f409ee5ec">view</a> • Fixed layout for category view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0e4e26206bdcc164e5df586368ed45edd45b9a74">view</a> • fixed broken redirect route
|
||||
@@ -712,6 +782,7 @@
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/d591c1ea0495de091eb0f71daa8572929096c897">view</a> • Fixed bug where RTD = 1 instead of 0
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e49420f62d26405b2fa0385f0ae7b3009b3beeaf">view</a> • Fixed bug in depreciation display
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1dc7fd1bdf8852fed6d886938f632c8ea69d4798">view</a> • Fixed depreciation display on asset view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cc275367bffa3965a229e1527f6cd8cffd3415f1">view</a> • Removed close button on 'no results' error
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/211a527ae176df667f6f8fbc95901c53a368d8e2">view</a> • Fixed FK
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/aaebaa8d36158aafc61988a6370239e85f2e75e5">view</a> • Bugfix to put custom title in the page title
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/194150bbf0493512018390d011e8d88d144e9763">view</a> • Hacky shit to fix pagination weirdness - will come back to this
|
||||
@@ -768,3 +839,54 @@
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ac4c905c42d920d2cf8455d644f4c65332a81d0d">view</a> • Fixed #140
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/4a13cded607415d749151cef495332c48c58cf86">view</a> • Fixed path for Travis composer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ddf946ad5eb6dd8480eeaa709f82af75e0c61444">view</a> • Tried to fix failing build caused by travis composer
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a4b220d6c31c97f6504023f0b52527825a4cd897">view</a> • Fixed #191 - allow admins to assign a user during asset creation
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/dc1033025a0bc1b2d657e06c89058c3ab95f2c59">view</a> • Fixed #151 - more complete translations
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/56d619b218794b43d8c6b182c89c75f83af9dcd9">view</a> • Fixed missing language string
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/69fca5d1eda0e5f26d2085f7eebc08fafd84a3ae">view</a> • Fixed #58
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8197e6174e9f12bcfddd94c6bf606ee36e6801bf">view</a> • Fixes #200
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cb8369e9de96aaf1cf9108e22f4038fa6486b881">view</a> • Initial QA Patch to fix errors Add License Add Asset Show Deleted Users License Assign
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/62a3ed671bbd957075563933f49e8a5445042737">view</a> • DB migration, layout and clone fixes
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9ccc7d756f9361757eafc1dce9684ee9f5ecc1c3">view</a> • A0.4.2: Added asset, license, user, model cloning and fixed some bugs.
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/652f1c746c4757dce9d33d7bd90a9357822c4656">view</a> • Fixes Travis CI build
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/363d084bd623f778cd72ca7d385a4fb2f67ef474">view</a> • Fixed DB name in travis CI
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/49c5607e1c8a82a3111123ad84b537644546ebb3">view</a> • Fixes #222
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/96e40d72b9ac3f74b94b0e39b6f296f0f0b2a1f4">view</a> • fix typo: artisand -> artisan
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e978038cc044f60c2eca71b6319063009a57886f">view</a> • Merge pull request #234 from burlito/typo-fix
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/a829fcf52f933d087c3776993b42311ec9a8988e">view</a> • fix: Use the old asset tag when cloning
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ee7d9bec7082dc2e60a4797dea84a0b7443c8090">view</a> • Fixes #279 - QR checkbox not staying checked
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/bf1e07555160ede517d41f649d6b1d0911f89dd2">view</a> • Fixes #87 - made datatables responsive
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fafd03f00f49cb9ffe81d50aa9ca3d1f1fa1d043">view</a> • Added DB Prefix to Migrations
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/309772e67d62989f1f60141a4a10d724a44c6baa">view</a> • Fixed operator for setting bool display
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/22f81912e416cfe1227a08b5d8b6323e32e1ef36">view</a> • Fixes #299
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/86b7b6946f1e1bd404127e228c615e4abe0b20fb">view</a> • Fixes #316 - added model name back to view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/9e85dcb9fcb4cc932ecddd23caa6b51e83110543">view</a> • Fixes #315 - add EOL as display option in settings (run migrations)
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/ee35948980c22f9256241c02d7febd90275f6229">view</a> • fix div issues
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0022389463e251e73402450cfbc280cb05633bd1">view</a> • Fix dropdown menu position
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/343798d241172707145ef365445062db9bb6b99a">view</a> • Merge pull request #322 from madd15/fix-js-delete-asset
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1078dbf5c5f6a5bec1a2ef864cebfcc7883d31e6">view</a> • Fixes #324
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6b2d3efe3e76429c9c2f5de78f04c4f7e2748a3d">view</a> • Fixes #237 - reporting-only group
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e04cc806d9209b54a1833172ebb66ab55b5f0c06">view</a> • Fixes #327
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/8699a90093bd27c0502dcc25f6e7d55344d54a3b">view</a> • Fixed changelog
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/cff24309a1514f9ea991881ca72898c7a6358562">view</a> • Possibly fixes #343
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b2d5dc9ec5460ff1f02db6c1a31ea87d224de4c9">view</a> • Fix #342
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/74ae2fceea68d18514e87edc008cb3016361beee">view</a> • Fix class on th
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/fc2d472ed350d7d63fb97942d00a97b62d4bed55">view</a> • Fixed english language string
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/89c7159c56f88bcf8459a5eb02d79d636335cb28">view</a> • Fix array check for empty rows
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/7ddc6d497af13e7894031ac763939be9863889a4">view</a> • Fix Report Langs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/13b173409fcd5b5ce8e79566b5110eadcf51c233">view</a> • Fix License form langs
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/b73ae3147a60b29ac455063ecf419a609cce2cac">view</a> • Fixes #362, reduced asset name to 2 char min
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/637009054cc74b17e2dd226c6f8c467eed5b0962">view</a> • Fixed typo in english
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/6905d82fc48998f9c95c454c8bf37a34e30c002e">view</a> • Fixes #374 to keep the requirement to PHP 5.4
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/102481631330fbed894bf72510845bff6c88e59e">view</a> • Fix #377 - Checkout users last_name, first_name
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/d6a0249c60cbb026b2e3190285d50723a76f22ee">view</a> • Fixed #373 - added ability to auto-increment asset tags
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/1b41c974cf67c550b2cae39eeec8f90cb2da79e0">view</a> • Fixes #348 - remove constraints on license keys
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/89a2b87e42c18b308835ef71d196b91002b451ef">view</a> • Fixes #367 - added model number to dropdown
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/64c16a0bacfcde7c4d92971f2129f1b1aeac2c0e">view</a> • Fixes #386 and #273 - altered column type to text
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/daefc86e5878a21f9909806599f22198360c1f9b">view</a> • Formattig fixes for #386
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/73dd339772fcc35e50603ded115f67714620da69">view</a> • Fix #388 - License not showing checked out in view
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/0663ccb99fa926ff944dded330ba1f0cd95abbb3">view</a> • Check if ->adminuser->id isset before trying to print the fullName so we can catch when a user that created an asset has been deleted. Fixes #349
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/533be7f942cb6dfccd1e8a79c043d61791e4c54b">view</a> • fixed #435. using namespace with route groups to increase the readability
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/e434616db83a8d693af63b4705e1b24476fc3c17">view</a> • Merge pull request #436 from rashivkp/fix-435
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/5e496672c66428a1bbd37772aabd44f8bb1cb0fa">view</a> • Fixes #469
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/3c141e8f5017e8f161b6fd1fb82b288283b8450c">view</a> • Fixes #467
|
||||
* <a href="http://github.com/snipe/snipe-it/commit/548de1a1a217e6b5c6fcbbf6cd4918f078e64542">view</a> • Fixes #468 - updated ordering on license checkout
|
||||
|
||||
+27
-3
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu
|
||||
FROM ubuntu:trusty
|
||||
MAINTAINER Brady Wetherington <uberbrady@gmail.com>
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
@@ -12,7 +12,8 @@ php5-gd \
|
||||
patch \
|
||||
curl \
|
||||
vim \
|
||||
git
|
||||
git \
|
||||
mysql-client
|
||||
|
||||
RUN php5enmod mcrypt
|
||||
RUN php5enmod gd
|
||||
@@ -27,6 +28,14 @@ RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars
|
||||
|
||||
COPY docker/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||
|
||||
#SSL
|
||||
RUN mkdir -p /var/lib/snipeit/ssl
|
||||
COPY docker/001-default-ssl.conf /etc/apache2/sites-enabled/001-default-ssl.conf
|
||||
#COPY docker/001-default-ssl.conf /etc/apache2/sites-available/001-default-ssl.conf
|
||||
|
||||
RUN a2enmod ssl
|
||||
#RUN a2ensite 001-default-ssl.conf
|
||||
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN a2enmod rewrite
|
||||
@@ -43,6 +52,13 @@ COPY docker/*.php /var/www/html/app/config/production/
|
||||
|
||||
RUN chown -R docker /var/www/html
|
||||
|
||||
RUN \
|
||||
rm -r "/var/www/html/app/private_uploads" && ln -fs "/var/lib/snipeit/data/private_uploads" "/var/www/html/app/private_uploads" && \
|
||||
rm -r "/var/www/html/public/uploads/avatars" && ln -fs "/var/lib/snipeit/data/uploads/avatars" "/var/www/html/public/uploads/avatars" && \
|
||||
rm -r "/var/www/html/public/uploads/models" && ln -fs "/var/lib/snipeit/data/uploads/models" "/var/www/html/public/uploads/models" && \
|
||||
rm -r "/var/www/html/public/uploads/suppliers" && ln -fs "/var/lib/snipeit/data/uploads/suppliers" "/var/www/html/public/uploads/suppliers" && \
|
||||
rm -r "/var/www/html/app/storage/dumps" && ln -fs "/var/lib/snipeit/dumps" "/var/www/html/app/storage/dumps"
|
||||
|
||||
############## DEPENDENCIES via COMPOSER ###################
|
||||
|
||||
#global install of composer
|
||||
@@ -60,8 +76,16 @@ RUN cd /var/www/html;composer install
|
||||
#RUN chmod +x /tmp/app_install.exp
|
||||
#RUN /tmp/app_install.exp
|
||||
|
||||
############### DATA VOLUME #################
|
||||
|
||||
VOLUME [/var/lib/snipeit]
|
||||
|
||||
##### START SERVER
|
||||
|
||||
CMD . /etc/apache2/envvars ;apache2 -DFOREGROUND
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[](https://pledgie.com/campaigns/22899) [](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) [](http://stillmaintained.com/snipe/snipe-it) [](https://crowdin.com/project/snipe-it)
|
||||
[](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) []() [](https://crowdin.com/project/snipe-it)
|
||||
[](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://hub.docker.com/r/snipe/snipe-it/)
|
||||
[](https://twitter.com/snipeyhead)
|
||||
|
||||
|
||||
## Snipe-IT - Asset Management For the Rest of Us
|
||||
|
||||
[](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
It is built on [Laravel 4.2](http://laravel.com) and uses the [Sentry 2](https://github.com/cartalyst/sentry) package.
|
||||
|
||||
@@ -70,7 +70,7 @@ class AppCommand extends Command
|
||||
$this->askUserEmail();
|
||||
$this->askUserPassword();
|
||||
|
||||
$this->askUserDummyData();
|
||||
$this->askUserDummyData();
|
||||
|
||||
$this->comment('');
|
||||
$this->comment('');
|
||||
@@ -256,8 +256,7 @@ class AppCommand extends Command
|
||||
{
|
||||
// Ask the user to input the user password
|
||||
$dummydata = $this->ask('Do you want to seed your database with dummy data? y/N (default is no): ');
|
||||
|
||||
$this->dummyData = ( strstr($dummydata, 'N' ) || empty($dummydata) ) ? true : false;
|
||||
$this->dummyData = (strstr($dummydata, 'y' )) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -360,6 +359,8 @@ class AppCommand extends Command
|
||||
'permissions' => array(
|
||||
'admin' => 1,
|
||||
'user' => 1,
|
||||
'superuser' => 1,
|
||||
'reports' => 1,
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class AssetImportCommand extends Command {
|
||||
|
||||
// Loop through the records
|
||||
$nbInsert = $csv->each(function ($row) use ($duplicates) {
|
||||
$status_id = 1;
|
||||
|
||||
|
||||
// Let's just map some of these entries to more user friendly words
|
||||
|
||||
@@ -77,7 +77,7 @@ class AssetImportCommand extends Command {
|
||||
$user_email = '';
|
||||
}
|
||||
|
||||
// User's email
|
||||
// User's username
|
||||
if (array_key_exists('2',$row)) {
|
||||
$user_username = trim($row[2]);
|
||||
} else {
|
||||
@@ -98,23 +98,24 @@ class AssetImportCommand extends Command {
|
||||
$user_asset_category = '';
|
||||
}
|
||||
|
||||
// Asset Name
|
||||
// Asset Model
|
||||
if (array_key_exists('5',$row)) {
|
||||
$user_asset_name = trim($row[5]);
|
||||
$user_asset_model = substr(trim($row[5]), 0, 254);
|
||||
} else {
|
||||
$user_asset_name = '';
|
||||
$user_asset_model = '';
|
||||
}
|
||||
|
||||
// Asset Manufacturer
|
||||
if (array_key_exists('6',$row)) {
|
||||
$user_asset_mfgr = trim($row[6]);
|
||||
$user_asset_mfgr = substr(trim($row[6]), 0, 254);
|
||||
} else {
|
||||
$user_asset_mfgr = '';
|
||||
}
|
||||
|
||||
// Asset model number
|
||||
if (array_key_exists('7',$row)) {
|
||||
$user_asset_modelno = trim($row[7]);
|
||||
$user_asset_modelno = substr(trim($row[7]), 0, 254);
|
||||
//$user_asset_modelno = trim($row[7]);
|
||||
} else {
|
||||
$user_asset_modelno = '';
|
||||
}
|
||||
@@ -169,6 +170,51 @@ class AssetImportCommand extends Command {
|
||||
$user_asset_purchase_cost = '';
|
||||
}
|
||||
|
||||
// Asset Company Name
|
||||
if (array_key_exists('14',$row)) {
|
||||
if ($row[14]!='') {
|
||||
$user_asset_company_name = trim($row[14]);
|
||||
} else {
|
||||
$user_asset_company_name= '';
|
||||
}
|
||||
} else {
|
||||
$user_asset_company_name = '';
|
||||
}
|
||||
|
||||
// Asset Status Name
|
||||
if (array_key_exists('15',$row)) {
|
||||
if ($row[15]!='') {
|
||||
$user_asset_status = trim($row[15]);
|
||||
} else {
|
||||
$user_asset_status= '';
|
||||
}
|
||||
} else {
|
||||
$user_asset_status = '';
|
||||
}
|
||||
|
||||
// Asset Warranty Months
|
||||
if (array_key_exists('16',$row)) {
|
||||
if ($row[16]!='') {
|
||||
$user_asset_warranty = intval($row[16]);
|
||||
} else {
|
||||
$user_asset_warranty= NULL;
|
||||
}
|
||||
} else {
|
||||
$user_asset_warranty = NULL;
|
||||
}
|
||||
|
||||
// Asset Supplier
|
||||
if (array_key_exists('17',$row)) {
|
||||
if ($row[17]!='') {
|
||||
$user_asset_supplier = trim($row[17]);
|
||||
} else {
|
||||
$user_asset_supplier= '';
|
||||
}
|
||||
} else {
|
||||
$user_asset_supplier = '';
|
||||
}
|
||||
|
||||
|
||||
// A number was given instead of a name
|
||||
if (is_numeric($user_name)) {
|
||||
$this->comment('User '.$user_name.' is not a name - assume this user already exists');
|
||||
@@ -179,7 +225,7 @@ class AssetImportCommand extends Command {
|
||||
$this->comment('No user data provided - skipping user creation, just adding asset');
|
||||
$first_name = '';
|
||||
$last_name = '';
|
||||
$user_username = '';
|
||||
//$user_username = '';
|
||||
|
||||
} else {
|
||||
$user_email_array = User::generateFormattedNameFromFullName($this->option('email_format'), $user_name);
|
||||
@@ -208,7 +254,7 @@ class AssetImportCommand extends Command {
|
||||
$this->comment('Username: '.$user_username);
|
||||
$this->comment('Email: '.$user_email);
|
||||
$this->comment('Category Name: '.$user_asset_category);
|
||||
$this->comment('Item: '.$user_asset_name);
|
||||
$this->comment('Item: '.$user_asset_model);
|
||||
$this->comment('Manufacturer ID: '.$user_asset_mfgr);
|
||||
$this->comment('Model No: '.$user_asset_modelno);
|
||||
$this->comment('Serial No: '.$user_asset_serial);
|
||||
@@ -216,8 +262,11 @@ class AssetImportCommand extends Command {
|
||||
$this->comment('Location: '.$user_asset_location);
|
||||
$this->comment('Purchase Date: '.$user_asset_purchase_date);
|
||||
$this->comment('Purchase Cost: '.$user_asset_purchase_cost);
|
||||
$this->comment('Status: '.$user_asset_status);
|
||||
$this->comment('Supplier: '.$user_asset_supplier);
|
||||
$this->comment('Warranty Months: '.$user_asset_warranty);
|
||||
$this->comment('Notes: '.$user_asset_notes);
|
||||
|
||||
$this->comment('Company Name: '.$user_asset_company_name);
|
||||
$this->comment('------------- Action Summary ----------------');
|
||||
|
||||
if ($user_username!='') {
|
||||
@@ -252,11 +301,11 @@ class AssetImportCommand extends Command {
|
||||
}
|
||||
|
||||
// Check for the location match and create it if it doesn't exist
|
||||
if ($location = Location::where('name', $user_asset_location)->first()) {
|
||||
if ($location = Location::where('name', e($user_asset_location))->first()) {
|
||||
$this->comment('Location '.$user_asset_location.' already exists');
|
||||
} else {
|
||||
|
||||
$location = new Location();
|
||||
$location = new Location();
|
||||
|
||||
if ($user_asset_location!='') {
|
||||
|
||||
@@ -292,26 +341,25 @@ class AssetImportCommand extends Command {
|
||||
}
|
||||
|
||||
// Check for the category match and create it if it doesn't exist
|
||||
if ($category = Category::where('name', $category_name)->where('category_type', 'asset')->first()) {
|
||||
if ($category = Category::where('name', e($category_name))->where('category_type', 'asset')->first()) {
|
||||
$this->comment('Category '.$category_name.' already exists');
|
||||
|
||||
} else {
|
||||
$category = new Category();
|
||||
|
||||
$category->name = $category_name;
|
||||
$category->name = e($category_name);
|
||||
$category->category_type = 'asset';
|
||||
$category->user_id = 1;
|
||||
|
||||
if ($category->save()) {
|
||||
$this->comment('Category '.$user_asset_category.' was created');
|
||||
} else {
|
||||
} else {
|
||||
$this->comment('Something went wrong! Category '.$user_asset_category.' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check for the manufacturer match and create it if it doesn't exist
|
||||
if ($manufacturer = Manufacturer::where('name', $user_asset_mfgr)->first()) {
|
||||
if ($manufacturer = Manufacturer::where('name', e($user_asset_mfgr))->first()) {
|
||||
$this->comment('Manufacturer '.$user_asset_mfgr.' already exists');
|
||||
} else {
|
||||
$manufacturer = new Manufacturer();
|
||||
@@ -320,33 +368,96 @@ class AssetImportCommand extends Command {
|
||||
|
||||
if ($manufacturer->save()) {
|
||||
$this->comment('Manufacturer '.$user_asset_mfgr.' was created');
|
||||
} else {
|
||||
} else {
|
||||
$this->comment('Something went wrong! Manufacturer '.$user_asset_mfgr.' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check for the supplier match and create it if it doesn't exist
|
||||
if ($supplier = Supplier::where('name', e($user_asset_supplier))->first()) {
|
||||
$this->comment('Supplier '.$user_asset_supplier.' already exists');
|
||||
} else {
|
||||
$supplier = new Supplier();
|
||||
$supplier->name = e($user_asset_supplier);
|
||||
$supplier->user_id = 1;
|
||||
|
||||
if ($supplier->save()) {
|
||||
$this->comment('Supplier '.$user_asset_supplier.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Supplier '.$user_asset_supplier.' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($user_asset_status=='') {
|
||||
$user_asset_status = 'Unspecified Status';
|
||||
}
|
||||
// Check for the status label match and create it if it doesn't exist
|
||||
if ($statuslabel = Statuslabel::where('name', e($user_asset_status))->first()) {
|
||||
$this->comment('Status Label '.$user_asset_status.' already exists');
|
||||
} else {
|
||||
|
||||
$statuslabel = new Statuslabel();
|
||||
$statuslabel->name = e($user_asset_status);
|
||||
$statuslabel->user_id = 1;
|
||||
$statuslabel->deployable = 1;
|
||||
|
||||
if ($statuslabel->save()) {
|
||||
$this->comment('Status Label '.$user_asset_status.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Status Label '.$user_asset_status.' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
$status_id = $statuslabel->id;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Check for the asset model match and create it if it doesn't exist
|
||||
if ($asset_model = Model::where('name', $user_asset_name)->where('modelno', $user_asset_modelno)->where('category_id', $category->id)->where('manufacturer_id', $manufacturer->id)->first()) {
|
||||
$this->comment('The Asset Model '.$user_asset_name.' with model number '.$user_asset_modelno.' already exists');
|
||||
if ($asset_model = Model::where('name', e($user_asset_model ))->where('modelno', e($user_asset_modelno))->where('category_id', $category->id)->where('manufacturer_id', $manufacturer->id)->first()) {
|
||||
$this->comment('The Asset Model '.$user_asset_model .' with model number '.$user_asset_modelno.' already exists');
|
||||
} else {
|
||||
$asset_model = new Model();
|
||||
$asset_model->name = e($user_asset_name);
|
||||
$asset_model->name = e($user_asset_model );
|
||||
$asset_model->manufacturer_id = $manufacturer->id;
|
||||
$asset_model->modelno = e($user_asset_modelno);
|
||||
$asset_model->category_id = $category->id;
|
||||
$asset_model->user_id = 1;
|
||||
|
||||
if ($asset_model->save()) {
|
||||
$this->comment('Asset Model '.$user_asset_name.' with model number '.$user_asset_modelno.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Asset Model '.$user_asset_name.' was NOT created');
|
||||
$this->comment('Asset Model '.$user_asset_model .' with model number '.$user_asset_modelno.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Asset Model '.$user_asset_model .' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check for the asset company match and create it if it doesn't exist
|
||||
if ($user_asset_company_name!='') {
|
||||
if ($company = Company::where('name', e($user_asset_company_name))->first()) {
|
||||
$this->comment('Company '.$user_asset_company_name.' already exists');
|
||||
} else {
|
||||
$company = new Company();
|
||||
$company->name = e($user_asset_company_name);
|
||||
|
||||
if ($company->save()) {
|
||||
$this->comment('Company '.$user_asset_company_name.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Company '.$user_asset_company_name.' was NOT created');
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$company = new Company();
|
||||
}
|
||||
|
||||
// Check for the asset match and create it if it doesn't exist
|
||||
if ($asset = Asset::where('asset_tag', $user_asset_tag)->first()) {
|
||||
if ($asset = Asset::where('asset_tag', e($user_asset_tag))->first()) {
|
||||
$this->comment('The Asset with asset tag '.$user_asset_tag.' already exists');
|
||||
} else {
|
||||
$asset = new Asset();
|
||||
@@ -359,7 +470,7 @@ class AssetImportCommand extends Command {
|
||||
if ($user_asset_purchase_cost!='') {
|
||||
$asset->purchase_cost = ParseFloat(e($user_asset_purchase_cost));
|
||||
} else {
|
||||
$asset->purchase_cost = 0.00;
|
||||
$asset->purchase_cost = '0.00';
|
||||
}
|
||||
$asset->serial = e($user_asset_serial);
|
||||
$asset->asset_tag = e($user_asset_tag);
|
||||
@@ -368,6 +479,8 @@ class AssetImportCommand extends Command {
|
||||
$asset->rtd_location_id = $location->id;
|
||||
$asset->user_id = 1;
|
||||
$asset->status_id = $status_id;
|
||||
$asset->warranty_months = $user_asset_warranty;
|
||||
$asset->company_id = $company->id;
|
||||
if ($user_asset_purchase_date!='') {
|
||||
$asset->purchase_date = $user_asset_purchase_date;
|
||||
} else {
|
||||
@@ -376,9 +489,9 @@ class AssetImportCommand extends Command {
|
||||
$asset->notes = e($user_asset_notes);
|
||||
|
||||
if ($asset->save()) {
|
||||
$this->comment('Asset '.$user_asset_name.' with serial number '.$user_asset_serial.' was created');
|
||||
$this->comment('Asset '.$user_asset_model .' with serial number '.$user_asset_serial.' was created');
|
||||
} else {
|
||||
$this->comment('Something went wrong! Asset '.$user_asset_name.' was NOT created');
|
||||
$this->comment('Something went wrong! Asset '.$user_asset_model .' was NOT created');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ return array(
|
||||
| Application Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale ties into the languaage files in app/lang, which contain the
|
||||
| This locale ties into the language files in app/lang, which contain the
|
||||
| language files for each translation.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@ return array(
|
||||
array(
|
||||
'permission' => 'superuser',
|
||||
'label' => 'Super User',
|
||||
'note' => 'Determines whether the user has full access to all aspects of the admin. ',
|
||||
),
|
||||
),
|
||||
|
||||
@@ -13,6 +14,7 @@ return array(
|
||||
array(
|
||||
'permission' => 'admin',
|
||||
'label' => 'Admin Rights',
|
||||
'note' => 'Determines whether the user has access to most aspects of the admin.',
|
||||
),
|
||||
),
|
||||
|
||||
@@ -20,6 +22,15 @@ return array(
|
||||
array(
|
||||
'permission' => 'reports',
|
||||
'label' => 'View Reports',
|
||||
'note' => 'Determines whether the user has the abiity to view reports.',
|
||||
),
|
||||
),
|
||||
|
||||
'Licenses' => array(
|
||||
array(
|
||||
'permission' => 'license_keys',
|
||||
'label' => 'View License Keys',
|
||||
'note' => 'Determines whether the user has the ability to view the license keys assigned to them in their own profile. (Usually granted for lower-level permissions that wouldn\'t normally have access.)',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v2.0.5-pre',
|
||||
'hash_version' => 'v2.0.5-pre-191-g948be5c',
|
||||
);
|
||||
'app_version' => 'v2.1.1',
|
||||
'hash_version' => 'v2.1.1-55-g701c16f',
|
||||
);
|
||||
|
||||
@@ -37,6 +37,13 @@ class AuthController extends BaseController
|
||||
$baseDn = Setting::getSettings()->ldap_basedn;
|
||||
$filterQuery = Setting::getSettings()->ldap_auth_filter_query . $username;
|
||||
$ldapversion = Setting::getSettings()->ldap_version;
|
||||
$ldap_server_cert_ignore = Setting::getSettings()->ldap_server_cert_ignore;
|
||||
|
||||
// If we are ignoring the SSL cert we need to setup the environment variable
|
||||
// before we create the connection
|
||||
if($ldap_server_cert_ignore) {
|
||||
putenv('LDAPTLS_REQCERT=never');
|
||||
}
|
||||
|
||||
// Connecting to LDAP
|
||||
$connection = ldap_connect($ldaphost) or die("Could not connect to {$ldaphost}");
|
||||
@@ -50,7 +57,7 @@ class AuthController extends BaseController
|
||||
$ldapbind = ldap_bind($connection, $ldaprdn, $ldappass);
|
||||
if ( ($results = @ldap_search($connection, $baseDn, $filterQuery)) != false ) {
|
||||
$entry = ldap_first_entry($connection, $results);
|
||||
if ( ($userDn = @ldap_get_dn($connection, $entry)) !== false ) {
|
||||
if ( ($userDn = @ldap_get_dn($connection, $entry)) != false ) {
|
||||
if( ($isBound = ldap_bind($connection, $userDn, $password)) == "true") {
|
||||
return $returnUser ?
|
||||
array_change_key_case(ldap_get_attributes($connection, $entry),CASE_LOWER)
|
||||
@@ -89,8 +96,8 @@ class AuthController extends BaseController
|
||||
$item["email"] = isset( $ldapatttibutes[$ldap_result_email][0] ) ? $ldapatttibutes[$ldap_result_email][0] : "" ;
|
||||
|
||||
//create user
|
||||
if(!empty($item["username"]) && !empty($item['email'])) {
|
||||
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10);
|
||||
if(!empty($item["username"])) {
|
||||
//$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10);
|
||||
|
||||
$newuser = array(
|
||||
'first_name' => $item["firstname"],
|
||||
@@ -98,21 +105,22 @@ class AuthController extends BaseController
|
||||
'username' => $item["username"],
|
||||
'email' => $item["email"],
|
||||
'employee_num' => $item["employee_number"],
|
||||
'password' => $pass,
|
||||
'password' => Input::get("password"), //$pass,
|
||||
'activated' => 1,
|
||||
'location_id' => null,
|
||||
'permissions' => '{"user":1}',
|
||||
'permissions' => ["user" => 1], //'{"user":1}',
|
||||
'notes' => 'Imported from LDAP'
|
||||
);
|
||||
|
||||
DB::table('users')->insert($newuser);
|
||||
Sentry::createUser($newuser);
|
||||
/*DB::table('users')->insert($newuser);
|
||||
$updateuser = Sentry::findUserByLogin($item["username"]);
|
||||
$updateuser->setHasher(new Cartalyst\Sentry\Hashing\BcryptHasher);
|
||||
|
||||
// Update the user details
|
||||
$updateuser->password = $pass;
|
||||
$updateuser->password = Input::get('password');
|
||||
|
||||
// Update the user
|
||||
$updateuser->save();
|
||||
$updateuser->save(); */
|
||||
} else {
|
||||
throw new Cartalyst\Sentry\Users\UserNotFoundException();
|
||||
}
|
||||
@@ -120,7 +128,7 @@ class AuthController extends BaseController
|
||||
//$item["note"] = "<strong>created</strong>";
|
||||
$credentials = array(
|
||||
'username' => $item["username"],
|
||||
'password' => $pass,
|
||||
'password' => Input::get("password")//$pass,
|
||||
);
|
||||
return $credentials;
|
||||
}
|
||||
@@ -149,47 +157,52 @@ class AuthController extends BaseController
|
||||
}
|
||||
try {
|
||||
|
||||
/**
|
||||
* =================================================================
|
||||
* Hack in LDAP authentication
|
||||
*/
|
||||
// Should we even check for LDAP users?
|
||||
if (Setting::getSettings()->ldap_enabled=='1') {
|
||||
|
||||
// Try to get the user from the database.
|
||||
$user = (array) DB::table('users')->where('username', Input::get('username'))->first();
|
||||
//If user does not exist and authenticates sucessfully with LDAP we will create it onf the fly and sign in with default permissions
|
||||
if(!$user){
|
||||
if($userattr = $this->ldap(Input::get('username'), Input::get('password'),true) ){
|
||||
LOG::debug("Creating LDAP authenticated user.");
|
||||
LOG::debug("LDAP is enabled.");
|
||||
// Check if the user exists in the database
|
||||
$user = User::where('username','=',Input::get('username'))->whereNull('deleted_at')->first();
|
||||
LOG::debug("Sentry lookup complete");
|
||||
|
||||
|
||||
// The user does not exist in the database. Try to get them from LDAP.
|
||||
// If user does not exist and authenticates sucessfully with LDAP we
|
||||
// will create it on the fly and sign in with default permissions
|
||||
if(!$user){
|
||||
LOG::debug("Local user ".Input::get('username')." does not exist");
|
||||
if($userattr = $this->ldap(Input::get('username'), Input::get('password'),true) ){
|
||||
LOG::debug("Creating local user from authenticated LDAP user.");
|
||||
$credentials = $this->createUserFromLdap($userattr);
|
||||
Sentry::authenticate($credentials, Input::get('remember-me', 0));
|
||||
} else {
|
||||
LOG::debug("User did not authenticate correctly against LDAP. No local user was created.");
|
||||
}
|
||||
|
||||
// If the user exists and they were imported from LDAP already
|
||||
} else {
|
||||
|
||||
}
|
||||
LOG::debug("Local user ".Input::get('username')." exists in database. Authenticating existing user against LDAP.");
|
||||
|
||||
if ($this->ldap(Input::get('username'), Input::get('password')) ) {
|
||||
LOG::debug("Valid LDAP login. Updating the local data.");
|
||||
$sentryuser=Sentry::findUserById($user->id); //need the Sentry object, not the Eloquent object, to access critical password hashing functions
|
||||
$sentryuser->password = Input::get('password');
|
||||
$sentryuser->save();
|
||||
|
||||
} else {
|
||||
LOG::debug("User did not authenticate correctly against LDAP. Local user was not updated.");
|
||||
}// End LDAP auth
|
||||
|
||||
} // End if(!user)
|
||||
|
||||
// NO LDAP enabled - just try to login the user normally
|
||||
}
|
||||
|
||||
else if ($user && strpos($user["notes"],'LDAP') !== false) {
|
||||
LOG::debug("Authenticating user against LDAP.");
|
||||
if( $this->ldap(Input::get('username'), Input::get('password')) ) {
|
||||
LOG::debug("valid login");
|
||||
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10);
|
||||
$user = Sentry::findUserByLogin( Input::get('username') );
|
||||
$user->password = $pass;
|
||||
$user->save();
|
||||
$credentials = array(
|
||||
'username' => Input::get('username'),
|
||||
'password' => $pass,
|
||||
);
|
||||
Sentry::authenticate($credentials, Input::get('remember-me', 0));
|
||||
}
|
||||
else {
|
||||
throw new Cartalyst\Sentry\Users\UserNotFoundException();
|
||||
}
|
||||
}
|
||||
/* ============================================================== */
|
||||
else {
|
||||
LOG::debug("Authenticating user against database.");
|
||||
// Try to log the user in
|
||||
Sentry::authenticate(Input::only('username', 'password'), Input::get('remember-me', 0));
|
||||
LOG::debug("Authenticating user against database.");
|
||||
// Try to log the user in
|
||||
if (!Sentry::authenticate(Input::only('username', 'password'), Input::get('remember-me', 0))) {
|
||||
LOG::debug("Local authentication failed.");
|
||||
throw new Cartalyst\Sentry\Users\UserNotFoundException();
|
||||
}
|
||||
|
||||
// Get the page we were before
|
||||
@@ -200,13 +213,25 @@ class AuthController extends BaseController
|
||||
|
||||
// Redirect to the users page
|
||||
return Redirect::to($redirect)->with('success', Lang::get('auth/message.signin.success'));
|
||||
|
||||
} catch (Cartalyst\Sentry\Users\UserNotFoundException $e) {
|
||||
LOG::debug("Local authentication: User ".Input::get('username')." not found");
|
||||
$this->messageBag->add('username', Lang::get('auth/message.account_not_found'));
|
||||
|
||||
} catch (Cartalyst\Sentry\Users\WrongPasswordException $e) {
|
||||
LOG::debug("Local authentication: Password for ".Input::get('username')." is incorrect.");
|
||||
$this->messageBag->add('username', Lang::get('auth/message.account_not_found'));
|
||||
|
||||
} catch (Cartalyst\Sentry\Users\UserNotActivatedException $e) {
|
||||
LOG::debug("Local authentication: User not activated");
|
||||
$this->messageBag->add('username', Lang::get('auth/message.account_not_activated'));
|
||||
|
||||
} catch (Cartalyst\Sentry\Throttling\UserSuspendedException $e) {
|
||||
LOG::debug("Local authentication: Account suspended");
|
||||
$this->messageBag->add('username', Lang::get('auth/message.account_suspended'));
|
||||
|
||||
} catch (Cartalyst\Sentry\Throttling\UserBannedException $e) {
|
||||
LOG::debug("Local authentication: Account banned.");
|
||||
$this->messageBag->add('username', Lang::get('auth/message.account_banned'));
|
||||
}
|
||||
|
||||
@@ -307,6 +332,7 @@ class AuthController extends BaseController
|
||||
}
|
||||
|
||||
} catch (Cartalyst\Sentry\Users\UserNotFoundException $e) {
|
||||
return Redirect::route('forgot-password')->withInput()->with('error', $e->getMessage());
|
||||
// Even though the username was not found, we will pretend
|
||||
// we have sent the password reset code through username,
|
||||
// this is a security measure against hackers.
|
||||
|
||||
@@ -20,12 +20,7 @@ class ProfileController extends AuthorizedController
|
||||
{
|
||||
// Get the user information
|
||||
$user = Sentry::getUser();
|
||||
|
||||
// Show the page
|
||||
|
||||
$location_list = array('' => 'Select One') + Location::lists('name', 'id');
|
||||
|
||||
// Show the page
|
||||
$location_list = locationsList();
|
||||
return View::make('frontend/account/profile', compact('user'))->with('location_list',$location_list);
|
||||
}
|
||||
|
||||
@@ -63,7 +58,7 @@ class ProfileController extends AuthorizedController
|
||||
$user->website = Input::get('website');
|
||||
$user->location_id = Input::get('location_id');
|
||||
$user->gravatar = Input::get('gravatar');
|
||||
|
||||
|
||||
if (Input::file('avatar')) {
|
||||
$image = Input::file('avatar');
|
||||
$file_name = $user->first_name."-".$user->last_name.".".$image->getClientOriginalExtension();
|
||||
@@ -75,7 +70,7 @@ class ProfileController extends AuthorizedController
|
||||
if (Input::get('avatar_delete') == 1 && Input::file('avatar') == "") {
|
||||
$user->avatar = NULL;
|
||||
}
|
||||
|
||||
|
||||
$user->save();
|
||||
|
||||
// Redirect to the settings page
|
||||
|
||||
@@ -16,6 +16,9 @@ use DB;
|
||||
use Slack;
|
||||
use Setting;
|
||||
use Config;
|
||||
use Mail;
|
||||
use User;
|
||||
|
||||
|
||||
class ViewAssetsController extends AuthorizedController
|
||||
{
|
||||
@@ -26,18 +29,22 @@ class ViewAssetsController extends AuthorizedController
|
||||
*/
|
||||
public function getIndex()
|
||||
{
|
||||
$user = Sentry::getUser();
|
||||
|
||||
$user = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find(Sentry::getUser()->id);
|
||||
|
||||
$userlog = $user->userlog->load('assetlog', 'consumablelog', 'assetlog.model', 'licenselog', 'accessorylog', 'userlog', 'adminlog');
|
||||
|
||||
|
||||
if (isset($user->id)) {
|
||||
return View::make('frontend/account/view-assets', compact('user'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/users/message.user_not_found', compact('id' ));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('users')->with('error', $error);
|
||||
}
|
||||
if (isset($user->id)) {
|
||||
return View::make('frontend/account/view-assets', compact('user', 'userlog'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/users/message.user_not_found', compact('id' ));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('users')->with('error', $error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,46 +72,57 @@ class ViewAssetsController extends AuthorizedController
|
||||
else {
|
||||
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $asset->id;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->created_at = date("Y-m-d h:i:s");
|
||||
$logaction->asset_id = $data['asset_id'] = $asset->id;
|
||||
$logaction->asset_type = $data['asset_type'] = 'hardware';
|
||||
$logaction->created_at = $data['requested_date'] = date("Y-m-d h:i:s");
|
||||
|
||||
if ($user->location_id) {
|
||||
$logaction->location_id = $user->location_id;
|
||||
}
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->user_id = $data['user_id'] = Sentry::getUser()->id;
|
||||
$log = $logaction->logaction('requested');
|
||||
|
||||
$data['requested_by'] = $user->fullName();
|
||||
$data['asset_name'] = $asset->showAssetName();
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->slack_endpoint) {
|
||||
if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!Config::get('app.lock_passwords'))) {
|
||||
Mail::send('emails.asset-requested', $data, function ($m) use ($user, $settings) {
|
||||
$m->to($settings->alert_email, $settings->site_name);
|
||||
$m->subject('Asset Requested');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
if ($settings->slack_endpoint) {
|
||||
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'REQUESTED:',
|
||||
'value' => strtoupper($logaction->asset_type).' asset <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> requested by <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.Sentry::getUser()->fullName().'>.'
|
||||
]
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
|
||||
]
|
||||
])->send('Asset Requested');
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
} catch (Exception $e) {
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'REQUESTED:',
|
||||
'value' => strtoupper($logaction->asset_type).' asset <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> requested by <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.Sentry::getUser()->fullName().'>.'
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
])->send('Asset Requested');
|
||||
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Redirect::route('requestable-assets')->with('success')->with('success', Lang::get('admin/hardware/message.requests.success'));
|
||||
}
|
||||
@@ -122,6 +140,12 @@ class ViewAssetsController extends AuthorizedController
|
||||
return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$user = Sentry::getUser();
|
||||
|
||||
if ($user->id != $findlog->checkedout_to) {
|
||||
return Redirect::to('account/view-assets')->with('error', Lang::get('admin/users/message.error.incorrect_user_accepted'));
|
||||
}
|
||||
|
||||
// Asset
|
||||
if (($findlog->asset_id!='') && ($findlog->asset_type=='hardware')) {
|
||||
$item = Asset::find($findlog->asset_id);
|
||||
@@ -172,6 +196,11 @@ class ViewAssetsController extends AuthorizedController
|
||||
}
|
||||
|
||||
$user = Sentry::getUser();
|
||||
|
||||
if ($user->id != $findlog->checkedout_to) {
|
||||
return Redirect::to('account/view-assets')->with('error', Lang::get('admin/users/message.error.incorrect_user_accepted'));
|
||||
}
|
||||
|
||||
$logaction = new Actionlog();
|
||||
|
||||
if (Input::get('asset_acceptance')=='accepted') {
|
||||
|
||||
@@ -42,7 +42,7 @@ class AccessoriesController extends AdminController
|
||||
{
|
||||
// Show the page
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','accessory')->whereNull('deleted_at')->orderBy('name','ASC')->lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$location_list = locationsList();
|
||||
return View::make('backend/accessories/edit')
|
||||
->with('accessory', new Accessory)
|
||||
@@ -125,7 +125,7 @@ class AccessoriesController extends AdminController
|
||||
}
|
||||
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','accessory')->whereNull('deleted_at')->orderBy('name','ASC')->lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$location_list = locationsList();
|
||||
|
||||
return View::make('backend/accessories/edit', compact('accessory'))
|
||||
@@ -170,7 +170,13 @@ class AccessoriesController extends AdminController
|
||||
|
||||
// Update the accessory data
|
||||
$accessory->name = e(Input::get('name'));
|
||||
$accessory->location_id = e(Input::get('location_id'));
|
||||
|
||||
if (e(Input::get('location_id')) == '') {
|
||||
$accessory->location_id = NULL;
|
||||
} else {
|
||||
$accessory->location_id = e(Input::get('location_id'));
|
||||
}
|
||||
|
||||
$accessory->category_id = e(Input::get('category_id'));
|
||||
$accessory->company_id = Company::getIdForCurrentUser(Input::get('company_id'));
|
||||
$accessory->order_number = e(Input::get('order_number'));
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
use Validator;
|
||||
use View;
|
||||
use Setting;
|
||||
use Asset;
|
||||
|
||||
class AssetMaintenancesController extends AdminController
|
||||
{
|
||||
@@ -87,7 +88,7 @@
|
||||
|
||||
foreach($maintenances as $maintenance) {
|
||||
|
||||
$actions = '<nobr><a href="'.route('update/asset_maintenance', $maintenance->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/statuslabel', $maintenance->id).'" data-content="'.Lang::get('admin/asset_maintenances/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($maintenance->title).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></nobr>';
|
||||
$actions = '<nobr><a href="'.route('update/asset_maintenance', $maintenance->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/asset_maintenance', $maintenance->id).'" data-content="'.Lang::get('admin/asset_maintenances/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($maintenance->title).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></nobr>';
|
||||
|
||||
if (($maintenance->cost) && ($maintenance->asset->assetloc) && ($maintenance->asset->assetloc->currency!='')) {
|
||||
$maintenance_cost = $maintenance->asset->assetloc->currency.$maintenance->cost;
|
||||
@@ -106,7 +107,7 @@
|
||||
'cost' => $maintenance_cost,
|
||||
'asset_maintenance_type' => e($maintenance->asset_maintenance_type),
|
||||
'start_date' => $maintenance->start_date,
|
||||
'time' => $maintenance->asset_maintenance_time,
|
||||
'asset_maintenance_time' => $maintenance->asset_maintenance_time,
|
||||
'completion_date' => $maintenance->completion_date,
|
||||
'actions' => $actions,
|
||||
'companyName' => is_null($company) ? '' : $company->name
|
||||
@@ -232,6 +233,16 @@
|
||||
$assetMaintenance->completion_date = null;
|
||||
}
|
||||
|
||||
if (( $assetMaintenance->completion_date !== "" )
|
||||
&& ( $assetMaintenance->completion_date !== "0000-00-00" )
|
||||
&& ( $assetMaintenance->start_date !== "" )
|
||||
&& ( $assetMaintenance->start_date !== "0000-00-00" )
|
||||
) {
|
||||
$startDate = Carbon::parse( $assetMaintenance->start_date );
|
||||
$completionDate = Carbon::parse( $assetMaintenance->completion_date );
|
||||
$assetMaintenance->asset_maintenance_time = $completionDate->diffInDays( $startDate );
|
||||
}
|
||||
|
||||
// Was the asset maintenance created?
|
||||
if ($assetMaintenance->save()) {
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ use Paginator;
|
||||
use Manufacturer; //for embedded-create
|
||||
use Artisan;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
use CustomField;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Models;
|
||||
|
||||
|
||||
class AssetsController extends AdminController
|
||||
@@ -66,7 +68,7 @@ class AssetsController extends AdminController
|
||||
$manufacturer_list = manufacturerList();
|
||||
$category_list = categoryList();
|
||||
$supplier_list = suppliersList();
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$assigned_to = usersList();
|
||||
$statuslabel_types = statusTypeList();
|
||||
|
||||
@@ -99,9 +101,25 @@ class AssetsController extends AdminController
|
||||
{
|
||||
// create a new model instance
|
||||
$asset = new Asset();
|
||||
$asset->model()->associate(Model::find(e(Input::get('model_id'))));
|
||||
|
||||
//attempt to validate
|
||||
$validator = Validator::make(Input::all(), $asset->validationRules());
|
||||
$input=Input::all();
|
||||
|
||||
$rules=$asset->validationRules();
|
||||
if($asset->model->fieldset)
|
||||
{
|
||||
foreach($asset->model->fieldset->fields AS $field) {
|
||||
$input[$field->db_column_name()]=$input['fields'][$field->db_column_name()];
|
||||
$asset->{$field->db_column_name()}=$input[$field->db_column_name()];
|
||||
}
|
||||
$rules+=$asset->model->fieldset->validation_rules();
|
||||
unset($input['fields']);
|
||||
}
|
||||
|
||||
$validator = Validator::make($input, $rules );
|
||||
$custom_errors=[];
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
@@ -160,7 +178,7 @@ class AssetsController extends AdminController
|
||||
}
|
||||
|
||||
$checkModel = Config::get('app.url').'/api/models/'.e(Input::get('model_id')).'/check';
|
||||
$asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL;
|
||||
//$asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL;
|
||||
|
||||
// Save the asset data
|
||||
$asset->name = e(Input::get('name'));
|
||||
@@ -235,7 +253,7 @@ class AssetsController extends AdminController
|
||||
$manufacturer_list = manufacturerList();
|
||||
$category_list = categoryList();
|
||||
$supplier_list = suppliersList();
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$assigned_to = usersList();
|
||||
$statuslabel_types = statusTypeList();
|
||||
|
||||
@@ -269,8 +287,26 @@ class AssetsController extends AdminController
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
$input=Input::all();
|
||||
// return "INPUT IS: <pre>".print_r($input,true)."</pre>";
|
||||
$rules=$asset->validationRules($assetId);
|
||||
$model=Model::find(e(Input::get('model_id'))); //validate by the NEW model's custom fields, not the current one
|
||||
if($model->fieldset)
|
||||
{
|
||||
foreach($model->fieldset->fields AS $field) {
|
||||
$input[$field->db_column_name()]=$input['fields'][$field->db_column_name()];
|
||||
$asset->{$field->db_column_name()}=$input[$field->db_column_name()];
|
||||
}
|
||||
$rules+=$model->fieldset->validation_rules();
|
||||
unset($input['fields']);
|
||||
}
|
||||
|
||||
//return "Rules: <pre>".print_r($rules,true)."</pre>";
|
||||
|
||||
//attempt to validate
|
||||
$validator = Validator::make(Input::all(), $asset->validationRules($assetId));
|
||||
$validator = Validator::make($input, $rules );
|
||||
|
||||
$custom_errors=[];
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
@@ -290,7 +326,7 @@ class AssetsController extends AdminController
|
||||
if (e(Input::get('warranty_months')) == '') {
|
||||
$asset->warranty_months = NULL;
|
||||
} else {
|
||||
$asset->warranty_months = e(Input::get('warranty_months'));
|
||||
$asset->warranty_months = e(Input::get('warranty_months'));
|
||||
}
|
||||
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
@@ -323,8 +359,15 @@ class AssetsController extends AdminController
|
||||
$asset->rtd_location_id = e(Input::get('rtd_location_id'));
|
||||
}
|
||||
|
||||
if (Input::has('image_delete')) {
|
||||
unlink(public_path().'/uploads/assets/'.$asset->image);
|
||||
$asset->image = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$checkModel = Config::get('app.url').'/api/models/'.e(Input::get('model_id')).'/check';
|
||||
$asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL;
|
||||
//$asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL;
|
||||
|
||||
// Update the asset data
|
||||
$asset->name = e(Input::get('name'));
|
||||
@@ -363,6 +406,7 @@ class AssetsController extends AdminController
|
||||
|
||||
|
||||
// Redirect to the asset management page with error
|
||||
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
|
||||
return Redirect::to("hardware/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error'));
|
||||
|
||||
}
|
||||
@@ -464,17 +508,15 @@ class AssetsController extends AdminController
|
||||
|
||||
|
||||
if (Input::get('checkout_at')!= date("Y-m-d")){
|
||||
$checkout_at = e(Input::get('checkout_at')).' 00:00:00';
|
||||
$checkout_at = e(Input::get('checkout_at')).' 00:00:00';
|
||||
} else {
|
||||
$checkout_at = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
if (Input::has('expected_checkin')) {
|
||||
if (Input::get('expected_checkin')!= date("Y-m-d")){
|
||||
$expected_checkin = e(Input::get('expected_checkin'));
|
||||
}
|
||||
} else {
|
||||
$expected_checkin = null;
|
||||
$expected_checkin = e(Input::get('expected_checkin'));
|
||||
} else {
|
||||
$expected_checkin = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -504,8 +546,8 @@ class AssetsController extends AdminController
|
||||
else if (!Company::isCurrentUserHasAccess($asset)) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
return View::make('backend/hardware/checkin', compact('asset'))->with('backto', $backto);
|
||||
$statusLabel_list = statusLabelList();
|
||||
return View::make('backend/hardware/checkin', compact('asset'))->with('statusLabel_list',$statusLabel_list)->with('backto', $backto);
|
||||
}
|
||||
|
||||
|
||||
@@ -544,7 +586,12 @@ class AssetsController extends AdminController
|
||||
$asset->assigned_to = NULL;
|
||||
$asset->accepted = NULL;
|
||||
|
||||
$asset->expected_checkin = NULL;
|
||||
$asset->last_checkout = NULL;
|
||||
|
||||
if (Input::has('status_id')) {
|
||||
$asset->status_id = e(Input::get('status_id'));
|
||||
}
|
||||
// Was the asset updated?
|
||||
if($asset->save()) {
|
||||
|
||||
@@ -603,6 +650,7 @@ class AssetsController extends AdminController
|
||||
$data['item_name'] = $asset->showAssetName();
|
||||
$data['checkin_date'] = $logaction->created_at;
|
||||
$data['item_tag'] = $asset->asset_tag;
|
||||
$data['item_serial'] = $asset->serial;
|
||||
$data['note'] = $logaction->note;
|
||||
|
||||
if ((($asset->checkin_email()=='1')) && ($user) && (!Config::get('app.lock_passwords'))) {
|
||||
@@ -805,7 +853,7 @@ class AssetsController extends AdminController
|
||||
file_put_contents($file, $display_output);
|
||||
|
||||
|
||||
return View::make('backend/hardware/import-status');
|
||||
return Redirect::to('hardware')->with('success','Your file has been imported');
|
||||
|
||||
}
|
||||
|
||||
@@ -835,14 +883,14 @@ class AssetsController extends AdminController
|
||||
$supplier_list = suppliersList();
|
||||
$assigned_to = usersList();
|
||||
$statuslabel_types = statusTypeList();
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
|
||||
$asset = clone $asset_to_clone;
|
||||
$asset->id = null;
|
||||
$asset->asset_tag = '';
|
||||
$asset->serial = '';
|
||||
$asset->assigned_to = '';
|
||||
$asset->mac_address = '';
|
||||
|
||||
return View::make('backend/hardware/edit')
|
||||
->with('supplier_list',$supplier_list)
|
||||
->with('model_list',$model_list)
|
||||
@@ -891,9 +939,9 @@ class AssetsController extends AdminController
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function postUpload($assetID = null)
|
||||
public function postUpload($assetId = null)
|
||||
{
|
||||
$asset = Asset::find($assetID);
|
||||
$asset = Asset::find($assetId);
|
||||
|
||||
// the asset is valid
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
@@ -965,11 +1013,12 @@ class AssetsController extends AdminController
|
||||
* Delete the associated file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
**/
|
||||
public function getDeleteFile($assetID = null, $fileId = null)
|
||||
public function getDeleteFile($assetId = null, $fileId = null)
|
||||
{
|
||||
$asset = Asset::find($assetID);
|
||||
$asset = Asset::find($assetId);
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
|
||||
// the asset is valid
|
||||
@@ -1003,12 +1052,13 @@ class AssetsController extends AdminController
|
||||
* Display/download the uploaded file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
**/
|
||||
public function displayFile($assetID = null, $fileId = null)
|
||||
public function displayFile($assetId = null, $fileId = null)
|
||||
{
|
||||
|
||||
$asset = Asset::find($assetID);
|
||||
$asset = Asset::find($assetId);
|
||||
|
||||
// the asset is valid
|
||||
if (isset($asset->id)) {
|
||||
@@ -1054,43 +1104,63 @@ class AssetsController extends AdminController
|
||||
public function postBulkEdit($assets = null)
|
||||
{
|
||||
|
||||
if (!Company::isCurrentUserAuthorized()) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
}
|
||||
else if (!Input::has('edit_asset')) {
|
||||
return Redirect::back()->with('error', 'No assets selected');
|
||||
} else {
|
||||
$asset_raw_array = Input::get('edit_asset');
|
||||
foreach ($asset_raw_array as $asset_id => $value) {
|
||||
$asset_ids[] = $asset_id;
|
||||
if (!Company::isCurrentUserAuthorized()) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
|
||||
}
|
||||
} elseif (!Input::has('edit_asset')) {
|
||||
return Redirect::back()->with('error', 'No assets selected');
|
||||
|
||||
}
|
||||
} else {
|
||||
$asset_raw_array = Input::get('edit_asset');
|
||||
foreach ($asset_raw_array as $asset_id => $value) {
|
||||
$asset_ids[] = $asset_id;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input::has('bulk_actions')) {
|
||||
|
||||
|
||||
// Create labels
|
||||
if (Input::get('bulk_actions')=='labels') {
|
||||
$assets = Asset::find($asset_ids);
|
||||
$assetcount = count($assets);
|
||||
$count = 0;
|
||||
$settings = Setting::getSettings();
|
||||
if ($settings->qr_code=='1') {
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings)->with('count',$count);
|
||||
$assets = Asset::find($asset_ids);
|
||||
$assetcount = count($assets);
|
||||
$count = 0;
|
||||
|
||||
return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings)->with('count',$count);
|
||||
|
||||
} else {
|
||||
// QR codes are not enabled
|
||||
return Redirect::to("hardware")->with('error','Barcodes are not enabled in Admin > Settings');
|
||||
}
|
||||
|
||||
} elseif (Input::get('bulk_actions')=='delete') {
|
||||
|
||||
|
||||
$assets = Asset::with('assigneduser','assetloc')->find($asset_ids);
|
||||
return View::make('backend/hardware/bulk-delete')->with('assets',$assets);
|
||||
|
||||
// Bulk edit
|
||||
} elseif (Input::get('bulk_actions')=='edit') {
|
||||
|
||||
$assets = Input::get('edit_asset');
|
||||
$supplier_list = array('' => '') + suppliersList();
|
||||
$statuslabel_list = array('' => '') + statusLabelList();
|
||||
$location_list = array('' => '') + locationsList();
|
||||
$models_list = array('' => '') + modelList();
|
||||
$companies_list = array('' => '') + array('clear' => Lang::get('general.remove_company')) + companyList();
|
||||
|
||||
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id');
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
|
||||
return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list);
|
||||
return View::make('backend/hardware/bulk')
|
||||
->with('assets',$assets)
|
||||
->with('supplier_list',$supplier_list)
|
||||
->with('statuslabel_list',$statuslabel_list)
|
||||
->with('location_list',$location_list)
|
||||
->with('models_list',$models_list)
|
||||
->with('companies_list',$companies_list);
|
||||
|
||||
|
||||
}
|
||||
@@ -1113,14 +1183,14 @@ class AssetsController extends AdminController
|
||||
public function postBulkSave($assets = null)
|
||||
{
|
||||
|
||||
if (!Company::isCurrentUserAuthorized()) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
}
|
||||
else if (Input::has('bulk_edit')) {
|
||||
if (!Company::isCurrentUserAuthorized()) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
|
||||
} elseif (Input::has('bulk_edit')) {
|
||||
|
||||
$assets = Input::get('bulk_edit');
|
||||
|
||||
if ( (Input::has('purchase_date')) || (Input::has('purchase_cost')) || (Input::has('supplier_id')) || (Input::has('order_number')) || (Input::has('warranty_months')) || (Input::has('rtd_location_id')) || (Input::has('requestable')) || (Input::has('status_id')) ) {
|
||||
if ( (Input::has('purchase_date')) || (Input::has('purchase_cost')) || (Input::has('supplier_id')) || (Input::has('order_number')) || (Input::has('warranty_months')) || (Input::has('rtd_location_id')) || (Input::has('requestable')) || (Input::has('company_id')) || (Input::has('status_id')) || (Input::has('model_id')) ) {
|
||||
|
||||
foreach ($assets as $key => $value) {
|
||||
|
||||
@@ -1138,6 +1208,19 @@ class AssetsController extends AdminController
|
||||
$update_array['supplier_id'] = e(Input::get('supplier_id'));
|
||||
}
|
||||
|
||||
if (Input::has('model_id')) {
|
||||
$update_array['model_id'] = e(Input::get('model_id'));
|
||||
}
|
||||
|
||||
if (Input::has('company_id')) {
|
||||
if (Input::get('company_id')=="clear") {
|
||||
$update_array['company_id'] = null;
|
||||
} else {
|
||||
$update_array['company_id'] = e(Input::get('company_id'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input::has('order_number')) {
|
||||
$update_array['order_number'] = e(Input::get('order_number'));
|
||||
}
|
||||
@@ -1154,11 +1237,9 @@ class AssetsController extends AdminController
|
||||
$update_array['status_id'] = e(Input::get('status_id'));
|
||||
}
|
||||
|
||||
if (Input::get('requestable')=='1') {
|
||||
$update_array['requestable'] = 1;
|
||||
} else {
|
||||
$update_array['requestable'] = 0;
|
||||
}
|
||||
if (Input::has('requestable')) {
|
||||
$update_array['requestable'] = e(Input::get('requestable'));
|
||||
}
|
||||
|
||||
|
||||
if (DB::table('assets')
|
||||
@@ -1195,12 +1276,61 @@ class AssetsController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Save bulk edits
|
||||
*
|
||||
* @return View
|
||||
**/
|
||||
public function postBulkDelete($assets = null)
|
||||
{
|
||||
|
||||
if (!Company::isCurrentUserAuthorized()) {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
} elseif (Input::has('bulk_edit')) {
|
||||
//$assets = Input::get('bulk_edit');
|
||||
$assets = Asset::find(Input::get('bulk_edit'));
|
||||
//print_r($assets);
|
||||
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
//echo '<li>'.$asset;
|
||||
$update_array['deleted_at'] = date('Y-m-d h:i:s');
|
||||
$update_array['assigned_to'] = NULL;
|
||||
|
||||
if (DB::table('assets')
|
||||
->where('id', $asset->id)
|
||||
->update($update_array)) {
|
||||
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $asset->id;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->created_at = date("Y-m-d H:i:s");
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$log = $logaction->logaction('deleted');
|
||||
|
||||
}
|
||||
|
||||
} // endforeach
|
||||
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.delete.success'));
|
||||
|
||||
// no values given, nothing to update
|
||||
} else {
|
||||
return Redirect::to("hardware")->with('info',Lang::get('admin/hardware/message.delete.nothing_updated'));
|
||||
|
||||
}
|
||||
|
||||
// Something weird happened here - default to hardware
|
||||
return Redirect::to("hardware");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getDatatable($status = null)
|
||||
{
|
||||
|
||||
|
||||
$assets = Asset::select('assets.*')->with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category','assetstatus','assetloc', 'company')
|
||||
$assets = Asset::select('assets.*')->with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category','model.fieldset','assetstatus','assetloc', 'company')
|
||||
->Hardware();
|
||||
|
||||
if (Input::has('search')) {
|
||||
@@ -1264,6 +1394,12 @@ class AssetsController extends AdminController
|
||||
'image',
|
||||
];
|
||||
|
||||
$all_custom_fields=CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||
|
||||
foreach($all_custom_fields AS $field) {
|
||||
$allowed_columns[]=$field->db_column_name();
|
||||
}
|
||||
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'asset_tag';
|
||||
|
||||
@@ -1313,10 +1449,10 @@ class AssetsController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
$rows[] = array(
|
||||
$row = array(
|
||||
'checkbox' =>'<div class="text-center"><input type="checkbox" name="edit_asset['.$asset->id.']" class="one_required"></div>',
|
||||
'id' => $asset->id,
|
||||
'image' => ($asset->image!='') ? '<img src="'.Config::get('app.url').'/uploads/assets/'.$asset->image.'" height=50 width=50>' : (($asset->model->image!='') ? '<img src="'.Config::get('app.url').'/uploads/models/'.$asset->model->image.'" height=40 width=50>' : ''),
|
||||
'image' => (($asset->image) && ($asset->image!='')) ? '<img src="'.Config::get('app.url').'/uploads/assets/'.$asset->image.'" height=50 width=50>' : ((($asset->model) && ($asset->model->image!='')) ? '<img src="'.Config::get('app.url').'/uploads/models/'.$asset->model->image.'" height=40 width=50>' : ''),
|
||||
'name' => '<a title="'.$asset->name.'" href="hardware/'.$asset->id.'/view">'.$asset->name.'</a>',
|
||||
'asset_tag' => '<a title="'.$asset->asset_tag.'" href="hardware/'.$asset->id.'/view">'.$asset->asset_tag.'</a>',
|
||||
'serial' => $asset->serial,
|
||||
@@ -1326,13 +1462,17 @@ class AssetsController extends AdminController
|
||||
'category' => (($asset->model) && ($asset->model->category)) ? $asset->model->category->name : '',
|
||||
'eol' => ($asset->eol_date()) ? $asset->eol_date() : '',
|
||||
'notes' => $asset->notes,
|
||||
'order_number' => ($asset->order_number!='') ? '<a href="../hardware/?order_number='.$asset->order_number.'">'.$asset->order_number.'</a>' : '',
|
||||
'order_number' => ($asset->order_number!='') ? '<a href="'.Config::get('app.url').'/hardware?order_number='.$asset->order_number.'">'.$asset->order_number.'</a>' : '',
|
||||
'last_checkout' => ($asset->last_checkout!='') ? $asset->last_checkout : '',
|
||||
'expected_checkin' => ($asset->expected_checkin!='') ? $asset->expected_checkin : '',
|
||||
'change' => ($inout) ? $inout : '',
|
||||
'actions' => ($actions) ? $actions : '',
|
||||
'companyName' => is_null($asset->company) ? '' : e($asset->company->name)
|
||||
);
|
||||
);
|
||||
foreach($all_custom_fields AS $field) {
|
||||
$row[$field->db_column_name()]=$asset->{$field->db_column_name()};
|
||||
}
|
||||
$rows[]=$row;
|
||||
}
|
||||
|
||||
$data = array('total'=>$assetCount, 'rows'=>$rows);
|
||||
|
||||
@@ -171,20 +171,25 @@ class CategoriesController extends AdminController
|
||||
// Check if the category exists
|
||||
if (is_null($category = Category::find($categoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return Redirect::to('admin/settings/categories')->with('error', Lang::get('admin/categories/message.not_found'));
|
||||
return Redirect::route('categories')->with('error', Lang::get('admin/categories/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
if ($category->has_models() > 0) {
|
||||
return Redirect::route('categories')->with('error', Lang::get('admin/categories/message.assoc_models'));
|
||||
|
||||
} elseif ($category->accessories()->count() > 0) {
|
||||
return Redirect::route('categories')->with('error', Lang::get('admin/categories/message.assoc_accessories'));
|
||||
|
||||
} elseif ($category->consumables()->count() > 0) {
|
||||
return Redirect::route('categories')->with('error', Lang::get('admin/categories/message.assoc_consumables'));
|
||||
|
||||
// Redirect to the asset management page
|
||||
return Redirect::to('admin/settings/categories')->with('error', Lang::get('admin/categories/message.assoc_users'));
|
||||
} else {
|
||||
|
||||
$category->delete();
|
||||
|
||||
// Redirect to the locations management page
|
||||
return Redirect::to('admin/settings/categories')->with('success', Lang::get('admin/categories/message.delete.success'));
|
||||
return Redirect::route('categories')->with('success', Lang::get('admin/categories/message.delete.success'));
|
||||
}
|
||||
|
||||
|
||||
@@ -250,12 +255,11 @@ class CategoriesController extends AdminController
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$actions = '<a href="'.route('update/category', $category->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/category', $category->id).'" data-content="'.Lang::get('admin/categories/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($category->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
|
||||
|
||||
$rows[] = array(
|
||||
'id' => $category->id,
|
||||
'name' => link_to('/admin/settings/categories/'.$category->id.'/view', $category->name) ,
|
||||
'category_type' => ucwords($category->category_type),
|
||||
'count' => ($category->category_type=='asset') ? $category->assetscount() : $category->accessoriescount(),
|
||||
'count' => $category->itemCount(),
|
||||
'acceptance' => ($category->require_acceptance=='1') ? '<i class="fa fa-check"></i>' : '',
|
||||
//EULA is still not working correctly
|
||||
'eula' => ($category->getEula()) ? '<i class="fa fa-check"></i>' : '',
|
||||
@@ -268,7 +272,7 @@ class CategoriesController extends AdminController
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getDataView($categoryID) {
|
||||
public function getDataViewAssets($categoryID) {
|
||||
|
||||
$category = Category::with('assets.company')->find($categoryID);
|
||||
$category_assets = $category->assets;
|
||||
@@ -336,4 +340,111 @@ class CategoriesController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getDataViewAccessories($categoryID) {
|
||||
|
||||
$category = Category::with('accessories.company')->find($categoryID);
|
||||
$category_assets = $category->accessories;
|
||||
|
||||
if (Input::has('search')) {
|
||||
$category_assets = $category_assets->TextSearch(e(Input::get('search')));
|
||||
}
|
||||
|
||||
if (Input::has('offset')) {
|
||||
$offset = e(Input::get('offset'));
|
||||
} else {
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
if (Input::has('limit')) {
|
||||
$limit = e(Input::get('limit'));
|
||||
} else {
|
||||
$limit = 50;
|
||||
}
|
||||
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
|
||||
$allowed_columns = ['id','name','serial','asset_tag'];
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
$count = $category_assets->count();
|
||||
|
||||
$rows = array();
|
||||
|
||||
foreach ($category_assets as $asset) {
|
||||
|
||||
$actions = '';
|
||||
$inout='';
|
||||
|
||||
if ($asset->deleted_at=='') {
|
||||
$actions = '<div style=" white-space: nowrap;"><a href="'.route('update/accessory', $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a> <a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/accessory', $asset->id).'" data-content="'.Lang::get('admin/hardware/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($asset->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rows[] = array(
|
||||
'id' => $asset->id,
|
||||
'name' => link_to_route('view/accessory', $asset->name, [$asset->id]),
|
||||
'actions' => $actions,
|
||||
'companyName' => Company::getName($asset),
|
||||
);
|
||||
}
|
||||
|
||||
$data = array('total' => $count, 'rows' => $rows);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function getDataViewConsumables($categoryID) {
|
||||
|
||||
$category = Category::with('accessories.company')->find($categoryID);
|
||||
$category_assets = $category->consumables;
|
||||
|
||||
if (Input::has('search')) {
|
||||
$category_assets = $category_assets->TextSearch(e(Input::get('search')));
|
||||
}
|
||||
|
||||
if (Input::has('offset')) {
|
||||
$offset = e(Input::get('offset'));
|
||||
} else {
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
if (Input::has('limit')) {
|
||||
$limit = e(Input::get('limit'));
|
||||
} else {
|
||||
$limit = 50;
|
||||
}
|
||||
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
|
||||
$allowed_columns = ['id','name','serial','asset_tag'];
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
$count = $category_assets->count();
|
||||
|
||||
$rows = array();
|
||||
|
||||
foreach ($category_assets as $asset) {
|
||||
|
||||
$actions = '';
|
||||
$inout='';
|
||||
|
||||
if ($asset->deleted_at=='') {
|
||||
$actions = '<div style=" white-space: nowrap;"><a href="'.route('update/consumable', $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a> <a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/consumable', $asset->id).'" data-content="'.Lang::get('admin/hardware/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($asset->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rows[] = array(
|
||||
'id' => $asset->id,
|
||||
'name' => link_to_route('view/consumable', $asset->name, [$asset->id]),
|
||||
'actions' => $actions,
|
||||
'companyName' => Company::getName($asset),
|
||||
);
|
||||
}
|
||||
|
||||
$data = array('total' => $count, 'rows' => $rows);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class ConsumablesController extends AdminController
|
||||
{
|
||||
// Show the page
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','consumable')->whereNull('deleted_at')->orderBy('name','ASC')->lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$location_list = locationsList();
|
||||
|
||||
return View::make('backend/consumables/edit')
|
||||
@@ -126,7 +126,7 @@ class ConsumablesController extends AdminController
|
||||
}
|
||||
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','consumable')->whereNull('deleted_at')->orderBy('name','ASC')->lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$location_list = locationsList();
|
||||
|
||||
return View::make('backend/consumables/edit', compact('consumable'))
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php namespace Controllers\Admin;
|
||||
|
||||
use View;
|
||||
use CustomFieldset;
|
||||
use CustomField;
|
||||
use Input;
|
||||
use Validator;
|
||||
use Redirect;
|
||||
use Model;
|
||||
use Lang;
|
||||
use Sentry;
|
||||
|
||||
class CustomFieldsController extends \BaseController {
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
$fieldsets=CustomFieldset::with("fields","models")->get();
|
||||
//$fieldsets=CustomFieldset::all();
|
||||
$fields=CustomField::with("fieldset")->get();
|
||||
//$fields=CustomField::all();
|
||||
return View::make("backend.custom_fields.index")->with("custom_fieldsets",$fieldsets)->with("custom_fields",$fields);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
return View::make("backend.custom_fields.create");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store()
|
||||
{
|
||||
//
|
||||
$cfset=new CustomFieldset(["name" => Input::get("name"),"user_id" => Sentry::getUser()->id]);
|
||||
$validator=Validator::make(Input::all(),$cfset->rules);
|
||||
if($validator->passes()) {
|
||||
$cfset->save();
|
||||
return Redirect::route("admin.custom_fields.show",[$cfset->id])->with('success',Lang::get('admin/custom_fields/message.fieldset.create.success'));
|
||||
} else {
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
}
|
||||
|
||||
public function associate($id)
|
||||
{
|
||||
|
||||
$set = CustomFieldset::find($id);
|
||||
|
||||
foreach($set->fields AS $field) {
|
||||
if($field->id == Input::get('field_id')) {
|
||||
return Redirect::route("admin.custom_fields.show",[$id])->withInput()->withErrors(['field_id' => Lang::get('admin/custom_fields/message.field.already_added')]);
|
||||
}
|
||||
}
|
||||
|
||||
$results=$set->fields()->attach(Input::get('field_id'),["required" => (Input::get('required') == "on"),"order" => Input::get('order')]);
|
||||
|
||||
return Redirect::route("admin.custom_fields.show",[$id])->with("success",Lang::get('admin/custom_fields/message.field.create.assoc_success'));
|
||||
}
|
||||
|
||||
public function createField()
|
||||
{
|
||||
return View::make("backend.custom_fields.create_field");
|
||||
}
|
||||
|
||||
public function storeField()
|
||||
{
|
||||
$field=new CustomField(["name" => Input::get("name"),"element" => Input::get("element"),"user_id" => Sentry::getUser()->id]);
|
||||
if(!in_array(Input::get('format'),["ALPHA","NUMERIC","MAC","IP"])) {
|
||||
$field->format=Input::get("custom_format");
|
||||
} else {
|
||||
$field->format=Input::get('format');
|
||||
}
|
||||
|
||||
$validator=Validator::make(Input::all(),$field->rules);
|
||||
if($validator->passes()) {
|
||||
$results=$field->save();
|
||||
//return "postCreateField: $results";
|
||||
if ($results) {
|
||||
return Redirect::route("admin.custom_fields.index")->with("success",Lang::get('admin/custom_fields/message.field.create.success'));
|
||||
} else {
|
||||
return Redirect::back()->withInput()->with('error', Lang::get('admin/custom_fields/message.field.create.error'));
|
||||
}
|
||||
} else {
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteField($field_id)
|
||||
{
|
||||
$field=CustomField::find($field_id);
|
||||
|
||||
if($field->fieldset->count()>0) {
|
||||
return Redirect::back()->withErrors(['message' => "Field is in-use"]);
|
||||
} else {
|
||||
$field->delete();
|
||||
return Redirect::route("admin.custom_fields.index")->with("success",Lang::get('admin/custom_fields/message.field.delete.success'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//$id=$parameters[0];
|
||||
$cfset=CustomFieldset::find($id);
|
||||
|
||||
//print_r($parameters);
|
||||
//
|
||||
$custom_fields_list=["" => "Add New Field to Fieldset"] + CustomField::lists("name","id");
|
||||
// print_r($custom_fields_list);
|
||||
$maxid=0;
|
||||
foreach($cfset->fields AS $field) {
|
||||
// print "Looking for: ".$field->id;
|
||||
if($field->pivot->order > $maxid) {
|
||||
$maxid=$field->pivot->order;
|
||||
}
|
||||
if(isset($custom_fields_list[$field->id])) {
|
||||
// print "Found ".$field->id.", so removing it.<br>";
|
||||
unset($custom_fields_list[$field->id]);
|
||||
}
|
||||
}
|
||||
|
||||
return View::make("backend.custom_fields.show")->with("custom_fieldset",$cfset)->with("maxid",$maxid+1)->with("custom_fields_list",$custom_fields_list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function update($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
$fieldset=CustomFieldset::find($id);
|
||||
|
||||
$models=Model::where("fieldset_id","=",$id);
|
||||
if($models->count()==0) {
|
||||
$fieldset->delete();
|
||||
return Redirect::route("admin.custom_fields.index")->with("success",Lang::get('admin/custom_fields/message.fieldset.delete.success'));
|
||||
}
|
||||
else {
|
||||
return Redirect::route("admin.custom_fields.index")->with("error",Lang::get('admin/custom_fields/message.fieldset.delete.in_use')); //->with("models",$models);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class LicensesController extends AdminController
|
||||
$depreciation_list = array('0' => Lang::get('admin/licenses/form.no_depreciation')) + Depreciation::lists('name', 'id');
|
||||
$supplier_list = array('' => 'Select Supplier') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
|
||||
return View::make('backend/licenses/edit')
|
||||
->with('license_options',$license_options)
|
||||
@@ -203,7 +203,7 @@ class LicensesController extends AdminController
|
||||
$depreciation_list = array('0' => Lang::get('admin/licenses/form.no_depreciation')) + Depreciation::lists('name', 'id');
|
||||
$supplier_list = array('' => 'Select Supplier') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
|
||||
return View::make('backend/licenses/edit', compact('license'))
|
||||
->with('license_options',$license_options)
|
||||
@@ -746,7 +746,7 @@ class LicensesController extends AdminController
|
||||
/**
|
||||
* Get the asset information to present to the asset view page
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $licenseId
|
||||
* @return View
|
||||
**/
|
||||
public function getView($licenseId = null)
|
||||
@@ -782,7 +782,7 @@ class LicensesController extends AdminController
|
||||
// Show the page
|
||||
$license_options = array('0' => 'Top Level') + License::lists('name', 'id');
|
||||
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
//clone the orig
|
||||
$license = clone $license_to_clone;
|
||||
$license->id = null;
|
||||
@@ -805,7 +805,7 @@ class LicensesController extends AdminController
|
||||
/**
|
||||
* Upload the file to the server
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $licenseId
|
||||
* @return View
|
||||
**/
|
||||
public function postUpload($licenseId = null)
|
||||
@@ -882,7 +882,8 @@ class LicensesController extends AdminController
|
||||
/**
|
||||
* Delete the associated file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $licenseId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
**/
|
||||
public function getDeleteFile($licenseId = null, $fileId = null)
|
||||
@@ -920,7 +921,8 @@ class LicensesController extends AdminController
|
||||
/**
|
||||
* Display/download the uploaded file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $licenseId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
**/
|
||||
public function displayFile($licenseId = null, $fileId = null)
|
||||
@@ -954,7 +956,7 @@ class LicensesController extends AdminController
|
||||
$licenses = $licenses->TextSearch(Input::get('search'));
|
||||
}
|
||||
|
||||
$allowed_columns = ['id','name'];
|
||||
$allowed_columns = ['id','name','serial'];
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class LocationsController extends AdminController
|
||||
} else {
|
||||
$location->parent_id = e(Input::get('parent_id'));
|
||||
}
|
||||
$location->currency = Input::get('currency','$');
|
||||
$location->currency = e(Input::get('currency','$'));
|
||||
$location->address = e(Input::get('address'));
|
||||
$location->address2 = e(Input::get('address2'));
|
||||
$location->city = e(Input::get('city'));
|
||||
@@ -143,6 +143,7 @@ class LocationsController extends AdminController
|
||||
}
|
||||
|
||||
// Redirect to the location create page
|
||||
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
|
||||
return Redirect::to('admin/settings/locations/create')->with('error', Lang::get('admin/locations/message.create.error'));
|
||||
}
|
||||
|
||||
@@ -202,7 +203,7 @@ class LocationsController extends AdminController
|
||||
} else {
|
||||
$location->parent_id = e(Input::get('parent_id',''));
|
||||
}
|
||||
$location->currency = Input::get('currency','$');
|
||||
$location->currency = e(Input::get('currency','$'));
|
||||
$location->address = e(Input::get('address'));
|
||||
$location->address2 = e(Input::get('address2'));
|
||||
$location->city = e(Input::get('city'));
|
||||
|
||||
@@ -223,7 +223,7 @@ class ManufacturersController extends AdminController
|
||||
$rows = array();
|
||||
|
||||
foreach($manufacturers as $manufacturer) {
|
||||
$actions = '<a href="'.route('update/manufacturer', $manufacturer->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/location', $manufacturer->id).'" data-content="'.Lang::get('admin/manufacturers/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($manufacturer->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
|
||||
$actions = '<a href="'.route('update/manufacturer', $manufacturer->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/manufacturer', $manufacturer->id).'" data-content="'.Lang::get('admin/manufacturers/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($manufacturer->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
|
||||
|
||||
$rows[] = array(
|
||||
'id' => $manufacturer->id,
|
||||
|
||||
@@ -82,7 +82,7 @@ class ModelsController extends AdminController
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->with('error', Lang::get('admin/models/message.create.duplicate_set'));;
|
||||
return Redirect::back()->withInput()->with('error', Lang::get('admin/models/message.create.duplicate_set'));
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,13 @@ class ModelsController extends AdminController
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->user_id = Sentry::getId();
|
||||
$model->show_mac_address = e(Input::get('show_mac_address', '0'));
|
||||
if (Input::get('custom_fieldset')!='') {
|
||||
$model->fieldset_id = e(Input::get('custom_fieldset'));
|
||||
}
|
||||
|
||||
//$model->show_mac_address = e(Input::get('show_mac_address', '0'));
|
||||
|
||||
|
||||
if (Input::file('image')) {
|
||||
@@ -162,6 +167,7 @@ class ModelsController extends AdminController
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->user_id = Sentry::getUser()->id;
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->eol=0;
|
||||
|
||||
if($model->save()) {
|
||||
@@ -239,7 +245,12 @@ class ModelsController extends AdminController
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->show_mac_address = e(Input::get('show_mac_address', '0'));
|
||||
$model->note = e(Input::get('note'));
|
||||
if (Input::get('custom_fieldset')=='') {
|
||||
$model->fieldset_id = null;
|
||||
} else {
|
||||
$model->fieldset_id = e(Input::get('custom_fieldset'));
|
||||
}
|
||||
|
||||
if (Input::file('image')) {
|
||||
$image = Input::file('image');
|
||||
@@ -322,7 +333,7 @@ class ModelsController extends AdminController
|
||||
/**
|
||||
* Get the model information to present to the model view page
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $modelId
|
||||
* @return View
|
||||
**/
|
||||
public function getView($modelId = null)
|
||||
@@ -375,6 +386,14 @@ class ModelsController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
public function getCustomFields($modelId)
|
||||
{
|
||||
$model=Model::find($modelId);
|
||||
return View::make("backend.models.custom_fields_form")->with("model",$model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the JSON response for the bootstrap table list view
|
||||
*
|
||||
@@ -385,7 +404,13 @@ class ModelsController extends AdminController
|
||||
public function getDatatable($status = null)
|
||||
{
|
||||
$models = Model::with('category','assets','depreciation');
|
||||
($status != 'Deleted') ?: $models->withTrashed()->Deleted();
|
||||
|
||||
switch ($status) {
|
||||
case 'Deleted':
|
||||
$models->withTrashed()->Deleted();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (Input::has('search')) {
|
||||
$models = $models->TextSearch(Input::get('search'));
|
||||
@@ -432,6 +457,7 @@ class ModelsController extends AdminController
|
||||
'depreciation' => (($model->depreciation)&&($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : Lang::get('general.no_depreciation'),
|
||||
'category' => ($model->category) ? $model->category->name : '',
|
||||
'eol' => ($model->eol) ? $model->eol.' '.Lang::get('general.months') : '',
|
||||
'note' => $model->getNote(),
|
||||
'actions' => $actions
|
||||
);
|
||||
}
|
||||
@@ -479,9 +505,10 @@ class ModelsController extends AdminController
|
||||
$assets = $assets->skip($offset)->take($limit)->get();
|
||||
|
||||
$rows = array();
|
||||
$actions = '';
|
||||
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
$actions = '';
|
||||
|
||||
if ($asset->assetstatus) {
|
||||
if ($asset->assetstatus->deployable != 0) {
|
||||
|
||||
@@ -162,7 +162,7 @@ class ReportsController extends AdminController
|
||||
|
||||
if (( $asset->assigned_to > 0 ) && ( $asset->assigneduser->location_id > 0 )) {
|
||||
$location = Location::find( $asset->assigneduser->location_id );
|
||||
if ($location->name) {
|
||||
if ($location) {
|
||||
$row[] = $location->name;
|
||||
} else {
|
||||
$row[] = '';
|
||||
@@ -474,23 +474,25 @@ class ReportsController extends AdminController
|
||||
}
|
||||
}
|
||||
if (e( Input::get( 'location' ) ) == '1') {
|
||||
if (( $asset->assigned_to > 0 ) && ( $asset->assigneduser->location_id > 0 )) {
|
||||
$show_loc = '';
|
||||
if (( $asset->assigned_to > 0 ) && ( $asset->assigneduser->location_id !='' )) {
|
||||
$location = Location::find( $asset->assigneduser->location_id );
|
||||
if ($location->name) {
|
||||
$row[] = $location->name;
|
||||
if ($location) {
|
||||
$show_loc .= $location->name;
|
||||
} else {
|
||||
$row[] = '';
|
||||
$show_loc .= 'User location '.$asset->assigneduser->location_id.' is invalid';
|
||||
}
|
||||
} elseif ($asset->rtd_location_id) {
|
||||
} elseif ($asset->rtd_location_id!='') {
|
||||
$location = Location::find( $asset->rtd_location_id );
|
||||
if ($location->name) {
|
||||
$row[] = $location->name;
|
||||
if ($location) {
|
||||
$show_loc .= $location->name;
|
||||
} else {
|
||||
$row[] = '';
|
||||
$show_loc .= 'Default location '.$asset->rtd_location_id.' is invalid';
|
||||
}
|
||||
} else {
|
||||
$row[] = ''; // Empty string if location is not set
|
||||
}
|
||||
|
||||
$row[] = $show_loc;
|
||||
|
||||
}
|
||||
if (e( Input::get( 'assigned_to' ) ) == '1') {
|
||||
if ($asset->assigned_to > 0) {
|
||||
|
||||
@@ -37,8 +37,6 @@ class SettingsController extends AdminController
|
||||
|
||||
/**
|
||||
* Setting update.
|
||||
*
|
||||
* @param int $settingId
|
||||
* @return View
|
||||
*/
|
||||
public function getEdit()
|
||||
@@ -63,7 +61,6 @@ class SettingsController extends AdminController
|
||||
/**
|
||||
* Setting update form processing page.
|
||||
*
|
||||
* @param int $settingId
|
||||
* @return Redirect
|
||||
*/
|
||||
public function postEdit()
|
||||
@@ -158,6 +155,7 @@ class SettingsController extends AdminController
|
||||
$setting->slack_botname = e(Input::get('slack_botname'));
|
||||
$setting->ldap_enabled = Input::get('ldap_enabled', '0');
|
||||
$setting->ldap_server = Input::get('ldap_server');
|
||||
$setting->ldap_server_cert_ignore = Input::get('ldap_server_cert_ignore', false);
|
||||
$setting->ldap_uname = Input::get('ldap_uname');
|
||||
$setting->ldap_pword = Crypt::encrypt(Input::get('ldap_pword'));
|
||||
$setting->ldap_basedn = Input::get('ldap_basedn');
|
||||
@@ -243,11 +241,11 @@ class SettingsController extends AdminController
|
||||
|
||||
|
||||
/**
|
||||
* Download the dump file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
* Download the dump file
|
||||
*
|
||||
* @param string|null $filename
|
||||
* @return View
|
||||
*/
|
||||
public function downloadFile($filename = null)
|
||||
{
|
||||
if (!Config::get('app.lock_passwords')) {
|
||||
@@ -268,11 +266,11 @@ class SettingsController extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* Download the dump file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
* Download the dump file
|
||||
*
|
||||
* @param string|null $filename
|
||||
* @return View
|
||||
*/
|
||||
public function deleteFile($filename = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ class SuppliersController extends AdminController
|
||||
$rows = array();
|
||||
|
||||
foreach($suppliers as $supplier) {
|
||||
$actions = '<a href="'.route('update/supplier', $supplier->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/location', $supplier->id).'" data-content="'.Lang::get('admin/suppliers/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($supplier->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
|
||||
$actions = '<a href="'.route('update/supplier', $supplier->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/supplier', $supplier->id).'" data-content="'.Lang::get('admin/suppliers/message.delete.confirm').'" data-title="'.Lang::get('general.delete').' '.htmlspecialchars($supplier->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
|
||||
|
||||
$rows[] = array(
|
||||
'id' => $supplier->id,
|
||||
|
||||
@@ -43,13 +43,13 @@ class UsersController extends AdminController {
|
||||
* @var array
|
||||
*/
|
||||
protected $validationRules = array(
|
||||
'first_name' => 'required|alpha_space|min:2',
|
||||
'last_name' => 'required|alpha_space|min:2',
|
||||
'first_name' => 'required|alpha_space|min:1',
|
||||
'last_name' => 'required|alpha_space|min:1',
|
||||
'location_id' => 'numeric',
|
||||
'username' => 'required|min:2|unique:users,deleted_at,NULL',
|
||||
'email' => 'email|unique:users,email',
|
||||
'password' => 'required|min:6',
|
||||
'password_confirm' => 'required|min:6|same:password',
|
||||
'password_confirm' => 'required|same:password',
|
||||
'company_id' => 'integer',
|
||||
);
|
||||
|
||||
@@ -86,7 +86,7 @@ class UsersController extends AdminController {
|
||||
|
||||
$location_list = locationsList();
|
||||
$manager_list = managerList();
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
|
||||
/* echo '<pre>';
|
||||
print_r($userPermissions);
|
||||
@@ -284,8 +284,8 @@ class UsersController extends AdminController {
|
||||
$permissions = Config::get('permissions');
|
||||
$this->encodeAllPermissions($permissions);
|
||||
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$location_list = locationsList();
|
||||
$company_list = companyList();
|
||||
$manager_list = array('' => 'Select a User') + DB::table('users')
|
||||
->select(DB::raw('concat(last_name,", ",first_name," (",email,")") as full_name, id'))
|
||||
->whereNull('deleted_at')
|
||||
@@ -371,19 +371,21 @@ class UsersController extends AdminController {
|
||||
|
||||
try {
|
||||
// Update the user
|
||||
$user->first_name = Input::get('first_name');
|
||||
$user->last_name = Input::get('last_name');
|
||||
$user->username = Input::get('username');
|
||||
$user->email = Input::get('email');
|
||||
$user->employee_num = Input::get('employee_num');
|
||||
$user->activated = Input::get('activated', $user->activated);
|
||||
$user->permissions = Input::get('permissions');
|
||||
$user->jobtitle = Input::get('jobtitle');
|
||||
$user->phone = Input::get('phone');
|
||||
$user->first_name = e(Input::get('first_name'));
|
||||
$user->last_name = e(Input::get('last_name'));
|
||||
$user->username = e(Input::get('username'));
|
||||
$user->email = e(Input::get('email'));
|
||||
$user->employee_num = e(Input::get('employee_num'));
|
||||
$user->activated = e(Input::get('activated', $user->activated));
|
||||
if (Sentry::getUser()->hasAccess('superuser')) {
|
||||
$user->permissions = Input::get('permissions');
|
||||
}
|
||||
$user->jobtitle = e(Input::get('jobtitle'));
|
||||
$user->phone = e(Input::get('phone'));
|
||||
$user->location_id = Input::get('location_id');
|
||||
$user->company_id = Company::getIdForUser(Input::get('company_id'));
|
||||
$user->manager_id = Input::get('manager_id');
|
||||
$user->notes = Input::get('notes');
|
||||
$user->notes = e(Input::get('notes'));
|
||||
|
||||
if ($user->manager_id == "") {
|
||||
$user->manager_id = NULL;
|
||||
@@ -401,7 +403,7 @@ class UsersController extends AdminController {
|
||||
|
||||
// Do we want to update the user email?
|
||||
if (!Config::get('app.lock_passwords')) {
|
||||
$user->email = Input::get('email');
|
||||
$user->email = e(Input::get('email'));
|
||||
}
|
||||
|
||||
// Get the current user groups
|
||||
@@ -437,7 +439,7 @@ class UsersController extends AdminController {
|
||||
$success = Lang::get('admin/users/message.success.update');
|
||||
|
||||
// Redirect to the user page
|
||||
return Redirect::route('view/user', $id)->with('success', $success);
|
||||
return Redirect::route('users')->with('success', $success);
|
||||
}
|
||||
|
||||
// Prepare the error message
|
||||
@@ -536,6 +538,10 @@ class UsersController extends AdminController {
|
||||
unset($user_raw_array[$key]);
|
||||
}
|
||||
|
||||
if (!Sentry::getUser()->isSuperUser()) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.insufficient_permissions'));
|
||||
}
|
||||
|
||||
if (!Config::get('app.lock_passwords')) {
|
||||
|
||||
$assets = Asset::whereIn('assigned_to', $user_raw_array)->get();
|
||||
@@ -587,6 +593,7 @@ class UsersController extends AdminController {
|
||||
return Redirect::route('users')->with('error', 'Bulk delete is not enabled in this installation');
|
||||
}
|
||||
|
||||
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
|
||||
return Redirect::route('users')->with('error', 'An error has occurred');
|
||||
}
|
||||
}
|
||||
@@ -730,7 +737,7 @@ class UsersController extends AdminController {
|
||||
$this->encodeAllPermissions($permissions);
|
||||
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
$company_list = Company::getSelectList();
|
||||
$company_list = companyList();
|
||||
$manager_list = array('' => 'Select a User') + DB::table('users')
|
||||
->select(DB::raw('concat(last_name,", ",first_name," (",email,")") as full_name, id'))
|
||||
->whereNull('deleted_at')
|
||||
@@ -805,7 +812,15 @@ class UsersController extends AdminController {
|
||||
$activated = '0';
|
||||
}
|
||||
|
||||
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10);
|
||||
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 15);
|
||||
|
||||
// Location
|
||||
if (array_key_exists('4',$row)) {
|
||||
$user_location_id = trim($row[4]);
|
||||
if ($user_location_id=='') {
|
||||
$user_location_id = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -823,8 +838,11 @@ class UsersController extends AdminController {
|
||||
'email' => $row[3],
|
||||
'password' => $pass,
|
||||
'activated' => $activated,
|
||||
'location_id' => $row[4],
|
||||
'company_id' => Company::getIdForUser($row[5]),
|
||||
'location_id' => $user_location_id,
|
||||
'phone' => $row[5],
|
||||
'jobtitle' => $row[6],
|
||||
'employee_num' => $row[7],
|
||||
//'company_id' => Company::getIdForUser($row[8]),
|
||||
'permissions' => '{"user":1}',
|
||||
'notes' => 'Imported user'
|
||||
);
|
||||
@@ -889,8 +907,8 @@ class UsersController extends AdminController {
|
||||
$sort = e(Input::get('sort'));
|
||||
}
|
||||
|
||||
$users = User::select(array('users.id','users.email','users.username','users.location_id','users.manager_id','users.first_name','users.last_name','users.created_at','users.notes','users.company_id'))
|
||||
->with('assets','accessories','consumables','licenses','manager','sentryThrottle','groups','userloc','company');
|
||||
$users = User::select(array('users.id','users.employee_num','users.email','users.username','users.location_id','users.manager_id','users.first_name','users.last_name','users.created_at','users.notes','users.company_id', 'users.deleted_at','users.activated'))
|
||||
->with('assets','accessories','consumables','licenses','manager','sentryThrottle','groups','userloc','company');
|
||||
$users = Company::scopeCompanyables($users);
|
||||
|
||||
switch ($status) {
|
||||
@@ -916,8 +934,8 @@ class UsersController extends AdminController {
|
||||
default:
|
||||
$allowed_columns =
|
||||
[
|
||||
'last_name','first_name','email','username',
|
||||
'assets','accessories', 'consumables','licenses','groups'
|
||||
'last_name','first_name','email','username','employee_num',
|
||||
'assets','accessories', 'consumables','licenses','groups','activated'
|
||||
];
|
||||
|
||||
$sort = in_array($sort, $allowed_columns) ? $sort : 'first_name';
|
||||
@@ -937,7 +955,7 @@ class UsersController extends AdminController {
|
||||
$actions = '<nobr>';
|
||||
|
||||
foreach ($user->groups as $group) {
|
||||
$group_names .= '<a href="' . Config::get('app.url') . '/admin/groups/' . $group->id . '/edit" class="label label-default">' . $group->name . '</a> ';
|
||||
$group_names .= '<a href="' . Config::get('app.url') . '/admin/groups/' . $group->id . '/edit" class="label label-default">' . e($group->name) . '</a> ';
|
||||
}
|
||||
|
||||
|
||||
@@ -965,18 +983,20 @@ class UsersController extends AdminController {
|
||||
'checkbox' =>'<div class="text-center hidden-xs hidden-sm"><input type="checkbox" name="edit_user['.$user->id.']" class="one_required"></div>',
|
||||
'name' => '<a title="'.$user->fullName().'" href="../admin/users/'.$user->id.'/view">'.$user->fullName().'</a>',
|
||||
'email' => ($user->email!='') ?
|
||||
'<a href="mailto:'.$user->email.'" class="hidden-md hidden-lg">'.$user->email.'</a>'
|
||||
.'<a href="mailto:'.$user->email.'" class="hidden-xs hidden-sm"><i class="fa fa-envelope"></i></a>'
|
||||
'<a href="mailto:'.e($user->email).'" class="hidden-md hidden-lg">'.e($user->email).'</a>'
|
||||
.'<a href="mailto:'.e($user->email).'" class="hidden-xs hidden-sm"><i class="fa fa-envelope"></i></a>'
|
||||
.'</span>' : '',
|
||||
'username' => $user->username,
|
||||
'location' => ($user->userloc) ? $user->userloc->name : '',
|
||||
'manager' => ($user->manager) ? '<a title="' . $user->manager->fullName() . '" href="users/' . $user->manager->id . '/view">' . $user->manager->fullName() . '</a>' : '',
|
||||
'username' => e($user->username),
|
||||
'location' => ($user->userloc) ? e($user->userloc->name) : '',
|
||||
'manager' => ($user->manager) ? '<a title="' . e($user->manager->fullName()) . '" href="users/' . $user->manager->id . '/view">' . e($user->manager->fullName()) . '</a>' : '',
|
||||
'assets' => $user->assets->count(),
|
||||
'employee_num' => e($user->employee_num),
|
||||
'licenses' => $user->licenses->count(),
|
||||
'accessories' => $user->accessories->count(),
|
||||
'consumables' => $user->consumables->count(),
|
||||
'groups' => $group_names,
|
||||
'notes' => $user->notes,
|
||||
'notes' => e($user->notes),
|
||||
'activated' => ($user->activated=='1') ? '<i class="fa fa-check"></i>' : '<i class="fa fa-times"></i>',
|
||||
'actions' => ($actions) ? $actions : '',
|
||||
'companyName' => is_null($user->company) ? '' : e($user->company->name)
|
||||
);
|
||||
@@ -989,7 +1009,7 @@ class UsersController extends AdminController {
|
||||
/**
|
||||
* Upload the file to the server
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $userId
|
||||
* @return View
|
||||
* */
|
||||
public function postUpload($userId = null) {
|
||||
@@ -1054,7 +1074,8 @@ class UsersController extends AdminController {
|
||||
/**
|
||||
* Delete the associated file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $userId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
* */
|
||||
public function getDeleteFile($userId = null, $fileId = null) {
|
||||
@@ -1089,7 +1110,8 @@ class UsersController extends AdminController {
|
||||
/**
|
||||
* Display/download the uploaded file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @param int $userId
|
||||
* @param int $fileId
|
||||
* @return View
|
||||
* */
|
||||
public function displayFile($userId = null, $fileId = null) {
|
||||
@@ -1150,7 +1172,7 @@ class UsersController extends AdminController {
|
||||
protected $ldapValidationRules = array(
|
||||
'firstname' => 'required|alpha_space|min:2',
|
||||
'lastname' => 'required|alpha_space|min:2',
|
||||
'employee_number' => 'numeric',
|
||||
'employee_number' => 'alpha_space',
|
||||
'username' => 'required|min:2|unique:users,username',
|
||||
'email' => 'email|unique:users,email',
|
||||
);
|
||||
@@ -1193,8 +1215,15 @@ class UsersController extends AdminController {
|
||||
$ldap_result_first_name = Setting::getSettings()->ldap_fname_field;
|
||||
|
||||
$ldap_result_active_flag = Setting::getSettings()->ldap_active_flag_field;
|
||||
$ldap_result_emp_num = Setting::getSettings()->ldap_emp_num_field;
|
||||
$ldap_result_email = Setting::getSettings()->ldap_email_field;
|
||||
$ldap_result_emp_num = Setting::getSettings()->ldap_emp_num;
|
||||
$ldap_result_email = Setting::getSettings()->ldap_email;
|
||||
$ldap_server_cert_ignore = Setting::getSettings()->ldap_server_cert_ignore;
|
||||
|
||||
// If we are ignoring the SSL cert we need to setup the environment variable
|
||||
// before we create the connection
|
||||
if($ldap_server_cert_ignore) {
|
||||
putenv('LDAPTLS_REQCERT=never');
|
||||
}
|
||||
|
||||
// Connect to LDAP server
|
||||
$ldapconn = @ldap_connect($url);
|
||||
@@ -1214,21 +1243,48 @@ class UsersController extends AdminController {
|
||||
|
||||
// Binding to ldap server
|
||||
$ldapbind = @ldap_bind($ldapconn, $username, $password);
|
||||
|
||||
Log::error(ldap_errno($ldapconn));
|
||||
if (!$ldapbind) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.error.ldap_could_not_bind').ldap_error($ldapconn));
|
||||
}
|
||||
|
||||
// Perform the search
|
||||
$search_results = @ldap_search($ldapconn, $base_dn, '('.$filter.')');
|
||||
if (!$search_results) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.error.ldap_could_not_search').ldap_error($ldapconn));
|
||||
}
|
||||
// Set up LDAP pagination for very large databases
|
||||
// @author Richard Hofman
|
||||
$page_size = 500;
|
||||
$cookie = '';
|
||||
$result_set = array();
|
||||
$global_count = 0;
|
||||
|
||||
// Get results
|
||||
$results = @ldap_get_entries($ldapconn, $search_results);
|
||||
if (!$results) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.error.ldap_could_not_get_entries').ldap_error($ldapconn));
|
||||
}
|
||||
// Perform the search
|
||||
do {
|
||||
// Paginate (non-critical, if not supported by server)
|
||||
ldap_control_paged_result($ldapconn, $page_size, false, $cookie);
|
||||
|
||||
$search_results = ldap_search($ldapconn, $base_dn, '('.$filter.')');
|
||||
|
||||
if (!$search_results) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.error.ldap_could_not_search').ldap_error($ldapconn));
|
||||
}
|
||||
|
||||
// Get results from page
|
||||
$results = ldap_get_entries($ldapconn, $search_results);
|
||||
if (!$results) {
|
||||
return Redirect::route('users')->with('error', Lang::get('admin/users/message.error.ldap_could_not_get_entries').ldap_error($ldapconn));
|
||||
}
|
||||
|
||||
// Add results to result set
|
||||
$global_count += $results['count'];
|
||||
$result_set = array_merge($result_set, $results);
|
||||
|
||||
ldap_control_paged_result_response($ldapconn, $search_results, $cookie);
|
||||
|
||||
} while ($cookie !== null && $cookie != '');
|
||||
|
||||
// Clean up after search
|
||||
$result_set['count'] = $global_count;
|
||||
$results = $result_set;
|
||||
ldap_control_paged_result($ldapconn, 0);
|
||||
|
||||
$summary = array();
|
||||
for ($i = 0; $i < $results["count"]; $i++) {
|
||||
|
||||
@@ -18,6 +18,7 @@ class CreateModelsTable extends Migration
|
||||
$table->integer('manufacturer_id')->nullable();
|
||||
$table->integer('category_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ class CreateCategoriesTable extends Migration
|
||||
$table->string('name');
|
||||
$table->integer('parent')->default(0);
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ class CreateManufacturersTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class CreateAssetsTable extends Migration
|
||||
$table->text('notes');
|
||||
$table->integer('user_id');
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class CreateLicensesTable extends Migration
|
||||
$table->text('notes');
|
||||
$table->integer('user_id');
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class CreateDepreciationsTable extends Migration
|
||||
$table->integer('months');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id');
|
||||
$table->engine = 'InnoDB';
|
||||
//$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ class CreateLocationsTable extends Migration
|
||||
$table->string('country',2);
|
||||
$table->timestamps();
|
||||
$table->integer('user_id');
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class CreateHistoryTable extends Migration
|
||||
$table->integer('location_id')->nullable;
|
||||
$table->timestamps();
|
||||
$table->integer('user_id');
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ class CreateSettingsTable extends Migration
|
||||
$table->string('option_value');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id');
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,8 @@ class EditLocationIdAssetLogsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$prefix=DB::getTablePrefix();
|
||||
DB::statement('ALTER TABLE '.$prefix.'asset_logs MODIFY location_id int(11) null');
|
||||
DB::statement('ALTER TABLE '.$prefix.'asset_logs MODIFY added_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP');
|
||||
DB::statement('ALTER TABLE '.DB::getTablePrefix().'asset_logs MODIFY location_id int(11) null');
|
||||
DB::statement('ALTER TABLE '.DB::getTablePrefix().'asset_logs MODIFY added_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class CreateStatusLabels extends Migration
|
||||
$table->integer('user_id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ class AddUploadsTable extends Migration
|
||||
$table->string('filenotes')->nullable;
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class ReCreateLicensesTable extends Migration
|
||||
$table->integer('depreciation_id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ class CreateLicenseSeatsTable extends Migration
|
||||
$table->integer('user_id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class CreateNewLicensesTable extends Migration
|
||||
$table->integer('depreciation_id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ class AddSuppliers extends Migration
|
||||
$table->timestamps();
|
||||
$table->integer('user_id');
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,15 +29,15 @@ class AddEulaFields extends Migration {
|
||||
});
|
||||
|
||||
|
||||
Schema::create('requested_assets', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('asset_id')->default(NULL);
|
||||
$table->integer('user_id')->default(NULL);
|
||||
$table->dateTime('accepted_at')->nullable()->default(NULL);
|
||||
$table->dateTime('denied_at')->nullable()->default(NULL);
|
||||
$table->string('notes')->default(NULL);
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::create('requested_assets', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('asset_id')->default(NULL);
|
||||
$table->integer('user_id')->default(NULL);
|
||||
$table->dateTime('accepted_at')->nullable()->default(NULL);
|
||||
$table->dateTime('denied_at')->nullable()->default(NULL);
|
||||
$table->string('notes')->default(NULL);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ class AddAccessoriesTable extends Migration {
|
||||
$table->boolean('requestable')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
|
||||
@@ -17,12 +17,13 @@ class CreateConsumables extends Migration {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable()->default(NULL);
|
||||
$table->integer('category_id')->nullable()->default(NULL);
|
||||
$table->integer('location_id')->nullable()->default(NULL);
|
||||
$table->integer('location_id')->nullable()->default(NULL);
|
||||
$table->integer('user_id')->nullable()->default(NULL);
|
||||
$table->integer('qty')->default(0);
|
||||
$table->boolean('requestable')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
//use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCustomFieldsTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('custom_fields', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('format');
|
||||
$table->string('element');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('custom_fields');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCustomFieldCustomFieldset extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('custom_field_custom_fieldset', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('custom_field_id');
|
||||
$table->integer('custom_fieldset_id');
|
||||
|
||||
$table->integer('order');
|
||||
$table->boolean('required');
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('custom_field_custom_fieldset');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCustomFieldsets extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('custom_fieldsets', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->engine = 'InnoDB';
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('custom_fieldsets');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddFieldsetIdToAssets extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function (Blueprint $table) {
|
||||
$table->integer('fieldset_id')->nullable();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models',function (Blueprint $table) {
|
||||
$table->dropColumn('fieldset_id');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateMacAddress extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
||||
|
||||
$f2=new CustomFieldset(['name' => "Asset with MAC Address"]);
|
||||
$f2->timestamps=false; //when this model was first created, it had no timestamps. But later on it gets them.
|
||||
if(!$f2->save()) {
|
||||
throw new Exception("couldn't save customfieldset");
|
||||
}
|
||||
$macid=DB::table('custom_fields')->insertGetId([
|
||||
'name' => "MAC Address",
|
||||
'format' => CustomField::$PredefinedFormats['MAC'],
|
||||
'element'=>'text']);
|
||||
if(!$macid) {
|
||||
throw new Exception("Can't save MAC Custom field: $macid");
|
||||
}
|
||||
|
||||
$f2->fields()->attach($macid,['required' => false, 'order' => 1]);
|
||||
Model::where(["show_mac_address" => true])->update(["fieldset_id"=>$f2->id]);
|
||||
|
||||
DB::statement("ALTER TABLE assets CHANGE mac_address _snipeit_mac_address varchar(255)");
|
||||
|
||||
$ans=Schema::table("models",function (Blueprint $table) {
|
||||
$table->renameColumn('show_mac_address','deprecated_mac_address');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
$f=CustomFieldset::where(["name" => "Asset with MAC Address"])->first();
|
||||
$f->fields()->delete();
|
||||
$f->delete();
|
||||
Schema::table("models",function(Blueprint $table) {
|
||||
$table->renameColumn("deprecated_mac_address","show_mac_address");
|
||||
});
|
||||
DB::statement("ALTER TABLE assets CHANGE _snipeit_mac_address mac_address varchar(255)");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ class CreateCompaniesTable extends Migration {
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class AddCompanyIdToConsumablesTable extends Migration {
|
||||
Schema::table('consumables', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
//$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AddCompanyIdToConsumablesTable extends Migration {
|
||||
{
|
||||
Schema::table('consumables', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('consumables_company_id_foreign');
|
||||
//$table->dropForeign('consumables_company_id_foreign');
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class AddCompanyIdToAccessoriesTable extends Migration {
|
||||
Schema::table('accessories', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
//$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AddCompanyIdToAccessoriesTable extends Migration {
|
||||
{
|
||||
Schema::table('accessories', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('accessories_company_id_foreign');
|
||||
//$table->dropForeign('accessories_company_id_foreign');
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class AddCompanyIdToUsersTable extends Migration {
|
||||
Schema::table('users', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
//$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AddCompanyIdToUsersTable extends Migration {
|
||||
{
|
||||
Schema::table('users', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('users_company_id_foreign');
|
||||
//$table->dropForeign('users_company_id_foreign');
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class AddCompanyIdToLicensesTable extends Migration {
|
||||
Schema::table('licenses', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
//$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AddCompanyIdToLicensesTable extends Migration {
|
||||
{
|
||||
Schema::table('licenses', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('licenses_company_id_foreign');
|
||||
//$table->dropForeign('licenses_company_id_foreign');
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class AddCompanyIdToAssetsTable extends Migration {
|
||||
Schema::table('assets', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
//$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AddCompanyIdToAssetsTable extends Migration {
|
||||
{
|
||||
Schema::table('assets', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('assets_company_id_foreign');
|
||||
// $table->dropForeign('assets_company_id_foreign');
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ImportLdapSettings extends Migration {
|
||||
|
||||
/**
|
||||
* Migration to pull in LDAP settings from ldap.config into database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
$settings = Setting::first();
|
||||
|
||||
// Only update the settings record if there IS an LDAP Config
|
||||
// AND the Settings table doesn't already have LDAP settings in it
|
||||
|
||||
if ((Config::get('ldap.url')) && ($settings) && ($settings->ldap_server)) {
|
||||
|
||||
$settings->ldap_enabled = 1;
|
||||
$settings->ldap_server = Config::get('ldap.url');
|
||||
$settings->ldap_uname = Config::get('ldap.username');
|
||||
$settings->ldap_pword = Crypt::encrypt(Config::get('ldap.password'));
|
||||
$settings->ldap_basedn = Config::get('ldap.basedn');
|
||||
$settings->ldap_filter = Config::get('ldap.filter');
|
||||
$settings->ldap_username_field = Config::get('ldap.result.username');
|
||||
$settings->ldap_lname_field = Config::get('ldap.result.last.name');
|
||||
$settings->ldap_fname_field = Config::get('ldap.result.first.name');
|
||||
$settings->ldap_auth_filter_query = Config::get('ldap.authentication.filter.query');
|
||||
$settings->ldap_version = Config::get('ldap.version');
|
||||
$settings->ldap_active_flag = Config::get('ldap.result.active.flag');
|
||||
$settings->ldap_emp_num = Config::get('ldap.result.emp.num');
|
||||
$settings->ldap_email = Config::get('ldap.result.email');
|
||||
|
||||
// Save the imported settings
|
||||
if ($settings->save()) {
|
||||
echo 'LDAP settings imported into database'."\n";
|
||||
|
||||
// Copy the old LDAP config file to prevent any future confusion
|
||||
if (@copy(app_path().'/config/'.app()->environment().'/ldap.php', app_path().'/config/'.app()->environment().'/deprecated.ldap.php')) {
|
||||
|
||||
if (@unlink(app_path().'/config/'.app()->environment().'/ldap.php')) {
|
||||
echo 'Original LDAP file archived to '.app_path().'/config/'.app()->environment().'/deprecated.ldap.php'."\n";
|
||||
} else {
|
||||
echo 'Could not archive LDAP config file'."\n";
|
||||
}
|
||||
|
||||
} else {
|
||||
echo 'Could not archive LDAP config file'."\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
if (@copy(app_path().'/config/'.app()->environment().'/deprecated.ldap.php', app_path().'/config/'.app()->environment().'/ldap.php')) {
|
||||
echo 'Un-archived LDAP config file'."\n";
|
||||
@unlink(app_path().'/config/'.app()->environment().'/deprecated.ldap.php');
|
||||
|
||||
} else {
|
||||
echo 'Could not un-archive LDAP config file. Manually rename it instead.'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RemoveFkCompanyId extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
// Schema::table('users', function(Blueprint $table)
|
||||
// {
|
||||
// $table->dropForeign('users_company_id_foreign');
|
||||
// });
|
||||
//
|
||||
// Schema::table('accessories', function(Blueprint $table)
|
||||
// {
|
||||
// $table->dropForeign('accessories_company_id_foreign');
|
||||
// });
|
||||
//
|
||||
// Schema::table('assets', function(Blueprint $table)
|
||||
// {
|
||||
// $table->dropForeign('assets_company_id_foreign');
|
||||
// });
|
||||
//
|
||||
// Schema::table('consumables', function(Blueprint $table)
|
||||
// {
|
||||
// $table->dropForeign('consumables_company_id_foreign');
|
||||
// });
|
||||
//
|
||||
// Schema::table('licenses', function(Blueprint $table)
|
||||
// {
|
||||
// $table->dropForeign('licenses_company_id_foreign');
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLdapServerCertIgnoreToSettingsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function(Blueprint $table)
|
||||
{
|
||||
$table->boolean('ldap_server_cert_ignore')->default(FALSE);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function(Blueprint $table)
|
||||
{
|
||||
$table->dropColumn('ldap_server_cert_ignore');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTimestampAndUserIdToCustomFields extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('custom_fields', function(Blueprint $table)
|
||||
{
|
||||
$table->integer("user_id")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('custom_fields', function(Blueprint $table)
|
||||
{
|
||||
$table->dropColumn("user_id");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTimestampAndUserIdToCustomFieldsets extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('custom_fieldsets', function(Blueprint $table)
|
||||
{
|
||||
$table->timestamps();
|
||||
$table->integer("user_id")->nullable();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('custom_fieldsets', function(Blueprint $table)
|
||||
{
|
||||
$table->dropTimestamps();
|
||||
$table->dropColumn("user_id");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNotesToModels extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function ($table) {
|
||||
$table->text('note')->nullable()->default(NULL);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models', function ($table) {
|
||||
$table->dropColumn('note');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
+9
-2
@@ -34,6 +34,7 @@ App::after(function ($request, $response) {
|
||||
Route::filter('auth', function () {
|
||||
// Check if the user is logged in
|
||||
if ( ! Sentry::check()) {
|
||||
Log::debug('Not logged in - auth filter');
|
||||
// Store the current uri in the session
|
||||
Session::put('loginRedirect', Request::url());
|
||||
|
||||
@@ -74,7 +75,8 @@ Route::filter('guest', function () {
|
||||
|
||||
Route::filter('admin-auth', function () {
|
||||
// Check if the user is logged in
|
||||
if ( ! Sentry::check()) {
|
||||
if ( !Sentry::check()) {
|
||||
LOG::debug('Not logged in - admin-auth');
|
||||
// Store the current uri in the session
|
||||
Session::put('loginRedirect', Request::url());
|
||||
|
||||
@@ -84,8 +86,9 @@ Route::filter('admin-auth', function () {
|
||||
|
||||
// Check if the user has access to the admin pages
|
||||
if ( ! Sentry::getUser()->hasAccess('admin')) {
|
||||
LOG::debug('Not a super admin');
|
||||
// Show the insufficient permissions page
|
||||
return Redirect::route('view-assets');
|
||||
return Redirect::route('view-assets')->with('error','You do not have permission to view this page.');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -102,6 +105,7 @@ Route::filter('admin-auth', function () {
|
||||
Route::filter('reporting-auth', function () {
|
||||
// Check if the user is logged in
|
||||
if ( ! Sentry::check()) {
|
||||
LOG::debug('Not logged in');
|
||||
// Store the current uri in the session
|
||||
Session::put('loginRedirect', Request::url());
|
||||
|
||||
@@ -111,6 +115,7 @@ Route::filter('reporting-auth', function () {
|
||||
|
||||
// Check if the user has access to the admin pages
|
||||
if ( ! Sentry::getUser()->hasAccess('reports')) {
|
||||
LOG::debug('Unsufficient permissions');
|
||||
// Show the insufficient permissions page
|
||||
return Redirect::route('profile')->with("error","You do not have permission to view this page.");
|
||||
}
|
||||
@@ -119,6 +124,7 @@ Route::filter('reporting-auth', function () {
|
||||
Route::filter('backup-auth', function () {
|
||||
|
||||
if (!Sentry::getUser()->isSuperUser()) {
|
||||
LOG::debug('Not a super admin');
|
||||
return Redirect::route('home')->with('error', Lang::get('general.insufficient_permissions'));
|
||||
}
|
||||
});
|
||||
@@ -138,6 +144,7 @@ Route::filter('backup-auth', function () {
|
||||
|
||||
Route::filter('csrf', function () {
|
||||
if (Session::token() != Input::get('_token')) {
|
||||
LOG::debug('No CSRF token');
|
||||
throw new Illuminate\Session\TokenMismatchException;
|
||||
}
|
||||
});
|
||||
|
||||
+28
-6
@@ -5,13 +5,16 @@
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
function ParseFloat($floatString){
|
||||
|
||||
// use comma for thousands until local info is property used
|
||||
$LocaleInfo = localeconv();
|
||||
$floatString = str_replace("," , "", $floatString);
|
||||
$floatString = str_replace($LocaleInfo["decimal_point"] , ".", $floatString);
|
||||
return floatval($floatString);
|
||||
if(!function_exists("ParseFloat")) {
|
||||
//this may be only necessary to run tests?
|
||||
function ParseFloat($floatString){
|
||||
// use comma for thousands until local info is property used
|
||||
$LocaleInfo = localeconv();
|
||||
$floatString = str_replace("," , "", $floatString);
|
||||
$floatString = str_replace($LocaleInfo["decimal_point"] , ".", $floatString);
|
||||
return floatval($floatString);
|
||||
}
|
||||
}
|
||||
|
||||
function modelList() {
|
||||
@@ -23,6 +26,14 @@ function modelList() {
|
||||
return $model_list;
|
||||
}
|
||||
|
||||
function companyList() {
|
||||
$company_list = array('0' => Lang::get('general.select_company')) + DB::table('companies')
|
||||
->orderBy('name', 'asc')
|
||||
->lists('name', 'id');
|
||||
return $company_list;
|
||||
}
|
||||
|
||||
|
||||
function categoryList() {
|
||||
$category_list = array('' => '') + DB::table('categories')
|
||||
->whereNull('deleted_at')
|
||||
@@ -86,6 +97,17 @@ function usersList() {
|
||||
return $users_list;
|
||||
}
|
||||
|
||||
function customFieldsetList() {
|
||||
$customfields=CustomFieldset::lists('name','id');
|
||||
return array('' => Lang::get('admin/models/general.no_custom_field')) + $customfields;
|
||||
}
|
||||
|
||||
function predefined_formats() {
|
||||
$keys=array_keys(CustomField::$PredefinedFormats);
|
||||
$stuff=array_combine($keys,$keys);
|
||||
return $stuff+["" => "Custom Format..."];
|
||||
}
|
||||
|
||||
function barcodeDimensions ($barcode_type = 'QRCODE') {
|
||||
if ($barcode_type == 'C128') {
|
||||
$size['height'] = '-1';
|
||||
|
||||
Executable → Regular
+9
-6
@@ -5,19 +5,22 @@ return array(
|
||||
'about_accessories_text' => 'الملحقات هي أي شيء تقوم بتسليمه للمستخدمين لكنه لا يحتوي على رقم تسلسلي (أو أنك لست بحاجة إلى تتبعه بشكل خاص). مثال: فأرة الحاسوب أو لوحة المفاتيح.',
|
||||
'accessory_category' => 'فئة الملحق',
|
||||
'accessory_name' => 'اسم الملحق',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Accessory',
|
||||
'date' => 'Purchase Date',
|
||||
'cost' => 'تكلفة شراء',
|
||||
'checkout' => 'الملحقات المخرجة',
|
||||
'checkin' => 'إدخالات الملحقات',
|
||||
'create' => 'إنشاء ملحق',
|
||||
'date' => 'تاريخ الشراء',
|
||||
'edit' => 'تعديل الملحق',
|
||||
'eula_text' => 'إنشاء اتفاقية جديدة',
|
||||
'eula_text_help' => 'يسمح لك هذا الحقل بتخصيص الاتفاقيات لأنواع معينة من الأصول. اذا كنت تمتلك اتفاقية واحدة لجميع أصولك يمكنك أن تقوم بتأشير المربع في الأسفل لاستخدام الاتفاقية الافتراضية.',
|
||||
'require_acceptance' => 'مطالبة المستخدمين بتأكيد قبولهم الأصول في هذه الفئة.',
|
||||
'no_default_eula' => 'ليس هناك اتفاقيات. قم باضافة واحدة من "الاعدادات".',
|
||||
'order' => 'Order Number',
|
||||
'order' => 'رقم طلب الشراء',
|
||||
'qty' => 'الكمية',
|
||||
'total' => 'المجموع',
|
||||
'remaining' => 'المتاح',
|
||||
'update' => 'Update Accessory',
|
||||
'update' => 'تحديث الملحق',
|
||||
'use_default_eula' => 'قم باستعمال <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a>.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
'use_default_eula_disabled' => '<del>استخدام (اتفاقية ترخيص المستخدم) الافتراضية الأساسية بدلا من ذلك.</del> لم يتم تحديد (اتفاقية ترخيص المستخدم) الافتراضية الأساسية. الرجاء إضافتها في الإعدادات.',
|
||||
|
||||
);
|
||||
|
||||
Executable → Regular
+9
-9
@@ -2,23 +2,23 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Accessory does not exist.',
|
||||
'does_not_exist' => 'الملحق غير موجود.',
|
||||
'assoc_users' => 'تم إخراج :count عنصر من هذا الملحق للمستخدمين، الرجاء إيداع الملحقات ثم حاول مرة أخرى. ',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Accessory was not created, please try again.',
|
||||
'success' => 'Accessory created successfully.'
|
||||
'error' => 'لم يتم انشاء الملحق، الرجاء المحاولة مرة اخرى.',
|
||||
'success' => 'تم انشاء الملحق بنجاح.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Accessory was not updated, please try again',
|
||||
'success' => 'Accessory updated successfully.'
|
||||
'error' => 'لم يتم تحديث الملحق، الرجاء المحاولة مرة أخرى',
|
||||
'success' => 'تم بنجاح تحديث الملحق.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this category?',
|
||||
'error' => 'There was an issue deleting the category. Please try again.',
|
||||
'success' => 'The category was deleted successfully.'
|
||||
'confirm' => 'هل أنت متأكد من رغبتك في حذف هذا الملحق؟',
|
||||
'error' => 'حدث خطأ أثناء محاولة حذف الملحق. الرجاء حاول مرة أخرى.',
|
||||
'success' => 'تم حذف الملحق بنجاح.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
@@ -30,7 +30,7 @@ return array(
|
||||
'checkin' => array(
|
||||
'error' => 'لم يتم إيداع الملحق، الرجاء المحاولة مرة أخرى',
|
||||
'success' => 'تم إيداع الملحق بنجاح.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'user_does_not_exist' => 'هذا المستخدم خاطئ، الرجاء المحاولة مرة أخرى.'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'dl_csv' => 'Download CSV',
|
||||
'dl_csv' => 'التنزيل كملف CSV',
|
||||
'eula_text' => 'اتفاقية ترخيص المستخدم',
|
||||
'id' => 'رقم المعرف',
|
||||
'require_acceptance' => 'القبول',
|
||||
|
||||
Executable → Regular
+10
-10
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'asset_maintenance_type' => 'Maintenance Type',
|
||||
'title' => 'Title',
|
||||
'start_date' => 'Started',
|
||||
'completion_date' => 'Completed',
|
||||
'cost' => 'Cost',
|
||||
'is_warranty' => 'Warranty Improvement',
|
||||
'asset_maintenance_time' => 'Days',
|
||||
'notes' => 'Notes',
|
||||
'update' => 'Update',
|
||||
'create' => 'Create'
|
||||
'asset_maintenance_type' => 'تصنيف الصيانة',
|
||||
'title' => 'المسمى',
|
||||
'start_date' => 'بدأت',
|
||||
'completion_date' => 'أنجزت',
|
||||
'cost' => 'التكلفة',
|
||||
'is_warranty' => 'تحسين الضمان',
|
||||
'asset_maintenance_time' => 'أيام',
|
||||
'notes' => 'مُلاحظات',
|
||||
'update' => 'تعديل',
|
||||
'create' => 'إنشاء'
|
||||
];
|
||||
|
||||
Executable → Regular
+7
-7
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'asset_maintenances' => 'Asset Maintenances',
|
||||
'edit' => 'Edit Asset Maintenance',
|
||||
'delete' => 'Delete Asset Maintenance',
|
||||
'view' => 'View Asset Maintenance Details',
|
||||
'repair' => 'Repair',
|
||||
'maintenance' => 'Maintenance',
|
||||
'upgrade' => 'Upgrade'
|
||||
'asset_maintenances' => 'صيانة الاُصول',
|
||||
'edit' => 'تعديل صيانة الأصل',
|
||||
'delete' => 'حذف صيانة الأصل',
|
||||
'view' => 'عرض تفاصيل صيانة الأصل',
|
||||
'repair' => 'إصلاح',
|
||||
'maintenance' => 'الصيانة',
|
||||
'upgrade' => 'الترقية'
|
||||
];
|
||||
|
||||
Executable → Regular
+9
-9
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'not_found' => 'Asset Maintenance you were looking for was not found!',
|
||||
'not_found' => 'لم يتم العثور على صيانة الأصل!',
|
||||
'delete' => [
|
||||
'confirm' => 'Are you sure you wish to delete this asset maintenance?',
|
||||
'error' => 'There was an issue deleting the asset maintenance. Please try again.',
|
||||
'success' => 'The asset maintenance was deleted successfully.'
|
||||
'confirm' => 'هل أنت متأكد من رغبتك في حذف صيانة الأصل؟',
|
||||
'error' => 'حدثت مشكلة في عملية الحذف لصيانة الأصل. الرجاء المحاولة مرة اُخرى.',
|
||||
'success' => 'تم حذف صيانة الأصل بنجاح.'
|
||||
],
|
||||
'create' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'لم يتم إنشاء صيانة الأصل، الرجاء المحاولة مرة أخرى.',
|
||||
'success' => 'تم إنشاء صيانة الأصل بنجاح.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'Not Completed Yet',
|
||||
'warranty' => 'Warranty',
|
||||
'not_warranty' => 'Not Warranty',
|
||||
'asset_maintenance_incomplete' => 'لم يكتمل بعد',
|
||||
'warranty' => 'الضمان',
|
||||
'not_warranty' => 'لا يوجد ضمان',
|
||||
];
|
||||
Executable → Regular
+5
-5
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'title' => 'Asset Maintenance',
|
||||
'asset_name' => 'Asset',
|
||||
'supplier_name' => 'Supplier',
|
||||
'is_warranty' => 'Warranty',
|
||||
'dl_csv' => 'Download CSV'
|
||||
'title' => 'صيانة الاُصل',
|
||||
'asset_name' => 'الأصل',
|
||||
'supplier_name' => 'المزود',
|
||||
'is_warranty' => 'الضمان',
|
||||
'dl_csv' => 'التنزيل كملف CSV'
|
||||
];
|
||||
|
||||
Executable → Regular
+11
-11
@@ -5,18 +5,18 @@ return array(
|
||||
'about_categories' => 'تصنيفات الأصول تساعدك على ترتيب الأصول. من الأمثلة على التصنيفات " مكاتب "، "أجهزة الكمبيوتر المحمولة "، "الهواتف النقالة "، "أجهزة لوحية " وهكذا، كما يمكنك استخدام التصنيفات بأي طريقة تناسبك. ',
|
||||
'asset_categories' => 'التصنيفات',
|
||||
'category_name' => 'اسم التصنيف',
|
||||
'checkin_email' => 'Send email to user on checkin.',
|
||||
'clone' => 'Clone Category',
|
||||
'checkin_email' => 'إرسال إشعار للمستخدم عند الإدخال.',
|
||||
'clone' => 'نسخ التصنيف',
|
||||
'create' => 'إنشاء تصنيف',
|
||||
'edit' => 'Edit Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.',
|
||||
'required_eula' => 'This user will be emailed a copy of the EULA',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'edit' => 'تعديل التصنيف',
|
||||
'eula_text' => 'إتفاقية الإستخدام للتصنيف',
|
||||
'eula_text_help' => 'يسمح لك هذا الحقل بتخصيص الاتفاقيات لأنواع معينة من الأصول. اذا كنت تمتلك اتفاقية واحدة لجميع أصولك يمكنك أن تقوم بتأشير المربع في الأسفل لاستخدام الاتفاقية الافتراضية.',
|
||||
'require_acceptance' => 'مطالبة المستخدمين بتأكيد قبولهم للأصول في هذا التصنيف.',
|
||||
'required_acceptance' => 'سيتم اشعار المستخدم لتأكيد قبول الأصل.',
|
||||
'required_eula' => 'سيتم إشعار هذا المستخدم بإتفاقية الإستخدام',
|
||||
'no_default_eula' => 'ليس هناك اي اتفاقيات إستخدام. قم باضافة واحدة من "الاعدادات".',
|
||||
'update' => 'تحديث التصنيف',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
'use_default_eula' => 'قم باستعمال <a href="#" data-toggle="modal" data-target="#eulaModal">إتفاقية الإستخدام الإفتراضية</a>.',
|
||||
'use_default_eula_disabled' => '<del>إستعمال إتفاقية الإستخدام الافتراضية بدلا من ذلك.</del> لم يتم تحديد إتفاقية الإستخدام الافتراضية. الرجاء إضافتها في الإعدادات.',
|
||||
|
||||
);
|
||||
|
||||
Executable → Regular
+2
-1
@@ -3,7 +3,8 @@
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'التصنيف غير موجود.',
|
||||
'assoc_users' => 'هذا التصنيف مرتبط مع نموذج. فضلاً قم بتحديث النماذج بحيث لا تكون مرتبطة بهذا التصنيف. ',
|
||||
'assoc_models' => 'This category is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this category and try again. ',
|
||||
'assoc_items' => 'This category is currently associated with at least one :asset_type and cannot be deleted. Please update your :asset_type to no longer reference this category and try again. ',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'فشل إنشاء التصنيف، فضلاً حاول مرة أخرى.',
|
||||
|
||||
Executable → Regular
+2
-2
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'eula_text' => 'EULA',
|
||||
'eula_text' => 'اتفاقية ترخيص المستخدم',
|
||||
'id' => 'الرقم',
|
||||
'parent' => 'التصنيف الأب',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'require_acceptance' => 'القبول',
|
||||
'title' => 'اسم التصنيف',
|
||||
|
||||
);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'select_company' => 'اختر الشركة',
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return array(
|
||||
'does_not_exist' => 'الشركة غير موجودة.',
|
||||
'assoc_users' => 'هذه الشركة مرتبطة حاليا مع نموذج ولا يمكن حذفها. رجاءً قم بتحديث النماذج بحيث لا تكون مرتبطة بهذه الشركة ثم حاول مرة اُخرى. ',
|
||||
'create' => array(
|
||||
'error' => 'لم يتم انشاء الشركة، رجاءً حاول مرة اُخرى.',
|
||||
'success' => 'تم إنشاء الشركة بنجاح.'
|
||||
),
|
||||
'update' => array(
|
||||
'error' => 'لم يتم تحديث الشركة، رجاءً حاول مرة اُخرى',
|
||||
'success' => 'تم تحديث الشركة بنجاح.'
|
||||
),
|
||||
'delete' => array(
|
||||
'confirm' => 'هل أنت متأكد من رغبتك في حذف هذه الشركة؟',
|
||||
'error' => 'حدثت مشكلة اثناء عملية حذف الشركة. رجاءً المحاولة مرة اُخرى.',
|
||||
'success' => 'تم حذف الشركة بنجاح.'
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
return array(
|
||||
'companies' => 'الشركات',
|
||||
'create' => 'إنشاء شركة',
|
||||
'title' => 'شركة',
|
||||
'update' => 'تحديث الشركة',
|
||||
'name' => 'إسم الشركة',
|
||||
'id' => 'رقم التعريف',
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_components_title' => 'حول المكونات',
|
||||
'about_components_text' => 'المكونات هي العناصر التي تشكل جزءا من الأصل، على سبيل المثال القرص الصلب، ذاكرة الوصول العشوائي، إلخ.',
|
||||
'component_name' => 'اسم المكون',
|
||||
'checkin' => 'ادخالات المكونات',
|
||||
'checkout' => 'مخرجات المكونات',
|
||||
'cost' => 'تكلفة الشراء',
|
||||
'create' => 'إنشاء مكون',
|
||||
'edit' => 'تعديل مكون',
|
||||
'date' => 'تاريخ الشراء',
|
||||
'order' => 'رقم طلب الشراء',
|
||||
'remaining' => 'المتبقية',
|
||||
'total' => 'المجموع',
|
||||
'update' => 'تحديث مكون',
|
||||
);
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'المكون غير موجود.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'لم يتم إنشاء المكون، الرجاء المحاولة مرة أخرى.',
|
||||
'success' => 'تم إنشاء المكون بنجاح.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'لم يتم تحديث المكون، الرجاء المحاولة مرة أخرى',
|
||||
'success' => 'تم تحديث المكون بنجاح.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'هل أنت متأكد من رغبتك في حذف هذا المكون؟',
|
||||
'error' => 'حدثت مشكلة اثناء عملية حذف المكون. رجاءً المحاولة مرة اُخرى.',
|
||||
'success' => 'تم حذف المكون بنجاح.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'لم تتم عملة اخراج المكون، الرجاء المحاولة مرة اخرى',
|
||||
'success' => 'تم إخراج المكون بنجاح.',
|
||||
'user_does_not_exist' => 'هذا المستخدم خاطئ، الرجاء المحاولة مرة أخرى.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'لم تتم عملية اخراج المكون، الرجاء المحاولة مرة اخرى',
|
||||
'success' => 'تم إدخال المكون بنجاح.',
|
||||
'user_does_not_exist' => 'هذا المستخدم خاطئ، الرجاء المحاولة مرة أخرى.'
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => 'اسم المكون',
|
||||
);
|
||||
Executable → Regular
+11
-10
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_consumables_title' => 'About Consumables',
|
||||
'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
'about_consumables_title' => 'حول المواد الاستهلاكية',
|
||||
'about_consumables_text' => 'المواد الاستهلاكية هي الأشياء المشتراة والتي ستستخدم مع مرور الوقت. على سبيل المثال، حبر الطابعة أو ورق الناسخة.',
|
||||
'consumable_name' => 'اسم المادة الإستهلاكية',
|
||||
'cost' => 'تكلفة الشراء',
|
||||
'create' => 'إنشاء مادة إستهلاكية',
|
||||
'date' => 'تاريخ الشراء',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'رقم طلب الشراء',
|
||||
'remaining' => 'المتبقية',
|
||||
'total' => 'المجموع',
|
||||
'update' => 'تحديث المادة الإستهلاكية',
|
||||
);
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'custom_fields' => 'Custom Fields',
|
||||
'field' => 'Field',
|
||||
'about_fieldsets_title' => 'About Fieldsets',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
|
||||
'fieldset' => 'Fieldset',
|
||||
'qty_fields' => 'Qty Fields',
|
||||
'fieldsets' => 'Fieldsets',
|
||||
'fieldset_name' => 'Fieldset Name',
|
||||
'field_name' => 'Field Name',
|
||||
'field_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Custom Format',
|
||||
'required' => 'Required',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Used By Models',
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'New Fieldset',
|
||||
'create_field' => 'New Custom Field',
|
||||
);
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'field' => array(
|
||||
'invalid' => 'That field does not exist.',
|
||||
'already_added' => 'Field already added',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Field was not created, please try again.',
|
||||
'success' => 'Field created successfully.',
|
||||
'assoc_success' => 'Field successfully added to fieldset.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Field was not updated, please try again',
|
||||
'success' => 'Field updated successfully.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this field?',
|
||||
'error' => 'There was an issue deleting the field. Please try again.',
|
||||
'success' => 'The field was deleted successfully.',
|
||||
'in_use' => 'Field is still in use.',
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
'fieldset' => array(
|
||||
|
||||
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Fieldset was not created, please try again.',
|
||||
'success' => 'Fieldset created successfully.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Fieldset was not updated, please try again',
|
||||
'success' => 'Fieldset updated successfully.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this fieldset?',
|
||||
'error' => 'There was an issue deleting the fieldset. Please try again.',
|
||||
'success' => 'The fieldset was deleted successfully.',
|
||||
'in_use' => 'Fieldset is still in use.',
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+3
-1
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'bulk_delete' => 'Confrm Bulk Delete Assets',
|
||||
'bulk_delete_help' => 'Review the assets for bulk deletion below. Once deleted, these assets can be restored, but they will no longer be associated with any users they are currently assigned to.',
|
||||
'bulk_delete_warn' => 'You are about to delete :asset_count assets.',
|
||||
'bulk_update' => 'Bulk Update Assets',
|
||||
'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ',
|
||||
'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.',
|
||||
|
||||
Executable → Regular
Executable → Regular
+14
-1
@@ -36,6 +36,12 @@ return array(
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some Items did not import Correctly.',
|
||||
'errorDetail' => 'The Following Items were not imported because of errors.',
|
||||
'success' => "Your File has been imported",
|
||||
),
|
||||
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this asset?',
|
||||
@@ -52,7 +58,14 @@ return array(
|
||||
'checkin' => array(
|
||||
'error' => 'Asset was not checked in, please try again',
|
||||
'success' => 'Asset checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.',
|
||||
'already_checked_in' => 'That asset is already checked in.',
|
||||
|
||||
),
|
||||
|
||||
'requests' => array(
|
||||
'error' => 'Asset was not requested, please try again',
|
||||
'success' => 'Asset requested successfully.',
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user