Compare commits

..

307 Commits

Author SHA1 Message Date
snipe
e434616db8 Merge pull request #436 from rashivkp/fix-435
fixed #435. using namespace with route groups to increase the readability
2015-01-04 21:50:07 -06:00
snipe
8a7b7418db Merge pull request #433 from thehereward/tidy-up-models
Tidy up models
2015-01-04 21:49:57 -06:00
Mohamed Rashid
533be7f942 fixed #435. using namespace with route groups to increase the readability 2015-01-05 01:24:16 +05:30
Hereward Mills
094ec50a68 TidyUp: Commonise the depreciate method of Asset and License. 2014-12-24 23:03:06 +00:00
Hereward Mills
98a29e460d TidyUp: Remove excess whitespace. 2014-12-24 22:34:16 +00:00
snipe
27fabfd110 Updated readme 2014-12-23 14:50:34 -05:00
snipe
dce1d47228 Updated language files 2014-12-23 14:48:43 -05:00
snipe
9bbec53635 Added --no-dev to composer for CI 2014-12-23 14:19:46 -05:00
snipe
82232a34ee Merge pull request #415 from svpernova09/feature/software-maintenance-additions
Feature/software maintenance additions Working on #232
2014-12-23 14:11:20 -05:00
Svpernova09
3d1795e312 Add process handling of new maintained and termination_date fields to the licenses methods for creating and editing licenses. Also add array for getCreate and getEdit to easily display maintained options in drop down 2014-12-10 07:45:53 -06:00
Svpernova09
d858861d0f Add termination_date and maintained fields to the License edit form. Add field labels to language file. 2014-12-10 07:44:47 -06:00
Svpernova09
eec36cb13a Add migration to add maintained and termination_date fields to licenses table 2014-12-10 07:43:57 -06:00
snipe
cee966e76e Merge pull request #408 from svpernova09/feature/add-asset-from-model-view
Feature/add asset from model view for #365
2014-12-03 15:25:56 -05:00
Svpernova09
dcf2b428da If we are passing along an id of a previously selected model, use that as the default selection. Otherwise we should fall back to Input::old() 2014-12-03 14:06:33 -06:00
Svpernova09
80d8432c35 Check the optional parameter and if there is a value, grab that model and pass along to the view. Refactored the view return to be easier to read and able to interject if our parameter was set. 2014-12-03 14:05:42 -06:00
Svpernova09
8ec5934af5 Add menu option in dropdown to create new hardware. Add optional parameter in create/hardware route to handle the parameter in the incoming link 2014-12-03 14:04:02 -06:00
snipe
31f77dcb4b Merge pull request #407 from svpernova09/bug/500-error-when-viewing-asset
Check if ->adminuser->id isset before trying to print the fullName so we...
2014-12-03 14:08:09 -05:00
Svpernova09
0663ccb99f 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 2014-12-03 07:46:29 -06:00
snipe
19189f688f Merge pull request #405 from svpernova09/enhancement/make-notes-field-textarea
Enhancement/make notes field textarea
2014-12-02 11:21:36 -05:00
Svpernova09
7849320db0 Convert note fields to text areas for licenses views 2014-12-02 06:59:16 -06:00
Svpernova09
cc8ca54b3f Convert note fields to text areas for hardware views 2014-12-02 06:59:01 -06:00
Svpernova09
ecb4d0d948 Add jetbrains IDE's config folders to gitignore 2014-12-02 06:51:50 -06:00
snipe
f20566f222 Merge pull request #393 from madd15/patch-1
Fix #388 - License not showing checked out in view
2014-11-23 19:36:28 -05:00
madd15
73dd339772 Fix #388 - License not showing checked out in view 2014-11-24 11:05:24 +10:30
snipe
5e6c4a250a Updated composer lock 2014-11-21 07:34:06 -05:00
snipe
bf96aae9d9 Truncate license in report 2014-11-21 07:32:12 -05:00
snipe
daefc86e58 Formattig fixes for #386 2014-11-21 06:10:30 -05:00
snipe
64c16a0bac Fixes #386 and #273 - altered column type to text 2014-11-21 05:47:49 -05:00
snipe
89a2b87e42 Fixes #367 - added model number to dropdown 2014-11-21 05:20:08 -05:00
snipe
1b41c974cf Fixes #348 - remove constraints on license keys 2014-11-20 18:43:33 -05:00
snipe
d6a0249c60 Fixed #373 - added ability to auto-increment asset tags 2014-11-20 18:28:45 -05:00
snipe
6a6676b1e7 Merge pull request #383 from madd15/patch-1
Fix half #377 - Checkout users last_name, first_name
2014-11-20 17:19:44 -05:00
madd15
1024816313 Fix #377 - Checkout users last_name, first_name 2014-11-21 08:47:19 +10:30
snipe
6905d82fc4 Fixes #374 to keep the requirement to PHP 5.4 2014-11-20 16:38:50 -05:00
snipe
22746db8b7 Newest translations 2014-11-20 16:28:38 -05:00
snipe
b826673d0d Added username field for #377 2014-11-20 16:17:48 -05:00
snipe
637009054c Fixed typo in english 2014-11-20 16:09:30 -05:00
snipe
5f5be6aa2a Removed line break 2014-11-20 16:09:21 -05:00
snipe
a863cf1615 Merge pull request #364 from madd15/patch-1
Remove Double </label>
2014-11-13 18:30:40 -05:00
madd15
05d8ff0252 Remove Double </label> 2014-11-14 09:57:02 +10:30
snipe
b73ae3147a Fixes #362, reduced asset name to 2 char min 2014-11-13 16:26:39 -05:00
snipe
81b2ce33c2 Polish, german and spanish translation strings 2014-11-12 21:13:46 -05:00
snipe
501e1749b3 Updated localization strings 2014-11-12 17:38:56 -05:00
snipe
53f279f55f Language string for "generate" 2014-11-12 17:34:22 -05:00
snipe
f5fb2525de Merge branch 'develop' of github.com:snipe/snipe-it into develop 2014-11-12 17:32:58 -05:00
snipe
53951c8bbc Nicer custom reports form layout 2014-11-12 17:32:48 -05:00
snipe
00755eadf0 Merge pull request #359 from madd15/patch-1
Fix Lang for Reports
2014-11-12 17:17:07 -05:00
madd15
13b173409f Fix License form langs 2014-11-13 08:44:47 +10:30
madd15
7ddc6d497a Fix Report Langs 2014-11-13 08:43:42 +10:30
snipe
2829eeca7c New reports language files 2014-11-12 17:05:46 -05:00
snipe
e39227633f Merge pull request #358 from madd15/feature-reports
Add error on empty options and Update to Lang for error and info
2014-11-12 17:01:31 -05:00
Madd15
89c7159c56 Fix array check for empty rows 2014-11-13 08:29:15 +10:30
snipe
6854453bc5 English is hard :( 2014-11-12 16:38:31 -05:00
snipe
ce9c616843 Updated language strings 2014-11-12 16:33:11 -05:00
Madd15
40b0ced8da Update Lang for error and info 2014-11-13 08:02:39 +10:30
Madd15
57ec8aa3c2 Add error for no options selected 2014-11-13 08:02:25 +10:30
snipe
02feb69d5d Localization on user's view page, new strings 2014-11-12 16:22:30 -05:00
snipe
fc2d472ed3 Fixed english language string 2014-11-12 15:52:08 -05:00
snipe
b622d977d9 Merge pull request #355 from madd15/feature-reports
Added Customizable Asset Report
2014-11-12 01:35:44 -05:00
Madd15
6d2a073d04 Custom Asset Report 2014-11-12 16:05:59 +10:30
snipe
564cf90e58 Merge pull request #354 from madd15/feature-reports
Feature Extended Reports
2014-11-12 00:32:51 -05:00
Madd15
c60e40096a Replace static titles with lang 2014-11-12 13:38:31 +10:30
Madd15
74ae2fceea Fix class on th 2014-11-12 13:34:53 +10:30
Madd15
02605bdf69 Add Asset Report with Reduced Load Time 2014-11-12 12:03:33 +10:30
Madd15
432e348e56 Add Report Controller and License Report 2014-11-12 12:02:55 +10:30
snipe
d91a7c7aa8 Merge pull request #351 from diwanicki/patch-1
Update view.blade.php
2014-11-07 16:57:39 -05:00
diwanicki
f2ae05786b Update view.blade.php
closing parens was missing from Depreciation, EOL was not configured for translations
2014-11-07 16:56:28 -05:00
snipe
3d3e2dc985 Merge pull request #346 from madd15/feature-supplier-image
Add image to supplier
2014-11-06 22:24:37 -05:00
madd15
3c3617d641 Add image to supplier 2014-11-07 13:46:14 +10:30
snipe
b518162c50 Merge pull request #345 from madd15/patch-1
Fix #342
2014-11-06 16:23:50 -05:00
madd15
b2d5dc9ec5 Fix #342 2014-11-07 07:52:44 +10:30
snipe
cff24309a1 Possibly fixes #343 2014-11-06 15:21:54 -05:00
snipe
b25c94e429 Purchase cost is not required 2014-11-06 15:21:32 -05:00
snipe
53a47743e8 Language string udpates 2014-11-05 23:06:06 -05:00
snipe
8a10386737 Merge pull request #338 from madd15/patch-license-lang
Lang changes for new licenses functions
2014-11-05 22:49:00 -05:00
madd15
7e95d36245 Lang changes for new licenses functions 2014-11-06 14:15:09 +10:30
snipe
f90327ee9c Merge pull request #337 from madd15/patch-1
Update to v1.1
2014-11-05 22:21:10 -05:00
madd15
3b5670965c Update to v1.1 2014-11-06 13:50:13 +10:30
snipe
8699a90093 Fixed changelog 2014-11-05 22:05:32 -05:00
snipe
562e5cd700 Changelog generator 2014-11-05 22:03:01 -05:00
snipe
3f7486e1a9 Updated changelog 2014-11-05 22:02:51 -05:00
snipe
0eb6183711 New strings for translation 2014-11-05 21:16:26 -05:00
snipe
cdf5ecc084 Merge pull request #336 from madd15/feature-updated-setting-view
Update Settings to contain PHP & Laravel versions
2014-11-05 21:03:27 -05:00
madd15
0eda46da0c Move side column back to top on the right 2014-11-06 11:23:07 +10:30
madd15
1047c5c8bb Update Settings to contain PHP & Laravel versions 2014-11-06 11:12:15 +10:30
snipe
5f6f3de25e Merge pull request #335 from madd15/feature-new-license-fields
Add Fields to Licenses and Update Supplier for Licenses
2014-11-05 18:26:57 -05:00
madd15
7833d10006 Add Fields to Licenses and Update Supplier for Licenses 2014-11-06 09:32:50 +10:30
snipe
122b3d89d9 Added assetlog to other status types 2014-11-05 16:11:07 -05:00
snipe
14801eca79 Merge branch 'develop' of github.com:snipe/snipe-it into develop 2014-11-05 16:10:11 -05:00
snipe
4a4b974f41 Merge pull request #333 from madd15/patch-1
Add assetlog to Deployed Loading
2014-11-05 16:09:55 -05:00
snipe
ab7b828e33 Romanian translations 2014-11-05 16:08:54 -05:00
snipe
b0e87d967a Arr! Pirate translations 2014-11-05 16:08:19 -05:00
snipe
a0001fe1ed Arabic translations 2014-11-05 16:08:08 -05:00
madd15
ac5fa1641e Add assetlog to Deployed Loading 2014-11-06 07:35:49 +10:30
snipe
7c16dd8c92 Eager loading on other status types 2014-11-05 15:57:10 -05:00
snipe
294b02127b Don't show asset name field if there is none 2014-11-05 15:16:38 -05:00
snipe
e04cc806d9 Fixes #327 2014-11-05 15:16:22 -05:00
snipe
2bee522a7c Included defaultLoc to assets view 2014-11-04 19:23:11 -05:00
snipe
5441dd41f0 Eager loading on assets listing 2014-11-04 18:58:16 -05:00
snipe
7858252fca More brazilian portuguese translations 2014-11-04 18:33:35 -05:00
snipe
6c6d31f15a A few more hungarian translations 2014-11-04 18:32:38 -05:00
snipe
6b2d3efe3e Fixes #237 - reporting-only group 2014-11-04 18:21:10 -05:00
snipe
1078dbf5c5 Fixes #324 2014-11-03 02:39:11 -05:00
snipe
300c262739 Merge pull request #320 from diwanicki/asset-view-edit-new-org
Adjustments to Asset Edit and Asset View layouts
2014-11-03 00:40:44 -05:00
snipe
25a7b05de6 Merge pull request #323 from madd15/patch-1
Fix if no asset selected sql error
2014-11-03 00:22:00 -05:00
madd15
70d7748229 Remove asterisk from asset 2014-11-03 15:48:51 +10:30
madd15
6315db7fd8 Allow checkout to user without asset 2014-11-03 15:35:04 +10:30
snipe
343798d241 Merge pull request #322 from madd15/fix-js-delete-asset
Delegate to table, add button to on()
2014-11-02 20:10:05 -05:00
snipe
5050862979 Merge pull request #321 from madd15/patch-5
Fix #318 - Missing end div causing layout issues
2014-11-02 17:34:36 -05:00
madd15
90baf2eeba Delegate to table, add button to on() 2014-11-03 08:58:19 +10:30
madd15
0022389463 Fix dropdown menu position 2014-11-03 08:24:53 +10:30
madd15
04123b3fe8 Missing end div causing layout issues 2014-11-03 08:12:34 +10:30
snipe
491de30374 Finnish translation via jarnok 2014-11-02 13:41:12 -05:00
snipe
0d402f52c8 Localization 2014-11-02 13:34:08 -05:00
diwanicki
55cd7c0f81 move br in notes div, almost there 2014-11-02 13:27:32 -05:00
diwanicki
63656762b0 changed style for notes, brd in div 2014-11-02 13:26:09 -05:00
diwanicki
87a9399b6b maybe a break? 2014-11-02 13:18:58 -05:00
diwanicki
ed5ff9a01b trying hard space 2014-11-02 13:14:56 -05:00
diwanicki
68bf40a7ea typo2 2014-11-02 13:10:01 -05:00
diwanicki
0cf24bdde1 typo 2014-11-02 13:08:44 -05:00
diwanicki
05502cf29d trying serial in col-md12 2014-11-02 13:03:06 -05:00
diwanicki
1305ea9597 move in div? 2014-11-02 11:27:56 -05:00
diwanicki
94e1fcb01b maybe breaks? 2014-11-02 11:24:28 -05:00
diwanicki
9c01ab334f playing with paragraph tags 2014-11-02 11:22:05 -05:00
diwanicki
b685ea666c em, small, and paragraphs 2014-11-02 11:17:34 -05:00
diwanicki
ee35948980 fix div issues 2014-11-02 11:09:29 -05:00
diwanicki
569714315c Revert c122cc2..f094551
This rolls back to commit c122cc2647.
2014-11-02 10:54:52 -05:00
diwanicki
f09455117b . 2014-11-02 10:51:45 -05:00
diwanicki
af70559754 . 2014-11-02 10:50:35 -05:00
diwanicki
07e6d49dce . 2014-11-02 10:49:22 -05:00
diwanicki
86597bb863 more 2014-11-02 10:46:57 -05:00
diwanicki
6d057846a1 again 2014-11-02 10:45:33 -05:00
diwanicki
ba9f8c61f1 more 2014-11-02 10:41:52 -05:00
diwanicki
d3266dd4e8 still more 2014-11-02 10:40:10 -05:00
diwanicki
9143ac461f and more 2014-11-02 10:37:32 -05:00
diwanicki
7199d6fd22 more adjustments 2014-11-02 10:29:24 -05:00
diwanicki
2b21b26950 more layout adjustments 2014-11-02 10:24:34 -05:00
diwanicki
c122cc2647 layout adjustments
layout adjustment to Notes field, hide Notes from asset creation log
display
2014-11-02 10:06:23 -05:00
diwanicki
ced8610833 cleanup, reorder, restore Asset view and edit
reordered fields on Asset Add/Edit form to flow more logically.
reordered fields on Asset View to flow more logically. Restored serial
number to Asset View. Added Asset specific notes field to Asset View
(they are in the log as part of the initial asset creation, but need to
be more prominent, especially if the device has a lot of history.
adjusted wording in EN lang template for clarity.
2014-11-02 08:48:42 -05:00
snipe
af63d34412 Updated language strings 2014-11-01 19:06:44 -04:00
snipe
9e85dcb9fc Fixes #315 - add EOL as display option in settings (run migrations) 2014-11-01 18:38:24 -04:00
snipe
687c629953 Bootstrap HTML cleanup 2014-11-01 17:45:28 -04:00
snipe
13b3e2c4d4 HTML cleanup 2014-11-01 17:42:15 -04:00
snipe
4d8e663bd1 Replaced hard-coded month string for languag support 2014-11-01 17:27:07 -04:00
snipe
3e11ea70da Reverting to old page title 2014-11-01 17:24:57 -04:00
snipe
86b7b6946f Fixes #316 - added model name back to view 2014-11-01 17:14:36 -04:00
snipe
3184c3e03b Updated language files 2014-10-30 07:51:11 -04:00
snipe
55eb4325bc Merge pull request #309 from madd15/patch-2
Allow checkout to user or asset
2014-10-29 23:15:18 -04:00
snipe
d4ef8a75b8 Merge pull request #310 from madd15/patch-3
Change file name to str_random(25) & prevent upsizing
2014-10-29 23:14:56 -04:00
madd15
cf4804a994 Added constraint to image to prevent upsizing 2014-10-30 10:34:52 +10:30
madd15
22590e2a43 Change file name to str_random(25) 2014-10-30 09:52:20 +10:30
madd15
d9f86df05f Uncomment User section 2014-10-30 09:34:55 +10:30
madd15
636eb29421 Change rule back to asset_id required_without 2014-10-30 09:33:31 +10:30
snipe
5dea4c7691 Merge pull request #308 from madd15/patch-1
Fix Gravatar email lang and < conflict
2014-10-29 18:56:26 -04:00
madd15
672e2e5fd4 Add gravatar_email 2014-10-30 09:06:13 +10:30
madd15
42ad3da3d3 Moved part of gravatar label to new line
<small> was conflicting with @lang
2014-10-30 09:04:47 +10:30
snipe
bb3aa99b9c Added CrowdIn badge 2014-10-29 18:33:13 -04:00
snipe
676155eacb Added translation link to footer 2014-10-29 17:50:21 -04:00
snipe
54071d1837 Updated readme for translation info 2014-10-29 17:49:55 -04:00
snipe
5abc4467df New placeholder language files for translations 2014-10-29 17:38:24 -04:00
snipe
ffe095d64b Updates to language files 2014-10-29 17:38:07 -04:00
snipe
ce566509ce Merge pull request #306 from madd15/patch-1
Allow spaces in category name
2014-10-29 14:27:48 -04:00
madd15
84cb51b4c3 Allow spaces in category name 2014-10-29 21:59:51 +10:30
snipe
9b0d930a21 Updated requirements in main README 2014-10-29 05:56:05 -04:00
snipe
1680d45163 Updated composer lock 2014-10-29 05:38:03 -04:00
snipe
5e1f61ea2a Ignore new uploads subdirectories 2014-10-29 05:37:48 -04:00
snipe
75d0136d7f Merge pull request #304 from madd15/feature-avatars
Feature local avatars and model images
2014-10-29 05:08:49 -04:00
madd15
30428cb858 Vars for lang - Image 2014-10-29 17:34:47 +10:30
madd15
26ab53c02c Added Location and Website 2014-10-29 17:33:10 +10:30
madd15
d8815b5ef5 Change to Vars for labels 2014-10-29 17:32:19 +10:30
madd15
e8737b156a Add image and avatar lang vars 2014-10-29 17:19:27 +10:30
madd15
f200e81334 Remove circle effect from image 2014-10-29 15:58:39 +10:30
madd15
03f3294873 Add images to models
Appropriate changes to views and controllers
includes migration and folder
2014-10-29 15:54:55 +10:30
madd15
da70d5042c uploads\avatars folder 2014-10-29 14:43:27 +10:30
madd15
239370058c changed to avatar 2014-10-29 14:28:24 +10:30
madd15
0b4c1b8d83 Feature Avatars
Appropriate changes to views and controllers
User Avatar Migration
Add intervention/image
2014-10-29 14:18:54 +10:30
snipe
736c9a1ad7 Merge pull request #302 from madd15/patch-2
Change Locations to sort by name asc
2014-10-28 02:05:05 -04:00
madd15
fb46a04d78 Change Locations to sort by name asc 2014-10-28 16:01:11 +10:30
snipe
e9e332e19e Merge pull request #300 from madd15/patch-2
Change paginate to get for Index
2014-10-27 15:19:33 -04:00
madd15
16420dafa9 Change paginate to get for Index
Fixes #261 - Pagination appears to work correctly after this change
2014-10-27 12:14:55 +10:30
rob
22f81912e4 Fixes #299 2014-10-24 17:08:50 -04:00
snipe
e61f93deb8 Merge pull request #297 from madd15/patch-4
Changed rtd_location_id for edit to match create
2014-10-24 16:38:18 -04:00
snipe
8d2b09a647 Merge pull request #298 from madd15/patch-1
Changed to == on $setting->qr_code
2014-10-24 12:11:36 -04:00
madd15
b11a0cb436 Changed to == on $setting->qr_code 2014-10-25 00:27:25 +10:30
madd15
dd923984ef Changed rtd_location_id for edit to match create
Forgot to change postEdit
2014-10-24 15:17:07 +10:30
snipe
d36c73550b Merge pull request #296 from madd15/patch-4
Change rtd_location_id to allow no location set
2014-10-24 00:24:05 -04:00
madd15
bbfc87dddf Change rtd_location_id to allow no location set 2014-10-24 14:50:27 +10:30
snipe
90497bb6a4 Updated spanish translations 2014-10-23 23:37:15 -04:00
snipe
35ce00f6ab Merge remote-tracking branch 'origin/master' into develop 2014-10-23 23:22:51 -04:00
snipe
3cbd8c9b5d Added CrowdIn link 2014-10-23 23:22:35 -04:00
snipe
599520dff6 Squashed commit of the following:
commit 309772e67d
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 22:43:06 2014 -0400

    Fixed operator for setting bool display

commit 139a0a2e2a
Merge: 88459b7 14a9500
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 22:39:55 2014 -0400

    Merge branch 'develop' of github.com:snipe/snipe-it into develop

commit 88459b755f
Merge: 05fb2a4 e17de3d
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 22:39:22 2014 -0400

    Merge branch 'madd15-patch-2' into develop

commit e17de3d34f
Merge: 062d16b a6cd7c0
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 22:38:11 2014 -0400

    Merge branch 'patch-2' of github.com:madd15/snipe-it into madd15-patch-2

commit a6cd7c0bab
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 13:07:57 2014 +1030

    Changed to only one date for checkout date

commit 062d16b2c0
Merge: 05fb2a4 7f44d6d
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 22:22:55 2014 -0400

    Merge branch 'patch-2' of github.com:madd15/snipe-it into madd15-patch-2

commit 7f44d6dd47
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:48:04 2014 +1030

    Add display_checkout_date to settings table

commit 9125def119
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:41:25 2014 +1030

    Add checkout_date

commit 024972e239
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:35:42 2014 +1030

    Add Checkout Date column

commit b0e1ef6024
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:32:44 2014 +1030

    Add Display Checkout Date

commit d74bddb51f
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:32:06 2014 +1030

    Add display_checkout_date

commit 189523a943
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:30:51 2014 +1030

    Add Display Checkout Date Setting

commit 98b96d372d
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 12:29:58 2014 +1030

    Add Display Checkout Date Setting

commit 14a9500c6f
Merge: 7bea50f 0e9e659
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 20:12:45 2014 -0400

    Merge pull request #293 from madd15/patch-5

    Update Country, Change to Form::, Change state to max 32

commit 0e9e659dc4
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 10:40:14 2014 +1030

    Alter State to varchar(32) in Suppliers Table

commit 7bea50feca
Merge: 05fb2a4 fafd03f
Author: snipe <snipe@snipe.net>
Date:   Thu Oct 23 20:08:31 2014 -0400

    Merge pull request #294 from madd15/patch-4

    Added DB Prefix to Migrations

commit 8f582f29e2
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 10:17:19 2014 +1030

    Change state to max 32

commit cbf23fc455
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 24 10:16:08 2014 +1030

    Update Country, Change to Form::

commit fafd03f00f
Author: madd15 <joshdeakin@adam.com.au>
Date:   Thu Oct 23 11:47:46 2014 +1030

    Added DB Prefix to Migrations

    Added DB::getTablePrefix(); to migrations to fix #284

    not sure if there is another way to achieve this

commit 05fb2a434c
Merge: 255b618 e43a945
Author: snipe <snipe@snipe.net>
Date:   Sun Oct 19 18:47:12 2014 -0400

    Merge pull request #283 from madd15/patch-3

    Update table.action to table.actions

commit e43a94586b
Author: madd15 <joshdeakin@adam.com.au>
Date:   Mon Oct 20 08:46:27 2014 +1030

    Update table.action to table.action

commit 0d12428140
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 17 15:39:58 2014 +1030

    Reordered, Changed title and added per_page

    Reordered, Changed title and added per_page

commit 692c861594
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 17 15:36:31 2014 +1030

    Updated static text to Lang vars

    Updated static text to Lang vars

commit c68d76870e
Author: madd15 <joshdeakin@adam.com.au>
Date:   Fri Oct 17 15:35:56 2014 +1030

    Change all form to use Form:: & update Lang

    Updated <input> to Form::
    Update static text to Lang Vars
2014-10-23 22:46:20 -04:00
snipe
309772e67d Fixed operator for setting bool display 2014-10-23 22:43:06 -04:00
snipe
139a0a2e2a Merge branch 'develop' of github.com:snipe/snipe-it into develop 2014-10-23 22:39:55 -04:00
snipe
88459b755f Merge branch 'madd15-patch-2' into develop 2014-10-23 22:39:22 -04:00
snipe
e17de3d34f Merge branch 'patch-2' of github.com:madd15/snipe-it into madd15-patch-2 2014-10-23 22:38:11 -04:00
madd15
a6cd7c0bab Changed to only one date for checkout date 2014-10-24 13:07:57 +10:30
snipe
062d16b2c0 Merge branch 'patch-2' of github.com:madd15/snipe-it into madd15-patch-2 2014-10-23 22:22:55 -04:00
madd15
7f44d6dd47 Add display_checkout_date to settings table 2014-10-24 12:48:04 +10:30
madd15
9125def119 Add checkout_date 2014-10-24 12:41:25 +10:30
madd15
024972e239 Add Checkout Date column 2014-10-24 12:35:42 +10:30
madd15
b0e1ef6024 Add Display Checkout Date 2014-10-24 12:32:44 +10:30
madd15
d74bddb51f Add display_checkout_date 2014-10-24 12:32:06 +10:30
madd15
189523a943 Add Display Checkout Date Setting 2014-10-24 12:30:51 +10:30
madd15
98b96d372d Add Display Checkout Date Setting 2014-10-24 12:29:58 +10:30
snipe
14a9500c6f Merge pull request #293 from madd15/patch-5
Update Country, Change to Form::, Change state to max 32
2014-10-23 20:12:45 -04:00
madd15
0e9e659dc4 Alter State to varchar(32) in Suppliers Table 2014-10-24 10:40:14 +10:30
snipe
7bea50feca Merge pull request #294 from madd15/patch-4
Added DB Prefix to Migrations
2014-10-23 20:08:31 -04:00
madd15
8f582f29e2 Change state to max 32 2014-10-24 10:17:19 +10:30
madd15
cbf23fc455 Update Country, Change to Form:: 2014-10-24 10:16:08 +10:30
madd15
fafd03f00f Added DB Prefix to Migrations
Added DB::getTablePrefix(); to migrations to fix #284

not sure if there is another way to achieve this
2014-10-23 11:47:46 +10:30
snipe
05fb2a434c Merge pull request #283 from madd15/patch-3
Update table.action to table.actions
2014-10-19 18:47:12 -04:00
madd15
e43a94586b Update table.action to table.action 2014-10-20 08:46:27 +10:30
madd15
0d12428140 Reordered, Changed title and added per_page
Reordered, Changed title and added per_page
2014-10-17 15:39:58 +10:30
madd15
692c861594 Updated static text to Lang vars
Updated static text to Lang vars
2014-10-17 15:36:31 +10:30
madd15
c68d76870e Change all form to use Form:: & update Lang
Updated <input> to Form::
Update static text to Lang Vars
2014-10-17 15:35:56 +10:30
snipe
255b618559 Updated for 1.0 release 2014-10-16 18:40:31 -04:00
snipe
bf1e075551 Fixes #87 - made datatables responsive 2014-10-16 17:46:47 -04:00
snipe
7c97477a53 Added default location to physical hardware 2014-10-16 17:41:56 -04:00
snipe
ee7d9bec70 Fixes #279 - QR checkbox not staying checked 2014-10-16 15:39:05 -04:00
snipe
58a99a2219 Merge pull request #246 from mrshu/patch-2
fix: Use the old asset tag when cloning
2014-09-10 11:51:31 -04:00
Marek Šuppa
a829fcf52f fix: Use the old asset tag when cloning
* Removed previous use of placeholder, added code to set the old asset tag as the new one since it is being checked for uniqueness.
* For more rationale see our discussion with @technogenus in #241
2014-09-10 08:55:57 +02:00
snipe
af450c9bcc Merge pull request #241 from mrshu/patch-1
views: Added old tag to placeholder when cloning
2014-09-08 14:25:32 -04:00
snipe
5575567726 Merge pull request #235 from rrdial/patch-1
Spelling correction.
2014-09-08 14:25:01 -04:00
snipe
97724a95e3 Merge pull request #242 from mizar1616/spanish
Spanish Translation 1.0
2014-09-08 14:23:15 -04:00
mizar1616
2bf57febd8 Spanish Translation
Ver 1.1
2014-09-08 15:19:35 +02:00
Marek Šuppa
a82a35d921 views: Added old tag to placeholder when cloning
* Added the old tag to the placeholder attribute of the `asset_tag` input to improve the UX.
2014-09-08 14:45:06 +02:00
R Ryan Dial
94ead64386 Spelling correction. 2014-09-02 14:57:27 -04:00
snipe
e978038cc0 Merge pull request #234 from burlito/typo-fix
fix typo: artisand -> artisan
2014-09-01 23:53:31 -04:00
Andrej Manduch
96e40d72b9 fix typo: artisand -> artisan
In few app.example.php config files was artisand instead artisan.

Signed-off-by: Andrej Manduch <amanduch@gmail.com>
2014-09-02 05:47:12 +02:00
snipe
284154a2d7 Merge remote-tracking branch 'origin/master' into develop 2014-08-17 04:38:19 -04:00
snipe
e0da7ffe9b Updated composer lock 2014-08-17 04:38:01 -04:00
snipe
35479bfa40 Removed pre-update-cmd 2014-08-17 04:37:38 -04:00
snipe
582a9bf78b Make location_id nullable 2014-08-17 04:37:30 -04:00
snipe
e8c197c6a5 No upper cap to password 2014-08-15 23:10:41 -04:00
snipe
ec658b0cf5 Stronger input validation 2014-08-15 22:13:09 -04:00
snipe
68d44e65d3 XSS filtering 2014-08-15 22:12:48 -04:00
snipe
6fd0cbe044 Allow up to 50-character password 2014-08-15 21:02:41 -04:00
snipe
4629875bdf Removed ID from listbox debugging 2014-08-15 20:16:19 -04:00
snipe
297f986c4b Merge remote-tracking branch 'origin/develop' 2014-08-15 20:11:00 -04:00
snipe
ccb49f4b23 I don't know why I have to keep committing this file 2014-08-15 20:10:52 -04:00
snipe
49c5607e1c Fixes #222 2014-08-15 20:05:48 -04:00
snipe
13f61e1e8a Newline 2014-08-15 19:46:10 -04:00
snipe
cd4e994ef5 Removed erronerous "All the users!" text 2014-08-15 19:27:35 -04:00
snipe
974fb6b9ae Added language string for #222 2014-08-15 19:15:00 -04:00
snipe
4365659a2c Removed IDE files 2014-08-13 15:45:29 -04:00
snipe
363d084bd6 Fixed DB name in travis CI 2014-08-12 15:06:52 -04:00
snipe
69cd6404f5 Merge remote-tracking branch 'origin/develop' 2014-08-12 14:58:48 -04:00
snipe
229291999f ... 2014-08-12 14:58:40 -04:00
snipe
2cb61ab1c5 Added link to @GR360RY's Ubuntu Ansible/Vagrant 2014-08-12 14:57:53 -04:00
snipe
652f1c746c Fixes Travis CI build 2014-08-12 14:53:51 -04:00
snipe
caaa96ec67 ... 2014-08-12 14:39:59 -04:00
snipe
db49e570fd ... 2014-08-12 14:03:29 -04:00
snipe
e242f8da0d Merge pull request #216 from cordeos/develop
A0.4.3 add asset, license, user, model clone and artisan db migration
2014-08-12 13:52:51 -04:00
Cordeos Team
8d3d8c86b1 A0.4.3 add asset, license, user, model clone and artisan db migration 2014-08-12 17:25:07 +09:00
Cordeos Team
144c9eb7f8 A0.4.2: asset, license, user, model cloning and move db migration 2014-08-12 15:54:12 +09:00
Cordeos Team
9ccc7d756f A0.4.2: Added asset, license, user, model cloning and fixed some bugs. 2014-08-12 14:28:41 +09:00
Cordeos Team
b1fafa7ca4 Added asset, license, user and model cloning 2014-08-12 13:41:17 +09:00
Cordeos Team
62a3ed671b DB migration, layout and clone fixes 2014-08-11 20:18:45 +09:00
Cordeos Team
7ac06fa004 DB migration script Rev 0.11 2014-08-11 17:45:11 +09:00
Cordeos Team
54c3dfbcce Added licence clone 2014-08-11 17:19:28 +09:00
Cordeos Team
0dfc9660ca alpha 0.4.0 release candidate 2014-08-11 17:13:43 +09:00
Cordeos Team
d6404dc734 0.4.1 release candidate 2014-08-11 13:32:24 +09:00
Cordeos Team
d482b1ea69 0.4.0 release candidate 2014-08-11 13:22:42 +09:00
Cordeos Team
8c7be8fbb3 0.4.0 release candidate 2014-08-11 13:15:08 +09:00
Cordeos Team
3944ebddf3 0.4.0 release candidate 2014-08-11 13:14:22 +09:00
Cordeos Team
6cfb4ab5d8 0.4.0 release candidate 2014-08-11 13:10:00 +09:00
Cordeos Team
64abdddccb Database migration update 2014-08-10 22:59:57 +09:00
Cordeos Team
23a64cfe26 Database migration update 2014-08-10 22:35:14 +09:00
Cordeos Team
448b54d8e2 DBUpdate 2014-08-10 22:08:38 +09:00
Cordeos Team
72671d3e1d initial beta .4 draft 2014-08-10 20:01:38 +09:00
Cordeos Team
efbe7b0fee initial beta .4 draft 2014-08-10 19:58:23 +09:00
Cordeos Team
af083570a0 initial beta .4 draft 2014-08-10 19:09:08 +09:00
Cordeos Team
87c2a4c9c0 initial commit 2014-08-10 16:42:40 +09:00
root
cb8369e9de Initial QA Patch to fix errors
Add License
Add Asset
Show Deleted Users
License Assign
2014-08-08 00:03:12 +09:00
root
6c5bbec44e Changes:
Updated user create to make LOCATION required - same as user edit
Own account password change updated to require only 6-12 characters
2014-08-05 14:56:37 +09:00
root
d71a02982d Changes:
set new user create to active YES as default
Changed user password validation to 6-12 characters
Licenses controller removed asset_id from the INSERT column list
2014-08-05 13:36:47 +09:00
root
b8a4c7e4d6 Initial COMMIT to set the file modified tracking. No changes made. 2014-08-05 13:22:08 +09:00
snipe
8197e6174e Fixes #200 2014-07-22 17:57:50 -04:00
snipe
3de929bb28 Merge pull request #199 from buzzedword/feature/gitignore-bin
Add bin directory to gitignore so vendor assets don't get committed.
2014-07-22 15:10:57 -04:00
snipe
f2036e0951 Merge pull request #197 from jarnokurlin/develop
user id 3 does not exists!
2014-07-22 14:54:42 -04:00
Danny Garcia
213e313e45 Add bin directory to gitignore so vendor assets don't get committed. 2014-07-22 14:52:08 -04:00
snipe
a695d8513c Merge pull request #198 from buzzedword/feature/bug-58
Fixed #58
2014-07-22 14:24:02 -04:00
Danny Garcia
69fca5d1ed Fixed #58
Added module scoping for all components, and stored lookups in event handlers instead
of querying live. Delays would erroniously cause values to persist.
2014-07-22 13:33:58 -04:00
Jarno Kurlin
94daba9bab user id 3 does not exists! 2014-07-22 18:53:45 +03:00
snipe
56d619b218 Fixed missing language string 2014-07-19 18:10:10 -04:00
snipe
dc1033025a Fixed #151 - more complete translations 2014-07-19 17:53:04 -04:00
snipe
a4b220d6c3 Fixed #191 - allow admins to assign a user during asset creation 2014-07-19 17:28:51 -04:00
snipe
a8c2955218 Updated changelog 2014-07-19 01:30:24 -04:00
snipe
03cd9f893c Better asset dropdown to include user it's assigned to where applicable 2014-07-19 01:16:53 -04:00
snipe
4f04b96a13 Adding 5.6 back in 2014-07-18 23:55:44 -04:00
snipe
d2d85436ad Tweaks to travis 2014-07-18 23:54:11 -04:00
snipe
85cd343bb6 Tried again - tweaking travis settings 2014-07-18 23:51:49 -04:00
snipe
6f6b98186e NFC why this is suddenly failing :( 2014-07-18 23:48:43 -04:00
snipe
f855be45aa Removed 5.6 2014-07-18 23:45:01 -04:00
snipe
ddf946ad5e Tried to fix failing build caused by travis composer 2014-07-18 23:42:36 -04:00
snipe
4a13cded60 Fixed path for Travis composer 2014-07-18 23:40:57 -04:00
snipe
27e43eebcb Added asset tag to license index view 2014-07-18 23:29:05 -04:00
snipe
196dbb856e Merge remote-tracking branch 'origin/develop' 2014-07-18 23:25:48 -04:00
snipe
3d91a43554 Added asset tag to asset list 2014-07-18 23:25:33 -04:00
snipe
9df9371ffe Merge remote-tracking branch 'origin/develop' 2014-07-18 20:25:12 -04:00
snipe
ca24ef1cd8 Merge branch 'refs/heads/feature/add-asset-to-software' into develop
Conflicts:
	app/controllers/admin/LicensesController.php
2014-07-18 20:24:51 -04:00
snipe
ac4c905c42 Fixed #140 2014-07-18 20:09:58 -04:00
snipe
7f48ca04b0 Updated changelog 2014-07-17 14:01:04 -04:00
snipe
39fff92bdb Updated changelog 2014-07-17 13:57:58 -04:00
snipe
ff61705a8f More edits for #140 2014-07-17 13:38:53 -04:00
snipe
aa8bbb88e9 Updated MVC for #140, ability to assign software to asset (incomplete) 2014-07-17 08:33:30 -04:00
snipe
7d04ded02a DB migration for #140 2014-07-17 08:32:11 -04:00
1743 changed files with 38161 additions and 13915 deletions

37
.bash_history Executable file
View File

@@ -0,0 +1,37 @@
ls
pwd
cd app
ls
cd views/
cd backend/
ls
cd users/
ls
vi view.blade.php
ls -alF
cd
pwd
ls -alF
pwd
cd app
ls
cd views/
cd backend/
cd users/
ls
ls -alF
chown snipeitftp view.blade.php
sudo chown snipeitftp view.blade.php
pwd
ls
vi view.blade.php
set noswapfile
set nobackup
vi view.blade.php
touch delete.me
vi delete.me
ls
ls -alF
touch view.blade.php
touch index.blade.php
vi view.blade.php

6
.gitignore vendored
View File

@@ -10,6 +10,10 @@ composer.phar
/app/config/*/database.php
/app/config/*/app.php
public/packages/*
public/uploads/models/*
public/uploads/avatars/*
/app/storage/views/*
/app/storage/logs/*
/app/storage/debugbar/
/app/storage/debugbar/
/bin/
.idea

4
.travis.yml Normal file → Executable file
View File

@@ -17,9 +17,7 @@ before_script:
- curl -s http://getcomposer.org/installer | php
- cp app/config/production/database.example.php app/config/database.php
- cp app/config/production/mail.example.php app/config/mail.php
- php composer.phar self-update
- php composer.phar validate
- php composer.phar install --prefer-source --no-interaction --dev
- composer install --prefer-source --no-interaction --no-dev
- php artisan key:generate
- php artisan migrate:install
- php artisan migrate --package cartalyst/sentry

142
CHANGELOG.md Normal file → Executable file
View File

@@ -1,13 +1,70 @@
### v0.3.9-alpha - Released Jul 03, 2014 04:08:38
### v1.1 - Released Nov 06, 2014 02:16:26
* <a href="http://github.com/snipe/snipe-it/commit/fafd03f00f49cb9ffe81d50aa9ca3d1f1fa1d043">view</a> &bull; Added DB Prefix to Migrations
* <a href="http://github.com/snipe/snipe-it/commit/309772e67d62989f1f60141a4a10d724a44c6baa">view</a> &bull; Fixed operator for setting bool display
* <a href="http://github.com/snipe/snipe-it/commit/22f81912e416cfe1227a08b5d8b6323e32e1ef36">view</a> &bull; Fixes #299
* <a href="http://github.com/snipe/snipe-it/commit/86b7b6946f1e1bd404127e228c615e4abe0b20fb">view</a> &bull; Fixes #316 - added model name back to view
* <a href="http://github.com/snipe/snipe-it/commit/9e85dcb9fcb4cc932ecddd23caa6b51e83110543">view</a> &bull; Fixes #315 - add EOL as display option in settings (run migrations)
* <a href="http://github.com/snipe/snipe-it/commit/ee35948980c22f9256241c02d7febd90275f6229">view</a> &bull; fix div issues
* <a href="http://github.com/snipe/snipe-it/commit/0022389463e251e73402450cfbc280cb05633bd1">view</a> &bull; Fix dropdown menu position
* <a href="http://github.com/snipe/snipe-it/commit/343798d241172707145ef365445062db9bb6b99a">view</a> &bull; Merge pull request #322 from madd15/fix-js-delete-asset
* <a href="http://github.com/snipe/snipe-it/commit/1078dbf5c5f6a5bec1a2ef864cebfcc7883d31e6">view</a> &bull; Fixes #324
* <a href="http://github.com/snipe/snipe-it/commit/6b2d3efe3e76429c9c2f5de78f04c4f7e2748a3d">view</a> &bull; Fixes #237 - reporting-only group
* <a href="http://github.com/snipe/snipe-it/commit/e04cc806d9209b54a1833172ebb66ab55b5f0c06">view</a> &bull; Fixes #327
### v1.0 - Released Oct 16, 2014 09:46:47
* <a href="http://github.com/snipe/snipe-it/commit/a4b220d6c31c97f6504023f0b52527825a4cd897">view</a> &bull; Fixed #191 - allow admins to assign a user during asset creation
* <a href="http://github.com/snipe/snipe-it/commit/dc1033025a0bc1b2d657e06c89058c3ab95f2c59">view</a> &bull; Fixed #151 - more complete translations
* <a href="http://github.com/snipe/snipe-it/commit/56d619b218794b43d8c6b182c89c75f83af9dcd9">view</a> &bull; Fixed missing language string
* <a href="http://github.com/snipe/snipe-it/commit/69fca5d1eda0e5f26d2085f7eebc08fafd84a3ae">view</a> &bull; Fixed #58
* <a href="http://github.com/snipe/snipe-it/commit/8197e6174e9f12bcfddd94c6bf606ee36e6801bf">view</a> &bull; Fixes #200
* <a href="http://github.com/snipe/snipe-it/commit/cb8369e9de96aaf1cf9108e22f4038fa6486b881">view</a> &bull; 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> &bull; DB migration, layout and clone fixes
* <a href="http://github.com/snipe/snipe-it/commit/9ccc7d756f9361757eafc1dce9684ee9f5ecc1c3">view</a> &bull; 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> &bull; Fixes Travis CI build
* <a href="http://github.com/snipe/snipe-it/commit/363d084bd623f778cd72ca7d385a4fb2f67ef474">view</a> &bull; Fixed DB name in travis CI
* <a href="http://github.com/snipe/snipe-it/commit/49c5607e1c8a82a3111123ad84b537644546ebb3">view</a> &bull; Fixes #222
* <a href="http://github.com/snipe/snipe-it/commit/96e40d72b9ac3f74b94b0e39b6f296f0f0b2a1f4">view</a> &bull; fix typo: artisand -> artisan
* <a href="http://github.com/snipe/snipe-it/commit/e978038cc044f60c2eca71b6319063009a57886f">view</a> &bull; Merge pull request #234 from burlito/typo-fix
* <a href="http://github.com/snipe/snipe-it/commit/a829fcf52f933d087c3776993b42311ec9a8988e">view</a> &bull; fix: Use the old asset tag when cloning
* <a href="http://github.com/snipe/snipe-it/commit/ee7d9bec7082dc2e60a4797dea84a0b7443c8090">view</a> &bull; Fixes #279 - QR checkbox not staying checked
* <a href="http://github.com/snipe/snipe-it/commit/bf1e07555160ede517d41f649d6b1d0911f89dd2">view</a> &bull; 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/ac4c905c42d920d2cf8455d644f4c65332a81d0d">view</a> &bull; Fixed #140
* <a href="http://github.com/snipe/snipe-it/commit/4a13cded607415d749151cef495332c48c58cf86">view</a> &bull; Fixed path for Travis composer
* <a href="http://github.com/snipe/snipe-it/commit/ddf946ad5eb6dd8480eeaa709f82af75e0c61444">view</a> &bull; Tried to fix failing build caused by travis composer
### v0.3.10-alpha - Released Jul 17, 2014 05:54:10
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/89a8f3c277d2482b2cd04c4c5c582c9e507770f8">view</a> &bull; Fixes #183 - added employee number to users
* <a href="http://github.com/snipe/snipe-it/commit/a7b809cb91f49fb2c8eaecc67822fa155a0f20ce">view</a> &bull; Updated title/header for users, additional fixes for #151
* <a href="http://github.com/snipe/snipe-it/commit/5266d9a30a9663fa80ff764b25ff71726e5c4f4c">view</a> &bull; Fixed title tag for user list view
* <a href="http://github.com/snipe/snipe-it/commit/43485e1a51330ef585a65b469d7eb85ae7bde13a">view</a> &bull; Fixed language definition
* <a href="http://github.com/snipe/snipe-it/commit/6b5a552d95ff6f6d5567275b50fcd487fb793820">view</a> &bull; Fixed #186 - Bug with select box not retaining selections on edit screen
* <a href="http://github.com/snipe/snipe-it/commit/90eb883b671919ea360122c2bf44433995a12144">view</a> &bull; Fixed #187 - replaced dummy site name with site name from admin panel preferences
* <a href="http://github.com/snipe/snipe-it/commit/f22f23f21dc11d393854849580f0c1229cec9827">view</a> &bull; Fixed button label on forgotten password page
* <a href="http://github.com/snipe/snipe-it/commit/2b9494ed8271254f8f84e016f238d518e6109842">view</a> &bull; Fixed inconsistent password requirements across admin user creation, user profile and forgotten password
* <a href="http://github.com/snipe/snipe-it/commit/9dc40a3a9c161267fd8c88aacc1fbf536c1ec2de">view</a> &bull; Fixed a few CSS quirks
* <a href="http://github.com/snipe/snipe-it/commit/99003e126a8fd0ad9aaea5a550e0af5e306fc1bb">view</a> &bull; Fixed bug with edit (supplier_id), added requestable field for assets
* <a href="http://github.com/snipe/snipe-it/commit/21251b462308f2d783b83be1a331a0faf0813d16">view</a> &bull; Fixed #190, where depreciation on licenses would not be saved
* <a href="http://github.com/snipe/snipe-it/commit/89000440f344f766a31adc69718d7f66df235abf">view</a> &bull; Added admin ability to unsuspend locked accounts #changelog
* <a href="http://github.com/snipe/snipe-it/commit/e203fc516fadf6218f5ce87c070d0cdba9fca188">view</a> &bull; Fixes #194
### v0.3.9-alpha - Released Jul 03, 2014 02:08:38
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/2825bcb4310899e89ccbc73dfa8b59ade28018da">view</a> &bull; Fixed #179 - account page to show assets checked out to the logged in user
* <a href="http://github.com/snipe/snipe-it/commit/c782f29f5aae752a6246be9778d418df172dd4f6">view</a> &bull; Pulled account sub-nav into top menu to free up UI space. #changelog
* <a href="http://github.com/snipe/snipe-it/commit/fad2ec66fa9abe0b34baf16cce453a7e9fc9e4d4">view</a> &bull; More README fixes and refinement
### v0.3.8-alpha - Released Jun 27, 2014 11:28:22
### v0.3.8-alpha - Released Jun 27, 2014 09:28:22
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/3e7a9e45d1954531bbc3b73f2ed59dd16d59c657">view</a> &bull; Fixes PR #168 and #167
* <a href="http://github.com/snipe/snipe-it/commit/945cb3253f1349e30aafa4e7cb57bb507a2ea0cc">view</a> &bull; Fix #117
@@ -20,17 +77,17 @@
* <a href="http://github.com/snipe/snipe-it/commit/ec9eab81bfb3b35bfe7ad06008b26f19009e6638">view</a> &bull; Closes #177 - change log file added, needs refining
### v.0.3.5-alpha - Released Jun 20, 2014 04:23:09
### v.0.3.5-alpha - Released Jun 20, 2014 02:23:09
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/d1499deecdff3c7a4235ffdfad5adbddc1a5098f">view</a> &bull; Provisions for strict mode, fixed license deletion bug
### v.0.3.4-alpha - Released Jun 20, 2014 12:27:59
### v.0.3.4-alpha - Released Jun 19, 2014 10:27:59
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/08d05b481f6366ad48fcdce72a8df53755f5dee8">view</a> &bull; Fixes #158
### v.0.3.3-alpha - Released Jun 18, 2014 10:04:46
### v.0.3.3-alpha - Released Jun 18, 2014 08:04:46
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/3518ab9f55f7992d6d4f886389d67b062a02f2d8">view</a> &bull; Fixes #139
* <a href="http://github.com/snipe/snipe-it/commit/ad9b1fc446ab15157502fe7c52ddbda455e3ea8f">view</a> &bull; Fixes #139
@@ -42,12 +99,12 @@
* <a href="http://github.com/snipe/snipe-it/commit/610c405aa50118163ad5d26d43e4bf6c2456f624">view</a> &bull; More fixes for #151
### v.0.3.2-alpha - Released May 06, 2014 10:26:21
### v.0.3.2-alpha - Released May 06, 2014 08:26:21
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/f4c5da57d0397877d90aa398267e59fcffee7b47">view</a> &bull; Fixed auth error when user isn't logged in
### v.0.3.1-alpha - Released May 06, 2014 06:48:09
### v.0.3.1-alpha - Released May 06, 2014 04:48:09
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/efad5db082d1461ea26556fad2f1671a49dc1480">view</a> &bull; Fix for broken datatables in upgrading to v2.2
* <a href="http://github.com/snipe/snipe-it/commit/5690e9ce1f178486179ce6cdfb00ca417acd87dd">view</a> &bull; Fixed code indentation for Apache virtualhost example
@@ -55,7 +112,7 @@
* <a href="http://github.com/snipe/snipe-it/commit/06067fc19c0127fdcbb78541e7cdc8e77f5444ac">view</a> &bull; Fixed CSV rexport
### v0.3.0-alpha - Released Jan 29, 2014 02:28:31
### v0.3.0-alpha - Released Jan 29, 2014 01:28:31
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/d91d75abe4df19dd6cd54705ba9967295973ced0">view</a> &bull; Fixing JSON parse errors from #97
* <a href="http://github.com/snipe/snipe-it/commit/baab758377e117a86c3273dd1d6e03e66b02dc8b">view</a> &bull; Fixed language support
@@ -82,7 +139,7 @@
* <a href="http://github.com/snipe/snipe-it/commit/580590b4c0b4a2f76ef8edfe02de986267fc7395">view</a> &bull; Fixed === to == (PHP is loosely typed)
### v0.2.0-alpha - Released Nov 29, 2013 11:09:07
### v0.2.0-alpha - Released Nov 29, 2013 10:09:07
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/06cbd0723e415d81ea12aa48f2c37188741b2dbc">view</a> &bull; Fixes #93
* <a href="http://github.com/snipe/snipe-it/commit/e305099b45401c871f16fec23c200080830fcd5d">view</a> &bull; Fixed model view
@@ -92,7 +149,7 @@
* <a href="http://github.com/snipe/snipe-it/commit/11c657ffa4c3bdd01cd04b81d01980b2d795107c">view</a> &bull; Fixes #36
### v0.1.2-alpha - Released Nov 29, 2013 02:59:05
### v0.1.2-alpha - Released Nov 29, 2013 01:59:05
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/b1aa67ddb72158513f0a706996c8c1f5b3609aa5">view</a> &bull; Fixes #69
* <a href="http://github.com/snipe/snipe-it/commit/aa38d83ba6369215451d905e599492214e9f4b8b">view</a> &bull; Fixes #63 and #70
@@ -105,12 +162,75 @@
* <a href="http://github.com/snipe/snipe-it/commit/d9a37f38228d55bb6265efc626e3ab7919013362">view</a> &bull; Fixes #88
* <a href="http://github.com/snipe/snipe-it/commit/5858bfb99b2144fbc805ec62cc90e6aaaf019f77">view</a> &bull; Fixed language file paths caused by #88
* <a href="http://github.com/snipe/snipe-it/commit/9f7cbc8a4f01ddf2596e831f658c9a8c321b2f46">view</a> &bull; Another fix related to #88, also accounts for users with invalid location_ids
* <a href="http://github.com/snipe/snipe-it/commit/1b56c31a22afd39a875677714b9c07e96876b8df">view</a> &bull; Fixed relationship between users/locations because fuck you ORM
* <a href="http://github.com/snipe/snipe-it/commit/f0f07b578b2439a627e5e946df0849d88d8526cf">view</a> &bull; Fixing pivot for users
* <a href="http://github.com/snipe/snipe-it/commit/9fa826b2e77ce22d25a8b3094bc825802d25be85">view</a> &bull; Fixed assigned to id
* <a href="http://github.com/snipe/snipe-it/commit/839d01a3af08d780be4152bc02b33bff1a7d7f20">view</a> &bull; Fixed relationship method because fuck you ORM
### v0.1.1-alpha - Released Nov 27, 2013 12:11:00
### v0.1.1-alpha - Released Nov 26, 2013 11:11:00
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/1527b88fd671a20c879c9b2061ae95f3b386ba27">view</a> &bull; Fixes #61
* <a href="http://github.com/snipe/snipe-it/commit/4c0af1eae1031c2630f6e29cc73f8a9dfac1081c">view</a> &bull; Fixed typo causing failure with mysql strict
* <a href="http://github.com/snipe/snipe-it/commit/0e3bcfecd05a39bfea6fc7ba11cb24d9d49e6d86">view</a> &bull; Should be final fixes for mysql strict mode
### Initial alpha - Released Nov 26, 2013 09:01:13
#### This is a pre-release
* <a href="http://github.com/snipe/snipe-it/commit/14972f894bb0e761e2d0170a2c93c9aac4edfca6">view</a> &bull; fixed typo
* <a href="http://github.com/snipe/snipe-it/commit/79da13dff767d57f6f4fbb12f195e25f409ee5ec">view</a> &bull; Fixed layout for category view
* <a href="http://github.com/snipe/snipe-it/commit/0e4e26206bdcc164e5df586368ed45edd45b9a74">view</a> &bull; fixed broken redirect route
* <a href="http://github.com/snipe/snipe-it/commit/9364c46c2df79c0de07dc5dbb724a3c44485b739">view</a> &bull; Fixed licensed link
* <a href="http://github.com/snipe/snipe-it/commit/4f0a1789db01f12ebc4bd47e7e0594bf67b64daf">view</a> &bull; Fixed license blades
* <a href="http://github.com/snipe/snipe-it/commit/27514f85c3ba9056c4609774a482a58605f4d8cf">view</a> &bull; Fixed typo in variable name
* <a href="http://github.com/snipe/snipe-it/commit/ffe786f659e3e8c5b91c27cd33cb77b6d24d3545">view</a> &bull; Fixed routes.
* <a href="http://github.com/snipe/snipe-it/commit/cf59ec8c67e142c0612fb7797448057b19af5cfa">view</a> &bull; Fixed pagination bug
* <a href="http://github.com/snipe/snipe-it/commit/76ac39115347dabac8ada21d981494a3edf7a29c">view</a> &bull; Fixed edit bug where new Category was invoked twice
* <a href="http://github.com/snipe/snipe-it/commit/940281dd4dd0a69b900a052c0bb84e24dde89666">view</a> &bull; Fixed bug on validation display
* <a href="http://github.com/snipe/snipe-it/commit/31d323fb71fcbe94f17f0a2b38183709e8c77151">view</a> &bull; Cosmetic fix on form
* <a href="http://github.com/snipe/snipe-it/commit/8f86ec9dae58cef27387b028f70c8116d649b425">view</a> &bull; Change depreciation to be by month; formatting fixes.
* <a href="http://github.com/snipe/snipe-it/commit/4da2bccbf78a0b630267c6ed75f3a1bd8100e20d">view</a> &bull; Merge pull request #27 from snipe/depreciation_fix
* <a href="http://github.com/snipe/snipe-it/commit/7bc7ffb72813cd176658d536bbdd6be0faa9a45c">view</a> &bull; Fixed some error reporting/required fields around checkout/checkin
* <a href="http://github.com/snipe/snipe-it/commit/48e180c6910d30732559b0cc077fce679344f56e">view</a> &bull; Fixed asset bug caused by unique validation in assets model
* <a href="http://github.com/snipe/snipe-it/commit/57107dceeee81e8618198da33af79fe66bde0d9e">view</a> &bull; Fixed checkin text
* <a href="http://github.com/snipe/snipe-it/commit/7b59f42fb03ee5017c11cf32abc8a23c3f5d2141">view</a> &bull; Fixed pagination bug, styled buttons
* <a href="http://github.com/snipe/snipe-it/commit/ffdb4b1aa8dde9942f7c3b110e9a68006779998b">view</a> &bull; Fixed wonky layout issue
* <a href="http://github.com/snipe/snipe-it/commit/3401fee672d796f4aca8dafced6917c7caf87866">view</a> &bull; Another table fix
* <a href="http://github.com/snipe/snipe-it/commit/ddfd69e5100b19bb05d6b76cb9fad3dbadad1921">view</a> &bull; More table fixes
* <a href="http://github.com/snipe/snipe-it/commit/5c43caf0579a26c1604fc81f5cbdf8f0d43c157d">view</a> &bull; More table fixes
* <a href="http://github.com/snipe/snipe-it/commit/44ba90f9f0a968999a743c35dd2bf153c2edbf1d">view</a> &bull; Fixed icon set to white in main nav
* <a href="http://github.com/snipe/snipe-it/commit/719c36d482cc67f1513351672eda057519f7f735">view</a> &bull; migration to fix a few fields in the log table
* <a href="http://github.com/snipe/snipe-it/commit/5b27a34f050646467a178ff780efc80036aadf1b">view</a> &bull; Fixed fieldname in userlog
* <a href="http://github.com/snipe/snipe-it/commit/76da83cbe1c4334380bb996a40cc374ab4ec12e9">view</a> &bull; Fixed links to edit/checkout
* <a href="http://github.com/snipe/snipe-it/commit/d6a718e99766829e700760c2266b62ad37cdb66b">view</a> &bull; Fixed bug in views for created_at date
* <a href="http://github.com/snipe/snipe-it/commit/0ee08e47e9f2b144084703142ae5eb099090476d">view</a> &bull; Fixed fatal error if admin who created the asset was deleted. (This should never happen, but...)
* <a href="http://github.com/snipe/snipe-it/commit/61cceb5f0b44e7f2a82ccca44be2bc42e8825156">view</a> &bull; Fixed open tag in CSS
* <a href="http://github.com/snipe/snipe-it/commit/c93469c465c0ce8a291d595ac8ccbafbfc68c71a">view</a> &bull; Fixed query for asset/license header boxes
* <a href="http://github.com/snipe/snipe-it/commit/d46556a83d5335913b8b7fe8558f416540290343">view</a> &bull; Fixed phone display if no value set
* <a href="http://github.com/snipe/snipe-it/commit/fc8c3c086ca70a513cd3fff39275fcf035cead5a">view</a> &bull; fixed #37
* <a href="http://github.com/snipe/snipe-it/commit/52020d09f034c9de78b798725c0f3700d0253beb">view</a> &bull; Fixed bomb when asset is unassigned
* <a href="http://github.com/snipe/snipe-it/commit/1b1efec858e8e0cfc5cfafc63bfb537e45191cd1">view</a> &bull; Fixed foreign key in assets
* <a href="http://github.com/snipe/snipe-it/commit/b7251d9992401c04a5da1771af0fcddad2754362">view</a> &bull; Fixed potential bug in blade
* <a href="http://github.com/snipe/snipe-it/commit/9249786a25bc166bf5341f59a11d644cf4f6425c">view</a> &bull; Fixed status display
* <a href="http://github.com/snipe/snipe-it/commit/c32d45e90142b41b567a350af6d399af67994a02">view</a> &bull; Fixed ID
* <a href="http://github.com/snipe/snipe-it/commit/2203789f4c5310599a94799bb3ead9ff9c1ce802">view</a> &bull; Fixes #41
* <a href="http://github.com/snipe/snipe-it/commit/03edbc008c671c868fced94a7761683309d9ab8b">view</a> &bull; Fixes #43
* <a href="http://github.com/snipe/snipe-it/commit/2b088a3fb2ea7711f66e4a887882b17f401ba4bc">view</a> &bull; Fixes #17
* <a href="http://github.com/snipe/snipe-it/commit/ad680a337e50638b4b9865e42e4ea7e453c4151b">view</a> &bull; Fixed column name spelling in DB
* <a href="http://github.com/snipe/snipe-it/commit/718236b2d4bedeaaad80cc601e3e91a3229e81fa">view</a> &bull; Fixed #9
* <a href="http://github.com/snipe/snipe-it/commit/3cc0ed87438b632679ce8b61a7ea0fae48999438">view</a> &bull; Fixed sorting weirdness
* <a href="http://github.com/snipe/snipe-it/commit/57d0f3643518190f0b4a6fe33ac6d83eda647119">view</a> &bull; Fixes #4
* <a href="http://github.com/snipe/snipe-it/commit/3ea0ad87c8733ce1bac0e9c10c2cdaf3254743d5">view</a> &bull; Fixes #22
* <a href="http://github.com/snipe/snipe-it/commit/e87e5b9cae19bfd06b815cf01be309d665409828">view</a> &bull; Fixes #46
* <a href="http://github.com/snipe/snipe-it/commit/7a5b133c5875959c5d7bebf16ea82bac7ceb3989">view</a> &bull; Fixed bug linking to assets when they should be pointing to licenses
* <a href="http://github.com/snipe/snipe-it/commit/e13578d97d6b1ef1990f171beda9b35868fda47c">view</a> &bull; Fixed error when no category is given
* <a href="http://github.com/snipe/snipe-it/commit/45c04b1cdebc0b19243a519d2580af921c82b47b">view</a> &bull; Fixed display bug
* <a href="http://github.com/snipe/snipe-it/commit/4d1dd1c446f76e5530d6fb7f932a77a8da2d0b73">view</a> &bull; Fixed #50 - MOAR VALIDATION!
* <a href="http://github.com/snipe/snipe-it/commit/12958553022d4b7b2184ebf837d4113b23f5cf27">view</a> &bull; Fixes #51
* <a href="http://github.com/snipe/snipe-it/commit/d0cbb9f3a7e4a1fc05ddcabd19e201434c14370b">view</a> &bull; Fixes #52
* <a href="http://github.com/snipe/snipe-it/commit/5bf38b1d02e743af22a51393f1e477100b1f76b7">view</a> &bull; Fixes #50
* <a href="http://github.com/snipe/snipe-it/commit/e6fc1956fc93132d04bf5ac4c0d108c1ae9eee0b">view</a> &bull; Fixes #55
* <a href="http://github.com/snipe/snipe-it/commit/ee3fb2785e719c938b6036f6ea74527c1217aba8">view</a> &bull; Fixed XSS on modal
* <a href="http://github.com/snipe/snipe-it/commit/dc5ad876863a1e17babce06adfb365f38c30ca59">view</a> &bull; Fixes #59
* <a href="http://github.com/snipe/snipe-it/commit/d7a8cac1dc6158983673688c2e48e9a48217b6f2">view</a> &bull; Fixed validation
* <a href="http://github.com/snipe/snipe-it/commit/196710dac807d48f6c73b02c2444a5b8d301b8a6">view</a> &bull; Fixed bug in error validation display

0
LICENSE Normal file → Executable file
View File

21
README.md Normal file → Executable file
View File

@@ -1,4 +1,4 @@
[![Click here to lend your support to: Snipe IT - Free Open Source Asset Management System and make a donation at pledgie.com](https://pledgie.com/campaigns/22899.png?skin_name=chrome)](https://pledgie.com/campaigns/22899) [![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it) [![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready&title=Ready)](http://waffle.io/snipe/snipe-it) [![ProjectStatus](http://stillmaintained.com/snipe/snipe-it.png)](http://stillmaintained.com/snipe/snipe-it)
[![Click here to lend your support to: Snipe IT - Free Open Source Asset Management System and make a donation at pledgie.com](https://pledgie.com/campaigns/22899.png?skin_name=chrome)](https://pledgie.com/campaigns/22899) [![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it) [![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready&title=Ready)](http://waffle.io/snipe/snipe-it) [![ProjectStatus](http://stillmaintained.com/snipe/snipe-it.png)](http://stillmaintained.com/snipe/snipe-it) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.png)](https://crowdin.com/project/snipe-it)
## Snipe-IT - Asset Management For the Rest of Us
@@ -7,7 +7,7 @@ This is a FOSS project for asset management in IT Operations. Knowing who has wh
It is built on [Laravel 4.1](http://laravel.com) and uses the [Sentry 2](https://github.com/cartalyst/sentry) package.
This project is being actively developed (at what seems like breakneck speed sometimes!) We're still in alpha release, so this is NOT recommended for production use yet, as many more things will likely change before v1.0-stable is ready - but we're [releasing quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](http://snipeitapp.com/demo.php).)
This project is being actively developed and we're [releasing quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](http://snipeitapp.com/demo.php).)
__This is web-based software__. This means there there is no executable file (aka no .exe files), and it must be run on a web server and accessed through a web browser. It runs on any Mac OSX, flavor of Linux, as well as Windows.
@@ -16,10 +16,10 @@ __This is web-based software__. This means there there is no executable file (ak
__Installation and configuration documentation for this project has been moved to http://docs.snipeitapp.com.__ This provides a more easily navigated, organized view of the documentation, and is based off of the [documentation branch](https://github.com/snipe/snipe-it/tree/documentation) in this repo. Contributions and bugfixes to the documentation are always welcome!
[![Build Status](https://www.gitbook.io/button/status/book/snipe/snipe-it-manual)](https://www.gitbook.io/book/snipe/snipe-it-manual/activity)
We'll be adding a long-overdue user's manual soon as well.
__To deploy on Ubuntu using Ansible and Vagrant, be sure to check out the [Snipe-IT Installation scripts](https://github.com/GR360RY/snipeit-ansible) created by [@GR360RY](https://github.com/GR360RY/).__
-----
### Bug Reports & Feature Requests
@@ -34,11 +34,24 @@ We use Waffle.io to help better communicate our roadmap with users. Our [project
To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.
### Translations!
If you're not a coder but want to give back to the project and you're fluent in other languages, consider helping out with the translations. We use [CrowdIn](https://crowdin.com) to manage translations, and it makes it super-simple for you to add translations to the project without messing with code. Check out [the Snipe-IT CrowdIn translation project here](https://crowdin.com/project/snipe-it/).
We currently have English, Chinese, Finnish, Malay, Romanian and Spanish completed, and are looking for lots more!
-----
## Requirements
- PHP 5.4 or later
- MCrypt PHP Extension
- Fileinfo Extension
And _one_ of the following image libraries (for QR codes, asset model image and user avatar image uploads).
- GD Library (>=2.0) … or …
- Imagick PHP extension (>=6.3.8)
-----

View File

@@ -223,7 +223,8 @@ class AppCommand extends Command
'name' => 'Admin',
'permissions' => array(
'admin' => 1,
'users' => 1
'users' => 1,
'reports' => 1
)
));
@@ -242,7 +243,8 @@ class AppCommand extends Command
'name' => 'Reporting',
'permissions' => array(
'admin' => 0,
'users' => 1
'users' => 1,
'reports' => 1,
)
));
@@ -260,7 +262,8 @@ class AppCommand extends Command
'name' => 'Users',
'permissions' => array(
'admin' => 0,
'users' => 1
'users' => 1,
'reports' => 0,
)
));

View File

@@ -67,7 +67,6 @@ return array(
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
'Barryvdh\Debugbar\ServiceProvider',
'Cartalyst\Sentry\SentryServiceProvider',
'Chumper\Datatable\DatatableServiceProvider',
@@ -118,6 +117,7 @@ return array(
'Form' => 'Illuminate\Support\Facades\Form',
'Hash' => 'Illuminate\Support\Facades\Hash',
'HTML' => 'Illuminate\Support\Facades\HTML',
'Image' => 'Intervention\Image\ImageManagerStatic',
'Input' => 'Illuminate\Support\Facades\Input',
'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log',

0
app/config/local/.gitignore vendored Normal file → Executable file
View File

2
app/config/local/app.example.php Normal file → Executable file
View File

@@ -37,7 +37,7 @@ return array(
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisand key:generate --env=staging to create a random one
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => 'Change_this_key_or_snipe_will_get_ya',

View File

@@ -0,0 +1,146 @@
<?php
use Illuminate\Support\Facades\Config;
return array(
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
|
*/
'enabled' => Config::get('app.debug'),
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests in a directory.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
|
*/
'storage' => array(
'enabled' => true,
'path' => storage_path() . '/debugbar',
),
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
*/
'capture_ajax' => true,
/*
|--------------------------------------------------------------------------
| Capture Console Commands
|--------------------------------------------------------------------------
|
| The Debugbar can listen to Artisan commands. You can view them with the browse button in the Debugbar.
|
*/
'capture_console' => false,
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
'collectors' => array(
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'auth' => false, // Display Laravel authentication status
),
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
'options' => array(
'auth' => array(
'show_name' => false, // Also show the users name/email in the debugbar
),
'db' => array(
'with_params' => true, // Render SQL with the parameters substituted
'timeline' => false, // Add the queries to the timeline
),
'mail' => array(
'full_log' => false
),
'views' => array(
'data' => false, //Note: Can slow down the application, because the data can be quite large..
),
'route' => array(
'label' => true // show complete route on bar
),
'logs' => array(
'file' => null
),
),
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before <body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
'inject' => true,
);

View File

@@ -20,159 +20,203 @@
return array(
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This drivers manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "eloquent" (more coming soon).
|
*/
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This drivers manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "eloquent" (more coming soon).
|
*/
'driver' => 'eloquent',
'driver' => 'eloquent',
/*
|--------------------------------------------------------------------------
| Default Hasher
|--------------------------------------------------------------------------
|
| This option allows you to specify the default hasher used by Sentry
|
| Supported: "native", "bcrypt", "sha256"
|
*/
/*
|--------------------------------------------------------------------------
| Default Hasher
|--------------------------------------------------------------------------
|
| This option allows you to specify the default hasher used by Sentry
|
| Supported: "native", "bcrypt", "sha256", "whirlpool"
|
*/
'hasher' => 'native',
'hasher' => 'native',
/*
|--------------------------------------------------------------------------
| Groups
|--------------------------------------------------------------------------
|
| Configuration specific to the group management component of Sentry.
|
*/
'groups' => array(
/*
|--------------------------------------------------------------------------
| Cookie
|--------------------------------------------------------------------------
|
| Configuration specific to the cookie component of Sentry.
|
*/
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
'cookie' => array(
'model' => 'Cartalyst\Sentry\Groups\Eloquent\Group',
/*
|--------------------------------------------------------------------------
| Default Cookie Key
|--------------------------------------------------------------------------
|
| This option allows you to specify the default cookie key used by Sentry.
|
| Supported: string
|
*/
),
'key' => 'cartalyst_sentry',
/*
|--------------------------------------------------------------------------
| Users
|--------------------------------------------------------------------------
|
| Configuration specific to the user management component of Sentry.
|
*/
'users' => array(
),
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
/*
|--------------------------------------------------------------------------
| Groups
|--------------------------------------------------------------------------
|
| Configuration specific to the group management component of Sentry.
|
*/
'model' => 'User',
'groups' => array(
/*
|--------------------------------------------------------------------------
| Login Attribute
|--------------------------------------------------------------------------
|
| If you're the "eloquent" driver and extending the base Eloquent model,
| we allow you to globally override the login attribute without even
| subclassing the model, simply by specifying the attribute below.
|
*/
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
'login_attribute' => 'email',
'model' => 'Cartalyst\Sentry\Groups\Eloquent\Group',
),
),
/*
|--------------------------------------------------------------------------
| Throttling
|--------------------------------------------------------------------------
|
| Throttling is an optional security feature for authentication, which
| enables limiting of login attempts and the suspension & banning of users.
|
*/
'throttling' => array(
/*
|--------------------------------------------------------------------------
| Users
|--------------------------------------------------------------------------
|
| Configuration specific to the user management component of Sentry.
|
*/
/*
|--------------------------------------------------------------------------
| Throttling
|--------------------------------------------------------------------------
|
| Enable throttling or not. Throttling is where users are only allowed a
| certain number of login attempts before they are suspended. Suspension
| must be removed before a new login attempt is allowed.
|
*/
'users' => array(
'enabled' => true,
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
//'model' => 'Cartalyst\Sentry\Users\Eloquent\User',
'model' => 'User',
'model' => 'Cartalyst\Sentry\Throttling\Eloquent\Throttle',
/*
|--------------------------------------------------------------------------
| Login Attribute
|--------------------------------------------------------------------------
|
| If you're using the "eloquent" driver and extending the base Eloquent
| model, we allow you to globally override the login attribute without
| even subclassing the model, simply by specifying the attribute below.
|
*/
/*
|--------------------------------------------------------------------------
| Attempts Limit
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver and extending the base Eloquent model,
| you have the option to globally set the login attempts.
|
| Supported: int
|
*/
'login_attribute' => 'email',
'attempt_limit' => 5,
),
/*
|--------------------------------------------------------------------------
| Suspension Time
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver and extending the base Eloquent model,
| you have the option to globally set the suspension time, in minutes.
|
| Supported: int
|
*/
/*
|--------------------------------------------------------------------------
| User Groups Pivot Table
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, you can specify the table name
| for the user groups pivot table.
|
| Default: users_groups
|
*/
'suspension_time' => 15,
'user_groups_pivot_table' => 'users_groups',
),
/*
|--------------------------------------------------------------------------
| Throttling
|--------------------------------------------------------------------------
|
| Throttling is an optional security feature for authentication, which
| enables limiting of login attempts and the suspension & banning of users.
|
*/
'throttling' => array(
/*
|--------------------------------------------------------------------------
| Throttling
|--------------------------------------------------------------------------
|
| Enable throttling or not. Throttling is where users are only allowed a
| certain number of login attempts before they are suspended. Suspension
| must be removed before a new login attempt is allowed.
|
*/
'enabled' => true,
/*
|--------------------------------------------------------------------------
| Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver, we need to know which
| Eloquent models should be used throughout Sentry.
|
*/
'model' => 'Cartalyst\Sentry\Throttling\Eloquent\Throttle',
/*
|--------------------------------------------------------------------------
| Attempts Limit
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver and extending the base Eloquent model,
| you have the option to globally set the login attempts.
|
| Supported: int
|
*/
'attempt_limit' => 5,
/*
|--------------------------------------------------------------------------
| Suspension Time
|--------------------------------------------------------------------------
|
| When using the "eloquent" driver and extending the base Eloquent model,
| you have the option to globally set the suspension time, in minutes.
|
| Supported: int
|
*/
'suspension_time' => 15,
),
);

View File

@@ -16,4 +16,12 @@ return array(
),
),
'Reporting' => array(
array(
'permission' => 'reports',
'label' => 'View Reports',
),
),
);

0
app/config/production/.gitignore vendored Normal file → Executable file
View File

6
app/config/production/app.example.php Normal file → Executable file
View File

@@ -13,7 +13,7 @@ return array(
|
*/
'debug' => false,
'debug' => true,
/*
|--------------------------------------------------------------------------
@@ -26,7 +26,7 @@ return array(
|
*/
'url' => 'http://www.yourserver.com',
'url' => 'http://staging.yourserver.com',
/*
|--------------------------------------------------------------------------
@@ -37,7 +37,7 @@ return array(
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisand key:generate --env=staging to create a random one
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => 'Change_this_key_or_snipe_will_get_ya',

0
app/config/remote.php Normal file → Executable file
View File

0
app/config/staging/.gitignore vendored Normal file → Executable file
View File

2
app/config/staging/app.example.php Normal file → Executable file
View File

@@ -37,7 +37,7 @@ return array(
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisand key:generate --env=staging to create a random one
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => 'Change_this_key_or_snipe_will_get_ya',

2
app/config/testing/app.example.php Normal file → Executable file
View File

@@ -37,7 +37,7 @@ return array(
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisand key:generate --env=staging to create a random one
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => 'Change_this_key_or_snipe_will_get_ya',

View File

@@ -7,10 +7,13 @@ class AdminController extends AuthorizedController
*
* @return void
*/
public function __construct()
{
// These have been moved into the routes for more granular control
// Apply the admin auth filter
$this->beforeFilter('admin-auth');
//$this->beforeFilter('admin-auth', array('except' => $this->whitelist));
}

View File

@@ -32,8 +32,8 @@ class ChangePasswordController extends AuthorizedController
{
// Declare the rules for the form validation
$rules = array(
'old_password' => 'required|between:3,32',
'password' => 'required|between:10,32',
'old_password' => 'required|min:6',
'password' => 'required|min:6',
'password_confirm' => 'required|same:password',
);

View File

@@ -1,6 +1,7 @@
<?php namespace Controllers\Account;
use AuthorizedController;
use Image;
use Input;
use Redirect;
use Sentry;
@@ -37,10 +38,10 @@ class ProfileController extends AuthorizedController
{
// Declare the rules for the form validation
$rules = array(
'first_name' => 'required|min:3',
'last_name' => 'required|min:3',
'first_name' => 'required|alpha_space|min:2',
'last_name' => 'required|alpha_space|min:2',
'location_id' => 'required',
'website' => 'url',
'website' => 'url|alpha_space|min:10',
'gravatar' => 'email',
);
@@ -62,6 +63,19 @@ 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();
$path = public_path('uploads/avatars/'.$file_name);
Image::make($image->getRealPath())->resize(84, 84)->save($path);
$user->avatar = $file_name;
}
if (Input::get('avatar_delete') == 1 && Input::file('avatar') == "") {
$user->avatar = NULL;
}
$user->save();
// Redirect to the settings page

0
app/controllers/account/ViewAssetsController.php Normal file → Executable file
View File

261
app/controllers/admin/AssetsController.php Normal file → Executable file
View File

@@ -40,15 +40,36 @@ class AssetsController extends AdminController
// Filter results
if (Input::get('Pending')) {
$assets = Asset::orderBy('asset_tag', 'ASC')->whereNull('status_id','and')->where('assigned_to','=','0')->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
->whereNull('status_id','and')
->where('assigned_to','=','0')
->where('physical', '=', 1)
->get();
} elseif (Input::get('RTD')) {
$assets = Asset::orderBy('asset_tag', 'ASC')->where('status_id', '=', 0)->where('assigned_to','=','0')->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
->where('status_id', '=', 0)
->where('assigned_to', '=', '0')
->where('physical', '=', 1)
->orderBy('asset_tag', 'ASC')
->get();
} elseif (Input::get('Undeployable')) {
$assets = Asset::orderBy('asset_tag', 'ASC')->where('status_id', '>', 1)->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
->where('status_id', '>', 1)
->where('physical', '=', 1)
->orderBy('asset_tag', 'ASC')
->get();
} elseif (Input::get('Deployed')) {
$assets = Asset::orderBy('asset_tag', 'ASC')->where('status_id', '=', 0)->where('assigned_to','>','0')->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
->where('status_id', '=', 0)
->where('physical', '=', 1)
->where('assigned_to','>','0')
->orderBy('asset_tag', 'ASC')
->get();
} else {
$assets = Asset::orderBy('asset_tag', 'ASC')->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc')
->where('physical', '=', 1)
->orderBy('asset_tag', 'ASC')
->get();
}
// Paginate the users
@@ -64,102 +85,49 @@ class AssetsController extends AdminController
return View::make('backend/hardware/index', compact('assets'));
}
public function getReports()
{
// Grab all the assets
$assets = Asset::orderBy('created_at', 'DESC')->get();
return View::make('backend/reports/index', compact('assets'));
}
public function exportReports()
{
// @todo - It may be worthwhile creating a separate controller for reporting
// Grab all the assets
$assets = Asset::orderBy('created_at', 'DESC')->get();
$rows = array();
// Create the header row
$header = array(
Lang::get('admin/hardware/table.asset_tag'),
Lang::get('admin/hardware/table.title'),
Lang::get('admin/hardware/table.serial'),
Lang::get('admin/hardware/table.checkoutto'),
Lang::get('admin/hardware/table.location'),
Lang::get('admin/hardware/table.purchase_date'),
Lang::get('admin/hardware/table.purchase_cost'),
Lang::get('admin/hardware/table.book_value'),
Lang::get('admin/hardware/table.diff')
);
$header = array_map('trim', $header);
$rows[] = implode($header, ',');
// Create a row per asset
foreach ($assets as $asset) {
$row = array();
$row[] = $asset->asset_tag;
$row[] = $asset->name;
$row[] = $asset->serial;
if ($asset->assigned_to > 0) {
$user = User::find($asset->assigned_to);
$row[] = $user->fullName();
} else {
$row[] = ''; // Empty string if unassigned
}
if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {
$location = Location::find($asset->assigneduser->location_id);
if ($location->city) {
$row[] = '"'.$location->city . ', ' . $location->state.'"';
} elseif ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} else {
$row[] = ''; // Empty string if location is not set
}
$depreciation = $asset->depreciate();
$row[] = $asset->purchase_date;
$row[] = '"'.number_format($asset->purchase_cost).'"';
$row[] = '"'.number_format($depreciation).'"';
$row[] = '"'.number_format($asset->purchase_cost - $depreciation).'"';
$rows[] = implode($row, ',');
}
// spit out a csv
$csv = implode($rows, "\n");
$response = Response::make($csv, 200);
$response->header('Content-Type', 'text/csv');
$response->header('Content-disposition', 'attachment;filename=report.csv');
return $response;
}
/**
* Asset create.
*
* @param null $model_id
*
* @return View
*/
public function getCreate()
public function getCreate($model_id = null)
{
// Grab the dropdown list of models
$model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id');
//$model_list = array('' => 'Select a Model') + Model::orderBy('name', 'asc')->lists('name'.' '. 'modelno', 'id');
$model_list = array('' => 'Select a Model') + DB::table('models')
->select(DB::raw('concat(name," / ",modelno) as name, id'))->orderBy('name', 'asc')
->orderBy('modelno', 'asc')
->lists('name', 'id');
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
$assigned_to = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
$location_list = array('' => '') + Location::orderBy('name', 'asc')->lists('name', 'id');
// Grab the dropdown list of status
$statuslabel_list = array('' => Lang::get('general.pending')) + array('0' => Lang::get('general.ready_to_deploy')) + Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
return View::make('backend/hardware/edit')->with('supplier_list',$supplier_list)->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('asset',new Asset);
$view = View::make('backend/hardware/edit');
$view->with('supplier_list',$supplier_list);
$view->with('model_list',$model_list);
$view->with('statuslabel_list',$statuslabel_list);
$view->with('assigned_to',$assigned_to);
$view->with('location_list',$location_list);
$view->with('asset',new Asset);
if (!is_null($model_id)) {
$selected_model = Model::find($model_id);
$view->with('selected_model',$selected_model);
}
return $view;
}
/**
* Asset create form processing.
*
@@ -167,15 +135,19 @@ class AssetsController extends AdminController
*/
public function postCreate()
{
// get the POST data
$new = Input::all();
// create a new model instance
$asset = new Asset();
//attempt to validate
$validator = Validator::make(Input::all(), $asset->validationRules());
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($asset->validate($new)) {
else {
if ( e(Input::get('status_id')) == '') {
$asset->status_id = NULL;
@@ -192,7 +164,7 @@ class AssetsController extends AdminController
if (e(Input::get('purchase_cost')) == '') {
$asset->purchase_cost = NULL;
} else {
$asset->purchase_cost = e(Input::get('purchase_cost'));
$asset->purchase_cost = ParseFloat(e(Input::get('purchase_cost')));
}
if (e(Input::get('purchase_date')) == '') {
@@ -201,6 +173,30 @@ class AssetsController extends AdminController
$asset->purchase_date = e(Input::get('purchase_date'));
}
if (e(Input::get('assigned_to')) == '') {
$asset->assigned_to = 0;
} else {
$asset->assigned_to = e(Input::get('assigned_to'));
}
if (e(Input::get('supplier_id')) == '') {
$asset->supplier_id = 0;
} else {
$asset->supplier_id = e(Input::get('supplier_id'));
}
if (e(Input::get('requestable')) == '') {
$asset->requestable = 0;
} else {
$asset->requestable = e(Input::get('requestable'));
}
if (e(Input::get('rtd_location_id')) == '') {
$asset->rtd_location_id = NULL;
} else {
$asset->rtd_location_id = e(Input::get('rtd_location_id'));
}
// Save the asset data
$asset->name = e(Input::get('name'));
$asset->serial = e(Input::get('serial'));
@@ -208,24 +204,17 @@ class AssetsController extends AdminController
$asset->order_number = e(Input::get('order_number'));
$asset->notes = e(Input::get('notes'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->supplier_id = e(Input::get('supplier_id'));
$asset->user_id = Sentry::getId();
$asset->assigned_to = '0';
$asset->archived = '0';
$asset->physical = '1';
$asset->depreciate = '0';
$asset->requestable = e(Input::get('requestable'));
// Was the asset created?
if($asset->save()) {
// Redirect to the asset listing page
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success'));
}
} else {
// failure
$errors = $asset->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
// Redirect to the asset create page with an error
@@ -248,14 +237,16 @@ class AssetsController extends AdminController
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
// Grab the dropdown list of models
$model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id');
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
$location_list = array('' => '') + Location::orderBy('name', 'asc')->lists('name', 'id');
// Grab the dropdown list of status
$statuslabel_list = array('' => Lang::get('general.pending')) + array('0' => Lang::get('general.ready_to_deploy')) + Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list);
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('supplier_list',$supplier_list)->with('location_list',$location_list)->with('statuslabel_list',$statuslabel_list);
}
@@ -273,27 +264,19 @@ class AssetsController extends AdminController
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
//attempt to validate
$validator = Validator::make(Input::all(), $asset->validationRules($assetId));
// Declare the rules for the form validation
$rules = array(
'name' => 'alpha_space|min:3',
'asset_tag' => 'required|alpha_space|min:3',
'model_id' => 'required',
'serial' => 'alpha_space|min:3',
'warranty_months' => 'integer',
'notes' => 'alpha_space',
);
// Create a new validator instance from our validation rules
$validator = Validator::make(Input::all(), $rules);
// If validation fails, we'll exit the operation now.
if ($validator->fails()) {
// Ooops.. something went wrong
return Redirect::back()->withInput()->withErrors($validator);
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
else {
if ( e(Input::get('status_id')) == '') {
if ( e(Input::get('status_id')) == '' ) {
$asset->status_id = NULL;
} else {
$asset->status_id = e(Input::get('status_id'));
@@ -308,7 +291,7 @@ class AssetsController extends AdminController
if (e(Input::get('purchase_cost')) == '') {
$asset->purchase_cost = NULL;
} else {
$asset->purchase_cost = e(Input::get('purchase_cost'));
$asset->purchase_cost = ParseFloat(e(Input::get('purchase_cost')));
}
if (e(Input::get('purchase_date')) == '') {
@@ -323,22 +306,37 @@ class AssetsController extends AdminController
$asset->supplier_id = e(Input::get('supplier_id'));
}
if (e(Input::get('requestable')) == '') {
$asset->requestable = 0;
} else {
$asset->requestable = e(Input::get('requestable'));
}
if (e(Input::get('rtd_location_id')) == '') {
$asset->rtd_location_id = 0;
} else {
$asset->rtd_location_id = e(Input::get('rtd_location_id'));
}
// Update the asset data
$asset->name = e(Input::get('name'));
$asset->serial = e(Input::get('serial'));
$asset->model_id = e(Input::get('model_id'));
$asset->order_number = e(Input::get('order_number'));
$asset->order_number = e(Input::get('order_number'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->notes = e(Input::get('notes'));
$asset->requestable = e(Input::get('requestable'));
$asset->physical = '1';
// Was the asset updated?
if($asset->save()) {
// Redirect to the new asset page
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.update.success'));
return Redirect::to("hardware/$assetId/view")->with('success', Lang::get('admin/hardware/message.update.success'));
}
else
{
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
}
// Redirect to the asset management page with error
@@ -387,9 +385,8 @@ class AssetsController extends AdminController
}
// Get the dropdown of users and then pass it to the checkout view
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id');
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id');
//print_r($users);
return View::make('backend/hardware/checkout', compact('asset'))->with('users_list',$users_list);
}
@@ -589,7 +586,7 @@ class AssetsController extends AdminController
public function getClone($assetId = null)
{
// Check if the asset exists
if (is_null($asset = Asset::find($assetId))) {
if (is_null($asset_to_clone = Asset::find($assetId))) {
// Redirect to the asset management page
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
}
@@ -600,11 +597,17 @@ class AssetsController extends AdminController
// Grab the dropdown list of status
$statuslabel_list = array('' => 'Pending') + array('0' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
$location_list = array('' => '') + Location::lists('name', 'id');
// get depreciation list
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
$assigned_to = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
$asset = clone $asset_to_clone;
$asset->id = null;
$asset->asset_tag = '';
return View::make('backend/hardware/edit')->with('supplier_list',$supplier_list)->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('assigned_to',$assigned_to)->with('asset',$asset)->with('location_list',$location_list);
return View::make('backend/hardware/clone', compact('asset'))->with('model_list',$model_list)->with('depreciation_list',$depreciation_list)->with('statuslabel_list',$statuslabel_list);
}
}

38
app/controllers/admin/CategoriesController.php Normal file → Executable file
View File

@@ -23,7 +23,7 @@ class CategoriesController extends AdminController
public function getIndex()
{
// Grab all the categories
$categories = Category::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$categories = Category::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/categories/index', compact('categories'));
@@ -50,14 +50,17 @@ class CategoriesController extends AdminController
public function postCreate()
{
// get the POST data
$new = Input::all();
// create a new model instance
$category = new Category();
$validator = Validator::make(Input::all(), $category->rules);
// attempt validation
if ($category->validate($new)) {
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
else{
// Update the category data
$category->name = e(Input::get('name'));
@@ -68,11 +71,7 @@ class CategoriesController extends AdminController
// Redirect to the new category page
return Redirect::to("admin/settings/categories")->with('success', Lang::get('admin/categories/message.create.success'));
}
} else {
// failure
$errors = $category->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the category create page
return Redirect::to('admin/settings/categories/create')->with('error', Lang::get('admin/categories/message.create.error'));
@@ -120,8 +119,17 @@ class CategoriesController extends AdminController
// get the POST data
$new = Input::all();
// attempt validation
$validator = Validator::make(Input::all(), $category->validationRules($categoryId));
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($category->validate($new)) {
else {
// Update the category data
$category->name = e(Input::get('name'));
@@ -131,11 +139,7 @@ class CategoriesController extends AdminController
// Redirect to the new category page
return Redirect::to("admin/settings/categories")->with('success', Lang::get('admin/categories/message.update.success'));
}
} else {
// failure
$errors = $category->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the category management page
return Redirect::to("admin/settings/categories/$categoryID/edit")->with('error', Lang::get('admin/categories/message.update.error'));

25
app/controllers/admin/DepreciationsController.php Normal file → Executable file
View File

@@ -23,7 +23,7 @@ class DepreciationsController extends AdminController
public function getIndex()
{
// Grab all the depreciations
$depreciations = Depreciation::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$depreciations = Depreciation::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/depreciations/index', compact('depreciations'));
@@ -118,27 +118,26 @@ class DepreciationsController extends AdminController
}
//attempt to validate
$validator = Validator::make(Input::all(), $depreciation->validationRules($depreciationId));
// get the POST data
$new = Input::all();
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($depreciation->validate($new)) {
else {
// Depreciation data
$depreciation->name = e(Input::get('name'));
$depreciation->name = e(Input::get('name'));
$depreciation->months = e(Input::get('months'));
// Was the asset created?
if($depreciation->save()) {
// Redirect to the depreciation page
return Redirect::to("admin/settings/depreciations/$depreciationId/edit")->with('success', Lang::get('admin/depreciations/message.update.success'));
return Redirect::to("admin/settings/depreciations/")->with('success', Lang::get('admin/depreciations/message.update.success'));
}
} else {
// failure
$errors = $depreciation->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the depreciation management page
return Redirect::to("admin/settings/depreciations/$depreciationId/edit")->with('error', Lang::get('admin/depreciations/message.update.error'));

226
app/controllers/admin/LicensesController.php Normal file → Executable file
View File

@@ -1,5 +1,6 @@
<?php namespace Controllers\Admin;
use Assets;
use AdminController;
use Input;
use Lang;
@@ -14,9 +15,11 @@ use Depreciation;
use Setting;
use Sentry;
use Str;
use Supplier;
use Validator;
use View;
class LicensesController extends AdminController
{
/**
@@ -25,10 +28,13 @@ class LicensesController extends AdminController
* @return View
*/
public function getIndex()
{
// Grab all the licenses
$licenses = License::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$licenses = License::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/licenses/index', compact('licenses'));
@@ -46,7 +52,14 @@ class LicensesController extends AdminController
$license_options = array('0' => 'Top Level') + License::lists('name', 'id');
// Show the page
$depreciation_list = array('0' => Lang::get('admin/licenses/form.no_depreciation')) + Depreciation::lists('name', 'id');
return View::make('backend/licenses/edit')->with('license_options',$license_options)->with('depreciation_list',$depreciation_list)->with('license',new License);
$supplier_list = array('' => 'Select Supplier') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
return View::make('backend/licenses/edit')
->with('license_options',$license_options)
->with('depreciation_list',$depreciation_list)
->with('supplier_list',$supplier_list)
->with('maintained_list',$maintained_list)
->with('license',new License);
}
@@ -68,23 +81,43 @@ class LicensesController extends AdminController
// attempt validation
if ($license->validate($new)) {
if ( e(Input::get('purchase_cost')) == '') {
$license->purchase_cost = NULL;
} else {
$license->purchase_cost = ParseFloat(e(Input::get('purchase_cost')));
//$license->purchase_cost = e(Input::get('purchase_cost'));
}
if ( e(Input::get('supplier_id')) == '') {
$license->supplier_id = NULL;
} else {
$license->supplier_id = e(Input::get('supplier_id'));
}
// Save the license data
$license->name = e(Input::get('name'));
$license->serial = e(Input::get('serial'));
$license->license_email = e(Input::get('license_email'));
$license->license_name = e(Input::get('license_name'));
$license->notes = e(Input::get('notes'));
$license->order_number = e(Input::get('order_number'));
$license->seats = e(Input::get('seats'));
$license->purchase_date = e(Input::get('purchase_date'));
$license->purchase_cost = e(Input::get('purchase_cost'));
$license->depreciation_id = e(Input::get('depreciation_id'));
$license->user_id = Sentry::getId();
$license->name = e(Input::get('name'));
$license->serial = e(Input::get('serial'));
$license->license_email = e(Input::get('license_email'));
$license->license_name = e(Input::get('license_name'));
$license->notes = e(Input::get('notes'));
$license->order_number = e(Input::get('order_number'));
$license->seats = e(Input::get('seats'));
$license->purchase_date = e(Input::get('purchase_date'));
$license->purchase_order = e(Input::get('purchase_order'));
//$license->purchase_cost = e(Input::get('purchase_cost'));
$license->depreciation_id = e(Input::get('depreciation_id'));
$license->expiration_date = e(Input::get('expiration_date'));
//$license->asset_id = e(Input::get('asset_id'));
$license->user_id = Sentry::getId();
if (($license->purchase_date == "") || ($license->purchase_date == "0000-00-00")) {
$license->purchase_date = NULL;
}
if (($license->expiration_date == "") || ($license->expiration_date == "0000-00-00")) {
$license->expiration_date = NULL;
}
if (($license->purchase_cost == "") || ($license->purchase_cost == "0.00")) {
$license->purchase_cost = NULL;
}
@@ -95,10 +128,10 @@ class LicensesController extends AdminController
// Save the license seat data
for ($x=0; $x<$license->seats; $x++) {
$license_seat = new LicenseSeat();
$license_seat->license_id = $insertedId;
$license_seat->user_id = Sentry::getId();
$license_seat->assigned_to = 0;
$license_seat->notes = NULL;
$license_seat->license_id = $insertedId;
$license_seat->user_id = Sentry::getId();
$license_seat->assigned_to = 0;
$license_seat->notes = NULL;
$license_seat->save();
}
@@ -142,7 +175,13 @@ class LicensesController extends AdminController
// Show the page
$license_options = array('' => 'Top Level') + DB::table('assets')->where('id', '!=', $licenseId)->lists('name', 'id');
$depreciation_list = array('0' => Lang::get('admin/licenses/form.no_depreciation')) + Depreciation::lists('name', 'id');
return View::make('backend/licenses/edit', compact('license'))->with('license_options',$license_options)->with('depreciation_list',$depreciation_list);
$supplier_list = array('' => 'Select Supplier') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
return View::make('backend/licenses/edit', compact('license'))
->with('license_options',$license_options)
->with('depreciation_list',$depreciation_list)
->with('supplier_list',$supplier_list)
->with('maintained_list',$maintained_list);
}
@@ -170,13 +209,21 @@ class LicensesController extends AdminController
if ($license->validate($new)) {
// Update the license data
$license->name = e(Input::get('name'));
$license->serial = e(Input::get('serial'));
$license->license_email = e(Input::get('license_email'));
$license->license_name = e(Input::get('license_name'));
$license->notes = e(Input::get('notes'));
$license->order_number = e(Input::get('order_number'));
$license->depreciation_id = e(Input::get('depreciation_id'));
$license->name = e(Input::get('name'));
$license->serial = e(Input::get('serial'));
$license->license_email = e(Input::get('license_email'));
$license->license_name = e(Input::get('license_name'));
$license->notes = e(Input::get('notes'));
$license->order_number = e(Input::get('order_number'));
$license->depreciation_id = e(Input::get('depreciation_id'));
$license->purchase_order = e(Input::get('purchase_order'));
$license->maintained = e(Input::get('maintained'));
if ( e(Input::get('supplier_id')) == '') {
$license->supplier_id = NULL;
} else {
$license->supplier_id = e(Input::get('supplier_id'));
}
// Update the asset data
if ( e(Input::get('purchase_date')) == '') {
@@ -185,10 +232,24 @@ class LicensesController extends AdminController
$license->purchase_date = e(Input::get('purchase_date'));
}
if ( e(Input::get('expiration_date')) == '') {
$license->expiration_date = NULL;
} else {
$license->expiration_date = e(Input::get('expiration_date'));
}
// Update the asset data
if ( e(Input::get('termination_date')) == '') {
$license->termination_date = NULL;
} else {
$license->termination_date = e(Input::get('termination_date'));
}
if ( e(Input::get('purchase_cost')) == '') {
$license->purchase_cost = NULL;
} else {
$license->purchase_cost = e(Input::get('purchase_cost'));
$license->purchase_cost = ParseFloat(e(Input::get('purchase_cost')));
//$license->purchase_cost = e(Input::get('purchase_cost'));
}
@@ -229,10 +290,10 @@ class LicensesController extends AdminController
for ($i=1; $i <= $difference; $i++) {
//Create a seat for this license
$license_seat = new LicenseSeat();
$license_seat->license_id = $license->id;
$license_seat->user_id = Sentry::getId();
$license_seat->assigned_to = 0;
$license_seat->notes = NULL;
$license_seat->license_id = $license->id;
$license_seat->user_id = Sentry::getId();
$license_seat->assigned_to = 0;
$license_seat->notes = NULL;
$license_seat->save();
}
@@ -244,7 +305,7 @@ class LicensesController extends AdminController
$logaction->note = abs($difference)." seats";
$log = $logaction->logaction('add seats');
}
$license->seats = e(Input::get('seats'));
$license->seats = e(Input::get('seats'));
}
// Was the asset created?
@@ -312,8 +373,30 @@ class LicensesController extends AdminController
// Get the dropdown of users and then pass it to the checkout view
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
//print_r($users);
return View::make('backend/licenses/checkout', compact('licenseseat'))->with('users_list',$users_list);
// Left join to get a list of assets and some other helpful info
$asset = DB::table('assets')
->leftJoin('users', 'users.id', '=', 'assets.assigned_to')
->select('assets.id', 'name', 'first_name', 'last_name','asset_tag',
DB::raw('concat (first_name," ",last_name) as full_name, assets.id as id'))
->whereNull('assets.deleted_at')
->get();
$asset_array = json_decode(json_encode($asset), true);
$asset_element[''] = 'Please select an asset';
// Build a list out of the data results
for ($x=0; $x<count($asset_array); $x++) {
if ($asset_array[$x]['full_name']!='') {
$full_name = ' ('.$asset_array[$x]['full_name'].')';
} else {
$full_name = ' (Unassigned)';
}
$asset_element[$asset_array[$x]['id']] = $asset_array[$x]['asset_tag'].' - '.$asset_array[$x]['name'].$full_name;
}
return View::make('backend/licenses/checkout', compact('licenseseat'))->with('users_list',$users_list)->with('asset_list',$asset_element);
}
@@ -324,18 +407,16 @@ class LicensesController extends AdminController
**/
public function postCheckout($seatId)
{
// Check if the asset exists
if (is_null($licenseseat = LicenseSeat::find($seatId))) {
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
}
$assigned_to = e(Input::get('assigned_to'));
$asset_id = e(Input::get('asset_id'));
// Declare the rules for the form validation
$rules = array(
'assigned_to' => 'required|integer|min:1',
'note' => 'alpha_space',
'asset_id' => 'required_without:assigned_to',
);
// Create a new validator instance from our validation rules
@@ -347,17 +428,46 @@ class LicensesController extends AdminController
return Redirect::back()->withInput()->withErrors($validator);
}
if ($assigned_to!='') {
// Check if the user exists
if (is_null($assigned_to = User::find($assigned_to))) {
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.user_does_not_exist'));
if (is_null($is_assigned_to = User::find($assigned_to))) {
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.user_does_not_exist'));
}
}
if ($asset_id!='') {
if (is_null($is_asset_id = Asset::find($asset_id))) {
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.asset_does_not_exist'));
}
if (($is_asset_id->assigned_to!=$assigned_to) && ($assigned_to!='')) {
//echo 'asset assigned to: '.$is_asset_id->assigned_to.'<br>license assigned to: '.$assigned_to;
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.owner_doesnt_match_asset'));
}
}
// Check if the asset exists
if (is_null($licenseseat = LicenseSeat::find($seatId))) {
// Redirect to the asset management page with error
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
}
if ( e(Input::get('asset_id')) == '') {
$licenseseat->asset_id = NULL;
} else {
$licenseseat->asset_id = e(Input::get('asset_id'));
}
// Update the asset data
if ( e(Input::get('assigned_to')) == '') {
$licenseseat->assigned_to = NULL;
} else {
$licenseseat->assigned_to = e(Input::get('assigned_to'));
}
@@ -366,8 +476,8 @@ class LicensesController extends AdminController
if($licenseseat->save()) {
$logaction = new Actionlog();
$logaction->asset_id = $licenseseat->license_id;
$logaction->location_id = $assigned_to->location_id;
//$logaction->location_id = $assigned_to->location_id;
$logaction->asset_type = 'software';
$logaction->user_id = Sentry::getUser()->id;
$logaction->note = e(Input::get('note'));
@@ -438,11 +548,12 @@ class LicensesController extends AdminController
$logaction->checkedout_to = $licenseseat->assigned_to;
// Update the asset data
$licenseseat->assigned_to = '0';
$licenseseat->assigned_to = '0';
$licenseseat->asset_id = NULL;
// Was the asset updated?
if($licenseseat->save()) {
$logaction->asset_id = $licenseseat->license_id;
$logaction->asset_id = NULL;
$logaction->location_id = NULL;
$logaction->asset_type = 'software';
$logaction->note = e(Input::get('note'));
@@ -478,5 +589,26 @@ class LicensesController extends AdminController
}
}
public function getClone($licenseId = null)
{
// Check if the license exists
if (is_null($license_to_clone = License::find($licenseId))) {
// Redirect to the blogs management page
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.does_not_exist'));
}
// Show the page
$license_options = array('0' => 'Top Level') + License::lists('name', 'id');
//clone the orig
$license = clone $license_to_clone;
$license->id = null;
$license->serial = null;
// Show the page
$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');
return View::make('backend/licenses/edit')->with('license_options',$license_options)->with('depreciation_list',$depreciation_list)->with('supplier_list',$supplier_list)->with('license',$license);
}
}

24
app/controllers/admin/LocationsController.php Normal file → Executable file
View File

@@ -23,7 +23,7 @@ class LocationsController extends AdminController
public function getIndex()
{
// Grab all the locations
$locations = Location::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$locations = Location::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/locations/index', compact('locations'));
@@ -123,14 +123,16 @@ class LocationsController extends AdminController
return Redirect::to('admin/settings/locations')->with('error', Lang::get('admin/locations/message.does_not_exist'));
}
//attempt to validate
$validator = Validator::make(Input::all(), $location->validationRules($locationId));
// get the POST data
$new = Input::all();
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($location->validate($new)) {
else {
// Update the location data
$location->name = e(Input::get('name'));
@@ -144,13 +146,9 @@ class LocationsController extends AdminController
// Was the asset created?
if($location->save()) {
// Redirect to the saved location page
return Redirect::to("admin/settings/locations/$locationId/edit")->with('success', Lang::get('admin/locations/message.update.success'));
return Redirect::to("admin/settings/locations/")->with('success', Lang::get('admin/locations/message.update.success'));
}
} else {
// failure
$errors = $location->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the location management page
return Redirect::to("admin/settings/locations/$locationId/edit")->with('error', Lang::get('admin/locations/message.update.error'));

20
app/controllers/admin/ManufacturersController.php Normal file → Executable file
View File

@@ -21,7 +21,7 @@ class ManufacturersController extends AdminController
public function getIndex()
{
// Grab all the manufacturers
$manufacturers = Manufacturer::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$manufacturers = Manufacturer::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/manufacturers/index', compact('manufacturers'));
@@ -109,13 +109,15 @@ class ManufacturersController extends AdminController
return Redirect::to('admin/settings/manufacturers')->with('error', Lang::get('admin/manufacturers/message.does_not_exist'));
}
$validator = Validator::make(Input::all(), $manufacturer->validationRules($manufacturerId));
// get the POST data
$new = Input::all();
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($manufacturer->validate($new)) {
else {
// Save the data
$manufacturer->name = e(Input::get('name'));
@@ -124,11 +126,7 @@ class ManufacturersController extends AdminController
// Redirect to the new manufacturer page
return Redirect::to("admin/settings/manufacturers")->with('success', Lang::get('admin/manufacturers/message.update.success'));
}
} else {
// failure
$errors = $manufacturer->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the manufacturer management page
return Redirect::to("admin/settings/manufacturers/$manufacturerId/edit")->with('error', Lang::get('admin/manufacturers/message.update.error'));

101
app/controllers/admin/ModelsController.php Normal file → Executable file
View File

@@ -1,6 +1,7 @@
<?php namespace Controllers\Admin;
use AdminController;
use Image;
use Input;
use Lang;
use Model;
@@ -24,7 +25,7 @@ class ModelsController extends AdminController
public function getIndex()
{
// Grab all the models
$models = Model::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$models = Model::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/models/index', compact('models'));
@@ -66,16 +67,38 @@ class ModelsController extends AdminController
// attempt validation
if ($model->validate($new)) {
if ( e(Input::get('depreciation_id')) == '') {
$model->depreciation_id = 0;
} else {
$model->depreciation_id = e(Input::get('depreciation_id'));
}
if ( e(Input::get('eol')) == '') {
$model->eol = 0;
} else {
$model->eol = e(Input::get('eol'));
}
// Save the model data
$model->name = e(Input::get('name'));
$model->modelno = e(Input::get('modelno'));
$model->depreciation_id = e(Input::get('depreciation_id'));
//$model->depreciation_id = e(Input::get('depreciation_id'));
$model->manufacturer_id = e(Input::get('manufacturer_id'));
$model->category_id = e(Input::get('category_id'));
$model->user_id = Sentry::getId();
$model->eol = e(Input::get('eol'));
//$model->eol = e(Input::get('eol'));
if (Input::file('image')) {
$image = Input::file('image');
$file_name = str_random(25).".".$image->getClientOriginalExtension();
$path = public_path('uploads/models/'.$file_name);
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path);
$model->image = $file_name;
}
// Was it created?
if($model->save()) {
@@ -132,31 +155,56 @@ class ModelsController extends AdminController
return Redirect::to('admin/models')->with('error', Lang::get('admin/models/message.does_not_exist'));
}
// get the POST data
$new = Input::all();
//attempt to validate
$validator = Validator::make(Input::all(), $model->validationRules($modelId));
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($model->validate($new)) {
else {
if ( e(Input::get('depreciation_id')) == '') {
$model->depreciation_id = 0;
} else {
$model->depreciation_id = e(Input::get('depreciation_id'));
}
if ( e(Input::get('eol')) == '') {
$model->eol = 0;
} else {
$model->eol = e(Input::get('eol'));
}
// Update the model data
$model->name = e(Input::get('name'));
$model->modelno = e(Input::get('modelno'));
$model->depreciation_id = e(Input::get('depreciation_id'));
$model->modelno = e(Input::get('modelno'));
$model->manufacturer_id = e(Input::get('manufacturer_id'));
$model->category_id = e(Input::get('category_id'));
$model->eol = e(Input::get('eol'));
if (Input::file('image')) {
$image = Input::file('image');
$file_name = str_random(25).".".$image->getClientOriginalExtension();
$path = public_path('uploads/models/'.$file_name);
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path);
$model->image = $file_name;
}
if (Input::get('image_delete') == 1 && Input::file('image') == "") {
$model->image = NULL;
}
// Was it created?
if($model->save()) {
// Redirect to the new model page
return Redirect::to("hardware/models")->with('success', Lang::get('admin/models/message.update.success'));
}
} else {
// failure
$errors = $model->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the model create page
return Redirect::to("hardware/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error'));
@@ -212,6 +260,31 @@ class ModelsController extends AdminController
}
}
public function getClone($modelId = null)
{
// Check if the model exists
if (is_null($model_to_clone = Model::find($modelId))) {
// Redirect to the model management page
return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.does_not_exist'));
}
$model = clone $model_to_clone;
$model->id = null;
// Show the page
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
$category_list = array('' => '') + DB::table('categories')->whereNull('deleted_at')->lists('name', 'id');
$view = View::make('backend/models/edit');
$view->with('category_list',$category_list);
$view->with('depreciation_list',$depreciation_list);
$view->with('manufacturer_list',$manufacturer_list);
$view->with('model',$model);
$view->with('clone_model',$model_to_clone);
return $view;
}

View File

@@ -0,0 +1,458 @@
<?php namespace Controllers\Admin;
use AdminController;
use Input;
use Lang;
use License;
use Asset;
use User;
use View;
use Location;
use Redirect;
use Response;
class ReportsController extends AdminController
{
/**
* Show Asset Report
*
* @return View
*/
public function getAssetsReport()
{
// Grab all the assets
$assets = Asset::with('model','assigneduser.userLoc','assetstatus','defaultLoc','assetlog','supplier','model.manufacturer')->orderBy('created_at', 'DESC')->get();
return View::make('backend/reports/asset', compact('assets'));
}
/**
* Export Asset Report as CSV
*
* @return file download
*/
public function exportAssetReport()
{
// Grab all the assets
$assets = Asset::orderBy('created_at', 'DESC')->get();
$rows = array();
// Create the header row
$header = array(
Lang::get('admin/hardware/table.asset_tag'),
Lang::get('admin/hardware/form.manufacturer'),
Lang::get('admin/hardware/form.model'),
Lang::get('general.model_no'),
Lang::get('general.name'),
Lang::get('admin/hardware/table.serial'),
Lang::get('admin/hardware/table.purchase_date'),
Lang::get('admin/hardware/table.purchase_cost'),
Lang::get('admin/hardware/form.order'),
Lang::get('admin/hardware/form.supplier'),
Lang::get('admin/hardware/table.checkoutto'),
Lang::get('admin/hardware/table.location'),
Lang::get('general.status')
);
$header = array_map('trim', $header);
$rows[] = implode($header, ',');
// Create a row per asset
foreach ($assets as $asset) {
$row = array();
$row[] = $asset->asset_tag;
if ($asset->model->manufacturer) {
$row[] = $asset->model->manufacturer->name;
} else {
$row[] = '';
}
$row[] = '"'.$asset->model->name.'"';
$row[] = '"'.$asset->model->modelno.'"';
$row[] = $asset->name;
$row[] = $asset->serial;
$row[] = $asset->purchase_date;
$row[] = '"'.number_format($asset->purchase_cost).'"';
if ($asset->order_number) {
$row[] = $asset->order_number;
} else {
$row[] = '';
}
if ($asset->supplier_id) {
$row[] = $asset->supplier->name;
} else {
$row[] = '';
}
if ($asset->assigned_to > 0) {
$user = User::find($asset->assigned_to);
$row[] = $user->fullName();
} else {
$row[] = ''; // Empty string if unassigned
}
if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {
$location = Location::find($asset->assigneduser->location_id);
if ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} elseif ($asset->rtd_location_id) {
$location = Location::find($asset->rtd_location_id);
if ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} else {
$row[] = ''; // Empty string if location is not set
}
if (($asset->status_id == '0') && ($asset->assigned_to == '0')) {
$row[] = Lang::get('general.ready_to_deploy');
} elseif (($asset->status_id == '') && ($asset->assigned_to == '0')) {
$row[] = Lang::get('general.pending');
} elseif ($asset->assetstatus) {
$row[] = $asset->assetstatus->name;
} else {
$row[] = '';
}
$rows[] = implode($row, ',');
}
// spit out a csv
$csv = implode($rows, "\n");
$response = Response::make($csv, 200);
$response->header('Content-Type', 'text/csv');
$response->header('Content-disposition', 'attachment;filename=report.csv');
return $response;
}
/**
* Show Depreciation Report for Assets
*
* @return View
*/
public function getDeprecationReport()
{
// Grab all the assets
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->orderBy('created_at', 'DESC')->get();
return View::make('backend/reports/depreciation', compact('assets'));
}
/**
* Export Depreciation Report as CSV
*
* @return file download
*/
public function exportDeprecationReport()
{
// @todo - It may be worthwhile creating a separate controller for reporting
// Grab all the assets
$assets = Asset::orderBy('created_at', 'DESC')->get();
$rows = array();
// Create the header row
$header = array(
Lang::get('admin/hardware/table.asset_tag'),
Lang::get('admin/hardware/table.title'),
Lang::get('admin/hardware/table.serial'),
Lang::get('admin/hardware/table.checkoutto'),
Lang::get('admin/hardware/table.location'),
Lang::get('admin/hardware/table.purchase_date'),
Lang::get('admin/hardware/table.purchase_cost'),
Lang::get('admin/hardware/table.book_value'),
Lang::get('admin/hardware/table.diff')
);
$header = array_map('trim', $header);
$rows[] = implode($header, ',');
// Create a row per asset
foreach ($assets as $asset) {
$row = array();
$row[] = $asset->asset_tag;
$row[] = $asset->name;
$row[] = $asset->serial;
if ($asset->assigned_to > 0) {
$user = User::find($asset->assigned_to);
$row[] = $user->fullName();
} else {
$row[] = ''; // Empty string if unassigned
}
if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {
$location = Location::find($asset->assigneduser->location_id);
if ($location->city) {
$row[] = '"'.$location->city . ', ' . $location->state.'"';
} elseif ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} else {
$row[] = ''; // Empty string if location is not set
}
$depreciation = $asset->depreciate();
$row[] = $asset->purchase_date;
$row[] = '"'.number_format($asset->purchase_cost).'"';
$row[] = '"'.number_format($depreciation).'"';
$row[] = '"'.number_format($asset->purchase_cost - $depreciation).'"';
$rows[] = implode($row, ',');
}
// spit out a csv
$csv = implode($rows, "\n");
$response = Response::make($csv, 200);
$response->header('Content-Type', 'text/csv');
$response->header('Content-disposition', 'attachment;filename=report.csv');
return $response;
}
/**
* Show Report for Licenses
*
* @return View
*/
public function getLicenseReport()
{
$licenses = License::orderBy('created_at', 'DESC')->get();
return View::make('backend/reports/licenses', compact('licenses'));
}
/**
* Export License Report as CSV
*
* @return file download
*/
public function exportLicenseReport()
{
$licenses = License::orderBy('created_at', 'DESC')->get();
$rows = array();
$header = array(
Lang::get('admin/licenses/table.title'),
Lang::get('admin/licenses/table.serial'),
Lang::get('admin/licenses/form.seats'),
Lang::get('admin/licenses/form.remaining_seats'),
Lang::get('admin/licenses/form.expiration'),
Lang::get('admin/licenses/form.date'),
Lang::get('admin/licenses/form.cost')
);
$header = array_map('trim', $header);
$rows[] = implode($header, ', ');
// Row per license
foreach ($licenses as $license) {
$row = array();
$row[] = $license->name;
$row[] = $license->serial;
$row[] = $license->seats;
$row[] = $license->remaincount();
$row[] = $license->expiration_date;
$row[] = $license->purchase_date;
$row[] = '"'.number_format($license->purchase_cost).'"';
$rows[] = implode($row, ',');
}
$csv = implode($rows, "\n");
$response = Response::make($csv, 200);
$response->header('Content-Type', 'text/csv');
$response->header('Content-disposition', 'attachment;filename=report.csv');
return $response;
}
public function getCustomReport()
{
return View::make('backend/reports/custom');
}
public function postCustom()
{
$assets = Asset::orderBy('created_at', 'DESC')->get();
$rows = array();
$header = array();
if (e(Input::get('asset_name')) == '1')
{
$header[] = 'Asset Name';
}
if (e(Input::get('asset_tag')) == '1')
{
$header[] = 'Asset Tag';
}
if (e(Input::get('manufacturer')) == '1')
{
$header[] = 'Manufacturer';
}
if (e(Input::get('model')) == '1')
{
$header[] = 'Model';
$header[] = 'Model Number';
}
if (e(Input::get('serial')) == '1')
{
$header[] = 'Serial';
}
if (e(Input::get('purchase_date')) == '1')
{
$header[] = 'Purchase Date';
}
if ((e(Input::get('purchase_cost')) == '1') && (e(Input::get('depreciation')) == '0'))
{
$header[] = 'Purchase Cost';
}
if (e(Input::get('order')) == '1')
{
$header[] = 'Order Number';
}
if (e(Input::get('supplier')) == '1')
{
$header[] = 'Supplier';
}
if (e(Input::get('location')) == '1')
{
$header[] = 'Location';
}
if (e(Input::get('assigned_to')) == '1')
{
$header[] = 'Assigned To';
}
if (e(Input::get('status')) == '1')
{
$header[] = 'Status';
}
if (e(Input::get('warranty')) == '1')
{
$header[] = 'Warranty';
$header[] = 'Warranty Expires';
}
if (e(Input::get('depreciation')) == '1')
{
$header[] = 'Purchase Cost';
$header[] = 'Value';
$header[] = 'Diff';
}
$header = array_map('trim', $header);
$rows[] = implode($header, ',');
foreach($assets as $asset) {
$row = array();
if (e(Input::get('asset_name')) == '1') {
$row[] = $asset->name;
}
if (e(Input::get('asset_tag')) == '1') {
$row[] = $asset->asset_tag;
}
if (e(Input::get('manufacturer')) == '1') {
if ($asset->model->manufacturer) {
$row[] = $asset->model->manufacturer->name;
} else {
$row[] = '';
}
}
if (e(Input::get('model')) == '1') {
$row[] = '"'.$asset->model->name.'"';
$row[] = '"'.$asset->model->modelno.'"';
}
if (e(Input::get('serial')) == '1') {
$row[] = $asset->serial;
}
if (e(Input::get('purchase_date')) == '1') {
$row[] = $asset->purchase_date;
}
if ((e(Input::get('purchase_cost')) == '1') && (e(Input::get('depreciation')) == '0')) {
$row[] = '"'.number_format($asset->purchase_cost).'"';
}
if (e(Input::get('order')) == '1') {
if ($asset->order_number) {
$row[] = $asset->order_number;
} else {
$row[] = '';
}
}
if (e(Input::get('supplier')) == '1') {
if ($asset->supplier_id) {
$row[] = $asset->supplier->name;
} else {
$row[] = '';
}
}
if (e(Input::get('location')) == '1') {
if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {
$location = Location::find($asset->assigneduser->location_id);
if ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} elseif ($asset->rtd_location_id) {
$location = Location::find($asset->rtd_location_id);
if ($location->name) {
$row[] = $location->name;
} else {
$row[] = '';
}
} else {
$row[] = ''; // Empty string if location is not set
}
}
if (e(Input::get('assigned_to')) == '1') {
if ($asset->assigned_to > 0) {
$user = User::find($asset->assigned_to);
$row[] = $user->fullName();
} else {
$row[] = ''; // Empty string if unassigned
}
}
if (e(Input::get('status')) == '1') {
if (($asset->status_id == '0') && ($asset->assigned_to == '0')) {
$row[] = Lang::get('general.ready_to_deploy');
} elseif (($asset->status_id == '') && ($asset->assigned_to == '0')) {
$row[] = Lang::get('general.pending');
} elseif ($asset->assetstatus) {
$row[] = $asset->assetstatus->name;
} else {
$row[] = '';
}
}
if (e(Input::get('warranty')) == '1') {
if ($asset->warranty_months) {
$row[] = $asset->warranty_months;
$row[] = $asset->warrantee_expires();
} else {
$row[] = '';
$row[] = '';
}
}
if (e(Input::get('depreciation')) == '1') {
$depreciation = $asset->depreciate();
$row[] = '"'.number_format($asset->purchase_cost).'"';
$row[] = '"'.number_format($depreciation).'"';
$row[] = '"'.number_format($asset->purchase_cost - $depreciation).'"';
}
$rows[] = implode($row, ',');
}
// spit out a csv
if (array_filter($rows)) {
$csv = implode($rows, "\n");
$response = Response::make($csv, 200);
$response->header('Content-Type', 'text/csv');
$response->header('Content-disposition', 'attachment;filename=report.csv');
return $response;
} else {
return Redirect::to("reports/custom")->with('error', Lang::get('admin/reports/message.error'));
}
}
}

4
app/controllers/admin/SettingsController.php Normal file → Executable file
View File

@@ -82,9 +82,13 @@ class SettingsController extends AdminController
$setting->id = '1';
$setting->site_name = e(Input::get('site_name'));
$setting->display_asset_name = e(Input::get('display_asset_name', '0'));
$setting->display_checkout_date = e(Input::get('display_checkout_date', '0'));
$setting->per_page = e(Input::get('per_page'));
$setting->qr_code = e(Input::get('qr_code', '0'));
$setting->display_eol = e(Input::get('display_eol', '0'));
$setting->qr_text = e(Input::get('qr_text'));
$setting->auto_increment_prefix = e(Input::get('auto_increment_prefix'));
$setting->auto_increment_assets = e(Input::get('auto_increment_assets', '0'));
// Was the asset updated?
if($setting->save()) {

25
app/controllers/admin/StatuslabelsController.php Normal file → Executable file
View File

@@ -23,7 +23,7 @@ class StatuslabelsController extends AdminController
public function getIndex()
{
// Grab all the statuslabels
$statuslabels = Statuslabel::orderBy('created_at', 'DESC')->paginate(10);
$statuslabels = Statuslabel::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/statuslabels/index', compact('statuslabels'));
@@ -113,28 +113,25 @@ class StatuslabelsController extends AdminController
return Redirect::to('admin/settings/statuslabels')->with('error', Lang::get('admin/statuslabels/message.does_not_exist'));
}
//attempt to validate
$validator = Validator::make(Input::all(), $statuslabel->validationRules($statuslabelId));
// get the POST data
$new = Input::all();
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($statuslabel->validate($new)) {
else {
// Update the Statuslabel data
$statuslabel->name = e(Input::get('name'));
// Was the asset created?
if($statuslabel->save()) {
// Redirect to the saved Statuslabel page
return Redirect::to("admin/settings/statuslabels/$statuslabelId/edit")->with('success', Lang::get('admin/statuslabels/message.update.success'));
return Redirect::to("admin/settings/statuslabels/")->with('success', Lang::get('admin/statuslabels/message.update.success'));
}
} else {
// failure
$errors = $statuslabel->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the Statuslabel management page
return Redirect::to("admin/settings/statuslabels/$statuslabelId/edit")->with('error', Lang::get('admin/statuslabels/message.update.error'));

100
app/controllers/admin/SuppliersController.php Normal file → Executable file
View File

@@ -1,6 +1,7 @@
<?php namespace Controllers\Admin;
use AdminController;
use Image;
use Input;
use Lang;
use Supplier;
@@ -21,7 +22,7 @@ class SuppliersController extends AdminController
public function getIndex()
{
// Grab all the suppliers
$suppliers = Supplier::orderBy('created_at', 'DESC')->paginate(Setting::getSettings()->per_page);
$suppliers = Supplier::orderBy('created_at', 'DESC')->get();
// Show the page
return View::make('backend/suppliers/index', compact('suppliers'));
@@ -57,20 +58,31 @@ class SuppliersController extends AdminController
if ($supplier->validate($new)) {
// Save the location data
$supplier->name = e(Input::get('name'));
$supplier->address = e(Input::get('address'));
$supplier->address2 = e(Input::get('address2'));
$supplier->city = e(Input::get('city'));
$supplier->state = e(Input::get('state'));
$supplier->country = e(Input::get('country'));
$supplier->zip = e(Input::get('zip'));
$supplier->contact = e(Input::get('contact'));
$supplier->phone = e(Input::get('phone'));
$supplier->fax = e(Input::get('fax'));
$supplier->email = e(Input::get('email'));
$supplier->notes = e(Input::get('notes'));
$supplier->url = $supplier->addhttp(e(Input::get('url')));
$supplier->user_id = Sentry::getId();
$supplier->name = e(Input::get('name'));
$supplier->address = e(Input::get('address'));
$supplier->address2 = e(Input::get('address2'));
$supplier->city = e(Input::get('city'));
$supplier->state = e(Input::get('state'));
$supplier->country = e(Input::get('country'));
$supplier->zip = e(Input::get('zip'));
$supplier->contact = e(Input::get('contact'));
$supplier->phone = e(Input::get('phone'));
$supplier->fax = e(Input::get('fax'));
$supplier->email = e(Input::get('email'));
$supplier->notes = e(Input::get('notes'));
$supplier->url = $supplier->addhttp(e(Input::get('url')));
$supplier->user_id = Sentry::getId();
if (Input::file('image')) {
$image = Input::file('image');
$file_name = str_random(25).".".$image->getClientOriginalExtension();
$path = public_path('uploads/suppliers/'.$file_name);
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path);
$supplier->image = $file_name;
}
// Was it created?
if($supplier->save()) {
@@ -122,39 +134,53 @@ class SuppliersController extends AdminController
}
// get the POST data
$new = Input::all();
//attempt to validate
$validator = Validator::make(Input::all(), $supplier->validationRules($supplierId));
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->withErrors($validator->messages());
}
// attempt validation
if ($supplier->validate($new)) {
else {
// Save the data
$supplier->name = e(Input::get('name'));
$supplier->address = e(Input::get('address'));
$supplier->address2 = e(Input::get('address2'));
$supplier->city = e(Input::get('city'));
$supplier->state = e(Input::get('state'));
$supplier->country = e(Input::get('country'));
$supplier->zip = e(Input::get('zip'));
$supplier->contact = e(Input::get('contact'));
$supplier->phone = e(Input::get('phone'));
$supplier->fax = e(Input::get('fax'));
$supplier->email = e(Input::get('email'));
$supplier->url = $supplier->addhttp(e(Input::get('url')));
$supplier->notes = e(Input::get('notes'));
$supplier->name = e(Input::get('name'));
$supplier->address = e(Input::get('address'));
$supplier->address2 = e(Input::get('address2'));
$supplier->city = e(Input::get('city'));
$supplier->state = e(Input::get('state'));
$supplier->country = e(Input::get('country'));
$supplier->zip = e(Input::get('zip'));
$supplier->contact = e(Input::get('contact'));
$supplier->phone = e(Input::get('phone'));
$supplier->fax = e(Input::get('fax'));
$supplier->email = e(Input::get('email'));
$supplier->url = $supplier->addhttp(e(Input::get('url')));
$supplier->notes = e(Input::get('notes'));
if (Input::file('image')) {
$image = Input::file('image');
$file_name = str_random(25).".".$image->getClientOriginalExtension();
$path = public_path('uploads/suppliers/'.$file_name);
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path);
$supplier->image = $file_name;
}
if (Input::get('image_delete') == 1 && Input::file('image') == "") {
$supplier->image = NULL;
}
// Was it created?
if($supplier->save()) {
// Redirect to the new supplier page
return Redirect::to("admin/settings/suppliers")->with('success', Lang::get('admin/suppliers/message.update.success'));
}
} else {
// failure
$errors = $supplier->errors();
return Redirect::back()->withInput()->withErrors($errors);
}
}
// Redirect to the supplier management page
return Redirect::to("admin/settings/suppliers/$supplierId/edit")->with('error', Lang::get('admin/suppliers/message.update.error'));

View File

@@ -32,9 +32,10 @@ class UsersController extends AdminController
protected $validationRules = array(
'first_name' => 'required|alpha_space|min:2',
'last_name' => 'required|alpha_space|min:2',
'location_id' => 'required',
'email' => 'required|email|unique:users,email',
'password' => 'required|between:10,32',
'password_confirm' => 'required|between:10,32|same:password',
'password' => 'required|min:6',
'password_confirm' => 'required|min:6|same:password',
);
/**
@@ -44,14 +45,29 @@ class UsersController extends AdminController
*/
public function getIndex()
{
// Grab all the users
// Grab all the users - depending on the scope to include
$users = Sentry::getUserProvider()->createModel();
// Do we want to include the deleted users?
// the with and onlyTrashed calls currently do not work - returns an
// inconsistent array which cannot be displayed by the blade output
if (Input::get('withTrashed')) {
$users = $users->withTrashed();
//$users = Sentry::getUserProvider()->createModel()->paginate();
} elseif (Input::get('onlyTrashed')) {
$users = $users->onlyTrashed();
// this is a tempoary 'fix' to display NO deleted users.
//$users = Sentry::getUserProvider()->createModel()->whereNotNull('deleted_at')->paginate();
//$users = Sentry::findAllUsers();
//$users = users::deletedUsers()->paginate();
$users = Sentry::getUserProvider()->createModel()->onlyTrashed();
//$users = users::whereNotNull('deleted_at')->paginate();
//$users = $users->onlyTrashed();
//$users = Users::onlyTrashed()->get();
//$users = Sentry::getUserProvider()->createModel();
}
@@ -62,7 +78,6 @@ class UsersController extends AdminController
'onlyTrashed' => Input::get('onlyTrashed'),
));
// Show the page
return View::make('backend/users/index', compact('users'));
}
@@ -158,7 +173,8 @@ class UsersController extends AdminController
$success = Lang::get('admin/users/message.success.create');
// Redirect to the new user page
return Redirect::route('update/user', $user->id)->with('success', $success);
//return Redirect::route('update/user', $user->id)->with('success', $success);
return Redirect::route('users')->with('success', $success);
}
@@ -333,7 +349,7 @@ class UsersController extends AdminController
$success = Lang::get('admin/users/message.success.update');
// Redirect to the user page
return Redirect::route('update/user', $id)->with('success', $success);
return Redirect::route('view/user', $id)->with('success', $success);
}
// Prepare the error message
@@ -529,4 +545,61 @@ class UsersController extends AdminController
}
}
public function getClone($id = null)
{
// We need to reverse the UI specific logic for our
// permissions here before we update the user.
$permissions = Input::get('permissions', array());
$this->decodePermissions($permissions);
app('request')->request->set('permissions', $permissions);
try {
// Get the user information
$user_to_clone = Sentry::getUserProvider()->findById($id);
$user = clone $user_to_clone;
$user->first_name = '';
$user->last_name = '';
$user->email = substr($user->email, ($pos = strpos($user->email, '@')) !== false ? $pos : 0);;
$user->id = null;
// Get this user groups
$userGroups = $user_to_clone->groups()->lists('group_id', 'name');
// Get this user permissions
$userPermissions = array_merge(Input::old('permissions', array('superuser' => -1)), $user_to_clone->getPermissions());
$this->encodePermissions($userPermissions);
// Get a list of all the available groups
$groups = Sentry::getGroupProvider()->findAll();
// Get all the available permissions
$permissions = Config::get('permissions');
$this->encodeAllPermissions($permissions);
$location_list = array('' => '') + Location::lists('name', 'id');
$manager_list = array('' => 'Select a User') + DB::table('users')
->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))
->whereNull('deleted_at')
->where('id','!=',$id)
->orderBy('last_name', 'asc')
->orderBy('first_name', 'asc')
->lists('full_name', 'id');
// Show the page
return View::make('backend/users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
->with('location_list',$location_list)
->with('manager_list',$manager_list)
->with('user',$user)
->with('clone_user',$user_to_clone);
} catch (UserNotFoundException $e) {
// 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);
}
}
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -9,12 +9,13 @@ class SetNullvaluesForUser extends Migration
*
* @return void
*/
public function up()
{
//
DB::statement('ALTER TABLE users MODIFY phone varchar(20) null');
DB::statement('ALTER TABLE users MODIFY jobtitle varchar(50) null');
$prefix = DB::getTablePrefix();
DB::statement('ALTER TABLE '.$prefix.'users MODIFY phone varchar(20) null');
DB::statement('ALTER TABLE '.$prefix.'users MODIFY jobtitle varchar(50) null');
}

View File

View File

@@ -11,7 +11,7 @@ class EditAddedOnAssetLogsTable extends Migration
*/
public function up()
{
DB::statement('ALTER TABLE asset_logs MODIFY added_on timestamp null');
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY added_on timestamp null');
}

View File

@@ -11,8 +11,9 @@ class EditLocationIdAssetLogsTable extends Migration
*/
public function up()
{
DB::statement('ALTER TABLE asset_logs MODIFY location_id int(11) null');
DB::statement('ALTER TABLE asset_logs MODIFY added_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP');
$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');
}

View File

View File

View File

View File

View File

View File

@@ -11,7 +11,7 @@ class AlterWarrantyColumnOnAssets extends Migration
*/
public function up()
{
DB::statement('ALTER TABLE assets CHANGE warrantee_months warranty_months int (3)');
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'assets CHANGE warrantee_months warranty_months int (3)');
}
/**

View File

View File

@@ -11,11 +11,11 @@ class AddNullableToLicensesTable extends Migration
*/
public function up()
{
//
DB::statement('ALTER TABLE licenses MODIFY order_number varchar(50) null');
DB::statement('ALTER TABLE licenses MODIFY notes varchar(255) null');
DB::statement('ALTER TABLE licenses MODIFY license_name varchar(100) null');
DB::statement('ALTER TABLE licenses MODIFY license_email varchar(120) null');
$prefix = DB::getTablePrefix();
DB::statement('ALTER TABLE ' . $prefix . 'licenses MODIFY order_number varchar(50) null');
DB::statement('ALTER TABLE ' . $prefix . 'licenses MODIFY notes varchar(255) null');
DB::statement('ALTER TABLE ' . $prefix . 'licenses MODIFY license_name varchar(100) null');
DB::statement('ALTER TABLE ' . $prefix . 'licenses MODIFY license_email varchar(120) null');
}
/**

View File

View File

@@ -13,7 +13,7 @@ class AlterDefaultLicenseDepreciationId extends Migration
public function up()
{
//
DB::statement('ALTER TABLE licenses MODIFY column depreciation_id tinyint(1) NOT NULL DEFAULT "0"');
DB::statement('ALTER TABLE '.DB::getTablePrefix().'licenses MODIFY column depreciation_id tinyint(1) NOT NULL DEFAULT "0"');
}

View File

@@ -13,7 +13,7 @@ class AlterDefaultValuesLicenses extends Migration
public function up()
{
//
DB::statement('ALTER TABLE license_seats MODIFY column notes text NULL');
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'license_seats MODIFY column notes text NULL');
}
/**

View File

@@ -13,7 +13,7 @@ class MakeAssetLogCheckedoutToNullable extends Migration
public function up()
{
//
DB::statement('ALTER TABLE asset_logs MODIFY column checkedout_to int(11) NULL');
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column checkedout_to int(11) NULL');
}
/**

View File

@@ -13,7 +13,7 @@ class MakeAssetLogPurchasedateToNullable extends Migration
public function up()
{
//
DB::statement('ALTER TABLE licenses MODIFY column purchase_date date NULL');
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'licenses MODIFY column purchase_date date NULL');
}
/**

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More