Compare commits
128 Commits
v0.2.0
...
v0.3.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2f068eb8f | ||
|
|
580590b4c0 | ||
|
|
5ec87e81b1 | ||
|
|
60d94eea04 | ||
|
|
78e3171fa6 | ||
|
|
d03d692868 | ||
|
|
4b4eefb4cc | ||
|
|
8b3f409703 | ||
|
|
d497a84245 | ||
|
|
01612652b5 | ||
|
|
5cb0a1465e | ||
|
|
55b54e0a42 | ||
|
|
a3eb61b307 | ||
|
|
9e5e9ee96b | ||
|
|
92347c6707 | ||
|
|
dc5ea81d34 | ||
|
|
9c369d72e1 | ||
|
|
ea0560e1ce | ||
|
|
cd62be0de0 | ||
|
|
7a3f6fb714 | ||
|
|
1ed761c97f | ||
|
|
a193e3118d | ||
|
|
e9a675a9a4 | ||
|
|
439a139d7c | ||
|
|
40d6ad09ae | ||
|
|
3acd88d451 | ||
|
|
8806208e83 | ||
|
|
5ba487d74e | ||
|
|
f6717d9f49 | ||
|
|
3ec6df492d | ||
|
|
cdddbcf695 | ||
|
|
483f9b1289 | ||
|
|
b2912195ac | ||
|
|
1cec46f997 | ||
|
|
4468cbd096 | ||
|
|
4c3e2a9a68 | ||
|
|
da9f28fbe7 | ||
|
|
8ac394bd3f | ||
|
|
d36409d037 | ||
|
|
7e9be9b935 | ||
|
|
dd701d253c | ||
|
|
78b3a0e1f9 | ||
|
|
1e9a81f59d | ||
|
|
432f44118f | ||
|
|
b697c77cd8 | ||
|
|
23ce0a9e67 | ||
|
|
0cd6c60fd9 | ||
|
|
82de635a75 | ||
|
|
299393aa26 | ||
|
|
7bc9a53b13 | ||
|
|
c1bf27fcba | ||
|
|
d72daf14ff | ||
|
|
c5678414ae | ||
|
|
329980c6c6 | ||
|
|
5fb649b59e | ||
|
|
19de8a15cf | ||
|
|
ab99e6a64f | ||
|
|
5dc9c30bca | ||
|
|
9308059230 | ||
|
|
ac9dfe2edc | ||
|
|
cf9cd1a7a0 | ||
|
|
194150bbf0 | ||
|
|
b97f5fc043 | ||
|
|
aaebaa8d36 | ||
|
|
ef4743ed49 | ||
|
|
6737a9a91a | ||
|
|
965d329ae5 | ||
|
|
e4fd2373fb | ||
|
|
e784854e05 | ||
|
|
c4c4db201f | ||
|
|
33df88d434 | ||
|
|
f02f4341ca | ||
|
|
211a527ae1 | ||
|
|
cc275367bf | ||
|
|
1dc7fd1bdf | ||
|
|
e49420f62d | ||
|
|
9fe8ace39b | ||
|
|
d591c1ea04 | ||
|
|
ae05f27015 | ||
|
|
b8ebcf769a | ||
|
|
9c718dce59 | ||
|
|
e09d250dd6 | ||
|
|
4d27008c5d | ||
|
|
cfd6c4301c | ||
|
|
dddba1198d | ||
|
|
a0267db832 | ||
|
|
0d46eba76e | ||
|
|
c8e47ad00e | ||
|
|
47b065208e | ||
|
|
775ec10114 | ||
|
|
d19721d17a | ||
|
|
c11510fdca | ||
|
|
1f2b3f8505 | ||
|
|
fba853a6a7 | ||
|
|
392cc8eb44 | ||
|
|
46281dd39b | ||
|
|
db2c751480 | ||
|
|
c08d672e49 | ||
|
|
70c446cb35 | ||
|
|
2de48f2b91 | ||
|
|
391334ee13 | ||
|
|
a678ec4171 | ||
|
|
ea42a18930 | ||
|
|
36a714b154 | ||
|
|
bee260b1f0 | ||
|
|
45f46466d7 | ||
|
|
8f235881c5 | ||
|
|
8bf6a34c58 | ||
|
|
ca591ccb5d | ||
|
|
9d22ce5ac7 | ||
|
|
067ddb9aac | ||
|
|
b352817407 | ||
|
|
e2dc24d926 | ||
|
|
baab758377 | ||
|
|
d91d75abe4 | ||
|
|
12d3d10dec | ||
|
|
7693e83d7f | ||
|
|
3bc35208af | ||
|
|
78d1c0345e | ||
|
|
ca39b34b8c | ||
|
|
3d1a533bf2 | ||
|
|
71eaeb2783 | ||
|
|
f9d8cb1b93 | ||
|
|
2e82794ab4 | ||
|
|
7c3a9faf53 | ||
|
|
2fe58f8d6d | ||
|
|
295cef61df | ||
|
|
8ed5584565 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -5,7 +5,10 @@ composer.phar
|
||||
/app/config/database.php
|
||||
/app/config/mail.php
|
||||
/app/database/*.sqlite
|
||||
/app/storage/logs/*
|
||||
/app/storage/meta/services.json
|
||||
/app/storage/sessions/*
|
||||
/app/config/*/mail.php
|
||||
/app/config/*/database.php
|
||||
/app/config/*/app.php
|
||||
public/packages/barryvdh/*
|
||||
/app/storage/views/*
|
||||
/app/storage/logs/*
|
||||
@@ -1,3 +1,5 @@
|
||||
# Contribution Guidelines
|
||||
|
||||
Please submit all issues and pull requests to the [snipe/snipe-it](http://github.com/snipe/snipe-it) repository in the develop branch!
|
||||
Please submit all issues and pull requests to the [snipe/snipe-it](http://github.com/snipe/snipe-it) repository in the develop branch!
|
||||
|
||||
As you're working on bug-fixes or features, please break them out into their own feature branches and open the pull request against your feature branch. It makes it much easier to decipher down the road, as you open multiple pull requests over time.
|
||||
127
README.md
127
README.md
@@ -8,13 +8,17 @@ It is built on [Laravel 4](http://laravel.com) and uses the [Sentry 2](https://g
|
||||
|
||||
Many thanks to the [Laravel 4 starter site](https://github.com/brunogaspar/laravel4-starter-kit) for a quick start.
|
||||
|
||||
This isn't actually ready for anyone to use yet, as I'm still working out some of the basic functionality. Feel free to check out the [GitHub Issues for this project](https://github.com/snipe/snipe-it/issues) to check on progress, open a bug report, or see what open issues you can help with.
|
||||
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).
|
||||
|
||||
### Bug Reports and Feature Requests
|
||||
|
||||
Feel free to check out the [GitHub Issues for this project](https://github.com/snipe/snipe-it/issues) to check on progress, open a bug report, request a feature, or see what open issues you can help with.
|
||||
|
||||
-----
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 5.3.7 or later
|
||||
- PHP 5.4 or later
|
||||
- MCrypt PHP Extension
|
||||
|
||||
-----
|
||||
@@ -43,41 +47,88 @@ Forgetting to do this can mean your DB might end up out of sync with the new fil
|
||||
|
||||
-----
|
||||
|
||||
### 2) Install the Dependencies via Composer
|
||||
##### 2.1) If you don't have composer installed globally
|
||||
### 2) Setup Environment, Database and Mail Settings
|
||||
|
||||
#### 2.1) Adjust Environments
|
||||
|
||||
Update the file `boostrap/start.php` under the section `Detect The Application Environment`.
|
||||
|
||||
vi bootstrap/start.php
|
||||
|
||||
-----
|
||||
|
||||
*IMPORTANT*: Since the initial install is done via command line (which cannot grok your apache hostname), it's important
|
||||
to include your machine name in the environmental array, or to pass the environmental override as a command line argument (using ` --env=local`).
|
||||
Otherwise, your configs will default to production (as Laravel does).
|
||||
|
||||
To find out your local machine's hostname, type `hostname` from a terminal prompt on the machine you're installing it on. If you
|
||||
encounter an error on your install, saying that the `driver` variable isn't defined, something got botched in your
|
||||
environmental settings and it's defaulting to production.
|
||||
|
||||
So for example, if you're installing this locally on your Mac named SnipeMBP and with a local Apache hostname of http://snipe-it.local:8888,
|
||||
your environmental variable section of `bootstrap/start.php` might look like this:
|
||||
|
||||
$env = $app->detectEnvironment(array(
|
||||
|
||||
'local' => array('SnipeMBP','http://*.local', '*.local*', '127.0.0.1', 'localhost*'),
|
||||
'staging' => array('http://staging.yourserver.com'),
|
||||
'production' => array('http://www.yourserver.com')
|
||||
));
|
||||
|
||||
|
||||
-----
|
||||
|
||||
#### 2.2) Setup Your Database
|
||||
|
||||
Copy the example database config `app/config/local/database.example.php` to `app/config/local/database.php`.
|
||||
Update the file `app/config/local/database.php` with your database name and credentials.
|
||||
|
||||
vi app/config/local/database.php
|
||||
|
||||
|
||||
#### 2.3) Setup Mail Settings
|
||||
|
||||
Copy the example mail config `app/config/local/mail.example.php` to `app/config/local/mail.php`.
|
||||
Update the file `app/config/local/mail.php` with your mail settings.
|
||||
|
||||
vi app/config/local/mail.php
|
||||
|
||||
This will be used to send emails to your users, when they register and they request a password reset.
|
||||
|
||||
#### 2.4) Adjust the application settings.
|
||||
|
||||
Copy the example app config `app/config/local/app.example.php` to `app/config/local/app.php`.
|
||||
|
||||
Update the file `app/config/local/app.php` with your URL settings.
|
||||
|
||||
vi app/config/local/app.php
|
||||
|
||||
You should also change your secret key here -- if you prefer to have your key randomly generated, run the artisan key:generate command from the application root.
|
||||
|
||||
php artisan key:generate --env=local
|
||||
|
||||
|
||||
#### 2.5) Additional Adjustments
|
||||
|
||||
The app is configured to automatically detect if you're in a local, staging, or production environment. Before deploying to a staging or production environment, follow sets 2.1, 2.2, and 2.3 above to tweak each environment as necessary. Configuration files for each environment can be found in app/config/{environment} (local, staging, and production).
|
||||
|
||||
-----
|
||||
|
||||
### 3) Install the Dependencies via Composer
|
||||
##### 3.1) If you don't have composer installed globally
|
||||
|
||||
cd your-folder
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
php composer.phar install
|
||||
|
||||
##### 2.2) For globally composer installations
|
||||
##### 3.2) For global composer installations
|
||||
|
||||
cd your-folder
|
||||
composer install
|
||||
|
||||
-----
|
||||
|
||||
### 3) Setup Database
|
||||
|
||||
Copy the file `app/config/database.php` to `database.php`, and update `database.php` with your database name and credentials
|
||||
|
||||
cp app/config/database.example.php app/config/database.php
|
||||
vi app/config/database.example.php
|
||||
|
||||
-----
|
||||
|
||||
### 4) Setup Mail Settings
|
||||
|
||||
Now, copy the file `app/config/mail.php` to `mail.php`, and update `mail.php` with your mail settings
|
||||
|
||||
cp app/config/mail.example.php app/config/mail.php
|
||||
vi app/config/mail.example.php
|
||||
|
||||
This will be used to send emails to your users, when they register and they request a password reset.
|
||||
|
||||
-----
|
||||
|
||||
### 5) Use custom CLI Installer Command
|
||||
### 4) Use custom CLI Installer Command
|
||||
|
||||
Now, you need to create yourself a user and finish the installation.
|
||||
|
||||
@@ -89,7 +140,7 @@ Use the following command to create your default user, user groups and run all t
|
||||
|
||||
### 6) Fix permissions
|
||||
|
||||
You'll need to make sure that the app/storage directory is writable by your webserver, since caches and log files get written there. You should use the minimum permissions available for writing, based on how you've got your webserver configured.
|
||||
You'll need to make sure that the `app/storage` directory is writable by your webserver, since caches and log files get written there. You should use the minimum permissions available for writing, based on how you've got your webserver configured.
|
||||
|
||||
chmod -R 755 app/storage
|
||||
|
||||
@@ -101,7 +152,7 @@ If you still run into a permissions error, you may need to increase the permissi
|
||||
|
||||
### 7) Set the correct document root for your server
|
||||
|
||||
The document root for the app should be set to the public directory. In a standard Apache virtualhost setup, that might look something like this:
|
||||
The document root for the app should be set to the public directory. In a standard Apache virtualhost setup, that might look something like this on a standard linux LAMP stack:
|
||||
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/html/public
|
||||
@@ -110,6 +161,19 @@ The document root for the app should be set to the public directory. In a standa
|
||||
# Other directives here
|
||||
</VirtualHost>
|
||||
|
||||
An OS X virtualhost setup could look more like:
|
||||
|
||||
Directory "/Users/flashingcursor/Sites/snipe-it/public/">
|
||||
Allow From All
|
||||
AllowOverride All
|
||||
Options +Indexes
|
||||
</Directory>
|
||||
<VirtualHost *:80>
|
||||
ServerName "snipe-it.dev"
|
||||
DocumentRoot "/Users/flashingcursor/Sites/snipe-it/public"
|
||||
SetEnv LARAVEL_ENV development
|
||||
</VirtualHost>
|
||||
|
||||
-----
|
||||
|
||||
### 8) Seed the Database
|
||||
@@ -138,6 +202,13 @@ If you're doing any development on this, make sure you purge the auto-loader if
|
||||
|
||||
php composer.phar dump-autoload
|
||||
|
||||
|
||||
-----
|
||||
|
||||
### Application logs
|
||||
|
||||
Application logs for this app are found in `app/storage/logs`, as is customary of Laravel.
|
||||
|
||||
-----
|
||||
|
||||
### Running this on an EC2 Micro Instance
|
||||
|
||||
@@ -245,6 +245,49 @@ class AppCommand extends Command {
|
||||
{
|
||||
$this->error('Group already exists.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Create the reporting group
|
||||
$group = Sentry::getGroupProvider()->create(array(
|
||||
'name' => 'Reporting',
|
||||
'permissions' => array(
|
||||
'admin' => 0,
|
||||
'users' => 1
|
||||
)
|
||||
));
|
||||
|
||||
// Show the success message.
|
||||
$this->comment('');
|
||||
$this->info('Reporting group created successfully.');
|
||||
}
|
||||
catch (Cartalyst\Sentry\Groups\GroupExistsException $e)
|
||||
{
|
||||
$this->error('Group already exists.');
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Create the general users group
|
||||
$group = Sentry::getGroupProvider()->create(array(
|
||||
'name' => 'Users',
|
||||
'permissions' => array(
|
||||
'admin' => 0,
|
||||
'users' => 1
|
||||
)
|
||||
));
|
||||
|
||||
// Show the success message.
|
||||
$this->comment('');
|
||||
$this->info('Users group created successfully.');
|
||||
}
|
||||
catch (Cartalyst\Sentry\Groups\GroupExistsException $e)
|
||||
{
|
||||
$this->error('Group already exists.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,6 +300,7 @@ class AppCommand extends Command {
|
||||
// Prepare the user data array.
|
||||
$data = array_merge($this->userData, array(
|
||||
'activated' => 1,
|
||||
'manager_id' => NULL,
|
||||
'permissions' => array(
|
||||
'admin' => 1,
|
||||
'user' => 1,
|
||||
@@ -290,6 +334,7 @@ class AppCommand extends Command {
|
||||
'email' => 'john.doe@example.com',
|
||||
'password' => 'johndoe',
|
||||
'activated' => 1,
|
||||
'manager_id' => 1,
|
||||
);
|
||||
|
||||
// Create the user
|
||||
|
||||
@@ -2,32 +2,6 @@
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
@@ -43,30 +17,16 @@ return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
| Application Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
| This locale ties into the languaage files in app/lang, which contain the
|
||||
| language files for each translation.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => 'YourSecretKey!!!',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
@@ -113,9 +73,12 @@ return array(
|
||||
'Illuminate\Validation\ValidationServiceProvider',
|
||||
'Illuminate\View\ViewServiceProvider',
|
||||
'Illuminate\Workbench\WorkbenchServiceProvider',
|
||||
'Barryvdh\Debugbar\ServiceProvider',
|
||||
|
||||
'Cartalyst\Sentry\SentryServiceProvider',
|
||||
|
||||
'Chumper\Datatable\DatatableServiceProvider',
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
@@ -183,6 +146,8 @@ return array(
|
||||
|
||||
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
|
||||
|
||||
'Datatable' => 'Chumper\Datatable\Facades\Datatable',
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
3
app/config/local/.gitignore
vendored
Normal file
3
app/config/local/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
app.php
|
||||
mail.php
|
||||
database.php
|
||||
45
app/config/local/app.example.php
Normal file
45
app/config/local/app.example.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://snipe-it-laravel.local:8888',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| 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
|
||||
*/
|
||||
|
||||
'key' => 'Change_this_key_or_snipe_will_get_ya',
|
||||
|
||||
);
|
||||
3
app/config/production/.gitignore
vendored
Normal file
3
app/config/production/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
app.php
|
||||
mail.php
|
||||
database.php
|
||||
45
app/config/production/app.example.php
Normal file
45
app/config/production/app.example.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://www.yourserver.com',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| 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
|
||||
*/
|
||||
|
||||
'key' => 'Change_this_key_or_snipe_will_get_ya',
|
||||
|
||||
);
|
||||
124
app/config/production/database.example.php
Executable file
124
app/config/production/database.example.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDO Fetch Style
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, database results will be returned as instances of the PHP
|
||||
| stdClass object; however, you may desire to retrieve records in an
|
||||
| array format for simplicity. Here you can tweak the fetch style.
|
||||
|
|
||||
*/
|
||||
|
||||
'fetch' => PDO::FETCH_CLASS,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'mysql',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => array(
|
||||
|
||||
'sqlite' => array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => __DIR__.'/../database/production.sqlite',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
'mysql' => array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'snipeit_laravel',
|
||||
'username' => 'snipeit_laravel',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
'pgsql' => array(
|
||||
'driver' => 'pgsql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'schema' => 'public',
|
||||
),
|
||||
|
||||
'sqlsrv' => array(
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => 'localhost',
|
||||
'database' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk have not actually be run in the databases.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => array(
|
||||
|
||||
'cluster' => true,
|
||||
|
||||
'default' => array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'database' => 0,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
124
app/config/production/mail.example.php
Executable file
124
app/config/production/mail.example.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'smtp',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Postmark mail service, which will provide reliable delivery.
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => 'smtp.mailgun.org',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to delivery e-mails to
|
||||
| users of your application. Like the host we have set this value to
|
||||
| stay compatible with the Postmark e-mail application by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'port' => 587,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => array('address' => null, 'name' => null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => 'tls',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Password
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the password required by your SMTP server to send out
|
||||
| messages from your application. This will be given to the server on
|
||||
| connection so that the application will be able to send messages.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail "Pretend"
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this option is enabled, e-mail will not actually be sent over the
|
||||
| web and will instead be written to your application's logs files so
|
||||
| you may inspect the message. This is great for local development.
|
||||
|
|
||||
*/
|
||||
|
||||
'pretend' => false,
|
||||
|
||||
);
|
||||
3
app/config/staging/.gitignore
vendored
Normal file
3
app/config/staging/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
app.php
|
||||
mail.php
|
||||
database.php
|
||||
45
app/config/staging/app.example.php
Normal file
45
app/config/staging/app.example.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://staging.yourserver.com',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| 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
|
||||
*/
|
||||
|
||||
'key' => 'Change_this_key_or_snipe_will_get_ya',
|
||||
|
||||
);
|
||||
124
app/config/staging/database.example.php
Executable file
124
app/config/staging/database.example.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDO Fetch Style
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, database results will be returned as instances of the PHP
|
||||
| stdClass object; however, you may desire to retrieve records in an
|
||||
| array format for simplicity. Here you can tweak the fetch style.
|
||||
|
|
||||
*/
|
||||
|
||||
'fetch' => PDO::FETCH_CLASS,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'mysql',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => array(
|
||||
|
||||
'sqlite' => array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => __DIR__.'/../database/production.sqlite',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
'mysql' => array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'snipeit_laravel',
|
||||
'username' => 'snipeit_laravel',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
'pgsql' => array(
|
||||
'driver' => 'pgsql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'schema' => 'public',
|
||||
),
|
||||
|
||||
'sqlsrv' => array(
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => 'localhost',
|
||||
'database' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk have not actually be run in the databases.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => array(
|
||||
|
||||
'cluster' => true,
|
||||
|
||||
'default' => array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'database' => 0,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
124
app/config/staging/mail.example.php
Executable file
124
app/config/staging/mail.example.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'smtp',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Postmark mail service, which will provide reliable delivery.
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => 'smtp.mailgun.org',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to delivery e-mails to
|
||||
| users of your application. Like the host we have set this value to
|
||||
| stay compatible with the Postmark e-mail application by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'port' => 587,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => array('address' => null, 'name' => null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => 'tls',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Password
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the password required by your SMTP server to send out
|
||||
| messages from your application. This will be given to the server on
|
||||
| connection so that the application will be able to send messages.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail "Pretend"
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this option is enabled, e-mail will not actually be sent over the
|
||||
| web and will instead be written to your application's logs files so
|
||||
| you may inspect the message. This is great for local development.
|
||||
|
|
||||
*/
|
||||
|
||||
'pretend' => false,
|
||||
|
||||
);
|
||||
45
app/config/testing/app.example.php
Normal file
45
app/config/testing/app.example.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://staging.yourserver.com',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| 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
|
||||
*/
|
||||
|
||||
'key' => 'Change_this_key_or_snipe_will_get_ya',
|
||||
|
||||
);
|
||||
91
app/config/testing/database.example.php
Executable file
91
app/config/testing/database.example.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDO Fetch Style
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, database results will be returned as instances of the PHP
|
||||
| stdClass object; however, you may desire to retrieve records in an
|
||||
| array format for simplicity. Here you can tweak the fetch style.
|
||||
|
|
||||
*/
|
||||
|
||||
'fetch' => PDO::FETCH_CLASS,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'sqlite',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => array(
|
||||
'sqlite' => array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'prefix' => ''
|
||||
),
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk have not actually be run in the databases.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => array(
|
||||
|
||||
'cluster' => true,
|
||||
|
||||
'default' => array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'database' => 0,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'default' => 'sqlite',
|
||||
|
||||
'connections' => array(
|
||||
'sqlite' => array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'prefix' => ''
|
||||
),
|
||||
)
|
||||
);
|
||||
124
app/config/testing/mail.example.php
Executable file
124
app/config/testing/mail.example.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'smtp',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Postmark mail service, which will provide reliable delivery.
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => 'smtp.mailgun.org',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to delivery e-mails to
|
||||
| users of your application. Like the host we have set this value to
|
||||
| stay compatible with the Postmark e-mail application by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'port' => 587,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => array('address' => null, 'name' => null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => 'tls',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Password
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the password required by your SMTP server to send out
|
||||
| messages from your application. This will be given to the server on
|
||||
| connection so that the application will be able to send messages.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail "Pretend"
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this option is enabled, e-mail will not actually be sent over the
|
||||
| web and will instead be written to your application's logs files so
|
||||
| you may inspect the message. This is great for local development.
|
||||
|
|
||||
*/
|
||||
|
||||
'pretend' => false,
|
||||
|
||||
);
|
||||
@@ -16,9 +16,12 @@ use Sentry;
|
||||
use Str;
|
||||
use Validator;
|
||||
use View;
|
||||
use Response;
|
||||
|
||||
class AssetsController extends AdminController {
|
||||
|
||||
protected $qrCodeDimensions = array( 'height' => 160, 'width' => 160);
|
||||
|
||||
/**
|
||||
* Show a list of all the assets.
|
||||
*
|
||||
@@ -71,6 +74,71 @@ class AssetsController extends AdminController {
|
||||
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')
|
||||
);
|
||||
$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;
|
||||
$row[] = $asset->assigned_to;
|
||||
|
||||
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);
|
||||
$row[] = $location->city . ', ' . $location->state;
|
||||
}
|
||||
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.
|
||||
*
|
||||
@@ -79,13 +147,12 @@ class AssetsController extends AdminController {
|
||||
public function getCreate()
|
||||
{
|
||||
// Grab the dropdown list of models
|
||||
$model_list = array('' => '') + Model::lists('name', 'id');
|
||||
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
|
||||
$model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
// Grab the dropdown list of status
|
||||
$statuslabel_list = array('' => 'Pending') + array('1' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
|
||||
$statuslabel_list = array('' => 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('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('depreciation_list',$depreciation_list)->with('asset',new Asset);
|
||||
return View::make('backend/hardware/edit')->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('asset',new Asset);
|
||||
|
||||
}
|
||||
|
||||
@@ -182,15 +249,12 @@ class AssetsController extends AdminController {
|
||||
}
|
||||
|
||||
// Grab the dropdown list of models
|
||||
$model_list = array('' => '') + Model::lists('name', 'id');
|
||||
$model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
// Grab the dropdown list of status
|
||||
$statuslabel_list = array('' => 'Pending') + array('0' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
|
||||
$statuslabel_list = array('' => Lang::get('general.pending')) + array('0' => Lang::get('general.ready_to_deploy')) + Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
// get depreciation list
|
||||
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
|
||||
|
||||
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('depreciation_list',$depreciation_list)->with('statuslabel_list',$statuslabel_list);
|
||||
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list);
|
||||
}
|
||||
|
||||
|
||||
@@ -212,10 +276,10 @@ class AssetsController extends AdminController {
|
||||
|
||||
// Declare the rules for the form validation
|
||||
$rules = array(
|
||||
'name' => 'required|min:3',
|
||||
'name' => 'alpha_space|min:3',
|
||||
'asset_tag' => 'required|alpha_space|min:3',
|
||||
'model_id' => 'required',
|
||||
'serial' => 'required|alpha_space|min:3',
|
||||
'serial' => 'alpha_space|min:3',
|
||||
'warranty_months' => 'integer',
|
||||
'notes' => 'alpha_space',
|
||||
);
|
||||
@@ -320,7 +384,7 @@ 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')->lists('full_name', 'id');
|
||||
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->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);
|
||||
@@ -465,10 +529,20 @@ class AssetsController extends AdminController {
|
||||
$asset = Asset::find($assetId);
|
||||
|
||||
if (isset($asset->id)) {
|
||||
return View::make('backend/hardware/view', compact('asset'));
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
$qr_code = (object) array(
|
||||
'display' => $settings->qr_code == '1',
|
||||
'height' => $this->qrCodeDimensions['height'],
|
||||
'width' => $this->qrCodeDimensions['width'],
|
||||
'url' => route('qr_code/hardware', $asset->id)
|
||||
);
|
||||
|
||||
return View::make('backend/hardware/view', compact('asset', 'qr_code'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id' ));
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('assets')->with('error', $error);
|
||||
@@ -476,6 +550,35 @@ class AssetsController extends AdminController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the QR code representing the asset
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function getQrCode($assetId = null)
|
||||
{
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->qr_code == '1') {
|
||||
$asset = Asset::find($assetId);
|
||||
if (isset($asset->id)) {
|
||||
$renderer = new \BaconQrCode\Renderer\Image\Png;
|
||||
$renderer->setWidth($this->qrCodeDimensions['height'])
|
||||
->setHeight($this->qrCodeDimensions['height']);
|
||||
$writer = new \BaconQrCode\Writer($renderer);
|
||||
$content = $writer->writeString(route('view/hardware', $asset->id));
|
||||
|
||||
$response = Response::make($content, 200);
|
||||
$response->header('Content-Type', 'image/png');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
$response = Response::make('', 404);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asset update.
|
||||
*
|
||||
|
||||
@@ -45,7 +45,7 @@ class LicensesController extends AdminController {
|
||||
// Show the page
|
||||
$license_options = array('0' => 'Top Level') + License::lists('name', 'id');
|
||||
// Show the page
|
||||
$depreciation_list = array('0' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
|
||||
$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);
|
||||
}
|
||||
|
||||
@@ -81,9 +81,13 @@ class LicensesController extends AdminController {
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->user_id = Sentry::getId();
|
||||
|
||||
if ($license->purchase_date == "0000-00-00") {
|
||||
$license->purchase_date = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($license->purchase_cost == "0.00") {
|
||||
$license->purchase_cost = NULL;
|
||||
}
|
||||
|
||||
// Was the license created?
|
||||
if($license->save())
|
||||
@@ -129,9 +133,17 @@ class LicensesController extends AdminController {
|
||||
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.does_not_exist'));
|
||||
}
|
||||
|
||||
if ($license->purchase_date == "0000-00-00") {
|
||||
$license->purchase_date = NULL;
|
||||
}
|
||||
|
||||
if ($license->purchase_cost == "0.00") {
|
||||
$license->purchase_cost = NULL;
|
||||
}
|
||||
|
||||
// Show the page
|
||||
$license_options = array('' => 'Top Level') + DB::table('assets')->where('id', '!=', $licenseId)->lists('name', 'id');
|
||||
$depreciation_list = array('0' => 'Do Not Depreciate') + Depreciation::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);
|
||||
}
|
||||
|
||||
@@ -156,6 +168,7 @@ class LicensesController extends AdminController {
|
||||
$new = Input::all();
|
||||
|
||||
|
||||
|
||||
// attempt validation
|
||||
if ($license->validate($new))
|
||||
{
|
||||
@@ -170,12 +183,11 @@ class LicensesController extends AdminController {
|
||||
$license->purchase_date = e(Input::get('purchase_date'));
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
|
||||
|
||||
// Was the asset created?
|
||||
if($license->save())
|
||||
{
|
||||
// Redirect to the new license page
|
||||
return Redirect::to("admin/licenses/$licenseId/edit")->with('success', Lang::get('admin/licenses/message.update.success'));
|
||||
return Redirect::to("admin/licenses/$licenseId/view")->with('success', Lang::get('admin/licenses/message.update.success'));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -185,7 +197,7 @@ class LicensesController extends AdminController {
|
||||
return Redirect::back()->withInput()->withErrors($errors);
|
||||
}
|
||||
|
||||
// Redirect to the category create page
|
||||
// Redirect to the license edit page
|
||||
return Redirect::to("admin/licenses/$licenseId/edit")->with('error', Lang::get('admin/licenses/message.update.error'));
|
||||
|
||||
}
|
||||
@@ -248,7 +260,7 @@ class LicensesController extends AdminController {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Check out the asset to a person
|
||||
**/
|
||||
public function postCheckout($seatId)
|
||||
@@ -295,7 +307,7 @@ class LicensesController extends AdminController {
|
||||
if($licenseseat->save())
|
||||
{
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $licenseseat->id;
|
||||
$logaction->asset_id = $licenseseat->license_id;
|
||||
$logaction->checkedout_to = $licenseseat->assigned_to;
|
||||
$logaction->location_id = $assigned_to->location_id;
|
||||
$logaction->asset_type = 'software';
|
||||
@@ -366,7 +378,7 @@ class LicensesController extends AdminController {
|
||||
// Was the asset updated?
|
||||
if($licenseseat->save())
|
||||
{
|
||||
$logaction->asset_id = $licenseseat->id;
|
||||
$logaction->asset_id = $licenseseat->license_id;
|
||||
$logaction->location_id = NULL;
|
||||
$logaction->asset_type = 'software';
|
||||
$logaction->note = e(Input::get('note'));
|
||||
|
||||
@@ -69,12 +69,13 @@ class ModelsController extends AdminController {
|
||||
{
|
||||
|
||||
// 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->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->user_id = Sentry::getId();
|
||||
$model->name = e(Input::get('name'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->depreciation_id = e(Input::get('depreciation_id'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->user_id = Sentry::getId();
|
||||
$model->eol = e(Input::get('eol'));
|
||||
|
||||
|
||||
// Was it created?
|
||||
@@ -133,7 +134,7 @@ class ModelsController extends AdminController {
|
||||
// Check if the model exists
|
||||
if (is_null($model = Model::find($modelId)))
|
||||
{
|
||||
// Redirect to the blogs management page
|
||||
// Redirect to the models management page
|
||||
return Redirect::to('admin/models')->with('error', Lang::get('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
||||
@@ -145,18 +146,19 @@ class ModelsController extends AdminController {
|
||||
{
|
||||
|
||||
// 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->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->name = e(Input::get('name'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->depreciation_id = e(Input::get('depreciation_id'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->eol = e(Input::get('eol'));
|
||||
|
||||
|
||||
// Was it created?
|
||||
if($model->save())
|
||||
{
|
||||
// Redirect to the new model page
|
||||
return Redirect::to("hardware/models/$modelId/edit")->with('success', Lang::get('admin/models/message.update.success'));
|
||||
return Redirect::to("hardware/models")->with('success', Lang::get('admin/models/message.update.success'));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -38,7 +38,8 @@ class SettingsController extends AdminController {
|
||||
public function getEdit()
|
||||
{
|
||||
$settings = Setting::orderBy('created_at', 'DESC')->paginate(10);
|
||||
return View::make('backend/settings/edit', compact('settings'));
|
||||
$is_gd_installed = extension_loaded('gd');
|
||||
return View::make('backend/settings/edit', compact('settings', 'is_gd_installed'));
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +83,7 @@ class SettingsController extends AdminController {
|
||||
$setting->id = '1';
|
||||
$setting->site_name = e(Input::get('site_name'));
|
||||
$setting->per_page = e(Input::get('per_page'));
|
||||
$setting->qr_code = e(Input::get('qr_code', '0'));
|
||||
|
||||
// Was the asset updated?
|
||||
if($setting->save())
|
||||
|
||||
@@ -5,6 +5,8 @@ use Cartalyst\Sentry\Users\LoginRequiredException;
|
||||
use Cartalyst\Sentry\Users\PasswordRequiredException;
|
||||
use Cartalyst\Sentry\Users\UserExistsException;
|
||||
use Cartalyst\Sentry\Users\UserNotFoundException;
|
||||
use HTML;
|
||||
use URL;
|
||||
use Config;
|
||||
use DB;
|
||||
use Input;
|
||||
@@ -18,6 +20,7 @@ use Redirect;
|
||||
use Sentry;
|
||||
use Validator;
|
||||
use View;
|
||||
use Chumper\Datatable\Facades\Datatable;
|
||||
|
||||
class UsersController extends AdminController {
|
||||
|
||||
@@ -47,7 +50,7 @@ class UsersController extends AdminController {
|
||||
// Do we want to include the deleted users?
|
||||
if (Input::get('withTrashed'))
|
||||
{
|
||||
$users = $users->withTrashed();
|
||||
|
||||
}
|
||||
else if (Input::get('onlyTrashed'))
|
||||
{
|
||||
@@ -55,12 +58,8 @@ class UsersController extends AdminController {
|
||||
}
|
||||
|
||||
|
||||
// Get the user assets
|
||||
//$assets = $users->assets();
|
||||
|
||||
|
||||
// Paginate the users
|
||||
$users = $users->paginate()
|
||||
$users = $users->paginate(100000)
|
||||
->appends(array(
|
||||
'withTrashed' => Input::get('withTrashed'),
|
||||
'onlyTrashed' => Input::get('onlyTrashed'),
|
||||
@@ -68,7 +67,7 @@ class UsersController extends AdminController {
|
||||
|
||||
|
||||
// Show the page
|
||||
return View::make('backend/users/index', compact('users', 'assets'));
|
||||
return View::make('backend/users/index', compact('users'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,9 +92,15 @@ class UsersController extends AdminController {
|
||||
$this->encodePermissions($selectedPermissions);
|
||||
|
||||
$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','and')
|
||||
->orderBy('last_name', 'asc')
|
||||
->orderBy('first_name', 'asc')
|
||||
->lists('full_name', 'id');
|
||||
|
||||
// Show the page
|
||||
return View::make('backend/users/create', compact('groups', 'selectedGroups', 'permissions', 'selectedPermissions'))->with('location_list',$location_list);
|
||||
return View::make('backend/users/create', compact('groups', 'selectedGroups', 'permissions', 'selectedPermissions'))->with('location_list',$location_list)->with('manager_list',$manager_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,8 +200,13 @@ class UsersController extends AdminController {
|
||||
$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');
|
||||
|
||||
}
|
||||
catch (UserNotFoundException $e)
|
||||
@@ -209,7 +219,9 @@ class UsersController extends AdminController {
|
||||
}
|
||||
|
||||
// Show the page
|
||||
return View::make('backend/users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))->with('location_list',$location_list);
|
||||
return View::make('backend/users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))
|
||||
->with('location_list',$location_list)
|
||||
->with('manager_list',$manager_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -273,6 +285,7 @@ class UsersController extends AdminController {
|
||||
$user->jobtitle = Input::get('jobtitle');
|
||||
$user->phone = Input::get('phone');
|
||||
$user->location_id = Input::get('location_id');
|
||||
$user->manager_id = Input::get('manager_id');
|
||||
|
||||
|
||||
// Do we want to update the user password?
|
||||
@@ -448,4 +461,36 @@ class UsersController extends AdminController {
|
||||
|
||||
}
|
||||
|
||||
public function getDatatable()
|
||||
{
|
||||
return Datatable::collection(User::all())
|
||||
->addColumn('name',function($model)
|
||||
{
|
||||
$name = HTML::image($model->gravatar(), $model->first_name, array('class'=>'img-circle avatar hidden-phone', 'style'=>'max-width: 45px'));
|
||||
$name .= HTML::link(URL::action('Controllers\Admin\UsersController@getView', $model->id), $model->first_name . ' ' . $model->last_name, array('class' => 'name'));
|
||||
return $name;
|
||||
}
|
||||
)
|
||||
->showColumns('email')
|
||||
->addColumn('assets', function($model)
|
||||
{
|
||||
$assets = $model->assets->count();
|
||||
return $assets;
|
||||
}
|
||||
)
|
||||
->addColumn('licenses', function($model)
|
||||
{
|
||||
$licenses = $model->licenses->count();
|
||||
return $licenses;
|
||||
}
|
||||
)
|
||||
->addColumn('activated', function($model)
|
||||
{
|
||||
$activated = $model->isActivated() ? '<i class="icon-ok"></i>' : '';
|
||||
return $activated;
|
||||
}
|
||||
)
|
||||
->make();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddFilenameToAssetLog extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('asset_logs', function($table)
|
||||
{
|
||||
$table->text('filename')->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('asset_logs', function($table)
|
||||
{
|
||||
$table->dropColumn('filename');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNullableToLicensesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEolOnModelsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function($table)
|
||||
{
|
||||
$table->integer('eol')->nullable()->default(NULL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models', function($table)
|
||||
{
|
||||
$table->dropColumn('old');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddManagerToUsersTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function($table)
|
||||
{
|
||||
$table->integer('manager_id')->nullable()->default(NULL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function($table)
|
||||
{
|
||||
$table->dropColumn('manager_id');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddQrCodeToSettingsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function($table)
|
||||
{
|
||||
$table->integer('qr_code')->nullable()->default(NULL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function($table)
|
||||
{
|
||||
$table->dropColumn('qr_code');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,11 +16,12 @@ class ActionlogSeeder extends Seeder {
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkout',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '3',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => '3',
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'asset_type' => 'hardware',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
@@ -28,11 +29,12 @@ class ActionlogSeeder extends Seeder {
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkin from',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '3',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => NULL,
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'asset_type' => 'hardware',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
@@ -40,11 +42,12 @@ class ActionlogSeeder extends Seeder {
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkout',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '3',
|
||||
'checkedout_to' => '1',
|
||||
'location_id' => '3',
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'asset_type' => 'software',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
@@ -52,11 +55,12 @@ class ActionlogSeeder extends Seeder {
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkin from',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '3',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => NULL,
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'asset_type' => 'software',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -12,71 +12,77 @@ class ModelsSeeder extends Seeder {
|
||||
|
||||
$date = new DateTime;
|
||||
$models[] = array(
|
||||
'name' => 'MacBook Pro (13-inch, Mid 2012)',
|
||||
'manufacturer_id' => '1',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro9,2',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => 'MacBook Pro (13-inch, Mid 2012)',
|
||||
'manufacturer_id' => '1',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro9,2',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '36',
|
||||
);
|
||||
|
||||
$models[] = array(
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Late 2012)',
|
||||
'manufacturer_id' => '1',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro10,2',
|
||||
'created_at' => $date->modify('-4 day'),
|
||||
'updated_at' => $date->modify('-1 day'),
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Late 2012)',
|
||||
'manufacturer_id' => '1',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro10,2',
|
||||
'created_at' => $date->modify('-4 day'),
|
||||
'updated_at' => $date->modify('-1 day'),
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '36',
|
||||
);
|
||||
|
||||
$models[] = array(
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Early 2013)',
|
||||
'manufacturer_id' => '2',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro10,2',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Early 2013)',
|
||||
'manufacturer_id' => '2',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro10,2',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '36',
|
||||
);
|
||||
|
||||
|
||||
$models[] = array(
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Late 2013)',
|
||||
'manufacturer_id' => '2',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro11,1',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => 'MacBook Pro (Retina, 13-inch, Late 2013)',
|
||||
'manufacturer_id' => '2',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'MacBookPro11,1',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '24',
|
||||
);
|
||||
|
||||
|
||||
$models[] = array(
|
||||
'name' => 'Inspiron 15 Non-Touch',
|
||||
'manufacturer_id' => '4',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'FNCWC16B',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => 'Inspiron 15 Non-Touch',
|
||||
'manufacturer_id' => '4',
|
||||
'category_id' => '1',
|
||||
'modelno' => 'FNCWC16B',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '36',
|
||||
);
|
||||
|
||||
$models[] = array(
|
||||
'name' => '22-inch T897',
|
||||
'manufacturer_id' => '4',
|
||||
'category_id' => '5',
|
||||
'modelno' => '78FNCWC16B',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'name' => '22-inch T897',
|
||||
'manufacturer_id' => '4',
|
||||
'category_id' => '5',
|
||||
'modelno' => '78FNCWC16B',
|
||||
'created_at' => $date->modify('-2 day'),
|
||||
'updated_at' => $date,
|
||||
'depreciation_id' => 1,
|
||||
'user_id' => 1,
|
||||
'eol' => '60',
|
||||
);
|
||||
|
||||
|
||||
|
||||
19
app/lang/en/admin/hardware/form.php
Normal file
19
app/lang/en/admin/hardware/form.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'create' => 'Create Asset',
|
||||
'update' => 'Asset Update',
|
||||
'tag' => 'Asset Tag',
|
||||
'name' => 'Asset Name',
|
||||
'serial' => 'Serial',
|
||||
'order' => 'Order Number',
|
||||
'model' => 'Model',
|
||||
'date' => 'Purchase Date',
|
||||
'cost' => 'Purchase Cost',
|
||||
'warranty' => 'Warranty',
|
||||
'status' => 'Status',
|
||||
'notes' => 'Notes',
|
||||
'months' => 'months',
|
||||
)
|
||||
;
|
||||
@@ -13,5 +13,6 @@ return array(
|
||||
'checkoutto' => 'Checked Out',
|
||||
'change' => 'In/Out',
|
||||
'location' => 'Location',
|
||||
'eol' => 'EOL',
|
||||
|
||||
);
|
||||
|
||||
20
app/lang/en/admin/licenses/form.php
Normal file
20
app/lang/en/admin/licenses/form.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'create' => 'Create License',
|
||||
'update' => 'Update License',
|
||||
'name' => 'Software Name',
|
||||
'serial' => 'Serial',
|
||||
'to_name' => 'Licensed to Name',
|
||||
'to_email' => 'Licensed to Email',
|
||||
'seats' => 'Seats',
|
||||
'order' => 'Order No.',
|
||||
'date' => 'Purchase Date',
|
||||
'cost' => 'Purchase Cost',
|
||||
'depreciation' => 'Depreciation',
|
||||
'no_depreciation' => 'Do Not Depreciate',
|
||||
'notes' => 'Notes',
|
||||
|
||||
)
|
||||
;
|
||||
@@ -6,5 +6,6 @@ return array(
|
||||
'modelnumber' => 'Model No.',
|
||||
'created_at' => 'Created at',
|
||||
'numassets' => 'Assets',
|
||||
'eol' => 'EOL',
|
||||
|
||||
);
|
||||
|
||||
@@ -8,6 +8,43 @@ return array(
|
||||
'save' => 'Save',
|
||||
'checkout' => 'Checkout',
|
||||
'checkin' => 'Checkin',
|
||||
'cancel' => 'Cancel'
|
||||
'cancel' => 'Cancel',
|
||||
'back' => 'Back',
|
||||
|
||||
);
|
||||
'total_assets' => 'total assets',
|
||||
'assets_available'=> 'assets available',
|
||||
'total_licenses'=> 'total licenses',
|
||||
'licenses_available'=> 'licenses available',
|
||||
'all_assets' => 'All Assets',
|
||||
'assets' => 'Assets',
|
||||
'asset' => 'Asset',
|
||||
'license' => 'License',
|
||||
'licenses' => 'Licenses',
|
||||
'user' => 'User',
|
||||
'people' => 'People',
|
||||
'reports' => 'Reports',
|
||||
'all' => 'All',
|
||||
|
||||
'create' => 'Create New',
|
||||
'welcome' => 'Welcome, :name',
|
||||
'settings' => 'Settings',
|
||||
'profile' => 'Your profile',
|
||||
'logout' => 'Logout',
|
||||
'admin' => 'Admin',
|
||||
'groups' => 'Groups',
|
||||
'status' => 'Status',
|
||||
'status_labels' => 'Status Labels',
|
||||
'manufacturers' => 'Manufacturers',
|
||||
'categories' => 'Categories',
|
||||
'locations' => 'Locations',
|
||||
'depreciation' => 'Depreciation',
|
||||
|
||||
'sign_in' => 'Sign in',
|
||||
'deployed' => 'Deployed',
|
||||
'ready_to_deploy'=> 'Ready to Deploy',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Un-deployable',
|
||||
'list_all' => 'List All',
|
||||
'asset_models' => 'Asset Models',
|
||||
)
|
||||
;
|
||||
|
||||
@@ -5,10 +5,10 @@ class Asset extends Elegant {
|
||||
protected $table = 'assets';
|
||||
protected $softDelete = true;
|
||||
protected $rules = array(
|
||||
'name' => 'required|alpha_space|min:3',
|
||||
'name' => 'alpha_space',
|
||||
'asset_tag' => 'required|alpha_space|min:3|unique:assets',
|
||||
'model_id' => 'required',
|
||||
'serial' => 'required|alpha_dash|min:3',
|
||||
'serial' => 'alpha_dash|min:3|unique:assets',
|
||||
'warranty_months' => 'integer',
|
||||
'note' => 'alpha_space',
|
||||
'notes' => 'alpha_space',
|
||||
@@ -21,7 +21,7 @@ class Asset extends Elegant {
|
||||
public function depreciate()
|
||||
{
|
||||
$depreciation_id = Model::find($this->model_id)->depreciation_id;
|
||||
if (isset($depreciation_id)) {
|
||||
if ($depreciation_id) {
|
||||
$depreciation_term = Depreciation::find($depreciation_id)->months;
|
||||
if($depreciation_term>0) {
|
||||
|
||||
@@ -141,7 +141,7 @@ class Asset extends Elegant {
|
||||
|
||||
public function depreciation()
|
||||
{
|
||||
return $this->belongsTo('Depreciation','id');
|
||||
return $this->model->belongsTo('Depreciation','depreciation_id');
|
||||
}
|
||||
|
||||
public function model()
|
||||
@@ -149,4 +149,28 @@ class Asset extends Elegant {
|
||||
return $this->belongsTo('Model','model_id');
|
||||
}
|
||||
|
||||
public function months_until_eol()
|
||||
{
|
||||
$today = date("Y-m-d");
|
||||
$d1 = new DateTime($today);
|
||||
$d2 = new DateTime($this->eol_date());
|
||||
|
||||
if ($this->eol_date() > $today)
|
||||
{
|
||||
$interval = $d2->diff($d1);
|
||||
} else {
|
||||
$interval = NULL;
|
||||
}
|
||||
|
||||
return $interval;
|
||||
}
|
||||
|
||||
public function eol_date()
|
||||
{
|
||||
$date = date_create($this->purchase_date);
|
||||
date_add($date, date_interval_create_from_date_string($this->model->eol.' months'));
|
||||
return date_format($date, 'Y-m-d');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,24 +2,22 @@
|
||||
|
||||
class License extends Elegant {
|
||||
|
||||
/**
|
||||
* Deletes a category
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
protected $guarded = 'id';
|
||||
protected $table = 'licenses';
|
||||
protected $softDelete = true;
|
||||
protected $rules = array(
|
||||
'name' => 'required|alpha_space|min:3',
|
||||
'serial' => 'required|alpha_dash|min:5',
|
||||
'serial' => 'required|alpha_space|min:5',
|
||||
'seats' => 'required|min:1|integer',
|
||||
'license_email' => 'email',
|
||||
'note' => 'alpha_space',
|
||||
'notes' => 'alpha_space',
|
||||
);
|
||||
|
||||
/**
|
||||
* Get the assigned user
|
||||
*
|
||||
*/
|
||||
public function assignedusers()
|
||||
{
|
||||
return $this->belongsToMany('User','license_seats','assigned_to','license_id');
|
||||
@@ -42,7 +40,7 @@ class License extends Elegant {
|
||||
*/
|
||||
public function adminuser()
|
||||
{
|
||||
return $this->belongsTo('User','id');
|
||||
return $this->belongsTo('User','user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,6 +65,10 @@ class License extends Elegant {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of available seats
|
||||
*
|
||||
*/
|
||||
public function availcount()
|
||||
{
|
||||
return DB::table('license_seats')
|
||||
@@ -76,7 +78,10 @@ class License extends Elegant {
|
||||
->count();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of assigned seats
|
||||
*
|
||||
*/
|
||||
public function assignedcount()
|
||||
{
|
||||
return DB::table('license_seats')
|
||||
@@ -86,6 +91,10 @@ class License extends Elegant {
|
||||
->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total number of seats
|
||||
*
|
||||
*/
|
||||
public function totalcount()
|
||||
{
|
||||
$avail = $this->availcount();
|
||||
@@ -94,11 +103,19 @@ class License extends Elegant {
|
||||
return $diff;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get license seat data
|
||||
*
|
||||
*/
|
||||
public function licenseseats()
|
||||
{
|
||||
return $this->hasMany('LicenseSeat');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get depreciation class
|
||||
*
|
||||
*/
|
||||
public function depreciation()
|
||||
{
|
||||
return $this->belongsTo('Depreciation','id');
|
||||
|
||||
@@ -6,7 +6,7 @@ class LicenseSeat extends Elegant {
|
||||
|
||||
public function license()
|
||||
{
|
||||
return $this->belongsTo('License');
|
||||
return $this->belongsTo('License','license_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
||||
@@ -4,10 +4,11 @@ class Model extends Elegant {
|
||||
|
||||
// Declare the rules for the form validation
|
||||
protected $rules = array(
|
||||
'name' => 'required|alpha_space|min:3',
|
||||
'modelno' => 'alpha_space|min:1',
|
||||
'category_id' => 'required|integer',
|
||||
'name' => 'required|alpha_space|min:3',
|
||||
'modelno' => 'alpha_space|min:1',
|
||||
'category_id' => 'required|integer',
|
||||
'manufacturer_id' => 'required|integer',
|
||||
'eol' => 'integer',
|
||||
);
|
||||
|
||||
public function assets()
|
||||
@@ -22,7 +23,7 @@ class Model extends Elegant {
|
||||
|
||||
public function depreciation()
|
||||
{
|
||||
return $this->belongsTo('Depreciation','id');
|
||||
return $this->belongsTo('Depreciation','depreciation_id');
|
||||
}
|
||||
|
||||
public function adminuser()
|
||||
@@ -35,6 +36,4 @@ class Model extends Elegant {
|
||||
return $this->belongsTo('Manufacturer','manufacturer_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class User extends SentryUserModel {
|
||||
public function gravatar()
|
||||
{
|
||||
// Generate the Gravatar hash
|
||||
$gravatar = md5(strtolower(trim($this->gravatar)));
|
||||
$gravatar = md5(strtolower(trim($this->email)));
|
||||
|
||||
// Return the Gravatar url
|
||||
return "//gravatar.com/avatar/{$gravatar}";
|
||||
@@ -65,4 +65,13 @@ class User extends SentryUserModel {
|
||||
return $this->belongsTo('Location','location_id')->withTrashed();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the user's manager based on the assigned user
|
||||
**/
|
||||
public function manager()
|
||||
{
|
||||
return $this->belongsTo('User','manager_id')->withTrashed();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Route::when('admin/*', 'crsf', array('post'));
|
||||
Route::when('hardware/*', 'crsf', array('post'));
|
||||
|
||||
Route::group(array('prefix' => 'hardware'), function()
|
||||
{
|
||||
|
||||
@@ -31,6 +26,7 @@ Route::group(array('prefix' => 'hardware'), function()
|
||||
Route::get('{assetId}/checkin', array('as' => 'checkin/hardware', 'uses' => 'Controllers\Admin\AssetsController@getCheckin'));
|
||||
Route::post('{assetId}/checkin', 'Controllers\Admin\AssetsController@postCheckin');
|
||||
Route::get('{assetId}/view', array('as' => 'view/hardware', 'uses' => 'Controllers\Admin\AssetsController@getView'));
|
||||
Route::get('{assetId}_qr_code.png', array('as' => 'qr_code/hardware', 'uses' => 'Controllers\Admin\AssetsController@getQrCode'));
|
||||
|
||||
|
||||
# Asset Model Management
|
||||
@@ -162,6 +158,8 @@ Route::group(array('prefix' => 'admin'), function()
|
||||
Route::get('{userId}/delete', array('as' => 'delete/user', 'uses' => 'Controllers\Admin\UsersController@getDelete'));
|
||||
Route::get('{userId}/restore', array('as' => 'restore/user', 'uses' => 'Controllers\Admin\UsersController@getRestore'));
|
||||
Route::get('{userId}/view', array('as' => 'view/user', 'uses' => 'Controllers\Admin\UsersController@getView'));
|
||||
|
||||
Route::get('datatable', array('as'=>'api.users', 'uses'=>'Controllers\Admin\UsersController@getDatatable'));
|
||||
});
|
||||
|
||||
# Group Management
|
||||
@@ -265,3 +263,4 @@ Route::get('/', function()
|
||||
});
|
||||
Route::get('/', array('as' => 'home', 'uses' => 'Controllers\Admin\AssetsController@getIndex'));
|
||||
Route::get('reports', array('as' => 'reports', 'uses' => 'Controllers\Admin\AssetsController@getReports'));
|
||||
Route::get('reports/export', array('as' => 'reports/export', 'uses' => 'Controllers\Admin\AssetsController@exportReports'));
|
||||
|
||||
@@ -95,5 +95,10 @@ App::down(function()
|
||||
|
|
||||
*/
|
||||
|
||||
App::error(function(\Illuminate\Session\TokenMismatchException $exception)
|
||||
{
|
||||
return Redirect::route('signin')->with('error','Your login session has expired. Please try logging in again.');
|
||||
});
|
||||
|
||||
require app_path().'/filters.php';
|
||||
require app_path().'/validators.php';
|
||||
|
||||
0
app/storage/logs/.gitkeep
Normal file
0
app/storage/logs/.gitkeep
Normal file
0
app/storage/views/.gitkeep
Normal file
0
app/storage/views/.gitkeep
Normal file
@@ -7,11 +7,10 @@ class ExampleTest extends TestCase {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicExample()
|
||||
public function testSomethingIsTrue()
|
||||
{
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
$this->assertTrue($this->client->getResponse()->isOk());
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
Validator::extend('alpha_space', function($attribute,$value,$parameters)
|
||||
{
|
||||
return preg_match("/^[-+:?'()_,!. a-zA-Z0-9]+$/",$value);
|
||||
return preg_match("/^[\n-+:?#~'\/\(\)_,!. a-zA-Z0-9]+$/m",$value);
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('categories') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>Asset Categories</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('categories') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@ Asset Categories ::
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-7">@lang('admin/categories/table.title')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -57,4 +57,4 @@ Asset Categories ::
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('depreciations') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>
|
||||
@if ($depreciation->id)
|
||||
Update Depreciation
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('depreciations') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@ Asset Depreciations ::
|
||||
<tr role="row">
|
||||
<th class="col-md-4">@lang('admin/depreciations/table.title')</th>
|
||||
<th class="col-md-2">@lang('admin/depreciations/table.term')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -57,4 +57,4 @@ Asset Depreciations ::
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
|
||||
@@ -12,7 +12,7 @@ Create Group ::
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('groups') }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>Group Update</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,7 +66,7 @@ Create Group ::
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('groups') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ Group Update ::
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('groups') }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>Group Update</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,10 +23,10 @@ Group Management ::
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-6">@lang('admin/groups/table.name')</th>
|
||||
<th class="col-md-1">@lang('admin/groups/table.users')</th>
|
||||
<th class="col-md-3">@lang('admin/groups/table.name')</th>
|
||||
<th class="col-md-2">@lang('admin/groups/table.users')</th>
|
||||
<th class="col-md-2">@lang('admin/groups/table.created_at')</th>
|
||||
<th class="col-md-3">@lang('table.actions')</th>
|
||||
<th class="col-md-1 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('hardware') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3> Checkin Asset </h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,11 +55,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
@if ($asset->id)
|
||||
<a class="btn btn-link" href="{{ route('view/hardware', $asset->id) }}">@lang('general.cancel')</a>
|
||||
@else
|
||||
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
|
||||
@endif
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i>@lang('general.checkin')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('hardware') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>
|
||||
@if ($asset->id)
|
||||
Checkout Asset to User
|
||||
@@ -72,11 +72,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
@if ($asset->id)
|
||||
<a class="btn btn-link" href="{{ route('view/hardware', $asset->id) }}">Cancel</a>
|
||||
@else
|
||||
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
|
||||
@endif
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="page-header">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ route('hardware') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
</div>
|
||||
|
||||
<h3>Clone Asset</h3>
|
||||
@@ -133,7 +133,7 @@
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
|
||||
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($asset->id)
|
||||
Asset Update ::
|
||||
@lang('admin/hardware/form.update') ::
|
||||
@else
|
||||
Create Asset ::
|
||||
@lang('admin/hardware/form.create') ::
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
@@ -16,17 +16,12 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
@if ($asset->id)
|
||||
<a href="{{ route('view/hardware',$asset->id) }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
@else
|
||||
<a href="{{ route('hardware') }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
@endif
|
||||
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
|
||||
<h3>
|
||||
@if ($asset->id)
|
||||
Asset Update
|
||||
@lang('admin/hardware/form.update')
|
||||
@else
|
||||
Create Asset
|
||||
@lang('admin/hardware/form.create')
|
||||
@endif
|
||||
</h3>
|
||||
</div>
|
||||
@@ -42,7 +37,7 @@
|
||||
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
|
||||
<label for="asset_tag" class="col-md-2 control-label">Asset Tag</label>
|
||||
<label for="asset_tag" class="col-md-2 control-label">@lang('admin/hardware/form.tag')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $asset->asset_tag) }}" />
|
||||
{{ $errors->first('asset_tag', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -51,7 +46,7 @@
|
||||
|
||||
<!-- Asset Title -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-2 control-label">Asset Name</label>
|
||||
<label for="name" class="col-md-2 control-label">@lang('admin/hardware/form.name')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
|
||||
{{ $errors->first('name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -59,7 +54,7 @@
|
||||
</div>
|
||||
<!-- Serial -->
|
||||
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
|
||||
<label for="serial" class="col-md-2 control-label">Serial</label>
|
||||
<label for="serial" class="col-md-2 control-label">@lang('admin/hardware/form.serial')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $asset->serial) }}" />
|
||||
{{ $errors->first('serial', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -68,7 +63,7 @@
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<label for="order_number" class="col-md-2 control-label">Order Number</label>
|
||||
<label for="order_number" class="col-md-2 control-label">@lang('admin/hardware/form.order')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $asset->order_number) }}" />
|
||||
{{ $errors->first('order_number', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -77,7 +72,7 @@
|
||||
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-2 control-label">Model</label>
|
||||
<label for="parent" class="col-md-2 control-label">@lang('admin/hardware/form.model')</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{{ $errors->first('model_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -86,7 +81,7 @@
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<label for="purchase_date" class="col-md-2 control-label">Purchase Date</label>
|
||||
<label for="purchase_date" class="col-md-2 control-label">@lang('admin/hardware/form.date')</label>
|
||||
<div class="input-group col-md-2">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $asset->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="icon-calendar"></i></span>
|
||||
@@ -96,10 +91,10 @@
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<label for="purchase_cost" class="col-md-2 control-label">Purchase Cost</label>
|
||||
<label for="purchase_cost" class="col-md-2 control-label">@lang('admin/hardware/form.cost')</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<span class="input-group-addon">@lang('general.currency')</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', $asset->purchase_cost) }}" />
|
||||
{{ $errors->first('purchase_cost', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
@@ -108,10 +103,10 @@
|
||||
|
||||
<!-- Warrantee -->
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="warranty_months" class="col-md-2 control-label">Warranty</label>
|
||||
<label for="warranty_months" class="col-md-2 control-label">@lang('admin/hardware/form.warranty')</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input class="col-md-2 form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" /> <span class="input-group-addon">months</span>
|
||||
<input class="col-md-2 form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" /> <span class="input-group-addon">@lang('admin/hardware/form.months')</span>
|
||||
{{ $errors->first('warranty_months', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,7 +114,7 @@
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-2 control-label">Status</label>
|
||||
<label for="status_id" class="col-md-2 control-label">@lang('admin/hardware/form.status')</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{{ $errors->first('status_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -128,7 +123,7 @@
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-2 control-label">Notes</label>
|
||||
<label for="notes" class="col-md-2 control-label">@lang('admin/hardware/form.notes')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="col-md-6 form-control" type="text" name="notes" id="notes" value="{{ Input::old('notes', $asset->notes) }}" />
|
||||
{{ $errors->first('notes', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -139,12 +134,8 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
@if ($asset->id)
|
||||
<a class="btn btn-link" href="{{ route('view/hardware', $asset->id) }}">Cancel</a>
|
||||
@else
|
||||
<a class="btn btn-link" href="{{ route('hardware') }}">Cancel</a>
|
||||
@endif
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> Save</button>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
@extends('backend/layouts/default')
|
||||
|
||||
@section('title0')
|
||||
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD') || Input::get('Deployed'))
|
||||
@if (Input::get('Pending'))
|
||||
@lang('general.pending')
|
||||
@elseif (Input::get('RTD'))
|
||||
@lang('general.ready_to_deploy')
|
||||
@elseif (Input::get('Undeployable'))
|
||||
@lang('general.undeployable')
|
||||
@elseif (Input::get('Deployed'))
|
||||
@lang('general.deployed')
|
||||
@endif
|
||||
@else
|
||||
@lang('general.all')
|
||||
@endif
|
||||
|
||||
@lang('general.assets')
|
||||
@stop
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD') || Input::get('Deployed'))
|
||||
@if (Input::get('Pending'))
|
||||
Pending
|
||||
@elseif (Input::get('RTD'))
|
||||
Ready to Deploy
|
||||
@elseif (Input::get('Undeployable'))
|
||||
Un-deployable
|
||||
@elseif (Input::get('Deployed'))
|
||||
Deployed
|
||||
@endif
|
||||
@else
|
||||
All
|
||||
@endif
|
||||
|
||||
Assets ::
|
||||
@parent
|
||||
@yield('title0') :: @parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@@ -26,23 +29,8 @@ Assets ::
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('create/hardware') }}" class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> Create New</a>
|
||||
<h3>
|
||||
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD') || Input::get('Deployed'))
|
||||
@if (Input::get('Pending'))
|
||||
Pending
|
||||
@elseif (Input::get('RTD'))
|
||||
Ready to Deploy
|
||||
@elseif (Input::get('Undeployable'))
|
||||
Un-deployable
|
||||
@elseif (Input::get('Deployed'))
|
||||
Deployed
|
||||
@endif
|
||||
@else
|
||||
All
|
||||
@endif
|
||||
Assets
|
||||
</h3>
|
||||
<a href="{{ route('create/hardware') }}" class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> @lang('general.create')</a>
|
||||
<h3>@yield('title0')</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,18 +42,18 @@ Assets ::
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-2" bSortable="true">@lang('admin/hardware/table.asset_tag')</th>
|
||||
<th class="col-md-2" bSortable="true">@lang('admin/hardware/table.title')</th>
|
||||
<th class="col-md-1" bSortable="true">@lang('admin/hardware/table.asset_tag')</th>
|
||||
<th class="col-md-3" bSortable="true">@lang('admin/hardware/table.title')</th>
|
||||
<th class="col-md-2" bSortable="true">@lang('admin/hardware/table.serial')</th>
|
||||
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
|
||||
<th class="col-md-2" bSortable="true">Status</th>
|
||||
<th class="col-md-2" bSortable="true">@lang('general.status')</th>
|
||||
@else
|
||||
<th class="col-md-2" bSortable="true">@lang('admin/hardware/table.checkoutto')</th>
|
||||
<th class="col-md-2" bSortable="true">@lang('admin/hardware/table.location')</th>
|
||||
@endif
|
||||
|
||||
<th class="col-md-2">@lang('admin/hardware/table.eol')</th>
|
||||
<th class="col-md-1">@lang('admin/hardware/table.change')</th>
|
||||
<th class="col-md-2" bSortable="false">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions" bSortable="false">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -73,20 +61,19 @@ Assets ::
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->asset_tag }}</a></td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->name }}</a></td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->model->name }}</a></td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
@if (Input::get('Pending') || Input::get('Undeployable') || Input::get('RTD'))
|
||||
<td>
|
||||
@if (Input::get('Pending'))
|
||||
Pending
|
||||
@lang('general.pending')
|
||||
@elseif (Input::get('RTD'))
|
||||
Ready to Deploy
|
||||
@lang('general.ready_to_deploy')
|
||||
@elseif (Input::get('Undeployable'))
|
||||
@if ($asset->assetstatus)
|
||||
{{ $asset->assetstatus->name }}
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
@@ -108,12 +95,18 @@ Assets ::
|
||||
|
||||
@endif
|
||||
|
||||
<td>
|
||||
@if ($asset->model->eol)
|
||||
{{ $asset->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if ($asset->status_id < 1 )
|
||||
@if ($asset->assigned_to != 0)
|
||||
<a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary">Checkin</a>
|
||||
<a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary">@lang('general.checkin')</a>
|
||||
@else
|
||||
<a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info">Checkout</a>
|
||||
<a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info">@lang('general.checkout')</a>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
@@ -126,9 +119,8 @@ Assets ::
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-9">
|
||||
<div class="alert alert-info alert-block">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<i class="icon-info-sign"></i>
|
||||
There are no results for your query.
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,10 @@ View Asset {{ $asset->asset_tag }} ::
|
||||
</ul>
|
||||
</div>
|
||||
<h3>
|
||||
<h3 class="name">History for {{ $asset->asset_tag }} ({{ $asset->name }})
|
||||
<h3 class="name">History for {{ $asset->asset_tag }}
|
||||
@if ($asset->name)
|
||||
({{ $asset->name }})
|
||||
@endif
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,6 +74,15 @@ View Asset {{ $asset->asset_tag }} ::
|
||||
{{ $asset->months_until_depreciated()->y }} years</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->model->eol)
|
||||
<div class="col-md-6"><strong>EOL Rate: </strong> {{ $asset->model->eol }} months </div>
|
||||
<div class="col-md-6"><strong>EOL Date: </strong> {{ $asset->eol_date() }}
|
||||
@if ($asset->months_until_eol())
|
||||
({{ $asset->months_until_eol()->y }} years,
|
||||
{{ $asset->months_until_eol()->m }} months)
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
@@ -142,6 +154,13 @@ View Asset {{ $asset->asset_tag }} ::
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3 col-xs-12 address pull-right">
|
||||
|
||||
@if ($qr_code->display)
|
||||
<h6>QR Code</h6>
|
||||
<p>
|
||||
<img src="{{ $qr_code->url }}" height="{{ $qr_code->height }}" width="{{ $qr_code->width }}" />
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0)))
|
||||
<h6><br>Checked Out To:</h6>
|
||||
<ul>
|
||||
@@ -178,11 +197,11 @@ View Asset {{ $asset->asset_tag }} ::
|
||||
@if ($asset->assetstatus)
|
||||
<h6><br>{{ $asset->assetstatus->name }} Asset</h6>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="icon-warning-sign"></i>
|
||||
<strong>Warning: </strong> This asset has been marked <strong>{{ $asset->assetstatus->name }}</strong> and is currently undeployable.
|
||||
If this status has changed, please update the asset status.
|
||||
If this status has changed, please update the asset status by <a href="{{ route('update/hardware', $asset->id) }}">editing the asset</a>.
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
@section('title')
|
||||
Snipe IT Asset Manager
|
||||
{{ Setting::getSettings()->site_name }}
|
||||
@show
|
||||
</title>
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/compiled/form-showcase.css') }}" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/lib/jquery.dataTables.css') }}" type="text/css" media="screen" />
|
||||
|
||||
|
||||
<!-- global header javascripts -->
|
||||
<script src="//code.jquery.com/jquery-latest.js"></script>
|
||||
<script src="{{ asset('assets/js/jquery.dataTables.js') }}"></script>
|
||||
|
||||
<!-- open sans font -->
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||
@@ -82,73 +84,97 @@
|
||||
<ul class="nav navbar-nav pull-right hidden-xs">
|
||||
@if (Sentry::check())
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle hidden-xs hidden-sm" data-toggle="dropdown">
|
||||
<i class="icon-plus"></i> @lang('general.create')
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li {{ (Request::is('hardware/create') ? 'class="active"' : '') }}>
|
||||
<a href="{{ route('create/hardware') }}">
|
||||
<i class="icon-plus"></i>
|
||||
@lang('general.asset')</a>
|
||||
</li>
|
||||
<li {{ (Request::is('admin/licenses/create') ? 'class="active"' : '') }}>
|
||||
<a href="{{ route('create/licenses') }}">
|
||||
<i class="icon-plus"></i>
|
||||
@lang('general.license')</a>
|
||||
</li>
|
||||
<li {{ (Request::is('admin/users/create') ? 'class="active"' : '') }}>
|
||||
<a href="{{ route('create/user') }}">
|
||||
<i class="icon-plus"></i>
|
||||
@lang('general.user')</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle hidden-xs hidden-sm" data-toggle="dropdown">
|
||||
Welcome, {{ Sentry::getUser()->first_name }}
|
||||
{{ Lang::get('general.welcome', array('name' => Sentry::getUser()->first_name)) }}
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
@if(Sentry::getUser()->hasAccess('admin'))
|
||||
<li>
|
||||
<a href="{{ route('app') }}">
|
||||
<i class="icon-cog"></i> Settings
|
||||
<i class="icon-cog"></i> @lang('general.settings')
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li{{ (Request::is('account/profile') ? ' class="active"' : '') }}>
|
||||
<a href="{{ route('profile') }}">
|
||||
<i class="icon-user"></i> Your profile
|
||||
<i class="icon-user"></i> @lang('general.profile')
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="{{ route('logout') }}">
|
||||
<i class="icon-off"></i>
|
||||
Logout
|
||||
@lang('general.logout')
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown{{ (Request::is('admin/users*|admin/groups*') ? ' active' : '') }} hidden-phone">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="{{ URL::to('admin/users') }}">
|
||||
<i class="icon-wrench icon-white"></i> Admin <span class="caret"></span>
|
||||
<i class="icon-wrench icon-white"></i> @lang('general.admin') <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li{{ (Request::is('admin/groups*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/groups') }}">
|
||||
<i class="icon-group"></i> Groups
|
||||
<i class="icon-group"></i> @lang('general.groups')
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/settings/statuslabels*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/settings/statuslabels') }}">
|
||||
<i class="icon-list"></i> Status Labels
|
||||
<i class="icon-list"></i> @lang('general.status_labels')
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/settings/manufacturers*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/settings/manufacturers') }}">
|
||||
<i class="icon-briefcase"></i> Manufacturers
|
||||
<i class="icon-briefcase"></i> @lang('general.manufacturers')
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/settings/categories*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/settings/categories') }}">
|
||||
<i class="icon-th"></i> Categories
|
||||
<i class="icon-th"></i> @lang('general.categories')
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/settings/locations*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/settings/locations') }}">
|
||||
<i class="icon-globe"></i> Locations
|
||||
<i class="icon-globe"></i> @lang('general.locations')
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/settings/depreciations*') ? ' class="active"' : '') }}>
|
||||
<a href="{{ URL::to('admin/settings/depreciations') }}">
|
||||
<i class="icon-arrow-down"></i> Depreciation
|
||||
<i class="icon-arrow-down"></i> @lang('general.depreciation')
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@else
|
||||
<li {{ (Request::is('auth/signin') ? 'class="active"' : '') }}><a href="{{ route('signin') }}">Sign in</a></li>
|
||||
<li {{ (Request::is('auth/signin') ? 'class="active"' : '') }}><a href="{{ route('signin') }}">@lang('general.sign_in')</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@@ -164,17 +190,17 @@
|
||||
<li{{ (Request::is('hardware*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="icon-barcode"></i>
|
||||
<span>Assets</span>
|
||||
<span>@lang('general.assets')</span>
|
||||
<i class="icon-chevron-down"></i>
|
||||
</a>
|
||||
|
||||
<ul class="submenu{{ (Request::is('hardware*') ? ' active' : '') }}">
|
||||
<li><a href="{{ URL::to('hardware?Deployed=true') }}" {{ (Request::query('Deployed') ? ' class="active"' : '') }} >Deployed</a></li>
|
||||
<li><a href="{{ URL::to('hardware?RTD=true') }}" {{ (Request::query('RTD') ? ' class="active"' : '') }} >Ready to Deploy</a></li>
|
||||
<li><a href="{{ URL::to('hardware?Pending=true') }}" {{ (Request::query('Pending') ? ' class="active"' : '') }} >Pending</a></li>
|
||||
<li><a href="{{ URL::to('hardware?Undeployable=true') }}" {{ (Request::query('Undeployable') ? ' class="active"' : '') }} >Un-Deployable</a></li>
|
||||
<li><a href="{{ URL::to('hardware') }}">List All</a></li>
|
||||
<li><a href="{{ URL::to('hardware/models') }}" {{ (Request::is('hardware/models*') ? ' class="active"' : '') }} >Asset Models</a></li>
|
||||
<li><a href="{{ URL::to('hardware?Deployed=true') }}" {{ (Request::query('Deployed') ? ' class="active"' : '') }} >@lang('general.deployed')</a></li>
|
||||
<li><a href="{{ URL::to('hardware?RTD=true') }}" {{ (Request::query('RTD') ? ' class="active"' : '') }} >@lang('general.ready_to_deploy')</a></li>
|
||||
<li><a href="{{ URL::to('hardware?Pending=true') }}" {{ (Request::query('Pending') ? ' class="active"' : '') }} >@lang('general.pending')</a></li>
|
||||
<li><a href="{{ URL::to('hardware?Undeployable=true') }}" {{ (Request::query('Undeployable') ? ' class="active"' : '') }} >@lang('general.undeployable')</a></li>
|
||||
<li><a href="{{ URL::to('hardware') }}">@lang('general.list_all')</a></li>
|
||||
<li><a href="{{ URL::to('hardware/models') }}" {{ (Request::is('hardware/models*') ? ' class="active"' : '') }} >@lang('general.asset_models')</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -182,19 +208,19 @@
|
||||
<li{{ (Request::is('admin/licenses*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
|
||||
<a href="{{ URL::to('admin/licenses') }}">
|
||||
<i class="icon-certificate"></i>
|
||||
<span>Licenses</span>
|
||||
<span>@lang('general.licenses')</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('admin/users*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
|
||||
<a href="{{ URL::to('admin/users') }}">
|
||||
<i class="icon-group"></i>
|
||||
<span>People</span>
|
||||
<span>@lang('general.people')</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{{ (Request::is('reports*') ? ' class="active"><div class="pointer"><div class="arrow"></div><div class="arrow_border"></div></div>' : '>') }}
|
||||
<a href="{{ URL::to('reports') }}">
|
||||
<i class="icon-signal"></i>
|
||||
<span>Reports</span>
|
||||
<span>@lang('general.reports')</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -208,13 +234,13 @@
|
||||
|
||||
@if ((Sentry::check()) && (Sentry::getUser()->hasAccess('admin')))
|
||||
<!-- upper main stats -->
|
||||
<div id="main-stats">
|
||||
<div id="main-stats">
|
||||
<div class="row stats-row">
|
||||
<div class="col-md-3 col-sm-3 stat">
|
||||
<div class="data">
|
||||
<a href="{{ URL::to('hardware') }}">
|
||||
<span class="number">{{ number_format(Asset::assetcount()) }}</span>
|
||||
<span style="color:black">total assets</span>
|
||||
<span style="color:black">@lang('general.total_assets')</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -222,7 +248,7 @@
|
||||
<div class="data">
|
||||
<a href="{{ URL::to('hardware?RTD=true') }}">
|
||||
<span class="number">{{ number_format(Asset::availassetcount()) }}</span>
|
||||
<span style="color:black">assets available</span>
|
||||
<span style="color:black">@lang('general.assets_available')</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -230,7 +256,7 @@
|
||||
<div class="data">
|
||||
<a href="{{ URL::to('admin/licenses') }}">
|
||||
<span class="number">{{ number_format(License::assetcount()) }}</span>
|
||||
<span style="color:black">total licenses</span>
|
||||
<span style="color:black">@lang('general.total_licenses')</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -238,65 +264,72 @@
|
||||
<div class="data">
|
||||
<a href="{{ URL::to('admin/licenses') }}">
|
||||
<span class="number">{{ number_format(License::availassetcount()) }}</span>
|
||||
<span style="color:black">licenses available</span>
|
||||
<span style="color:black">@lang('general.licenses_available')</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end upper main stats -->
|
||||
@endif
|
||||
|
||||
<!-- end upper main stats -->
|
||||
@endif
|
||||
|
||||
<div id="pad-wrapper">
|
||||
|
||||
<div id="pad-wrapper">
|
||||
<!-- Notifications -->
|
||||
@include('frontend/notifications')
|
||||
|
||||
<!-- Content -->
|
||||
@yield('content')
|
||||
|
||||
<!-- Notifications -->
|
||||
@include('frontend/notifications')
|
||||
|
||||
<!-- Content -->
|
||||
@yield('content')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div id="footer">
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="muted credit"><a href="http://snipeitapp.com">Snipe IT</a> is a free open source
|
||||
project by <a href="http://twitter.com/snipeyhead">@snipeyhead</a>. <a href="https://github.com/snipe/snipe-it">Fork it here</a>!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- end main container -->
|
||||
|
||||
<div class="modal fade" id="dataConfirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button><a class="btn btn-danger" id="dataConfirmOK">@lang('general.yes')</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- scripts -->
|
||||
<script src="//code.jquery.com/jquery-latest.js"></script>
|
||||
<script src="{{ asset('assets/js/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/jquery.knob.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/jquery.uniform.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/bootstrap.datepicker.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/jquery.dataTables.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/theme.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#example').dataTable({
|
||||
"sPaginationType": "full_numbers",
|
||||
"iDisplayLength": {{ Setting::getSettings()->per_page }},
|
||||
"aLengthMenu": [[{{ Setting::getSettings()->per_page }}, -1], [{{ Setting::getSettings()->per_page }}, "All"]]
|
||||
"aLengthMenu": [[{{ Setting::getSettings()->per_page }}, -1], [{{ Setting::getSettings()->per_page }}, "All"]],
|
||||
"aoColumnDefs": [{ 'bSortable': false, 'aTargets': [ 'actions' ] }]
|
||||
});
|
||||
});
|
||||
|
||||
$('#nosorting').dataTable({
|
||||
"sPaginationType": "full_numbers",
|
||||
@@ -337,30 +370,20 @@
|
||||
|
||||
// confirm delete modal
|
||||
$('.delete-asset').click(function(evnt) {
|
||||
var href = $(this).attr('href');
|
||||
var message = $(this).attr('data-content');
|
||||
var title = $(this).attr('data-title');
|
||||
|
||||
if (!$('#dataConfirmModal').length) {
|
||||
$('body').append('<div class="modal fade" id="dataConfirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel">'+title+'</h4></div><div class="modal-body">'+message+'</div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button><a class="btn btn-danger" id="dataConfirmOK">Yes</a></div></div></div></div>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#dataConfirmModal').find('.modal-body').text(message);
|
||||
$('#dataConfirmOK').attr('href', href);
|
||||
$('#dataConfirmModal').modal({show:true});
|
||||
})
|
||||
var href = $(this).attr('href');
|
||||
var message = $(this).attr('data-content');
|
||||
var title = $(this).attr('data-title');
|
||||
|
||||
$('#myModalLabel').text(title);
|
||||
$('#dataConfirmModal .modal-body').text(message);
|
||||
$('#dataConfirmOK').attr('href', href);
|
||||
$('#dataConfirmModal').modal({show:true});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('licenses') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3> Checkin License </h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('hardware') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>
|
||||
Checkout License to User
|
||||
</h3>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($license->id)
|
||||
License Update ::
|
||||
@lang('admin/licenses/form.update') ::
|
||||
@else
|
||||
Create License ::
|
||||
@lang('admin/licenses/form.create') ::
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
@@ -15,17 +15,12 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
@if ($license->id)
|
||||
<a href="{{ route('view/license',$license->id) }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
@else
|
||||
<a href="{{ route('licenses') }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
@endif
|
||||
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
|
||||
<h3>
|
||||
@if ($license->id)
|
||||
Update License
|
||||
@lang('admin/licenses/form.update')
|
||||
@else
|
||||
Create License
|
||||
@lang('admin/licenses/form.create')
|
||||
@endif
|
||||
</h3>
|
||||
</div>
|
||||
@@ -39,32 +34,23 @@
|
||||
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">Software Name</label>
|
||||
<label for="name" class="col-md-3 control-label">@lang('admin/licenses/form.name')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $license->name) }}" />
|
||||
{{ $errors->first('name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
|
||||
<label for="serial" class="col-md-3 control-label">Serial</label>
|
||||
<label for="serial" class="col-md-3 control-label">@lang('admin/licenses/form.serial')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $license->serial) }}" />
|
||||
{{ $errors->first('serial', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
|
||||
<label for="serial" class="col-md-3 control-label">Serial</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $license->serial) }}" />
|
||||
<textarea class="form-control" type="text" name="serial" id="serial">{{ Input::old('serial', $license->serial) }}</textarea>
|
||||
{{ $errors->first('serial', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
|
||||
<label for="license_name" class="col-md-3 control-label">Licensed to Name</label>
|
||||
<label for="license_name" class="col-md-3 control-label">@lang('admin/licenses/form.to_name')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="license_name" id="license_name" value="{{ Input::old('license_name', $license->license_name) }}" />
|
||||
{{ $errors->first('license_name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -72,7 +58,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('license_email') ? ' has-error' : '' }}">
|
||||
<label for="license_email" class="col-md-3 control-label">Licensed to Email</label>
|
||||
<label for="license_email" class="col-md-3 control-label">@lang('admin/licenses/form.to_email')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="license_email" id="license_email" value="{{ Input::old('license_email', $license->license_email) }}" />
|
||||
{{ $errors->first('license_email', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -80,7 +66,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
|
||||
<label for="seats" class="col-md-3 control-label">Seats</label>
|
||||
<label for="seats" class="col-md-3 control-label">@lang('admin/licenses/form.seats')</label>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="seats" id="seats" value="{{ Input::old('seats', $license->seats) }}" />
|
||||
{{ $errors->first('seats', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -88,7 +74,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<label for="order_number" class="col-md-3 control-label">Order No.</label>
|
||||
<label for="order_number" class="col-md-3 control-label">@lang('admin/licenses/form.order')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $license->order_number) }}" />
|
||||
{{ $errors->first('order_number', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -97,7 +83,7 @@
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<label for="purchase_date" class="col-md-3 control-label">Purchase Date</label>
|
||||
<label for="purchase_date" class="col-md-3 control-label">@lang('admin/licenses/form.date')</label>
|
||||
<div class="input-group col-md-2">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $license->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="icon-calendar"></i></span>
|
||||
@@ -107,10 +93,10 @@
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<label for="purchase_cost" class="col-md-3 control-label">Purchase Cost</label>
|
||||
<label for="purchase_cost" class="col-md-3 control-label">@lang('admin/licenses/form.cost')</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<span class="input-group-addon">@lang('general.currency')</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', $license->purchase_cost) }}" />
|
||||
{{ $errors->first('purchase_cost', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
@@ -119,7 +105,7 @@
|
||||
|
||||
<!-- Depreciation -->
|
||||
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">Depreciation</label>
|
||||
<label for="parent" class="col-md-3 control-label">@lang('admin/licenses/form.depreciation')</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $license->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -128,7 +114,7 @@
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-3 control-label">Notes</label>
|
||||
<label for="notes" class="col-md-3 control-label">@lang('admin/licenses/form.notes')</label>
|
||||
<div class="col-md-7">
|
||||
<input class="col-md-6 form-control" type="text" name="notes" id="notes" value="{{ Input::old('notes', $license->notes) }}" />
|
||||
{{ $errors->first('notes', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
@@ -139,12 +125,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
@if ($license->id)
|
||||
<a class="btn btn-link" href="{{ route('view/license', $license->id) }}">Cancel</a>
|
||||
@else
|
||||
<a class="btn btn-link" href="{{ route('licenses') }}">Cancel</a>
|
||||
@endif
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> Save</button>
|
||||
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -23,8 +23,9 @@ Licenses ::
|
||||
<tr role="row">
|
||||
<th class="col-md-3" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.title')</th>
|
||||
<th class="col-md-3" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.serial')</th>
|
||||
<th class="col-md-3" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.assigned_to')</th>
|
||||
<th class="col-md-2" tabindex="0" rowspan="1" colspan="1">@lang('table.actions')</th>
|
||||
<th class="col-md-2" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.assigned_to')</th>
|
||||
<th class="col-md-1 actions" tabindex="0" rowspan="1" colspan="1">In/Out</th>
|
||||
<th class="col-md-1 actions" tabindex="0" rowspan="1" colspan="1">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -32,25 +33,6 @@ Licenses ::
|
||||
|
||||
@foreach ($licenses as $license)
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->name }}</a>
|
||||
@if ($license->seats == 1)
|
||||
({{ $license->seats }} seat)
|
||||
@else
|
||||
({{ $license->seats }} seats)
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->serial }}</a></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="{{ route('update/license', $license->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
|
||||
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/license', $license->id) }}" data-content="Are you sure you wish to delete this license?" data-title="Delete {{ htmlspecialchars($license->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@if ($license->licenseseats)
|
||||
<?php $count=1; ?>
|
||||
@foreach ($license->licenseseats as $licensedto)
|
||||
@@ -60,7 +42,8 @@ Licenses ::
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->name }}</a>
|
||||
(Seat {{ $count }})
|
||||
</td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->serial }}</a></td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ Str::limit($license->serial, 40); }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if (($licensedto->assigned_to) && ($licensedto->deleted_at == NULL))
|
||||
<a href="{{ route('view/user', $licensedto->assigned_to) }}">
|
||||
@@ -77,6 +60,13 @@ Licenses ::
|
||||
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn btn-info">Checkout</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($count==1)
|
||||
<a href="{{ route('update/license', $license->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
|
||||
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/license', $license->id) }}" data-content="Are you sure you wish to delete this license?" data-title="Delete {{ htmlspecialchars($license->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,23 +11,8 @@ View License {{ $license->name }} ::
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn glow">Actions</button>
|
||||
<button class="btn glow dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
@if ($license->assigned_to != 0)
|
||||
<li><a href="{{ route('checkin/license', $license->id) }}" class="btn-flat info">Checkin</a></li>
|
||||
@else
|
||||
<li><a href="{{ route('checkout/license', $license->id) }}" class="btn-flat success">Checkout</a></li>
|
||||
@endif
|
||||
<li><a href="{{ route('update/license', $license->id) }}">Edit License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 class="name">History for ({{ $license->name }})</h3>
|
||||
|
||||
<a href="{{ route('update/license', $license->id) }}" class="btn-flat white pull-right"> Edit License</a>
|
||||
<h3 class="name">History for {{ $license->name }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,143 +20,159 @@ View License {{ $license->name }} ::
|
||||
<div class="row profile">
|
||||
<div class="col-md-9 bio">
|
||||
|
||||
<h6>License Info</h6>
|
||||
|
||||
<!-- checked out assets table -->
|
||||
<h6>{{ $license->seats }} License Seats</h6>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">Seat</th>
|
||||
<th class="col-md-6">User</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $count=1; ?>
|
||||
@if ($license->licenseseats)
|
||||
@foreach ($license->licenseseats as $licensedto)
|
||||
<div class="col-md-12">
|
||||
@if ($license->serial)
|
||||
<div class="col-md-6"><strong>Serial: </strong> {{ $license->serial }} </div>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
@if ($license->license_name)
|
||||
<div class="col-md-6"><strong>Licensed To: </strong> {{ $license->license_name }} </div>
|
||||
@endif
|
||||
|
||||
<td>Seat {{ $count }} </td>
|
||||
<td>
|
||||
@if ($licensedto->assigned_to)
|
||||
<a href="{{ route('view/user', $licensedto->assigned_to) }}">
|
||||
{{ $licensedto->user->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($licensedto->assigned_to)
|
||||
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn-flat info"> Checkin </a>
|
||||
@else
|
||||
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn-flat success">Checkout</a>
|
||||
@endif
|
||||
</td>
|
||||
@if ($license->license_email)
|
||||
<div class="col-md-6"><strong>Licensed Email: </strong> {{ $license->license_email }} </div>
|
||||
@endif
|
||||
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
@endif
|
||||
@if ($license->notes)
|
||||
<div class="col-md-6"><strong>Notes: </strong>{{ $license->notes }}</div>
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h6>Checkout History</h6>
|
||||
<br><br><br>
|
||||
</div>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-3"><span class="line"></span>Date</th>
|
||||
<th class="col-md-3"><span class="line"></span>Admin</th>
|
||||
<th class="col-md-3"><span class="line"></span>Action</th>
|
||||
<th class="col-md-3"><span class="line"></span>User</th>
|
||||
<th class="col-md-3"><span class="line"></span>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($license->assetlog) > 0)
|
||||
@foreach ($license->assetlog as $log)
|
||||
<tr>
|
||||
<td>
|
||||
@if ((isset($log->checkedout_to)) && ($log->checkedout_to == $license->assigned_to))
|
||||
<i class="icon-star"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->added_on }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
{{ $log->adminlog->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
|
||||
<td>
|
||||
@if (isset($log->checkedout_to))
|
||||
<a href="{{ route('view/user', $log->checkedout_to) }}">
|
||||
{{ $log->userlog->fullName() }}
|
||||
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note)
|
||||
{{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $license->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($license->adminuser->id))
|
||||
{{ $license->adminuser->fullName() }}
|
||||
@else
|
||||
Unknown Admin
|
||||
@endif
|
||||
</td>
|
||||
<td>created asset</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<!-- checked out assets table -->
|
||||
<h6>{{ $license->seats }} License Seats</h6>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">Seat</th>
|
||||
<th class="col-md-6">User</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $count=1; ?>
|
||||
@if ($license->licenseseats)
|
||||
@foreach ($license->licenseseats as $licensedto)
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3 col-xs-12 address pull-right">
|
||||
<h6><br>License Info:</h6>
|
||||
<ul>
|
||||
@if ($license->serial)
|
||||
<li>Serial: {{ $license->serial }} </li>
|
||||
<tr>
|
||||
<td>Seat {{ $count }} </td>
|
||||
<td>
|
||||
@if ($licensedto->assigned_to)
|
||||
<a href="{{ route('view/user', $licensedto->assigned_to) }}">
|
||||
{{ $licensedto->user->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
@if ($license->license_name)
|
||||
<li>License Name: {{ $license->license_name }} </li>
|
||||
</td>
|
||||
<td>
|
||||
@if ($licensedto->assigned_to)
|
||||
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn-flat info"> Checkin </a>
|
||||
@else
|
||||
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn-flat success">Checkout</a>
|
||||
@endif
|
||||
@if ($license->license_email)
|
||||
<li>License Email: {{ $license->license_email }} </li>
|
||||
@endif
|
||||
@if ($license->purchase_date)
|
||||
<li>Purchase Date: {{ $license->purchase_date }} </li>
|
||||
@endif
|
||||
@if ($license->purchase_cost)
|
||||
<li>Purchase Cost: ${{ number_format($license->purchase_cost,2) }} </li>
|
||||
@endif
|
||||
@if ($license->order_number)
|
||||
<li>Order #: {{ $license->order_number }} </li>
|
||||
@endif
|
||||
@if ($license->seats)
|
||||
<li>Seats: {{ $license->seats }} </li>
|
||||
@endif
|
||||
@if ($license->seats)
|
||||
<li>Depreciation: {{ $license->depreciation->name }} ({{ $license->depreciation->months }} months)</li>
|
||||
@endif
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
</div>
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h6>Checkout History</h6>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-3"><span class="line"></span>Date</th>
|
||||
<th class="col-md-3"><span class="line"></span>Admin</th>
|
||||
<th class="col-md-3"><span class="line"></span>Action</th>
|
||||
<th class="col-md-3"><span class="line"></span>User</th>
|
||||
<th class="col-md-3"><span class="line"></span>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($license->assetlog) > 0)
|
||||
@foreach ($license->assetlog as $log)
|
||||
<tr>
|
||||
<td>
|
||||
@if ((isset($log->checkedout_to)) && ($log->checkedout_to == $license->assigned_to))
|
||||
<i class="icon-star"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->added_on }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
{{ $log->adminlog->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
|
||||
<td>
|
||||
@if ($log->userlog)
|
||||
<a href="{{ route('view/user', $log->checkedout_to) }}">
|
||||
{{ $log->userlog->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note)
|
||||
{{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $license->created_at }}</td>
|
||||
<td>
|
||||
@if ($license->adminuser)
|
||||
{{ $license->adminuser->fullName() }}
|
||||
@else
|
||||
Unknown Admin
|
||||
@endif
|
||||
</td>
|
||||
<td>created asset</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3 col-xs-12 address pull-right">
|
||||
<h6><br>More Info:</h6>
|
||||
<ul>
|
||||
|
||||
@if ($license->purchase_date > 0)
|
||||
<li>Purchase Date: {{ $license->purchase_date }} </li>
|
||||
@endif
|
||||
@if ($license->purchase_cost > 0)
|
||||
<li>Purchase Cost: ${{ number_format($license->purchase_cost,2) }} </li>
|
||||
@endif
|
||||
@if ($license->order_number)
|
||||
<li>Order #: {{ $license->order_number }} </li>
|
||||
@endif
|
||||
@if (($license->seats) && ($license->seats) > 0)
|
||||
<li>Seats: {{ $license->seats }} </li>
|
||||
@endif
|
||||
@if ($license->depreciation)
|
||||
<li>Depreciation: {{ $license->depreciation->name }} ({{ $license->depreciation->months }} months)</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('locations') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>
|
||||
@if ($location->id)
|
||||
Update Location
|
||||
@@ -115,7 +115,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('locations') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@ Locations ::
|
||||
<th class="col-md-2">@lang('admin/locations/table.city'),
|
||||
@lang('admin/locations/table.state')
|
||||
@lang('admin/locations/table.country')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('manufacturers') }}" class="btn-flat gray pull-right"><i class="icon-plus-sign icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-plus-sign icon-white"></i> Back</a>
|
||||
<h3>
|
||||
@if ($manufacturer->id)
|
||||
Update Manufacturer
|
||||
@@ -52,7 +52,7 @@
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
@if ($manufacturer->id)
|
||||
<a class="btn btn-link" href="{{ route('view/manufacturer', $manufacturer->id) }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
@else
|
||||
<a class="btn btn-link" href="{{ route('manufacturers') }}">@lang('general.cancel')</a>
|
||||
@endif
|
||||
|
||||
@@ -25,7 +25,7 @@ Asset Manufacturers ::
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-7">@lang('admin/manufacturers/table.title')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@section('content')
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('models') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>
|
||||
@if ($model->id)
|
||||
Update Model
|
||||
@@ -78,11 +78,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EOL -->
|
||||
<div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
|
||||
<label for="eol" class="col-md-2 control-label">EOL</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input class="col-md-1 form-control" type="text" name="eol" id="eol" value="{{ Input::old('eol', $model->eol) }}" /> <span class="input-group-addon">months</span>
|
||||
{{ $errors->first('eol', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('models') }}">Cancel</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,19 +25,23 @@ Asset Models ::
|
||||
<th class="col-md-1">@lang('admin/models/table.numassets')</th>
|
||||
<th class="col-md-2">Depreciation</th>
|
||||
<th class="col-md-2">Category</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2">EOL</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($models as $model)
|
||||
<tr>
|
||||
<td><a href="{{ route('update/model', $model->id) }}">{{{ $model->name }}}</a></td>
|
||||
<td><a href="{{ route('view/model', $model->id) }}">{{{ $model->name }}}</a></td>
|
||||
<td>{{ $model->modelno }}</td>
|
||||
<td><a href="{{ route('view/model', $model->id) }}">{{ ($model->assets->count()) }}</a></td>
|
||||
<td>
|
||||
@if ($model->depreciation)
|
||||
{{ $model->depreciation->name }}
|
||||
({{ $model->depreciation->months }} months)
|
||||
|
||||
@if (($model->depreciation) && ($model->depreciation->id > 0))
|
||||
{{ $model->depreciation->name }}
|
||||
({{ $model->depreciation->months }} months)
|
||||
@else
|
||||
No Depreciation
|
||||
@endif
|
||||
|
||||
</td>
|
||||
@@ -46,6 +50,17 @@ Asset Models ::
|
||||
{{ $model->category->name }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
@if ($model->eol)
|
||||
{{ $model->eol }} months
|
||||
@else
|
||||
--
|
||||
@endif
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="{{ route('update/model', $model->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
|
||||
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/model', $model->id) }}" data-content="Are you sure you wish to delete this model?" data-title="Delete {{ htmlspecialchars($model->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
|
||||
|
||||
@@ -90,6 +90,10 @@ View Model {{ $model->model_tag }} ::
|
||||
<li>Depreciation: {{ $model->depreciation->name }} ({{ $model->depreciation->months }} months)</li>
|
||||
@endif
|
||||
|
||||
@if ($model->eol)
|
||||
<li>EOL: {{ $model->eol }} months</li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -33,12 +33,13 @@ Depreciation Report
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-2">@lang('admin/hardware/table.asset_tag')</th>
|
||||
<th class="col-sm-2">@lang('admin/hardware/table.title')</th>
|
||||
<th class="col-sm-2">@lang('admin/hardware/table.serial')</th>
|
||||
<th class="col-sm-3">@lang('admin/hardware/table.checkoutto')</th>
|
||||
<th class="col-sm-2">@lang('admin/hardware/table.location')</th>
|
||||
<th class="col-sm-2">@lang('admin/hardware/table.purchase_date')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.asset_tag')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.title')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.serial')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.checkoutto')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.location')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.purchase_date')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.eol')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.purchase_cost')</th>
|
||||
<th class="col-sm-1">@lang('admin/hardware/table.book_value')</th>
|
||||
<th class="col-sm-1">Diff</th>
|
||||
@@ -49,7 +50,7 @@ Depreciation Report
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->assigned_to != 0)
|
||||
@@ -66,9 +67,23 @@ Depreciation Report
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->purchase_date }}</td>
|
||||
|
||||
<td>
|
||||
@if ($asset->model->eol)
|
||||
{{ $asset->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($asset->purchase_cost > 0)
|
||||
<td class="align-right">${{ number_format($asset->purchase_cost) }}</td>
|
||||
<td class="align-right">${{ number_format($asset->depreciate()) }}</td>
|
||||
<td class="align-right">-${{ number_format(($asset->purchase_cost - $asset->depreciate())) }}</td>
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- header -->
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ route('app') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
</div>
|
||||
|
||||
<h3 class="name">Update Settings</h3>
|
||||
@@ -46,6 +46,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('qr_code') ? 'error' : '' }}">
|
||||
<label class="control-label" for="qr_code">Display QR Codes</label>
|
||||
<div class="controls">
|
||||
@if ($is_gd_installed)
|
||||
<input class="col-md-1" type="checkbox" name="qr_code" id="qr_code" value="1" {{ $setting->qr_code === '1' ? 'checked' : '' }} />
|
||||
@else
|
||||
<span class="help-inline">
|
||||
PHP Image Processing and GD plugin is NOT installed.
|
||||
<br>
|
||||
You must install php-gd to display QR codes, see <a href="http://www.php.net/manual/en/image.installation.php">install instructions</a>.
|
||||
</span>
|
||||
@endif
|
||||
{{ $errors->first('qr_code', '<span class="help-inline">:message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endforeach
|
||||
@@ -53,7 +69,7 @@
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-link" href="{{ route('app') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,14 @@ Settings ::
|
||||
<td>Per Page</td>
|
||||
<td>{{ $setting->per_page }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Display QR Codes</td>
|
||||
@if ($setting->qr_code === '1')
|
||||
<td>Yes</td>
|
||||
@else
|
||||
<td>No</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('statuslabels') }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<h3>Status Labels</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('statuslabels') }}">Cancel</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
|
||||
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@ Status Labels
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-4">@lang('admin/statuslabels/table.name')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -51,6 +51,8 @@ Create a User ::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Jobtitle -->
|
||||
<div class="form-group {{ $errors->has('jobtitle') ? 'error' : '' }}">
|
||||
<label class="control-label" for="jobtitle">Job Title</label>
|
||||
@@ -60,6 +62,17 @@ Create a User ::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manager -->
|
||||
<div class="form-group {{ $errors->has('manager_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="manager_id">Manager</label>
|
||||
<div class="controls">
|
||||
<div class="field-box">
|
||||
{{ Form::select('manager_id', $manager_list , Input::old('manager_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
{{ $errors->first('manager_id', '<span class="help-inline">:message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'error' : '' }}">
|
||||
<label class="control-label" for="location_id">Location</label>
|
||||
|
||||
@@ -11,7 +11,7 @@ Update User {{ $user->fullName() }} ::
|
||||
<div class="page-header">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ route('users') }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
||||
</div>
|
||||
<h3>
|
||||
Update User {{ $user->fullName() }}
|
||||
@@ -59,8 +59,19 @@ Update User {{ $user->fullName() }} ::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manager -->
|
||||
<div class="form-group {{ $errors->has('manager_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="manager_id">Manager</label>
|
||||
<div class="controls">
|
||||
<div class="field-box">
|
||||
{{ Form::select('manager_id', $manager_list , Input::old('manager_id', $user->manager_id), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
{{ $errors->first('manager_id', '<span class="help-inline">:message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="location_id">Location</label>
|
||||
<div class="controls">
|
||||
<div class="field-box">
|
||||
@@ -185,7 +196,7 @@ Update User {{ $user->fullName() }} ::
|
||||
<!-- Form Actions -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-link" href="{{ route('users') }}">@lang('general.cancel')</a>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
|
||||
|
||||
<button type="reset" class="btn">Reset</button>
|
||||
|
||||
|
||||
@@ -36,12 +36,13 @@ User Management ::
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-4">@lang('admin/users/table.name')</th>
|
||||
<th class="col-md-3">@lang('admin/users/table.email')</th>
|
||||
<th class="col-md-3">@lang('admin/users/table.name')</th>
|
||||
<th class="col-md-2">@lang('admin/users/table.email')</th>
|
||||
<th class="col-md-2">Manager</th>
|
||||
<th class="col-md-1">Assets</th>
|
||||
<th class="col-md-1">Licenses</th>
|
||||
<th class="col-md-1">@lang('admin/users/table.activated')</th>
|
||||
<th class="col-md-2">@lang('table.actions')</th>
|
||||
<th class="col-md-2 actions">@lang('table.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -54,23 +55,29 @@ User Management ::
|
||||
|
||||
</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@if ($user->manager)
|
||||
{{ $user->manager->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $user->assets->count() }}</td>
|
||||
<td>{{ $user->licenses->count() }}</td>
|
||||
<td>{{ $user->isActivated() ? '<i class="icon-ok"></i>' : ''}}</td>
|
||||
<td>
|
||||
@if ($user->id > 2)
|
||||
|
||||
@if ( ! is_null($user->deleted_at))
|
||||
<a href="{{ route('restore/user', $user->id) }}" class="btn btn-warning"><i class="icon-share-alt icon-white"></i></a>
|
||||
@else
|
||||
<a href="{{ route('update/user', $user->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
|
||||
|
||||
@if (Sentry::getId() !== $user->id)
|
||||
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/user', $user->id) }}" data-content="Are you sure you wish to delete this user?" data-title="Delete {{ htmlspecialchars($user->first_name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
|
||||
|
||||
@else
|
||||
<span class="btn-flat danger disabled"><i class="icon-trash icon-white"></i></span>
|
||||
<span class="btn delete-asset btn-danger disabled"><i class="icon-trash icon-white"></i></span>
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -78,7 +85,21 @@ User Management ::
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- {{
|
||||
Datatable::table()
|
||||
->addColumn(Lang::get('name'))
|
||||
->addColumn(Lang::get('email'))
|
||||
->addColumn('Assets')
|
||||
->addColumn('Licenses')
|
||||
->addColumn(Lang::get('activated'))
|
||||
->setUrl(route('api.users'))
|
||||
->render()
|
||||
}} -->
|
||||
|
||||
@else
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="icon-warning-sign"></i>
|
||||
|
||||
@@ -52,9 +52,9 @@ View User {{ $user->fullName() }} ::
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Asset Type</th>
|
||||
<th class="col-md-3"><span class="line"></span>Asset Tag</th>
|
||||
<th class="col-md-3"><span class="line"></span>Name</th>
|
||||
<th class="col-md-3"><span class="line"></span>Actions</th>
|
||||
<th class="col-md-2"><span class="line"></span>Asset Tag</th>
|
||||
<th class="col-md-2"><span class="line"></span>Name</th>
|
||||
<th class="col-md-1"><span class="line"></span>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -62,9 +62,7 @@ View User {{ $user->fullName() }} ::
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1')
|
||||
Hardware
|
||||
@else
|
||||
Software
|
||||
{{ $asset->model->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{ $asset->asset_tag }}</a></td>
|
||||
@@ -92,24 +90,16 @@ View User {{ $user->fullName() }} ::
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Asset Type</th>
|
||||
<th class="col-md-3">Serial</th>
|
||||
<th class="col-md-3"><span class="line"></span>Name</th>
|
||||
<th class="col-md-3"><span class="line"></span>Actions</th>
|
||||
<th class="col-md-4"><span class="line"></span>Name</th>
|
||||
<th class="col-md-4"><span class="line"></span>Serial</th>
|
||||
<th class="col-md-1"><span class="line"></span>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($license->physical=='0')
|
||||
Hardware
|
||||
@else
|
||||
Software
|
||||
@endif
|
||||
</td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->serial }}</a></td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->name }}</a></td>
|
||||
<td><a href="{{ route('view/license', $license->id) }}">{{ $license->serial }}</a></td>
|
||||
<td> <a href="{{ route('checkin/license', $license->pivot->id) }}" class="btn-flat info">Checkin</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -148,7 +138,7 @@ View User {{ $user->fullName() }} ::
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
@if ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at==''))
|
||||
<a href="{{ route('view/hardware', $log->asset_id) }}">{{ $log->assetlog->name }}</a>
|
||||
<a href="{{ route('view/hardware', $log->asset_id) }}">{{ $log->assetlog->asset_tag }}</a>
|
||||
@elseif ((isset($log->assetlog->name)) && ($log->assetlog->deleted_at!=''))
|
||||
<del>{{ $log->assetlog->name }}</del> (deleted)
|
||||
@else
|
||||
@@ -180,10 +170,15 @@ View User {{ $user->fullName() }} ::
|
||||
|
||||
<h6>Contact {{ $user->first_name }}</h6>
|
||||
|
||||
@if ($user->location_id)
|
||||
<iframe width="300" height="133" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&q={{ $user->userloc->address }},{{ $user->userloc->city }},{{ $user->userloc->state }},{{ $user->userloc->country }}&output=embed"></iframe>
|
||||
@endif
|
||||
|
||||
@if ($user->location_id)
|
||||
<iframe width="300" height="133" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&q={{ $user->userloc->address }},{{ $user->userloc->city }},{{ $user->userloc->state }},{{ $user->userloc->country }}&output=embed"></iframe>
|
||||
@endif
|
||||
<ul>
|
||||
@if ($user->manager)
|
||||
<strong>Manager:</strong> {{ $user->manager->fullName() }}
|
||||
@endif
|
||||
|
||||
@if ($user->location_id)
|
||||
<li>{{ $user->userloc->address }} {{ $user->userloc->address2 }}</li>
|
||||
<li>{{ $user->userloc->city }}, {{ $user->userloc->state }} {{ $user->userloc->zip }}<br /><br /></li>
|
||||
|
||||
@@ -28,8 +28,9 @@ $app->redirectIfTrailingSlash();
|
||||
|
||||
$env = $app->detectEnvironment(array(
|
||||
|
||||
'local' => array('your-machine-name'),
|
||||
|
||||
'local' => array('http://*.dev', 'http://*.local', '*.local*', '127.0.0.1', 'localhost*'),
|
||||
'staging' => array('http://staging.yourserver.com'),
|
||||
'production' => array('http://www.yourserver.com')
|
||||
));
|
||||
|
||||
/*
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
"laravel/framework": "4.0.*",
|
||||
"cartalyst/sentry": "2.0.*",
|
||||
"barryvdh/laravel-debugbar": "dev-master",
|
||||
"laravelbook/ardent": "dev-master"
|
||||
|
||||
"chumper/datatable": "dev-master",
|
||||
"bacon/bacon-qr-code": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
@@ -24,14 +27,19 @@
|
||||
"php artisan clear-compiled"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"php artisan optimize"
|
||||
"php artisan optimize",
|
||||
"php artisan debugbar:publish"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"php artisan debugbar:publish"
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"php artisan key:generate"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
"preferred-install": "dist",
|
||||
"bin-dir": "bin"
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
||||
946
composer.lock
generated
Executable file → Normal file
946
composer.lock
generated
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
10
public/assets/css/bootstrap/bootstrap.css
vendored
10
public/assets/css/bootstrap/bootstrap.css
vendored
@@ -523,10 +523,10 @@ dd {
|
||||
.dl-horizontal dd:after {
|
||||
content: " ";
|
||||
/* 1 */
|
||||
|
||||
|
||||
display: table;
|
||||
/* 2 */
|
||||
|
||||
|
||||
}
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
@@ -535,10 +535,10 @@ dd {
|
||||
.dl-horizontal dd:after {
|
||||
content: " ";
|
||||
/* 1 */
|
||||
|
||||
|
||||
display: table;
|
||||
/* 2 */
|
||||
|
||||
|
||||
}
|
||||
.dl-horizontal dd:after {
|
||||
clear: both;
|
||||
@@ -1804,7 +1804,7 @@ textarea.input-lg {
|
||||
}
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
padding: 3px 10px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
|
||||
@@ -13,8 +13,7 @@ table.dataTable thead th {
|
||||
padding: 10px 18px 15px 18px;
|
||||
border-top: 1px solid #dee3ea;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
|
||||
}
|
||||
|
||||
table.dataTable tfoot th {
|
||||
@@ -228,13 +227,13 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
.sorting { background: url('../../img/datatables/sort_both.png') no-repeat center right; }
|
||||
.sorting_asc { background: url('../../img/datatables/sort_asc.png') no-repeat center right; }
|
||||
.sorting_desc { background: url('../../img/datatables/sort_desc.png') no-repeat center right; }
|
||||
.sorting { background: url('../../img/datatables/sort_both.png') no-repeat center right; cursor: pointer; *cursor: hand; }
|
||||
.sorting_asc { background: url('../../img/datatables/sort_asc.png') no-repeat center right; cursor: pointer; *cursor: hand;}
|
||||
.sorting_desc { background: url('../../img/datatables/sort_desc.png') no-repeat center right; cursor: pointer; *cursor: hand;}
|
||||
|
||||
.sorting_asc_disabled { background: url('../../img/datatables/sort_asc_disabled.png') no-repeat center right; }
|
||||
.sorting_desc_disabled { background: url('../../img/datatables/sort_desc_disabled.png') no-repeat center right; }
|
||||
|
||||
|
||||
table.dataTable thead th:active,
|
||||
table.dataTable thead td:active {
|
||||
outline: none;
|
||||
|
||||
Reference in New Issue
Block a user