Compare commits
348 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33a709ecbc | |||
| 9b42d3a4fc | |||
| c598e3d9c0 | |||
| c822fff714 | |||
| c881535fda | |||
| 715fc3fa9b | |||
| c484afb12b | |||
| 5ec91ef5fc | |||
| 30db9a2943 | |||
| 1273c4ca87 | |||
| cb73d81d5b | |||
| 04735f1aff | |||
| d33dcbbcb1 | |||
| 04401ca09f | |||
| 0ff23c422a | |||
| 74a7b304c2 | |||
| 231e465898 | |||
| 68c3e88343 | |||
| ef6eae63d8 | |||
| afe2eb736c | |||
| 1552c1e917 | |||
| 258d1cd705 | |||
| d7b4e8a8de | |||
| c0c563b1c7 | |||
| 430b8233ed | |||
| 47f1488acc | |||
| 21799cca6d | |||
| e7ae4bd1c4 | |||
| 7da6ba5f68 | |||
| 8e9f7965c7 | |||
| 4ef2dd0c7e | |||
| 19ad8970d7 | |||
| a20e1f6943 | |||
| 5010720a97 | |||
| efaf067b94 | |||
| 6efd268004 | |||
| 7f26f01a8f | |||
| 31df29cac8 | |||
| 15a7e205be | |||
| 3e189d3502 | |||
| 6d16c97902 | |||
| 1ac401f0c0 | |||
| 62cb1daefd | |||
| acedab5587 | |||
| ad30aebcbc | |||
| 528c06cf7f | |||
| 97d97fc4df | |||
| e89cb883ec | |||
| 88ce0abe85 | |||
| 4570efc68b | |||
| ea28873fb0 | |||
| eb5d4983de | |||
| 379f6bef6c | |||
| e090762b5a | |||
| 9f3edd701b | |||
| 54bad2e4f6 | |||
| e41621def0 | |||
| 95fd96f29a | |||
| 663d5213eb | |||
| 92d6ed0761 | |||
| 59ea144b28 | |||
| f9f3b5b4f9 | |||
| 3de1a8f96c | |||
| 5d71628927 | |||
| 323a607130 | |||
| 8eaa70c39b | |||
| 29863004e2 | |||
| c2bbc1281c | |||
| a6232cbfd8 | |||
| 734dc49564 | |||
| a5a1c4223b | |||
| ca1351b704 | |||
| 3135869d5a | |||
| c2d30ce865 | |||
| 69a446af97 | |||
| 93b11c35d0 | |||
| cc3d007fa6 | |||
| 8cc1bd0159 | |||
| 8879bff160 | |||
| fae70bb485 | |||
| d4cafe364f | |||
| 346b62bf26 | |||
| 3ba6e45011 | |||
| 525a9225c8 | |||
| df448f0c35 | |||
| 7808039d0d | |||
| 0ff0d18351 | |||
| fc4f1fd7fc | |||
| d55d9f5530 | |||
| cd7461a3a8 | |||
| ad39ec1dc3 | |||
| b2af455523 | |||
| 6d4f4c6064 | |||
| 2b83b52735 | |||
| cd99295f83 | |||
| 6ab95ff387 | |||
| 1aa25d1e6d | |||
| 1b5b3fba8a | |||
| c71bdc0d5e | |||
| 7380affe9c | |||
| 1734c5ab99 | |||
| 18f96bb20a | |||
| da28036297 | |||
| 474731d1a3 | |||
| f59db3c741 | |||
| ecfc0e0e2b | |||
| 8ac16e53c7 | |||
| 5d81c04b3d | |||
| 037a8bee2f | |||
| e12bbbc171 | |||
| 31e2299385 | |||
| 097bb38a23 | |||
| 73ae41f3a9 | |||
| 4340d50071 | |||
| de94311c47 | |||
| cb51dc45b6 | |||
| dee4baf7dd | |||
| e04ac89c5a | |||
| 3fa1bc5c3f | |||
| 254f4b5f3e | |||
| 132578bfe3 | |||
| c2a1e39b54 | |||
| c41f4e9203 | |||
| c54615a85f | |||
| a7d953f923 | |||
| 35cf5b3d60 | |||
| ae381576aa | |||
| b28bcce5f1 | |||
| 7d7059504e | |||
| e04fb70aa3 | |||
| 7f1489a701 | |||
| 720c36e433 | |||
| 0cceacd17d | |||
| f9ad8d8aa5 | |||
| 253c402f3d | |||
| 083cb1b5ec | |||
| 8b3e22b58e | |||
| ad9e7f1d9e | |||
| 5887cce2c5 | |||
| f85061f988 | |||
| f8e12cabd4 | |||
| 348e996e31 | |||
| 70ae59ed62 | |||
| 6c4d661a85 | |||
| ae104293da | |||
| c07907833c | |||
| 7360e52f61 | |||
| 7d87b3384c | |||
| 30df21c7aa | |||
| 6bc1524783 | |||
| 366fb60628 | |||
| 01f11f2da4 | |||
| f6ae35df63 | |||
| 87936a58fa | |||
| 305db59472 | |||
| c0ce1939cb | |||
| 879b6b8f3f | |||
| 8777a1a9f1 | |||
| 43cdace9de | |||
| a04af4aead | |||
| e7eec42ab8 | |||
| 063e5c407c | |||
| 3ba02b65fb | |||
| 88dc0700f0 | |||
| 899e2bc9b6 | |||
| 1e4071b51d | |||
| f5b5f66b82 | |||
| 24e72d1b56 | |||
| f2922b0a44 | |||
| 92a99993ea | |||
| 9be159ea15 | |||
| 38961298ed | |||
| ea6a6d098a | |||
| 3ee9e93349 | |||
| c9b51bface | |||
| 1f0f9c2441 | |||
| d4fbea3571 | |||
| b32d74de57 | |||
| 4e4144ea74 | |||
| 7b331b26d3 | |||
| e02bea4275 | |||
| 24f5cdc743 | |||
| 08ee02d0cd | |||
| ec1ab6913e | |||
| f40bb7b8b3 | |||
| 17258b73a1 | |||
| 4a5007264e | |||
| bd01b11f4f | |||
| 064c0211db | |||
| 4cb931a93b | |||
| 3df8243d80 | |||
| f57c61dd4d | |||
| 7a4f115cb3 | |||
| 58ff929d71 | |||
| 49f25a23a9 | |||
| bcf75073ec | |||
| 6908456d09 | |||
| c26369f8cc | |||
| 56e090f3e7 | |||
| 00f7717142 | |||
| 823e0c8562 | |||
| 95be7908f8 | |||
| c660c71556 | |||
| fbf03b225d | |||
| a5f4c51ab2 | |||
| 89dce89035 | |||
| 8cdd215614 | |||
| 342a8b81af | |||
| cd5a352961 | |||
| a451fa1fa6 | |||
| e343c157c5 | |||
| 37fc216c5a | |||
| 96feb84fd4 | |||
| 80e10c4c98 | |||
| 35a133bbf9 | |||
| 0adbce77f9 | |||
| c89be34503 | |||
| 9c3873e712 | |||
| 4f6eeda368 | |||
| f690cd6305 | |||
| 447ed3518e | |||
| d9d99b2223 | |||
| 2b99adba5f | |||
| 11aa98d389 | |||
| 591f97f149 | |||
| ef696f8207 | |||
| ab1c921443 | |||
| 7b165a12e0 | |||
| 6f2f7cc214 | |||
| 89729bfa51 | |||
| 34032c73ce | |||
| f72b385790 | |||
| d541ded862 | |||
| 8cc95a3b9b | |||
| bf9a825095 | |||
| 5c92be5190 | |||
| fa9cf35ff5 | |||
| f36029a34a | |||
| c2e532e32e | |||
| 9bcc9a7ed1 | |||
| 7715731c4a | |||
| a2178392e6 | |||
| 0aa4d2a3db | |||
| 5867c60410 | |||
| 268fb98dbb | |||
| 5f1227d0fa | |||
| 1b93c5538a | |||
| 3645f85731 | |||
| 0b02b1631b | |||
| 31f4ba88f6 | |||
| c06a4d4118 | |||
| dbc93de6b3 | |||
| 2277b6ee69 | |||
| b36d73a4bb | |||
| 283d2855d7 | |||
| f175f52530 | |||
| e29da5521d | |||
| 1db1819a56 | |||
| aef3a734a3 | |||
| d2438f9fdb | |||
| 53d000e2d0 | |||
| addfcd4bc5 | |||
| b360736b77 | |||
| 2bae77b3af | |||
| c1600a33db | |||
| 5d3b84e01a | |||
| 7ed098de67 | |||
| 22af5561b2 | |||
| 7009b24748 | |||
| 389c27b2e6 | |||
| a61e913824 | |||
| 95ae26eb2a | |||
| cfebe11755 | |||
| d86b5aa613 | |||
| c255de7fc0 | |||
| 42d5d8db80 | |||
| 91bf9763d2 | |||
| 9c66dd5431 | |||
| 614396a15b | |||
| cfe0472ea2 | |||
| d20b5136b8 | |||
| 29f5b7c5e3 | |||
| 140bd137a4 | |||
| 3a9cb9ba7a | |||
| 6d0828bfe5 | |||
| 51a7752771 | |||
| a8681225f5 | |||
| 26a59afa44 | |||
| e22ce0d377 | |||
| 2fbef7f561 | |||
| 2678611c79 | |||
| 416cd236d2 | |||
| 4936a5914f | |||
| 36fce27297 | |||
| 4b2e45c5f2 | |||
| 11f46474ab | |||
| b0d52a4158 | |||
| 7b4845c255 | |||
| 223ba349ea | |||
| feeef4b66c | |||
| 42f8a35078 | |||
| 0128505213 | |||
| 06bee68cd2 | |||
| c255edaf61 | |||
| 7f0e21d50c | |||
| 1aeb4de0fa | |||
| bff33cb7f5 | |||
| 5695815360 | |||
| e67ba8a743 | |||
| 3669ab2ae8 | |||
| e2ee954592 | |||
| b4750f016d | |||
| 7069d9c6b1 | |||
| 8e0d774023 | |||
| 394836821c | |||
| a1ac7f8676 | |||
| cd338d2a70 | |||
| 4dc81ce65f | |||
| f5efc368a5 | |||
| 1db806f8b2 | |||
| b3af102d22 | |||
| 2b86f14e30 | |||
| 3f0e494276 | |||
| a4bac03692 | |||
| 950567e9d6 | |||
| dede09e9c5 | |||
| 3787a3f4ba | |||
| 95141d49ba | |||
| d85e524680 | |||
| 4a77dee79c | |||
| 6fba41e026 | |||
| f39922f51f | |||
| 53085983f8 | |||
| 4a2ac03ace | |||
| 548de1a1a2 | |||
| 82560b1098 | |||
| 3c141e8f50 | |||
| 5e496672c6 | |||
| 4887c53f25 | |||
| 2b79a61d65 | |||
| 5268c579e2 | |||
| 21448ea8e6 | |||
| 778a7bb18c | |||
| 685881cf27 | |||
| cf4b80bbd5 | |||
| 5c98dae57d | |||
| 5a6139fb64 | |||
| 0fb2728e3f |
@@ -0,0 +1,5 @@
|
||||
.git
|
||||
.dockerignore
|
||||
app/storage/logs/*
|
||||
app/storage/views/*
|
||||
vendor/*
|
||||
+5
-1
@@ -16,4 +16,8 @@ public/uploads/avatars/*
|
||||
/app/storage/logs/*
|
||||
/app/storage/debugbar/
|
||||
/bin/
|
||||
.idea
|
||||
.idea
|
||||
crowdin.yaml
|
||||
public/uploads/logo.gif
|
||||
public/uploads/logo.png
|
||||
.siteflow
|
||||
|
||||
+14
-8
@@ -1,3 +1,7 @@
|
||||
addons:
|
||||
hosts:
|
||||
- AlisonMBP
|
||||
|
||||
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
|
||||
language: php
|
||||
|
||||
@@ -15,14 +19,16 @@ env:
|
||||
before_script:
|
||||
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS snipeit_laravel;" -utravis; fi
|
||||
- curl -s http://getcomposer.org/installer | php
|
||||
- cp app/config/production/database.example.php app/config/database.php
|
||||
- cp app/config/production/mail.example.php app/config/mail.php
|
||||
- composer install --prefer-source --no-interaction --no-dev
|
||||
- php artisan key:generate
|
||||
- php artisan migrate:install
|
||||
- php artisan migrate --package cartalyst/sentry
|
||||
- php artisan migrate
|
||||
- php artisan db:seed
|
||||
- cp app/config/testing/app.example.php app/config/testing/app.php
|
||||
- cp app/config/testing/database.example.php app/config/testing/database.php
|
||||
- cp app/config/testing/mail.example.php app/config/testing/mail.php
|
||||
- composer self-update
|
||||
- composer install --prefer-source --no-interaction
|
||||
- php artisan key:generate --env=testing
|
||||
- php artisan migrate:install --env=testing --no-interaction -vvv
|
||||
- php artisan migrate --package cartalyst/sentry --env=testing --no-interaction -vvv
|
||||
- php artisan migrate --env=testing --no-interaction -vvv
|
||||
- php artisan db:seed --env=testing --no-interaction -vvv
|
||||
|
||||
# omitting "script:" will default to phpunit
|
||||
# use the $DB env variable to determine the phpunit.xml to use
|
||||
|
||||
+7
-11
@@ -6,20 +6,16 @@ Please submit all issues and pull requests to the [snipe/snipe-it](http://github
|
||||
|
||||
If you don't have a feature in mind, but would like to contribute back to the project, check out the [open issues](https://github.com/snipe/snipe-it/issues?state=open) and see if there are any you can tackle.
|
||||
|
||||
We use Waffle.io to help better communicate our roadmap with users. Our [project page there](http://waffle.io/snipe/snipe-it) will show you the backlog, what's ready to be worked on, what's in progress, and what's completed.
|
||||
|
||||
[](http://waffle.io/snipe/snipe-it)
|
||||
|
||||
The labels we use in GitHub Issues and Waffle.io indicate whether we've confirmed an issue as a bug, whether we're considering the issue as a potential feature, and whether it's ready for someone to work on it. We also provide labels such as "n00b", "intermediate" and "advanced" for the experience level we think it requires for contributors who want to help.
|
||||
|
||||
-----
|
||||
|
||||
## Translations!
|
||||
|
||||
If you're not great at PHP and you still want to help, consider contributing some translation files (assuming, of course, that you are fluent in another language.)
|
||||
|
||||
To do so:
|
||||
|
||||
* fork the develop branch
|
||||
* create a new branch on your new fork (something like `translations/french`)
|
||||
* copy the `en` directory and name it according to the [two-letter ISO 639-1 code](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
|
||||
* translate the strings
|
||||
* submit a pull request!
|
||||
|
||||
**If you've translated Snipe IT into another language already for your own usage, please consider contributing those translation files back to the project so that everyone can benefit.**
|
||||
If you're not a coder but want to give back to the project and you're fluent in other languages, that's okay too. We use [CrowdIn](https://crowdin.com) to manage translations, and it makes it super-simple for you to add translations (or validate proposed translations) to the project without messing with code. __Check out [the Snipe-IT CrowdIn translation project here](https://crowdin.com/project/snipe-it/)__.
|
||||
|
||||
Thanks!
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
FROM ubuntu
|
||||
MAINTAINER Brady Wetherington <uberbrady@gmail.com>
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apache2-bin \
|
||||
libapache2-mod-php5 \
|
||||
php5-mysql \
|
||||
php5-mcrypt \
|
||||
php5-gd \
|
||||
patch \
|
||||
curl \
|
||||
vim \
|
||||
git
|
||||
|
||||
RUN php5enmod mcrypt
|
||||
RUN php5enmod gd
|
||||
|
||||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/apache2/php.ini
|
||||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/cli/php.ini
|
||||
|
||||
RUN useradd --uid 1000 --gid 50 docker
|
||||
|
||||
RUN echo export APACHE_RUN_USER=docker >> /etc/apache2/envvars
|
||||
RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars
|
||||
|
||||
COPY docker/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
############ INITIAL APPLICATION SETUP #####################
|
||||
|
||||
COPY docker/app_start.patch /tmp/app_start.patch
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
#Patch bootstrap file
|
||||
RUN patch -p1 < /tmp/app_start.patch
|
||||
|
||||
#DB create?
|
||||
# mysqladmin -u root create snipeit_laravel
|
||||
|
||||
#DB create user, grant access to new DB?
|
||||
# grant all privileges on snipeit_laravel.* TO snipeit;
|
||||
|
||||
#DB config file init? (NEVER overwrite!)
|
||||
#RUN cp -n /var/www/html/app/config/production/database.example.php /var/www/html/app/config/production/database.php
|
||||
COPY docker/database.php /var/www/html/app/config/production/database.php
|
||||
|
||||
COPY docker/mail.php /var/www/html/app/config/production/mail.php
|
||||
|
||||
#change DB file user
|
||||
#RUN sed -i s/travis/snipe_it/ /var/www/html/app/config/production/database.php
|
||||
|
||||
#init app config file (DO NOT overwrite!)
|
||||
RUN cp -n /var/www/html/app/config/production/app.example.php /var/www/html/app/config/production/app.php
|
||||
|
||||
# Change default hostname to blank...I guess?
|
||||
RUN sed -i s%http://staging.yourserver.com%% /var/www/html/app/config/production/app.php
|
||||
|
||||
# turn off the toolbar
|
||||
RUN sed -i 's%\x27debug\x27 => true%\x27debug\x27 => false%' /var/www/html/app/config/production/app.php
|
||||
|
||||
RUN chown -R docker /var/www/html
|
||||
|
||||
############## DEPENDENCIES via COMPOSER ###################
|
||||
|
||||
#global install of composer
|
||||
RUN cd /tmp;curl -sS https://getcomposer.org/installer | php;mv /tmp/composer.phar /usr/local/bin/composer
|
||||
|
||||
# Get dependencies
|
||||
RUN cd /var/www/html;composer install
|
||||
|
||||
############### APPLICATION INSTALL/INIT #################
|
||||
|
||||
#RUN php artisan app:install
|
||||
# too interactive! Try something else
|
||||
|
||||
#COPY docker/app_install.exp /tmp/app_install.exp
|
||||
#RUN chmod +x /tmp/app_install.exp
|
||||
#RUN /tmp/app_install.exp
|
||||
|
||||
##### START SERVER
|
||||
|
||||
CMD . /etc/apache2/envvars ;apache2 -DFOREGROUND
|
||||
|
||||
EXPOSE 80
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
## Snipe-IT - Asset Management For the Rest of Us
|
||||
|
||||
[](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
It is built on [Laravel 4.1](http://laravel.com) and uses the [Sentry 2](https://github.com/cartalyst/sentry) package.
|
||||
It is built on [Laravel 4.2](http://laravel.com) and uses the [Sentry 2](https://github.com/cartalyst/sentry) package.
|
||||
|
||||
This project is being actively developed and we're [releasing quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](http://snipeitapp.com/demo.php).)
|
||||
|
||||
@@ -14,7 +16,7 @@ __This is web-based software__. This means there there is no executable file (ak
|
||||
-----
|
||||
### Documentation & Installation
|
||||
|
||||
__Installation and configuration documentation for this project has been moved to http://docs.snipeitapp.com.__ This provides a more easily navigated, organized view of the documentation, and is based off of the [documentation branch](https://github.com/snipe/snipe-it/tree/documentation) in this repo. Contributions and bugfixes to the documentation are always welcome!
|
||||
__Installation and configuration documentation for this project has been moved to http://snipeitapp.com/documentation/.__
|
||||
|
||||
We'll be adding a long-overdue user's manual soon as well.
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ class AppCommand extends Command
|
||||
'email' => null,
|
||||
'password' => null
|
||||
);
|
||||
|
||||
protected $dummyData = true;
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
@@ -67,6 +69,7 @@ class AppCommand extends Command
|
||||
$this->askUserEmail();
|
||||
$this->askUserPassword();
|
||||
|
||||
$this->askUserDummyData();
|
||||
|
||||
$this->comment('');
|
||||
$this->comment('');
|
||||
@@ -95,7 +98,19 @@ class AppCommand extends Command
|
||||
$this->sentryRunner();
|
||||
|
||||
// Seed the tables with dummy data
|
||||
$this->call('db:seed');
|
||||
if( $this->dummyData === true )
|
||||
{
|
||||
$this->call('db:seed', array('--force'=>true));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Seeding Settings table is mandatory
|
||||
$this->call('db:seed', array('--class' => 'SettingsSeeder', '--force'=>true));
|
||||
// Seeding Statuslabels is strongly recommended
|
||||
$this->call('db:seed', array('--class' => 'StatuslabelsSeeder', '--force'=>true));
|
||||
// Seeding Categories is good to have
|
||||
$this->call('db:seed', array('--class' => 'CategoriesSeeder', '--force'=>true));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,6 +207,20 @@ class AppCommand extends Command
|
||||
$this->userData['password'] = $password;
|
||||
} while( ! $password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asks the user to create dummy data
|
||||
*
|
||||
* @return void
|
||||
* @todo Use the Laravel Validator
|
||||
*/
|
||||
protected function askUserDummyData()
|
||||
{
|
||||
// Ask the user to input the user password
|
||||
$dummydata = $this->ask('Do you want to seed your database with dummy data? (deafult is yes): ');
|
||||
|
||||
$this->dummyData = ( strstr($dummydata, 'y' ) || empty($dummydata) ) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs all the necessary Sentry commands.
|
||||
@@ -207,7 +236,10 @@ class AppCommand extends Command
|
||||
$this->sentryCreateUser();
|
||||
|
||||
// Create dummy user
|
||||
$this->sentryCreateDummyUser();
|
||||
if( $this->dummyData === true )
|
||||
{
|
||||
$this->sentryCreateDummyUser();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
||||
class SendExpirationAlerts extends Command {
|
||||
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name = 'alerts:expiring';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'This command checks for expiring warrantees and service agreements, and sends out an alert email.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function fire()
|
||||
{
|
||||
$expiring_assets = Asset::getExpiringWarrantee(60);
|
||||
|
||||
$data['count'] = count($expiring_assets);
|
||||
$data['email_content'] ='';
|
||||
|
||||
|
||||
|
||||
foreach ($expiring_assets as $asset) {
|
||||
$now = date("Y-m-d");
|
||||
$expires = $asset->warrantee_expires();
|
||||
$difference = round(abs(strtotime($expires) - strtotime($now))/86400);
|
||||
|
||||
if ($difference > 30) {
|
||||
$data['email_content'] .= '<tr style="background-color: #fcffa3;">';
|
||||
} else {
|
||||
$data['email_content'] .= '<tr style="background-color:#d9534f;">';
|
||||
}
|
||||
$data['email_content'] .= '<td><a href="'.Config::get('app.url').'/hardware/'.$asset->id.'/view">';
|
||||
$data['email_content'] .= $asset->name.'</a></td><td>'.$asset->asset_tag.'</td>';
|
||||
$data['email_content'] .= '<td>'.$asset->warrantee_expires().'</td>';
|
||||
$data['email_content'] .= '<td>'.$difference.' days</td>';
|
||||
$data['email_content'] .= '</tr>';
|
||||
}
|
||||
|
||||
if ((Setting::getSettings()->alert_email!='') && (Setting::getSettings()->alerts_enabled==1)){
|
||||
|
||||
if (count($expiring_assets) > 0) {
|
||||
|
||||
Mail::send('emails.expiring-report', $data, function ($m) {
|
||||
$m->to(Setting::getSettings()->alert_email, Setting::getSettings()->site_name);
|
||||
$m->subject('Expiring Assets Report');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (Setting::getSettings()->alert_email=='') {
|
||||
echo "Could not send email. No alert email configured in settings. \n";
|
||||
} elseif (Setting::getSettings()->alerts_enabled!=1) {
|
||||
echo "Alerts are disabled in the settings. No mail will be sent. \n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+76
-40
@@ -27,6 +27,37 @@ return array(
|
||||
|
||||
'locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This setting may be used to control the default cipher used by the Laravel
|
||||
| encryption facilities.
|
||||
|
|
||||
| Note: In Laravel 4.2, the default cipher is MCRYPT_RIJNDAEL_128 (AES),
|
||||
| which is considered to be the most secure cipher. Changing the cipher
|
||||
| back to MCRYPT_RIJNDAEL_256 is required to decrypt cookies/values that
|
||||
| were encrypted in Laravel <= 4.1
|
||||
|
|
||||
*/
|
||||
|
||||
'cipher' => MCRYPT_RIJNDAEL_256,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Prevent Password changes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If for some reason you do not wish for admins to be able to edit the password
|
||||
| for any user (including themselves), set this to true.
|
||||
|
|
||||
*/
|
||||
|
||||
'lock_passwords' => false,
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
@@ -70,6 +101,7 @@ return array(
|
||||
'Barryvdh\Debugbar\ServiceProvider',
|
||||
'Cartalyst\Sentry\SentryServiceProvider',
|
||||
'Chumper\Datatable\DatatableServiceProvider',
|
||||
'Dinesh\Barcode\BarcodeServiceProvider',
|
||||
|
||||
),
|
||||
|
||||
@@ -99,46 +131,50 @@ return array(
|
||||
|
||||
'aliases' => array(
|
||||
|
||||
'App' => 'Illuminate\Support\Facades\App',
|
||||
'Artisan' => 'Illuminate\Support\Facades\Artisan',
|
||||
'Auth' => 'Illuminate\Support\Facades\Auth',
|
||||
'Blade' => 'Illuminate\Support\Facades\Blade',
|
||||
'Cache' => 'Illuminate\Support\Facades\Cache',
|
||||
'ClassLoader' => 'Illuminate\Support\ClassLoader',
|
||||
'Config' => 'Illuminate\Support\Facades\Config',
|
||||
'Controller' => 'Illuminate\Routing\Controller',
|
||||
'Cookie' => 'Illuminate\Support\Facades\Cookie',
|
||||
'Crypt' => 'Illuminate\Support\Facades\Crypt',
|
||||
'DB' => 'Illuminate\Support\Facades\DB',
|
||||
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
||||
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
|
||||
'Event' => 'Illuminate\Support\Facades\Event',
|
||||
'File' => 'Illuminate\Support\Facades\File',
|
||||
'Form' => 'Illuminate\Support\Facades\Form',
|
||||
'Hash' => 'Illuminate\Support\Facades\Hash',
|
||||
'HTML' => 'Illuminate\Support\Facades\HTML',
|
||||
'Image' => 'Intervention\Image\ImageManagerStatic',
|
||||
'Input' => 'Illuminate\Support\Facades\Input',
|
||||
'Lang' => 'Illuminate\Support\Facades\Lang',
|
||||
'Log' => 'Illuminate\Support\Facades\Log',
|
||||
'Mail' => 'Illuminate\Support\Facades\Mail',
|
||||
'Paginator' => 'Illuminate\Support\Facades\Paginator',
|
||||
'Password' => 'Illuminate\Support\Facades\Password',
|
||||
'Queue' => 'Illuminate\Support\Facades\Queue',
|
||||
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
||||
'Redis' => 'Illuminate\Support\Facades\Redis',
|
||||
'Request' => 'Illuminate\Support\Facades\Request',
|
||||
'Response' => 'Illuminate\Support\Facades\Response',
|
||||
'Route' => 'Illuminate\Support\Facades\Route',
|
||||
'Schema' => 'Illuminate\Support\Facades\Schema',
|
||||
'Seeder' => 'Illuminate\Database\Seeder',
|
||||
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
|
||||
'Session' => 'Illuminate\Support\Facades\Session',
|
||||
'SSH' => 'Illuminate\Support\Facades\SSH',
|
||||
'Str' => 'Illuminate\Support\Str',
|
||||
'URL' => 'Illuminate\Support\Facades\URL',
|
||||
'Validator' => 'Illuminate\Support\Facades\Validator',
|
||||
'View' => 'Illuminate\Support\Facades\View'
|
||||
'App' => 'Illuminate\Support\Facades\App',
|
||||
'Artisan' => 'Illuminate\Support\Facades\Artisan',
|
||||
'Auth' => 'Illuminate\Support\Facades\Auth',
|
||||
'Blade' => 'Illuminate\Support\Facades\Blade',
|
||||
'Cache' => 'Illuminate\Support\Facades\Cache',
|
||||
'ClassLoader' => 'Illuminate\Support\ClassLoader',
|
||||
'Config' => 'Illuminate\Support\Facades\Config',
|
||||
'Controller' => 'Illuminate\Routing\Controller',
|
||||
'Cookie' => 'Illuminate\Support\Facades\Cookie',
|
||||
'Crypt' => 'Illuminate\Support\Facades\Crypt',
|
||||
'DB' => 'Illuminate\Support\Facades\DB',
|
||||
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
||||
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
|
||||
'Event' => 'Illuminate\Support\Facades\Event',
|
||||
'File' => 'Illuminate\Support\Facades\File',
|
||||
'Form' => 'Illuminate\Support\Facades\Form',
|
||||
'Hash' => 'Illuminate\Support\Facades\Hash',
|
||||
'HTML' => 'Illuminate\Support\Facades\HTML',
|
||||
'Image' => 'Intervention\Image\ImageManagerStatic',
|
||||
'Input' => 'Illuminate\Support\Facades\Input',
|
||||
'Lang' => 'Illuminate\Support\Facades\Lang',
|
||||
'Log' => 'Illuminate\Support\Facades\Log',
|
||||
'Mail' => 'Illuminate\Support\Facades\Mail',
|
||||
'Paginator' => 'Illuminate\Support\Facades\Paginator',
|
||||
'Password' => 'Illuminate\Support\Facades\Password',
|
||||
'Queue' => 'Illuminate\Support\Facades\Queue',
|
||||
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
||||
'Redis' => 'Illuminate\Support\Facades\Redis',
|
||||
'Request' => 'Illuminate\Support\Facades\Request',
|
||||
'Response' => 'Illuminate\Support\Facades\Response',
|
||||
'Route' => 'Illuminate\Support\Facades\Route',
|
||||
'Schema' => 'Illuminate\Support\Facades\Schema',
|
||||
'Seeder' => 'Illuminate\Database\Seeder',
|
||||
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
|
||||
'Session' => 'Illuminate\Support\Facades\Session',
|
||||
'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
|
||||
'SSH' => 'Illuminate\Support\Facades\SSH',
|
||||
'Str' => 'Illuminate\Support\Str',
|
||||
'URL' => 'Illuminate\Support\Facades\URL',
|
||||
'Validator' => 'Illuminate\Support\Facades\Validator',
|
||||
'View' => 'Illuminate\Support\Facades\View',
|
||||
'Reader' => 'League\Csv\Reader',
|
||||
'DNS1D' => 'Dinesh\Barcode\Facades\DNS1DFacade',
|
||||
'DNS2D' => 'Dinesh\Barcode\Facades\DNS2DFacade',
|
||||
|
||||
),
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ return array(
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
| Run a php artisan key:generate --env=staging to create a random one
|
||||
| Run a php artisan key:generate to create a random one
|
||||
*/
|
||||
|
||||
'key' => 'Change_this_key_or_snipe_will_get_ya',
|
||||
|
||||
@@ -61,6 +61,7 @@ return array(
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => false,
|
||||
),
|
||||
|
||||
'pgsql' => array(
|
||||
|
||||
@@ -26,7 +26,7 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'sqlite',
|
||||
'default' => 'mysql',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -50,6 +50,18 @@ return array(
|
||||
'database' => ':memory:',
|
||||
'prefix' => ''
|
||||
),
|
||||
|
||||
'mysql' => array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'snipeit_laravel',
|
||||
'username' => 'travis',
|
||||
'password' => '',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|
||||
@@ -119,6 +119,6 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'pretend' => false,
|
||||
'pretend' => true,
|
||||
|
||||
);
|
||||
|
||||
@@ -6,6 +6,8 @@ use Redirect;
|
||||
use Sentry;
|
||||
use Validator;
|
||||
use View;
|
||||
use Config;
|
||||
use Lang;
|
||||
|
||||
class ChangeEmailController extends AuthorizedController
|
||||
{
|
||||
@@ -36,34 +38,39 @@ class ChangeEmailController extends AuthorizedController
|
||||
'email' => 'required|email|unique:users,email,'.Sentry::getUser()->email.',email',
|
||||
'email_confirm' => 'required|same:email',
|
||||
);
|
||||
|
||||
if (Config::get('app.lock_passwords')) {
|
||||
return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords'));
|
||||
} else {
|
||||
|
||||
// Create a new validator instance from our validation rules
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
// If validation fails, we'll exit the operation now.
|
||||
if ($validator->fails()) {
|
||||
// Ooops.. something went wrong
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
|
||||
// Grab the user
|
||||
$user = Sentry::getUser();
|
||||
|
||||
// Check the user current password
|
||||
if ( ! $user->checkPassword(Input::get('current_password'))) {
|
||||
// Set the error message
|
||||
$this->messageBag->add('current_password', 'Your current password is incorrect');
|
||||
|
||||
// Redirect to the change email page
|
||||
return Redirect::route('change-email')->withErrors($this->messageBag);
|
||||
}
|
||||
|
||||
// Update the user email
|
||||
$user->email = Input::get('email');
|
||||
$user->save();
|
||||
|
||||
// Redirect to the settings page
|
||||
return Redirect::route('change-email')->with('success', 'Email successfully updated');
|
||||
// Create a new validator instance from our validation rules
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
// If validation fails, we'll exit the operation now.
|
||||
if ($validator->fails()) {
|
||||
// Ooops.. something went wrong
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
|
||||
// Grab the user
|
||||
$user = Sentry::getUser();
|
||||
|
||||
// Check the user current password
|
||||
if ( ! $user->checkPassword(Input::get('current_password'))) {
|
||||
// Set the error message
|
||||
$this->messageBag->add('current_password', 'Your current password is incorrect');
|
||||
|
||||
// Redirect to the change email page
|
||||
return Redirect::route('change-email')->withErrors($this->messageBag);
|
||||
}
|
||||
|
||||
// Update the user email
|
||||
$user->email = Input::get('email');
|
||||
$user->save();
|
||||
|
||||
// Redirect to the settings page
|
||||
return Redirect::route('change-email')->with('success', 'Email successfully updated');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ use Redirect;
|
||||
use Sentry;
|
||||
use Validator;
|
||||
use View;
|
||||
use Config;
|
||||
use Lang;
|
||||
|
||||
class ChangePasswordController extends AuthorizedController
|
||||
{
|
||||
@@ -37,6 +39,9 @@ class ChangePasswordController extends AuthorizedController
|
||||
'password_confirm' => 'required|same:password',
|
||||
);
|
||||
|
||||
if (Config::get('app.lock_passwords')) {
|
||||
return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords'));
|
||||
} else {
|
||||
// Create a new validator instance from our validation rules
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
@@ -61,6 +66,7 @@ class ChangePasswordController extends AuthorizedController
|
||||
// Update the user password
|
||||
$user->password = Input::get('password');
|
||||
$user->save();
|
||||
}
|
||||
|
||||
// Redirect to the change-password page
|
||||
return Redirect::route('change-password')->with('success', 'Password successfully updated');
|
||||
|
||||
@@ -7,6 +7,10 @@ use Sentry;
|
||||
use Validator;
|
||||
use Location;
|
||||
use View;
|
||||
use Asset;
|
||||
use Actionlog;
|
||||
use Lang;
|
||||
use Accessory;
|
||||
|
||||
class ViewAssetsController extends AuthorizedController
|
||||
{
|
||||
@@ -33,4 +37,110 @@ class ViewAssetsController extends AuthorizedController
|
||||
}
|
||||
|
||||
|
||||
public function getRequestableIndex() {
|
||||
|
||||
$assets = Asset::with('model','defaultLoc')->Hardware()->RequestableAssets()->get();
|
||||
return View::make('frontend/account/requestable-assets', compact('user','assets'));
|
||||
}
|
||||
|
||||
|
||||
public function getRequestAsset($assetId = null) {
|
||||
|
||||
// Check if the asset exists
|
||||
if (is_null($asset = Asset::find($assetId))) {
|
||||
// Redirect to the asset management page
|
||||
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
|
||||
} else {
|
||||
|
||||
|
||||
return View::make('frontend/account/view-asset', compact('asset'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Get the acceptance screen
|
||||
public function getAcceptAsset($logID = null) {
|
||||
|
||||
if (is_null($findlog = Actionlog::find($logID))) {
|
||||
// Redirect to the asset management page
|
||||
return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
// Asset
|
||||
if (($findlog->asset_id!='') && ($findlog->asset_type=='hardware')) {
|
||||
$item = Asset::find($findlog->asset_id);
|
||||
|
||||
// software
|
||||
} elseif (($findlog->asset_id!='') && ($findlog->asset_type=='software')) {
|
||||
$item = License::find($findlog->asset_id);
|
||||
// accessories
|
||||
} elseif ($findlog->accessory_id!='') {
|
||||
$item = Accessory::find($findlog->accessory_id);
|
||||
}
|
||||
|
||||
// Check if the asset exists
|
||||
if (is_null($item)) {
|
||||
// Redirect to the asset management page
|
||||
return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
return View::make('frontend/account/accept-asset', compact('item'))->with('findlog', $findlog);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Save the acceptance
|
||||
public function postAcceptAsset($logID = null) {
|
||||
|
||||
|
||||
// Check if the asset exists
|
||||
if (is_null($findlog = Actionlog::find($logID))) {
|
||||
// Redirect to the asset management page
|
||||
return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$user = Sentry::getUser();
|
||||
$logaction = new Actionlog();
|
||||
|
||||
// Asset
|
||||
if (($findlog->asset_id!='') && ($findlog->asset_type=='hardware')) {
|
||||
$logaction->asset_id = $findlog->asset_id;
|
||||
$logaction->accessory_id = NULL;
|
||||
$logaction->asset_type = 'hardware';
|
||||
|
||||
// software
|
||||
} elseif (($findlog->asset_id!='') && ($findlog->asset_type=='software')) {
|
||||
$logaction->asset_id = $findlog->asset_id;
|
||||
$logaction->accessory_id = NULL;
|
||||
$logaction->asset_type = 'software';
|
||||
|
||||
// accessories
|
||||
} elseif ($findlog->accessory_id!='') {
|
||||
$logaction->asset_id = NULL;
|
||||
$logaction->accessory_id = $findlog->accessory_id;
|
||||
$logaction->asset_type = 'accessory';
|
||||
}
|
||||
|
||||
$logaction->checkedout_to = $findlog->checkedout_to;
|
||||
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$logaction->user_id = $user->id;
|
||||
$logaction->accepted_at = date("Y-m-d h:i:s");
|
||||
$log = $logaction->logaction('accepted');
|
||||
|
||||
return Redirect::to('account/view-assets')->with('success', 'You have successfully accept this asset.');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
<?php namespace Controllers\Admin;
|
||||
|
||||
use AdminController;
|
||||
use Input;
|
||||
use Lang;
|
||||
use Accessory;
|
||||
use Redirect;
|
||||
use Setting;
|
||||
use DB;
|
||||
use Sentry;
|
||||
use Str;
|
||||
use Validator;
|
||||
use View;
|
||||
use User;
|
||||
use Actionlog;
|
||||
use Mail;
|
||||
|
||||
class AccessoriesController extends AdminController
|
||||
{
|
||||
/**
|
||||
* Show a list of all the accessories.
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
|
||||
public function getIndex()
|
||||
{
|
||||
// Grab all the accessories
|
||||
$accessories = Accessory::orderBy('created_at', 'DESC')->get();
|
||||
|
||||
// Show the page
|
||||
return View::make('backend/accessories/index', compact('accessories'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accessory create.
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function getCreate()
|
||||
{
|
||||
// Show the page
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','accessory')->whereNull('deleted_at')->lists('name', 'id');
|
||||
return View::make('backend/accessories/edit')->with('accessory',new Accessory)->with('category_list',$category_list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accessory create form processing.
|
||||
*
|
||||
* @return Redirect
|
||||
*/
|
||||
public function postCreate()
|
||||
{
|
||||
|
||||
// create a new model instance
|
||||
$accessory = new Accessory();
|
||||
|
||||
$validator = Validator::make(Input::all(), $accessory->rules);
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
else{
|
||||
|
||||
// Update the accessory data
|
||||
$accessory->name = e(Input::get('name'));
|
||||
$accessory->category_id = e(Input::get('category_id'));
|
||||
$accessory->qty = e(Input::get('qty'));
|
||||
$accessory->user_id = Sentry::getId();
|
||||
|
||||
// Was the accessory created?
|
||||
if($accessory->save()) {
|
||||
// Redirect to the new accessory page
|
||||
return Redirect::to("admin/accessories")->with('success', Lang::get('admin/accessories/message.create.success'));
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the accessory create page
|
||||
return Redirect::to('admin/accessories/create')->with('error', Lang::get('admin/accessories/message.create.error'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessory update.
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return View
|
||||
*/
|
||||
public function getEdit($accessoryId = null)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$category_list = array('' => '') + DB::table('categories')->where('category_type','=','accessory')->whereNull('deleted_at')->lists('name', 'id');
|
||||
return View::make('backend/accessories/edit', compact('accessory'))->with('category_list',$category_list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accessory update form processing page.
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return Redirect
|
||||
*/
|
||||
public function postEdit($accessoryId = null)
|
||||
{
|
||||
// Check if the blog post exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
||||
// get the POST data
|
||||
$new = Input::all();
|
||||
|
||||
// attempt validation
|
||||
$validator = Validator::make(Input::all(), $accessory->validationRules($accessoryId));
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
// attempt validation
|
||||
else {
|
||||
|
||||
// Update the accessory data
|
||||
$accessory->name = e(Input::get('name'));
|
||||
$accessory->category_id = e(Input::get('category_id'));
|
||||
$accessory->qty = e(Input::get('qty'));
|
||||
|
||||
// Was the accessory created?
|
||||
if($accessory->save()) {
|
||||
// Redirect to the new accessory page
|
||||
return Redirect::to("admin/accessories")->with('success', Lang::get('admin/accessories/message.update.success'));
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the accessory management page
|
||||
return Redirect::to("admin/accessories/$accessoryID/edit")->with('error', Lang::get('admin/accessories/message.update.error'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the given accessory.
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return Redirect
|
||||
*/
|
||||
public function getDelete($accessoryId)
|
||||
{
|
||||
// Check if the blog post exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
if ($accessory->hasUsers() > 0) {
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.assoc_users', array('count'=> $accessory->hasUsers())));
|
||||
} else {
|
||||
$accessory->delete();
|
||||
|
||||
// Redirect to the locations management page
|
||||
return Redirect::to('admin/accessories')->with('success', Lang::get('admin/accessories/message.delete.success'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the accessory information to present to the accessory view page
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return View
|
||||
**/
|
||||
public function getView($accessoryID = null)
|
||||
{
|
||||
$accessory = Accessory::find($accessoryID);
|
||||
|
||||
if (isset($accessory->id)) {
|
||||
return View::make('backend/accessories/view', compact('accessory'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/accessories/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('accessories')->with('error', $error);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out the accessory to a person
|
||||
**/
|
||||
public function getCheckout($accessoryId)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to('accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
// Get the dropdown of users and then pass it to the checkout view
|
||||
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id');
|
||||
|
||||
return View::make('backend/accessories/checkout', compact('accessory'))->with('users_list',$users_list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out the accessory to a person
|
||||
**/
|
||||
public function postCheckout($accessoryId)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to('accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
$assigned_to = e(Input::get('assigned_to'));
|
||||
|
||||
|
||||
// Declare the rules for the form validation
|
||||
$rules = array(
|
||||
'assigned_to' => 'required|min:1'
|
||||
);
|
||||
|
||||
// Create a new validator instance from our validation rules
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
// If validation fails, we'll exit the operation now.
|
||||
if ($validator->fails()) {
|
||||
// Ooops.. something went wrong
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
|
||||
|
||||
// Check if the user exists
|
||||
if (is_null($user = User::find($assigned_to))) {
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.user_does_not_exist'));
|
||||
}
|
||||
|
||||
// Update the accessory data
|
||||
$accessory->assigned_to = e(Input::get('assigned_to'));
|
||||
|
||||
$accessory->users()->attach($accessory->id, array(
|
||||
'accessory_id' => $accessory->id,
|
||||
'assigned_to' => e(Input::get('assigned_to'))));
|
||||
|
||||
$logaction = new Actionlog();
|
||||
$logaction->accessory_id = $accessory->id;
|
||||
$logaction->checkedout_to = $accessory->assigned_to;
|
||||
$logaction->asset_type = 'accessory';
|
||||
$logaction->location_id = $user->location_id;
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$log = $logaction->logaction('checkout');
|
||||
|
||||
$accessory_user = DB::table('accessories_users')->where('assigned_to','=',$accessory->assigned_to)->where('accessory_id','=',$accessory->id)->first();
|
||||
|
||||
$data['log_id'] = $logaction->id;
|
||||
$data['eula'] = $accessory->getEula();
|
||||
$data['first_name'] = $user->first_name;
|
||||
$data['item_name'] = $accessory->name;
|
||||
$data['require_acceptance'] = $accessory->requireAcceptance();
|
||||
|
||||
|
||||
if (($accessory->requireAcceptance()=='1') || ($accessory->getEula())) {
|
||||
|
||||
Mail::send('emails.accept-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm accessory delivery');
|
||||
});
|
||||
}
|
||||
|
||||
// Redirect to the new accessory page
|
||||
return Redirect::to("admin/accessories")->with('success', Lang::get('admin/accessories/message.checkout.success'));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the accessory back into inventory
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return View
|
||||
**/
|
||||
public function getCheckin($accessoryUserId)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory_user = DB::table('accessories_users')->find($accessoryUserId))) {
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
$accessory = Accessory::find($accessory_user->accessory_id);
|
||||
return View::make('backend/accessories/checkin', compact('accessory'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check in the item so that it can be checked out again to someone else
|
||||
*
|
||||
* @param int $accessoryId
|
||||
* @return View
|
||||
**/
|
||||
public function postCheckin($accessoryUserId)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory_user = DB::table('accessories_users')->find($accessoryUserId))) {
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to('admin/accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
$accessory = Accessory::find($accessory_user->accessory_id);
|
||||
$logaction = new Actionlog();
|
||||
$logaction->checkedout_to = $accessory_user->assigned_to;
|
||||
|
||||
// Was the accessory updated?
|
||||
if(DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) {
|
||||
|
||||
$logaction->accessory_id = $accessory->id;
|
||||
$logaction->location_id = NULL;
|
||||
$logaction->asset_type = 'accessory';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$log = $logaction->logaction('checkin from');
|
||||
|
||||
// Redirect to the new accessory page
|
||||
return Redirect::to("admin/accessories")->with('success', Lang::get('admin/accessories/message.checkin.success'));
|
||||
}
|
||||
|
||||
// Redirect to the accessory management page with error
|
||||
return Redirect::to("admin/accessories")->with('error', Lang::get('admin/accessories/message.checkin.error'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -21,12 +21,12 @@ use Response;
|
||||
use Config;
|
||||
use Location;
|
||||
use Log;
|
||||
|
||||
use BaconQrCode\Renderer\Image as QrImage;
|
||||
use DNS2D;
|
||||
use Mail;
|
||||
|
||||
class AssetsController extends AdminController
|
||||
{
|
||||
protected $qrCodeDimensions = array( 'height' => 170, 'width' => 170);
|
||||
protected $qrCodeDimensions = array( 'height' => 3.5, 'width' => 3.5);
|
||||
|
||||
/**
|
||||
* Show a list of all the assets.
|
||||
@@ -38,40 +38,27 @@ class AssetsController extends AdminController
|
||||
{
|
||||
// Grab all the assets
|
||||
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->Hardware();
|
||||
// Filter results
|
||||
if (Input::get('Pending')) {
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
|
||||
->whereNull('status_id','and')
|
||||
->where('assigned_to','=','0')
|
||||
->where('physical', '=', 1)
|
||||
->get();
|
||||
$assets->Pending();
|
||||
} elseif (Input::get('RTD')) {
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
|
||||
->where('status_id', '=', 0)
|
||||
->where('assigned_to', '=', '0')
|
||||
->where('physical', '=', 1)
|
||||
->orderBy('asset_tag', 'ASC')
|
||||
->get();
|
||||
$assets->RTD();
|
||||
} elseif (Input::get('Undeployable')) {
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
|
||||
->where('status_id', '>', 1)
|
||||
->where('physical', '=', 1)
|
||||
->orderBy('asset_tag', 'ASC')
|
||||
->get();
|
||||
$assets->Undeployable();
|
||||
} elseif (Input::get('Archived')) {
|
||||
$assets->Archived();
|
||||
} elseif (Input::get('Requestable')) {
|
||||
$assets->RequestableAssets();
|
||||
} elseif (Input::get('Deployed')) {
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
|
||||
->where('status_id', '=', 0)
|
||||
->where('physical', '=', 1)
|
||||
->where('assigned_to','>','0')
|
||||
->orderBy('asset_tag', 'ASC')
|
||||
->get();
|
||||
} else {
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc')
|
||||
->where('physical', '=', 1)
|
||||
->orderBy('asset_tag', 'ASC')
|
||||
->get();
|
||||
$assets->Deployed();
|
||||
} elseif (Input::get('Deleted')) {
|
||||
$assets->withTrashed()->Deleted();
|
||||
}
|
||||
|
||||
$assets = $assets->orderBy('asset_tag', 'ASC')->get();
|
||||
|
||||
|
||||
// Paginate the users
|
||||
/**$assets = $assets->paginate(Setting::getSettings()->per_page)
|
||||
->appends(array(
|
||||
@@ -85,6 +72,8 @@ class AssetsController extends AdminController
|
||||
return View::make('backend/hardware/index', compact('assets'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Asset create.
|
||||
*
|
||||
@@ -110,7 +99,7 @@ class AssetsController extends AdminController
|
||||
|
||||
|
||||
// Grab the dropdown list of status
|
||||
$statuslabel_list = array('' => Lang::get('general.pending')) + array('0' => Lang::get('general.ready_to_deploy')) + Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$statuslabel_list = Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
$view = View::make('backend/hardware/edit');
|
||||
$view->with('supplier_list',$supplier_list);
|
||||
@@ -174,7 +163,7 @@ class AssetsController extends AdminController
|
||||
}
|
||||
|
||||
if (e(Input::get('assigned_to')) == '') {
|
||||
$asset->assigned_to = 0;
|
||||
$asset->assigned_to = NULL;
|
||||
} else {
|
||||
$asset->assigned_to = e(Input::get('assigned_to'));
|
||||
}
|
||||
@@ -204,7 +193,7 @@ class AssetsController extends AdminController
|
||||
$asset->order_number = e(Input::get('order_number'));
|
||||
$asset->notes = e(Input::get('notes'));
|
||||
$asset->asset_tag = e(Input::get('asset_tag'));
|
||||
|
||||
$asset->mac_address = e(Input::get('mac_address'));
|
||||
$asset->user_id = Sentry::getId();
|
||||
$asset->archived = '0';
|
||||
$asset->physical = '1';
|
||||
@@ -212,6 +201,17 @@ class AssetsController extends AdminController
|
||||
|
||||
// Was the asset created?
|
||||
if($asset->save()) {
|
||||
|
||||
if (Input::get('assigned_to')!='') {
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $asset->id;
|
||||
$logaction->checkedout_to = $asset->assigned_to;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$log = $logaction->logaction('checkout');
|
||||
}
|
||||
|
||||
// Redirect to the asset listing page
|
||||
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success'));
|
||||
}
|
||||
@@ -239,12 +239,15 @@ class AssetsController extends AdminController
|
||||
|
||||
|
||||
// Grab the dropdown list of models
|
||||
$model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$model_list = array('' => '') + DB::table('models')
|
||||
->select(DB::raw('concat(name," / ",modelno) as name, id'))->orderBy('name', 'asc')
|
||||
->orderBy('modelno', 'asc')
|
||||
->lists('name', 'id');
|
||||
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$location_list = array('' => '') + Location::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
// Grab the dropdown list of status
|
||||
$statuslabel_list = array('' => Lang::get('general.pending')) + array('0' => Lang::get('general.ready_to_deploy')) + Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$statuslabel_list = Statuslabel::orderBy('name', 'asc')->lists('name', 'id');
|
||||
|
||||
return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('supplier_list',$supplier_list)->with('location_list',$location_list)->with('statuslabel_list',$statuslabel_list);
|
||||
}
|
||||
@@ -306,7 +309,7 @@ class AssetsController extends AdminController
|
||||
$asset->supplier_id = e(Input::get('supplier_id'));
|
||||
}
|
||||
|
||||
if (e(Input::get('requestable')) == '') {
|
||||
if (e(Input::get('requestable')) == '') {
|
||||
$asset->requestable = 0;
|
||||
} else {
|
||||
$asset->requestable = e(Input::get('requestable'));
|
||||
@@ -322,10 +325,11 @@ class AssetsController extends AdminController
|
||||
$asset->name = e(Input::get('name'));
|
||||
$asset->serial = e(Input::get('serial'));
|
||||
$asset->model_id = e(Input::get('model_id'));
|
||||
$asset->order_number = e(Input::get('order_number'));
|
||||
$asset->order_number = e(Input::get('order_number'));
|
||||
$asset->asset_tag = e(Input::get('asset_tag'));
|
||||
$asset->notes = e(Input::get('notes'));
|
||||
$asset->physical = '1';
|
||||
$asset->mac_address = e(Input::get('mac_address'));
|
||||
|
||||
// Was the asset updated?
|
||||
if($asset->save()) {
|
||||
@@ -363,6 +367,12 @@ class AssetsController extends AdminController
|
||||
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.assoc_users'));
|
||||
} else {
|
||||
// Delete the asset
|
||||
|
||||
DB::table('assets')
|
||||
->where('id', $asset->id)
|
||||
->update(array('assigned_to' => NULL));
|
||||
|
||||
|
||||
$asset->delete();
|
||||
|
||||
// Redirect to the asset management page
|
||||
@@ -422,7 +432,7 @@ class AssetsController extends AdminController
|
||||
|
||||
|
||||
// Check if the user exists
|
||||
if (is_null($assigned_to = User::find($assigned_to))) {
|
||||
if (is_null($user = User::find($assigned_to))) {
|
||||
// Redirect to the asset management page with error
|
||||
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.user_does_not_exist'));
|
||||
}
|
||||
@@ -436,10 +446,25 @@ class AssetsController extends AdminController
|
||||
$logaction->asset_id = $asset->id;
|
||||
$logaction->checkedout_to = $asset->assigned_to;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->location_id = $assigned_to->location_id;
|
||||
$logaction->location_id = $user->location_id;
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$log = $logaction->logaction('checkout');
|
||||
|
||||
$data['log_id'] = $logaction->id;
|
||||
$data['eula'] = $asset->getEula();
|
||||
$data['first_name'] = $user->first_name;
|
||||
$data['item_name'] = $asset->name;
|
||||
$data['require_acceptance'] = $asset->requireAcceptance();
|
||||
|
||||
|
||||
if (($asset->requireAcceptance()=='1') || ($asset->getEula())) {
|
||||
|
||||
Mail::send('emails.accept-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm asset delivery');
|
||||
});
|
||||
}
|
||||
|
||||
// Redirect to the new asset page
|
||||
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.checkout.success'));
|
||||
@@ -490,7 +515,7 @@ class AssetsController extends AdminController
|
||||
$logaction->checkedout_to = $asset->assigned_to;
|
||||
|
||||
// Update the asset data to null, since it's being checked in
|
||||
$asset->assigned_to = '0';
|
||||
$asset->assigned_to = NULL;
|
||||
|
||||
// Was the asset updated?
|
||||
if($asset->save()) {
|
||||
@@ -519,7 +544,7 @@ class AssetsController extends AdminController
|
||||
**/
|
||||
public function getView($assetId = null)
|
||||
{
|
||||
$asset = Asset::find($assetId);
|
||||
$asset = Asset::withTrashed()->find($assetId);
|
||||
|
||||
if (isset($asset->id)) {
|
||||
|
||||
@@ -527,8 +552,6 @@ class AssetsController extends AdminController
|
||||
|
||||
$qr_code = (object) array(
|
||||
'display' => $settings->qr_code == '1',
|
||||
'height' => $this->qrCodeDimensions['height'],
|
||||
'width' => $this->qrCodeDimensions['width'],
|
||||
'url' => route('qr_code/hardware', $asset->id)
|
||||
);
|
||||
|
||||
@@ -538,7 +561,7 @@ class AssetsController extends AdminController
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('assets')->with('error', $error);
|
||||
return Redirect::route('hardware')->with('error', $error);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -555,15 +578,15 @@ class AssetsController extends AdminController
|
||||
|
||||
if ($settings->qr_code == '1') {
|
||||
$asset = Asset::find($assetId);
|
||||
if (isset($asset->id)) {
|
||||
|
||||
if (isset($asset->id,$asset->asset_tag)) {
|
||||
|
||||
$content = DNS2D::getBarcodePNG(route('view/hardware', $asset->id), "QRCODE",
|
||||
$this->qrCodeDimensions['height'],$this->qrCodeDimensions['width']);
|
||||
|
||||
$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));
|
||||
$img = imagecreatefromstring(base64_decode($content));
|
||||
imagepng($img);
|
||||
imagedestroy($img);
|
||||
|
||||
$content_disposition = sprintf('attachment;filename=qr_code_%s.png', preg_replace('/\W/', '', $asset->asset_tag));
|
||||
$response = Response::make($content, 200);
|
||||
@@ -595,9 +618,9 @@ class AssetsController extends AdminController
|
||||
$model_list = array('' => '') + Model::lists('name', 'id');
|
||||
|
||||
// Grab the dropdown list of status
|
||||
$statuslabel_list = array('' => 'Pending') + array('0' => 'Ready to Deploy') + Statuslabel::lists('name', 'id');
|
||||
$statuslabel_list = Statuslabel::lists('name', 'id');
|
||||
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
|
||||
// get depreciation list
|
||||
$depreciation_list = array('' => '') + Depreciation::lists('name', 'id');
|
||||
@@ -610,4 +633,254 @@ class AssetsController extends AdminController
|
||||
return View::make('backend/hardware/edit')->with('supplier_list',$supplier_list)->with('model_list',$model_list)->with('statuslabel_list',$statuslabel_list)->with('assigned_to',$assigned_to)->with('asset',$asset)->with('location_list',$location_list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getRestore($assetId = null)
|
||||
{
|
||||
|
||||
// Get user information
|
||||
$asset = Asset::withTrashed()->find($assetId);
|
||||
|
||||
if (isset($asset->id)) {
|
||||
|
||||
// Restore the user
|
||||
$asset->restore();
|
||||
|
||||
// Prepare the success message
|
||||
$success = Lang::get('admin/hardware/message.restore.success');
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('hardware')->with('success', $success);
|
||||
|
||||
} else {
|
||||
return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.not_found'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Upload the file to the server
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function postUpload($assetID = null)
|
||||
{
|
||||
$asset = Asset::find($assetID);
|
||||
|
||||
// the asset is valid
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
|
||||
if (isset($asset->id)) {
|
||||
|
||||
if (Input::hasFile('assetfile')) {
|
||||
|
||||
foreach(Input::file('assetfile') as $file) {
|
||||
|
||||
$rules = array(
|
||||
'assetfile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt|max:2000'
|
||||
);
|
||||
$validator = Validator::make(array('assetfile'=> $file), $rules);
|
||||
|
||||
if($validator->passes()){
|
||||
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
$filename = 'hardware-'.$asset->id.'-'.str_random(8);
|
||||
$filename .= '-'.Str::slug($file->getClientOriginalName()).'.'.$extension;
|
||||
$upload_success = $file->move($destinationPath, $filename);
|
||||
|
||||
//Log the deletion of seats to the log
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $asset->id;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('notes'));
|
||||
$logaction->checkedout_to = NULL;
|
||||
$logaction->created_at = date("Y-m-d h:i:s");
|
||||
$logaction->filename = $filename;
|
||||
$log = $logaction->logaction('uploaded');
|
||||
} else {
|
||||
return Redirect::back()->with('error', Lang::get('admin/hardware/message.upload.invalidfiles'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($upload_success) {
|
||||
return Redirect::back()->with('success', Lang::get('admin/hardware/message.upload.success'));
|
||||
} else {
|
||||
return Redirect::back()->with('success', Lang::get('admin/hardware/message.upload.error'));
|
||||
}
|
||||
|
||||
} else {
|
||||
return Redirect::back()->with('success', Lang::get('admin/hardware/message.upload.nofiles'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the hardware management page
|
||||
return Redirect::route('hardware')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete the associated file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function getDeleteFile($assetID = null, $fileId = null)
|
||||
{
|
||||
$asset = Asset::find($assetID);
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
|
||||
// the asset is valid
|
||||
if (isset($asset->id)) {
|
||||
|
||||
$log = Actionlog::find($fileId);
|
||||
$full_filename = $destinationPath.'/'.$log->filename;
|
||||
if (file_exists($full_filename)) {
|
||||
unlink($destinationPath.'/'.$log->filename);
|
||||
}
|
||||
$log->delete();
|
||||
return Redirect::back()->with('success', Lang::get('admin/hardware/message.deletefile.success'));
|
||||
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the hardware management page
|
||||
return Redirect::route('hardware')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Display/download the uploaded file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function displayFile($assetID = null, $fileId = null)
|
||||
{
|
||||
|
||||
$asset = Asset::find($assetID);
|
||||
|
||||
// the asset is valid
|
||||
if (isset($asset->id)) {
|
||||
$log = Actionlog::find($fileId);
|
||||
$file = $log->get_src();
|
||||
return Response::download($file);
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/hardware/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the hardware management page
|
||||
return Redirect::route('hardware')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Display bulk edit screen
|
||||
*
|
||||
* @return View
|
||||
**/
|
||||
public function postBulkEdit($assets = null)
|
||||
{
|
||||
|
||||
if (Input::has('edit_asset')) {
|
||||
|
||||
$assets = Input::get('edit_asset');
|
||||
|
||||
$supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
$statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id');
|
||||
$location_list = array('' => '') + Location::lists('name', 'id');
|
||||
}
|
||||
|
||||
return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Save bulk edits
|
||||
*
|
||||
* @return View
|
||||
**/
|
||||
public function postBulkSave($assets = null)
|
||||
{
|
||||
|
||||
if (Input::has('bulk_edit')) {
|
||||
|
||||
$assets = Input::get('bulk_edit');
|
||||
|
||||
if ( (Input::has('purchase_date')) || (Input::has('rtd_location_id')) || (Input::has('status_id')) ) {
|
||||
|
||||
foreach ($assets as $key => $value) {
|
||||
|
||||
$update_array = array();
|
||||
|
||||
if (Input::has('purchase_date')) {
|
||||
$update_array['purchase_date'] = e(Input::get('purchase_date'));
|
||||
}
|
||||
|
||||
if (Input::has('rtd_location_id')) {
|
||||
$update_array['rtd_location_id'] = e(Input::get('rtd_location_id'));
|
||||
}
|
||||
|
||||
if (Input::has('status_id')) {
|
||||
$update_array['status_id'] = e(Input::get('status_id'));
|
||||
}
|
||||
|
||||
|
||||
if (DB::table('assets')
|
||||
->where('id', $key)
|
||||
->update($update_array)) {
|
||||
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $key;
|
||||
$logaction->asset_type = 'hardware';
|
||||
$logaction->created_at = date("Y-m-d h:i:s");
|
||||
|
||||
if (Input::has('rtd_location_id')) {
|
||||
$logaction->location_id = e(Input::get('rtd_location_id'));
|
||||
}
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$log = $logaction->logaction('update');
|
||||
|
||||
}
|
||||
|
||||
} // endforeach
|
||||
|
||||
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.update.success'));
|
||||
|
||||
// no values given, nothing to update
|
||||
} else {
|
||||
return Redirect::to("hardware")->with('info',Lang::get('admin/hardware/message.update.nothing_updated'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // endif
|
||||
|
||||
return Redirect::to("hardware");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,9 @@ class CategoriesController extends AdminController
|
||||
public function getCreate()
|
||||
{
|
||||
// Show the page
|
||||
return View::make('backend/categories/edit')->with('category',new Category);
|
||||
$category_types= array('' => '', 'asset' => 'Asset', 'accessory' => 'Accessory');
|
||||
return View::make('backend/categories/edit')->with('category',new Category)
|
||||
->with('category_types',$category_types);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,26 +54,30 @@ class CategoriesController extends AdminController
|
||||
|
||||
// create a new model instance
|
||||
$category = new Category();
|
||||
|
||||
|
||||
$validator = Validator::make(Input::all(), $category->rules);
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
else{
|
||||
|
||||
// Update the category data
|
||||
$category->name = e(Input::get('name'));
|
||||
$category->user_id = Sentry::getId();
|
||||
$category->name = e(Input::get('name'));
|
||||
$category->category_type = e(Input::get('category_type'));
|
||||
$category->eula_text = e(Input::get('eula_text'));
|
||||
$category->use_default_eula = e(Input::get('use_default_eula', '0'));
|
||||
$category->require_acceptance = e(Input::get('require_acceptance', '0'));
|
||||
$category->user_id = Sentry::getId();
|
||||
|
||||
// Was the asset created?
|
||||
if($category->save()) {
|
||||
// Redirect to the new category page
|
||||
return Redirect::to("admin/settings/categories")->with('success', Lang::get('admin/categories/message.create.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the category create page
|
||||
return Redirect::to('admin/settings/categories/create')->with('error', Lang::get('admin/categories/message.create.error'));
|
||||
@@ -97,7 +103,11 @@ class CategoriesController extends AdminController
|
||||
//$category_options = array('' => 'Top Level') + Category::lists('name', 'id');
|
||||
|
||||
$category_options = array('' => 'Top Level') + DB::table('categories')->where('id', '!=', $categoryId)->lists('name', 'id');
|
||||
return View::make('backend/categories/edit', compact('category'))->with('category_options',$category_options);
|
||||
$category_types= array('' => '', 'asset' => 'Asset', 'accessory' => 'Accessory');
|
||||
|
||||
return View::make('backend/categories/edit', compact('category'))
|
||||
->with('category_options',$category_options)
|
||||
->with('category_types',$category_types);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +129,9 @@ class CategoriesController extends AdminController
|
||||
// get the POST data
|
||||
$new = Input::all();
|
||||
|
||||
// attempt validation
|
||||
// attempt validation
|
||||
$validator = Validator::make(Input::all(), $category->validationRules($categoryId));
|
||||
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
@@ -133,13 +143,17 @@ class CategoriesController extends AdminController
|
||||
|
||||
// Update the category data
|
||||
$category->name = e(Input::get('name'));
|
||||
$category->category_type = e(Input::get('category_type'));
|
||||
$category->eula_text = e(Input::get('eula_text'));
|
||||
$category->use_default_eula = e(Input::get('use_default_eula', '0'));
|
||||
$category->require_acceptance = e(Input::get('require_acceptance', '0'));
|
||||
|
||||
// Was the asset created?
|
||||
if($category->save()) {
|
||||
// Redirect to the new category page
|
||||
return Redirect::to("admin/settings/categories")->with('success', Lang::get('admin/categories/message.update.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the category management page
|
||||
return Redirect::to("admin/settings/categories/$categoryID/edit")->with('error', Lang::get('admin/categories/message.update.error'));
|
||||
@@ -154,7 +168,7 @@ class CategoriesController extends AdminController
|
||||
*/
|
||||
public function getDelete($categoryId)
|
||||
{
|
||||
// Check if the blog post exists
|
||||
// Check if the category exists
|
||||
if (is_null($category = Category::find($categoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return Redirect::to('admin/settings/categories')->with('error', Lang::get('admin/categories/message.not_found'));
|
||||
@@ -178,4 +192,30 @@ class CategoriesController extends AdminController
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the asset information to present to the category view page
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function getView($categoryID = null)
|
||||
{
|
||||
$category = Category::find($categoryID);
|
||||
|
||||
if (isset($category->id)) {
|
||||
return View::make('backend/categories/view', compact('category'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/categories/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('categories')->with('error', $error);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
use AdminController;
|
||||
use View;
|
||||
use Asset;
|
||||
use Actionlog;
|
||||
|
||||
class DashboardController extends AdminController
|
||||
{
|
||||
@@ -13,7 +15,57 @@ class DashboardController extends AdminController
|
||||
public function getIndex()
|
||||
{
|
||||
// Show the page
|
||||
return View::make('backend/dashboard');
|
||||
|
||||
$recent_activity = Actionlog::orderBy('created_at','DESC')->take(7)->get();
|
||||
|
||||
|
||||
$asset_stats['total'] = Asset::Hardware()->count();
|
||||
|
||||
$asset_stats['rtd']['total'] = Asset::Hardware()->RTD()->count();
|
||||
|
||||
if ($asset_stats['rtd']['total'] > 0) {
|
||||
$asset_stats['rtd']['percent'] = round(($asset_stats['rtd']['total']/$asset_stats['total']) * 100);
|
||||
} else {
|
||||
$asset_stats['rtd']['percent'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$asset_stats['pending']['total'] = Asset::Hardware()->Pending()->count();
|
||||
|
||||
if ($asset_stats['pending']['total'] > 0) {
|
||||
$asset_stats['pending']['percent'] = round(($asset_stats['pending']['total']/$asset_stats['total']) * 100);
|
||||
} else {
|
||||
$asset_stats['pending']['percent'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$asset_stats['deployed']['total'] = Asset::Hardware()->Deployed()->count();
|
||||
|
||||
if ($asset_stats['deployed']['total'] > 0) {
|
||||
$asset_stats['deployed']['percent'] = round(($asset_stats['deployed']['total']/$asset_stats['total']) * 100);
|
||||
} else {
|
||||
$asset_stats['deployed']['percent'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$asset_stats['undeployable']['total'] = Asset::Hardware()->Undeployable()->count();
|
||||
|
||||
if ($asset_stats['undeployable']['total'] > 0) {
|
||||
$asset_stats['undeployable']['percent'] = round(($asset_stats['undeployable']['total']/$asset_stats['total']) * 100);
|
||||
} else {
|
||||
$asset_stats['undeployable']['percent'] = 0;
|
||||
}
|
||||
|
||||
$asset_stats['archived']['total'] = Asset::Hardware()->Archived()->count();
|
||||
|
||||
if ($asset_stats['archived']['total'] > 0) {
|
||||
$asset_stats['archived']['percent'] = round(($asset_stats['archived']['total']/$asset_stats['total']) * 100);
|
||||
} else {
|
||||
$asset_stats['archived']['percent'] = 0;
|
||||
}
|
||||
|
||||
|
||||
return View::make('backend/dashboard')->with('asset_stats',$asset_stats)->with('recent_activity',$recent_activity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ use Str;
|
||||
use Supplier;
|
||||
use Validator;
|
||||
use View;
|
||||
|
||||
use Response;
|
||||
|
||||
class LicensesController extends AdminController
|
||||
{
|
||||
@@ -94,6 +94,18 @@ class LicensesController extends AdminController
|
||||
$license->supplier_id = e(Input::get('supplier_id'));
|
||||
}
|
||||
|
||||
if ( e(Input::get('maintained')) == '') {
|
||||
$license->maintained = 0;
|
||||
} else {
|
||||
$license->maintained = e(Input::get('maintained'));
|
||||
}
|
||||
|
||||
if ( e(Input::get('purchase_order')) == '') {
|
||||
$license->purchase_order = '';
|
||||
} else {
|
||||
$license->purchase_order = e(Input::get('purchase_order'));
|
||||
}
|
||||
|
||||
// Save the license data
|
||||
$license->name = e(Input::get('name'));
|
||||
$license->serial = e(Input::get('serial'));
|
||||
@@ -104,10 +116,8 @@ class LicensesController extends AdminController
|
||||
$license->seats = e(Input::get('seats'));
|
||||
$license->purchase_date = e(Input::get('purchase_date'));
|
||||
$license->purchase_order = e(Input::get('purchase_order'));
|
||||
//$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->depreciation_id = e(Input::get('depreciation_id'));
|
||||
$license->expiration_date = e(Input::get('expiration_date'));
|
||||
//$license->asset_id = e(Input::get('asset_id'));
|
||||
$license->user_id = Sentry::getId();
|
||||
|
||||
if (($license->purchase_date == "") || ($license->purchase_date == "0000-00-00")) {
|
||||
@@ -130,7 +140,7 @@ class LicensesController extends AdminController
|
||||
$license_seat = new LicenseSeat();
|
||||
$license_seat->license_id = $insertedId;
|
||||
$license_seat->user_id = Sentry::getId();
|
||||
$license_seat->assigned_to = 0;
|
||||
$license_seat->assigned_to = NULL;
|
||||
$license_seat->notes = NULL;
|
||||
$license_seat->save();
|
||||
}
|
||||
@@ -252,6 +262,18 @@ class LicensesController extends AdminController
|
||||
//$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
}
|
||||
|
||||
if ( e(Input::get('maintained')) == '') {
|
||||
$license->maintained = 0;
|
||||
} else {
|
||||
$license->maintained = e(Input::get('maintained'));
|
||||
}
|
||||
|
||||
if ( e(Input::get('purchase_order')) == '') {
|
||||
$license->purchase_order = '';
|
||||
} else {
|
||||
$license->purchase_order = e(Input::get('purchase_order'));
|
||||
}
|
||||
|
||||
|
||||
//Are we changing the total number of seats?
|
||||
if( $license->seats != e(Input::get('seats'))) {
|
||||
@@ -292,7 +314,7 @@ class LicensesController extends AdminController
|
||||
$license_seat = new LicenseSeat();
|
||||
$license_seat->license_id = $license->id;
|
||||
$license_seat->user_id = Sentry::getId();
|
||||
$license_seat->assigned_to = 0;
|
||||
$license_seat->assigned_to = NULL;
|
||||
$license_seat->notes = NULL;
|
||||
$license_seat->save();
|
||||
}
|
||||
@@ -346,11 +368,17 @@ class LicensesController extends AdminController
|
||||
} else {
|
||||
|
||||
// Delete the license and the associated license seats
|
||||
DB::table('license_seats')
|
||||
->where('id', $license->id)
|
||||
->update(array('assigned_to' => NULL,'asset_id' => NULL));
|
||||
|
||||
$licenseseats = $license->licenseseats();
|
||||
$licenseseats->delete();
|
||||
$license->delete();
|
||||
|
||||
|
||||
|
||||
|
||||
// Redirect to the licenses management page
|
||||
return Redirect::to('admin/licenses')->with('success', Lang::get('admin/licenses/message.delete.success'));
|
||||
}
|
||||
@@ -371,13 +399,15 @@ class LicensesController extends AdminController
|
||||
}
|
||||
|
||||
// Get the dropdown of users and then pass it to the checkout view
|
||||
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
|
||||
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id');
|
||||
|
||||
|
||||
// Left join to get a list of assets and some other helpful info
|
||||
$asset = DB::table('assets')
|
||||
->leftJoin('users', 'users.id', '=', 'assets.assigned_to')
|
||||
->select('assets.id', 'name', 'first_name', 'last_name','asset_tag',
|
||||
DB::raw('concat (first_name," ",last_name) as full_name, assets.id as id'))
|
||||
->leftJoin('models', 'assets.model_id', '=', 'models.id')
|
||||
->select('assets.id', 'assets.name', 'first_name', 'last_name','asset_tag',
|
||||
DB::raw('concat (first_name," ",last_name) as full_name, assets.id as id, models.name as modelname'))
|
||||
->whereNull('assets.deleted_at')
|
||||
->get();
|
||||
|
||||
@@ -388,9 +418,9 @@ class LicensesController extends AdminController
|
||||
for ($x=0; $x<count($asset_array); $x++) {
|
||||
|
||||
if ($asset_array[$x]['full_name']!='') {
|
||||
$full_name = ' ('.$asset_array[$x]['full_name'].')';
|
||||
$full_name = ' ('.$asset_array[$x]['full_name'].') '.$asset_array[$x]['modelname'];
|
||||
} else {
|
||||
$full_name = ' (Unassigned)';
|
||||
$full_name = ' (Unassigned) '.$asset_array[$x]['modelname'];
|
||||
}
|
||||
$asset_element[$asset_array[$x]['id']] = $asset_array[$x]['asset_tag'].' - '.$asset_array[$x]['name'].$full_name;
|
||||
|
||||
@@ -457,7 +487,7 @@ class LicensesController extends AdminController
|
||||
// Redirect to the asset management page with error
|
||||
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
if ( e(Input::get('asset_id')) == '') {
|
||||
$licenseseat->asset_id = NULL;
|
||||
} else {
|
||||
@@ -481,6 +511,7 @@ class LicensesController extends AdminController
|
||||
$logaction->asset_type = 'software';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$logaction->asset_id = $licenseseat->license_id;
|
||||
|
||||
|
||||
// Update the asset data
|
||||
@@ -548,12 +579,12 @@ class LicensesController extends AdminController
|
||||
$logaction->checkedout_to = $licenseseat->assigned_to;
|
||||
|
||||
// Update the asset data
|
||||
$licenseseat->assigned_to = '0';
|
||||
$licenseseat->assigned_to = NULL;
|
||||
$licenseseat->asset_id = NULL;
|
||||
|
||||
// Was the asset updated?
|
||||
if($licenseseat->save()) {
|
||||
$logaction->asset_id = NULL;
|
||||
$logaction->asset_id = $licenseseat->license_id;
|
||||
$logaction->location_id = NULL;
|
||||
$logaction->asset_type = 'software';
|
||||
$logaction->note = e(Input::get('note'));
|
||||
@@ -599,7 +630,7 @@ class LicensesController extends AdminController
|
||||
|
||||
// Show the page
|
||||
$license_options = array('0' => 'Top Level') + License::lists('name', 'id');
|
||||
|
||||
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
|
||||
//clone the orig
|
||||
$license = clone $license_to_clone;
|
||||
$license->id = null;
|
||||
@@ -608,7 +639,138 @@ class LicensesController extends AdminController
|
||||
// Show the page
|
||||
$depreciation_list = array('0' => Lang::get('admin/licenses/form.no_depreciation')) + Depreciation::lists('name', 'id');
|
||||
$supplier_list = array('' => 'Select Supplier') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
|
||||
return View::make('backend/licenses/edit')->with('license_options',$license_options)->with('depreciation_list',$depreciation_list)->with('supplier_list',$supplier_list)->with('license',$license);
|
||||
return View::make('backend/licenses/edit')->with('license_options',$license_options)->with('depreciation_list',$depreciation_list)->with('supplier_list',$supplier_list)->with('license',$license)->with('maintained_list',$maintained_list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Upload the file to the server
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function postUpload($licenseId = null)
|
||||
{
|
||||
$license = License::find($licenseId);
|
||||
|
||||
// the license is valid
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
|
||||
if (isset($license->id)) {
|
||||
|
||||
if (Input::hasFile('licensefile')) {
|
||||
|
||||
foreach(Input::file('licensefile') as $file) {
|
||||
|
||||
$rules = array(
|
||||
'licensefile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt|max:2000'
|
||||
);
|
||||
$validator = Validator::make(array('licensefile'=> $file), $rules);
|
||||
|
||||
if($validator->passes()){
|
||||
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
$filename = 'license-'.$license->id.'-'.str_random(8);
|
||||
$filename .= '-'.Str::slug($file->getClientOriginalName()).'.'.$extension;
|
||||
$upload_success = $file->move($destinationPath, $filename);
|
||||
|
||||
//Log the deletion of seats to the log
|
||||
$logaction = new Actionlog();
|
||||
$logaction->asset_id = $license->id;
|
||||
$logaction->asset_type = 'software';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('notes'));
|
||||
$logaction->checkedout_to = NULL;
|
||||
$logaction->created_at = date("Y-m-d h:i:s");
|
||||
$logaction->filename = $filename;
|
||||
$log = $logaction->logaction('uploaded');
|
||||
} else {
|
||||
return Redirect::back()->with('error', Lang::get('admin/licenses/message.upload.invalidfiles'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($upload_success) {
|
||||
return Redirect::back()->with('success', Lang::get('admin/licenses/message.upload.success'));
|
||||
} else {
|
||||
return Redirect::back()->with('success', Lang::get('admin/licenses/message.upload.error'));
|
||||
}
|
||||
|
||||
} else {
|
||||
return Redirect::back()->with('success', Lang::get('admin/licenses/message.upload.nofiles'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/licenses/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the licence management page
|
||||
return Redirect::route('licenses')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete the associated file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function getDeleteFile($licenseId = null, $fileId = null)
|
||||
{
|
||||
$license = License::find($licenseId);
|
||||
$destinationPath = app_path().'/private_uploads';
|
||||
|
||||
// the license is valid
|
||||
if (isset($license->id)) {
|
||||
|
||||
$log = Actionlog::find($fileId);
|
||||
$full_filename = $destinationPath.'/'.$log->filename;
|
||||
if (file_exists($full_filename)) {
|
||||
unlink($destinationPath.'/'.$log->filename);
|
||||
}
|
||||
$log->delete();
|
||||
return Redirect::back()->with('success', Lang::get('admin/licenses/message.deletefile.success'));
|
||||
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/licenses/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the licence management page
|
||||
return Redirect::route('licenses')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Display/download the uploaded file
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function displayFile($licenseId = null, $fileId = null)
|
||||
{
|
||||
|
||||
$license = License::find($licenseId);
|
||||
|
||||
// the license is valid
|
||||
if (isset($license->id)) {
|
||||
$log = Actionlog::find($fileId);
|
||||
$file = $log->get_src();
|
||||
return Response::download($file);
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/licenses/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the licence management page
|
||||
return Redirect::route('licenses')->with('error', $error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class ManufacturersController extends AdminController
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
// attempt validation
|
||||
@@ -126,7 +126,7 @@ class ManufacturersController extends AdminController
|
||||
// Redirect to the new manufacturer page
|
||||
return Redirect::to("admin/settings/manufacturers")->with('success', Lang::get('admin/manufacturers/message.update.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the manufacturer management page
|
||||
return Redirect::to("admin/settings/manufacturers/$manufacturerId/edit")->with('error', Lang::get('admin/manufacturers/message.update.error'));
|
||||
@@ -169,5 +169,30 @@ class ManufacturersController extends AdminController
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the asset information to present to the category view page
|
||||
*
|
||||
* @param int $assetId
|
||||
* @return View
|
||||
**/
|
||||
public function getView($manufacturerID = null)
|
||||
{
|
||||
$manufacturer = Manufacturer::find($manufacturerID);
|
||||
|
||||
if (isset($manufacturer->id)) {
|
||||
return View::make('backend/manufacturers/view', compact('manufacturer'));
|
||||
} else {
|
||||
// Prepare the error message
|
||||
$error = Lang::get('admin/manufacturers/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return Redirect::route('manufacturers')->with('error', $error);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,12 @@ class ModelsController extends AdminController
|
||||
public function getIndex()
|
||||
{
|
||||
// Grab all the models
|
||||
$models = Model::orderBy('created_at', 'DESC')->get();
|
||||
$models = Model::orderBy('created_at', 'DESC');
|
||||
if (Input::get('Deleted')) {
|
||||
$models->withTrashed()->Deleted();
|
||||
}
|
||||
|
||||
$models = $models->with('category','assets','depreciation')->get();
|
||||
|
||||
// Show the page
|
||||
return View::make('backend/models/index', compact('models'));
|
||||
@@ -67,13 +72,13 @@ class ModelsController extends AdminController
|
||||
|
||||
// attempt validation
|
||||
if ($model->validate($new)) {
|
||||
|
||||
|
||||
if ( e(Input::get('depreciation_id')) == '') {
|
||||
$model->depreciation_id = 0;
|
||||
} else {
|
||||
$model->depreciation_id = e(Input::get('depreciation_id'));
|
||||
}
|
||||
|
||||
|
||||
if ( e(Input::get('eol')) == '') {
|
||||
$model->eol = 0;
|
||||
} else {
|
||||
@@ -83,11 +88,11 @@ 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->eol = e(Input::get('eol'));
|
||||
$model->show_mac_address = e(Input::get('show_mac_address', '0'));
|
||||
|
||||
|
||||
if (Input::file('image')) {
|
||||
$image = Input::file('image');
|
||||
@@ -160,18 +165,18 @@ class ModelsController extends AdminController
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
// attempt validation
|
||||
else {
|
||||
|
||||
|
||||
if ( e(Input::get('depreciation_id')) == '') {
|
||||
$model->depreciation_id = 0;
|
||||
} else {
|
||||
$model->depreciation_id = e(Input::get('depreciation_id'));
|
||||
}
|
||||
|
||||
|
||||
if ( e(Input::get('eol')) == '') {
|
||||
$model->eol = 0;
|
||||
} else {
|
||||
@@ -180,9 +185,10 @@ class ModelsController extends AdminController
|
||||
|
||||
// Update the model data
|
||||
$model->name = e(Input::get('name'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->show_mac_address = e(Input::get('show_mac_address', '0'));
|
||||
|
||||
if (Input::file('image')) {
|
||||
$image = Input::file('image');
|
||||
@@ -198,13 +204,13 @@ class ModelsController extends AdminController
|
||||
if (Input::get('image_delete') == 1 && Input::file('image') == "") {
|
||||
$model->image = NULL;
|
||||
}
|
||||
|
||||
|
||||
// Was it created?
|
||||
if($model->save()) {
|
||||
// Redirect to the new model page
|
||||
return Redirect::to("hardware/models")->with('success', Lang::get('admin/models/message.update.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the model create page
|
||||
return Redirect::to("hardware/models/$modelId/edit")->with('error', Lang::get('admin/models/message.update.error'));
|
||||
@@ -237,6 +243,29 @@ class ModelsController extends AdminController
|
||||
return Redirect::to('hardware/models')->with('success', Lang::get('admin/models/message.delete.success'));
|
||||
}
|
||||
}
|
||||
|
||||
public function getRestore($modelId = null)
|
||||
{
|
||||
|
||||
// Get user information
|
||||
$model = Model::withTrashed()->find($modelId);
|
||||
|
||||
if (isset($model->id)) {
|
||||
|
||||
// Restore the model
|
||||
$model->restore();
|
||||
|
||||
// Prepare the success message
|
||||
$success = Lang::get('admin/models/message.restore.success');
|
||||
|
||||
// Redirect back
|
||||
return Redirect::back()->with('success', $success);
|
||||
|
||||
} else {
|
||||
return Redirect::back()->with('error', Lang::get('admin/models/message.not_found'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -247,7 +276,7 @@ class ModelsController extends AdminController
|
||||
**/
|
||||
public function getView($modelId = null)
|
||||
{
|
||||
$model = Model::find($modelId);
|
||||
$model = Model::withTrashed()->find($modelId);
|
||||
|
||||
if (isset($model->id)) {
|
||||
return View::make('backend/models/view', compact('model'));
|
||||
@@ -261,7 +290,7 @@ class ModelsController extends AdminController
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getClone($modelId = null)
|
||||
{
|
||||
// Check if the model exists
|
||||
@@ -269,10 +298,10 @@ class ModelsController extends AdminController
|
||||
// Redirect to the model management page
|
||||
return Redirect::to('assets/models')->with('error', Lang::get('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
||||
$model = clone $model_to_clone;
|
||||
$model->id = null;
|
||||
|
||||
|
||||
// Show the page
|
||||
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
|
||||
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
|
||||
@@ -284,7 +313,7 @@ class ModelsController extends AdminController
|
||||
$view->with('model',$model);
|
||||
$view->with('clone_model',$model_to_clone);
|
||||
return $view;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,10 +148,8 @@ class ReportsController extends AdminController
|
||||
*/
|
||||
public function exportDeprecationReport()
|
||||
{
|
||||
// @todo - It may be worthwhile creating a separate controller for reporting
|
||||
|
||||
// Grab all the assets
|
||||
$assets = Asset::orderBy('created_at', 'DESC')->get();
|
||||
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
$rows = array();
|
||||
|
||||
@@ -198,17 +196,20 @@ class ReportsController extends AdminController
|
||||
$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).'"';
|
||||
$row[] = '"'.Lang::get('general.currency').number_format($asset->purchase_cost).'"';
|
||||
$row[] = '"'.Lang::get('general.currency').number_format($asset->getDepreciatedValue()).'"';
|
||||
$row[] = '"-'.Lang::get('general.currency').number_format(($asset->purchase_cost - $asset->getDepreciatedValue())).'"';
|
||||
$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');
|
||||
|
||||
@@ -10,6 +10,7 @@ use Sentry;
|
||||
use Str;
|
||||
use Validator;
|
||||
use View;
|
||||
use Image;
|
||||
|
||||
class SettingsController extends AdminController
|
||||
{
|
||||
@@ -64,8 +65,10 @@ class SettingsController extends AdminController
|
||||
// Declare the rules for the form validation
|
||||
$rules = array(
|
||||
"site_name" => 'required|min:3',
|
||||
"per_page" => 'required|min:1|numeric',
|
||||
"qr_text" => 'min:1|max:31'
|
||||
"per_page" => 'required|min:1|numeric',
|
||||
"qr_text" => 'min:1|max:31',
|
||||
"logo" => 'mimes:jpeg,bmp,png,gif',
|
||||
"alert_email" => 'email',
|
||||
);
|
||||
|
||||
// Create a new validator instance from our validation rules
|
||||
@@ -77,6 +80,20 @@ class SettingsController extends AdminController
|
||||
// Ooops.. something went wrong
|
||||
return Redirect::back()->withInput()->withErrors($validator);
|
||||
}
|
||||
|
||||
if (Input::get('clear_logo')=='1') {
|
||||
$setting->logo = NULL;
|
||||
} elseif (Input::file('logo')) {
|
||||
$image = Input::file('logo');
|
||||
$file_name = "logo.".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(null, 40, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$setting->logo = $file_name;
|
||||
}
|
||||
|
||||
|
||||
// Update the asset data
|
||||
$setting->id = '1';
|
||||
@@ -86,9 +103,15 @@ class SettingsController extends AdminController
|
||||
$setting->per_page = e(Input::get('per_page'));
|
||||
$setting->qr_code = e(Input::get('qr_code', '0'));
|
||||
$setting->display_eol = e(Input::get('display_eol', '0'));
|
||||
$setting->load_remote = e(Input::get('load_remote', '0'));
|
||||
$setting->qr_text = e(Input::get('qr_text'));
|
||||
$setting->auto_increment_prefix = e(Input::get('auto_increment_prefix'));
|
||||
$setting->auto_increment_assets = e(Input::get('auto_increment_assets', '0'));
|
||||
$setting->alert_email = e(Input::get('alert_email'));
|
||||
$setting->alerts_enabled = e(Input::get('alerts_enabled', '0'));
|
||||
$setting->header_color = e(Input::get('header_color'));
|
||||
$setting->default_eula_text = e(Input::get('default_eula_text'));
|
||||
|
||||
|
||||
// Was the asset updated?
|
||||
if($setting->save()) {
|
||||
|
||||
@@ -38,7 +38,12 @@ class StatuslabelsController extends AdminController
|
||||
public function getCreate()
|
||||
{
|
||||
// Show the page
|
||||
return View::make('backend/statuslabels/edit')->with('statuslabel',new Statuslabel);
|
||||
$statuslabel = new Statuslabel;
|
||||
$use_statuslabel_type = $statuslabel->getStatuslabelType();
|
||||
|
||||
$statuslabel_types = array('' => Lang::get('admin/hardware/form.select_statustype')) + array('undeployable' => Lang::get('admin/hardware/general.undeployable')) + array('pending' => Lang::get('admin/hardware/general.pending')) + array('archived' => Lang::get('admin/hardware/general.archived')) + array('deployable' => Lang::get('admin/hardware/general.deployable'));
|
||||
|
||||
return View::make('backend/statuslabels/edit', compact('statuslabel_types','statuslabel'))->with('use_statuslabel_type',$use_statuslabel_type);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +64,15 @@ class StatuslabelsController extends AdminController
|
||||
// attempt validation
|
||||
if ($statuslabel->validate($new)) {
|
||||
|
||||
$statustype = Statuslabel::getStatuslabelTypesForDB(Input::get('statuslabel_types'));
|
||||
|
||||
// Save the Statuslabel data
|
||||
$statuslabel->name = e(Input::get('name'));
|
||||
$statuslabel->user_id = Sentry::getId();
|
||||
$statuslabel->notes = e(Input::get('notes'));
|
||||
$statuslabel->deployable = $statustype['deployable'];
|
||||
$statuslabel->pending = $statustype['pending'];
|
||||
$statuslabel->archived = $statustype['archived'];
|
||||
|
||||
// Was the asset created?
|
||||
if($statuslabel->save()) {
|
||||
@@ -94,8 +105,11 @@ class StatuslabelsController extends AdminController
|
||||
return Redirect::to('admin/settings/statuslabels')->with('error', Lang::get('admin/statuslabels/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$use_statuslabel_type = $statuslabel->getStatuslabelType();
|
||||
|
||||
return View::make('backend/statuslabels/edit', compact('statuslabel'));
|
||||
$statuslabel_types = array('' => Lang::get('admin/hardware/form.select_statustype')) + array('undeployable' => Lang::get('admin/hardware/general.undeployable')) + array('pending' => Lang::get('admin/hardware/general.pending')) + array('archived' => Lang::get('admin/hardware/general.archived')) + array('deployable' => Lang::get('admin/hardware/general.deployable'));
|
||||
|
||||
return View::make('backend/statuslabels/edit', compact('statuslabel','statuslabel_types'))->with('use_statuslabel_type',$use_statuslabel_type);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,20 +132,27 @@ class StatuslabelsController extends AdminController
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
// The given data did not pass validation
|
||||
// The given data did not pass validation
|
||||
return Redirect::back()->withInput()->withErrors($validator->messages());
|
||||
}
|
||||
// attempt validation
|
||||
else {
|
||||
// Update the Statuslabel data
|
||||
$statustype = Statuslabel::getStatuslabelTypesForDB(Input::get('statuslabel_types'));
|
||||
|
||||
$statuslabel->name = e(Input::get('name'));
|
||||
$statuslabel->notes = e(Input::get('notes'));
|
||||
$statuslabel->deployable = $statustype['deployable'];
|
||||
$statuslabel->pending = $statustype['pending'];
|
||||
$statuslabel->archived = $statustype['archived'];
|
||||
|
||||
|
||||
// Was the asset created?
|
||||
if($statuslabel->save()) {
|
||||
// Redirect to the saved Statuslabel page
|
||||
return Redirect::to("admin/settings/statuslabels/")->with('success', Lang::get('admin/statuslabels/message.update.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect to the Statuslabel management page
|
||||
return Redirect::to("admin/settings/statuslabels/$statuslabelId/edit")->with('error', Lang::get('admin/statuslabels/message.update.error'));
|
||||
|
||||
@@ -21,6 +21,8 @@ use Sentry;
|
||||
use Validator;
|
||||
use View;
|
||||
use Chumper\Datatable\Facades\Datatable;
|
||||
use League\Csv\Reader;
|
||||
use Mail;
|
||||
|
||||
class UsersController extends AdminController
|
||||
{
|
||||
@@ -149,7 +151,7 @@ class UsersController extends AdminController
|
||||
// permissions here before we create the user.
|
||||
|
||||
// Get the inputs, with some exceptions
|
||||
$inputs = Input::except('csrf_token', 'password_confirm', 'groups');
|
||||
$inputs = Input::except('csrf_token', 'password_confirm', 'groups','email_user');
|
||||
|
||||
// @TODO: Figure out WTF I need to do this.
|
||||
if ($inputs['manager_id']=='') {
|
||||
@@ -174,6 +176,22 @@ class UsersController extends AdminController
|
||||
|
||||
// Redirect to the new user page
|
||||
//return Redirect::route('update/user', $user->id)->with('success', $success);
|
||||
|
||||
if (Input::get('email_user')==1) {
|
||||
// Send the credentials through email
|
||||
|
||||
$data = array();
|
||||
$data['email'] = e(Input::get('email'));
|
||||
$data['first_name'] = e(Input::get('first_name'));
|
||||
$data['password'] = e(Input::get('password'));
|
||||
|
||||
Mail::send('emails.send-login', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Welcome ' . $user->first_name);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return Redirect::route('users')->with('success', $success);
|
||||
}
|
||||
|
||||
@@ -458,7 +476,7 @@ class UsersController extends AdminController
|
||||
public function getView($userId = null)
|
||||
{
|
||||
|
||||
$user = Sentry::getUserProvider()->createModel()->withTrashed()->find($userId);
|
||||
$user = Sentry::getUserProvider()->createModel()->find($userId);
|
||||
|
||||
if (isset($user->id)) {
|
||||
return View::make('backend/users/view', compact('user'));
|
||||
@@ -493,7 +511,7 @@ class UsersController extends AdminController
|
||||
}
|
||||
)
|
||||
->addColumn('activated', function ($model) {
|
||||
$activated = $model->isActivated() ? '<i class="icon-ok"></i>' : '';
|
||||
$activated = $model->isActivated() ? '<i class="fa fa-check"></i>' : '';
|
||||
return $activated;
|
||||
}
|
||||
)
|
||||
@@ -601,5 +619,122 @@ class UsersController extends AdminController
|
||||
return Redirect::route('users')->with('error', $error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* User import.
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function getImport()
|
||||
{
|
||||
// Get all the available groups
|
||||
$groups = Sentry::getGroupProvider()->findAll();
|
||||
// Selected groups
|
||||
$selectedGroups = Input::old('groups', array());
|
||||
// Get all the available permissions
|
||||
$permissions = Config::get('permissions');
|
||||
$this->encodeAllPermissions($permissions);
|
||||
// Selected permissions
|
||||
$selectedPermissions = Input::old('permissions', array('superuser' => -1));
|
||||
$this->encodePermissions($selectedPermissions);
|
||||
// Show the page
|
||||
return View::make('backend/users/import', compact('groups', 'selectedGroups', 'permissions', 'selectedPermissions'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* User import form processing.
|
||||
*
|
||||
* @return Redirect
|
||||
*/
|
||||
public function postImport()
|
||||
{
|
||||
|
||||
if (! ini_get("auto_detect_line_endings")) {
|
||||
ini_set("auto_detect_line_endings", '1');
|
||||
}
|
||||
|
||||
$csv = Reader::createFromPath(Input::file('user_import_csv'));
|
||||
$csv->setNewline("\r\n");
|
||||
|
||||
if (Input::get('has_headers')==1) {
|
||||
$csv->setOffset(1);
|
||||
}
|
||||
|
||||
$duplicates = '';
|
||||
|
||||
$nbInsert = $csv->each(function ($row) use ($duplicates) {
|
||||
|
||||
if (array_key_exists(2, $row)) {
|
||||
|
||||
if (Input::get('activate')==1) {
|
||||
$activated = '1';
|
||||
} else {
|
||||
$activated = '0';
|
||||
}
|
||||
|
||||
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10);
|
||||
|
||||
|
||||
|
||||
try {
|
||||
// Check if this email already exists in the system
|
||||
$user = DB::table('users')->where('email', $row[2])->first();
|
||||
if ($user) {
|
||||
$duplicates .= $row[2].', ';
|
||||
} else {
|
||||
|
||||
$newuser = array(
|
||||
'first_name' => $row[0],
|
||||
'last_name' => $row[1],
|
||||
'email' => $row[2],
|
||||
'password' => $pass,
|
||||
'activated' => $activated,
|
||||
'permissions' => '{"user":1}'
|
||||
);
|
||||
|
||||
DB::table('users')->insert($newuser);
|
||||
|
||||
$udpateuser = Sentry::findUserByLogin($row[2]);
|
||||
|
||||
// Update the user details
|
||||
$udpateuser->password = $pass;
|
||||
|
||||
// Update the user
|
||||
$udpateuser->save();
|
||||
|
||||
|
||||
if (Input::get('email_user')==1) {
|
||||
// Send the credentials through email
|
||||
|
||||
$data = array();
|
||||
$data['email'] = $row[2];
|
||||
$data['first_name'] = $row[0];
|
||||
$data['password'] = $pass;
|
||||
|
||||
Mail::send('emails.send-login', $data, function ($m) use ($newuser) {
|
||||
$m->to($newuser['email'], $newuser['first_name'] . ' ' . $newuser['last_name']);
|
||||
$m->subject('Welcome ' . $newuser['first_name']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
return Redirect::route('users')->with('duplicates',$duplicates)->with('success', 'Success');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class IncreaseUserFieldLengths extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'users MODIFY column jobtitle varchar(100) null');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'users MODIFY column jobtitle varchar(50) null');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddSoftDeletedToLog extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column asset_type varchar(100) null');
|
||||
DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column added_on timestamp default "0000-00-00 00:00:00"');
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->renameColumn('added_on', 'created_at');
|
||||
$table->timestamp('updated_at');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->renameColumn('created_at', 'added_on');
|
||||
$table->dropColumn('updated_at');
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class FixBadAssignedToIds extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
DB::update('update ' . DB::getTablePrefix() . 'assets SET assigned_to=NULL where assigned_to=0');
|
||||
|
||||
Schema::table('status_labels', function ($table) {
|
||||
$table->boolean('deployable')->default(0);
|
||||
$table->boolean('pending')->default(0);
|
||||
$table->boolean('archived')->default(0);
|
||||
$table->text('notes')->nullable();
|
||||
});
|
||||
|
||||
DB::statement('INSERT into ' . DB::getTablePrefix() . 'status_labels (user_id, name, deployable, pending, archived, notes) VALUES (1,"Pending",0,1,0,"These assets are not yet ready to be deployed, usually because of configuration or waiting on parts.")');
|
||||
DB::statement('INSERT into ' . DB::getTablePrefix() . 'status_labels (user_id, name, deployable, pending, archived, notes) VALUES (1,"Ready to Deploy",1,0,0,"These assets are ready to deploy.")');
|
||||
DB::statement('INSERT into ' . DB::getTablePrefix() . 'status_labels (user_id, name, deployable, pending, archived, notes) VALUES (1,"Archived",0,0,1,"These assets are no longer in circulation or viable.")');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('status_labels', function ($table) {
|
||||
$table->dropColumn('deployable');
|
||||
$table->dropColumn('pending');
|
||||
$table->dropColumn('archived');
|
||||
$table->dropColumn('notes');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateDataToNewStatuses extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// get newly added statuses from last migration
|
||||
$statuses = DB::select('select * from ' . DB::getTablePrefix() . 'status_labels where name="Pending" OR name="Ready to Deploy"');
|
||||
|
||||
|
||||
foreach ($statuses as $status) {
|
||||
if ($status->name =="Pending") {
|
||||
$pending_id = array($status->id);
|
||||
} elseif ($status->name =="Ready to Deploy") {
|
||||
$rtd_id = array($status->id);
|
||||
}
|
||||
}
|
||||
|
||||
// Pending
|
||||
$pendings = DB::select('select * from ' . DB::getTablePrefix() . 'assets where status_id IS NULL AND physical=1 ');
|
||||
|
||||
foreach ($pendings as $pending) {
|
||||
DB::update('update ' . DB::getTablePrefix() . 'assets set status_id = ? where status_id IS NULL AND physical=1',$pending_id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ready to Deploy
|
||||
$rtds = DB::select('select * from ' . DB::getTablePrefix() . 'assets where status_id = 0 AND physical=1 ');
|
||||
|
||||
foreach ($rtds as $rtd) {
|
||||
//DB::update('update users set votes = 100 where name = ?', array('John'));
|
||||
DB::update('update ' . DB::getTablePrefix() . 'assets set status_id = ? where status_id = 0 AND physical=1',$rtd_id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateMakeLicenseAssignedNull extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
DB::update('update ' . DB::getTablePrefix() . 'license_seats SET assigned_to=NULL where assigned_to=0');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateCreateRequestsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('requests', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('asset_id');
|
||||
$table->integer('user_id');
|
||||
$table->text('request_code');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('requests');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddMacAddressToAsset extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('assets', function ($table) {
|
||||
$table->string('mac_address')->nullable()->default(NULL);
|
||||
});
|
||||
|
||||
Schema::table('models', function ($table) {
|
||||
$table->boolean('show_mac_address')->default(0);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('assets', function ($table) {
|
||||
$table->dropColumn('mac_address');
|
||||
});
|
||||
|
||||
Schema::table('models', function ($table) {
|
||||
$table->dropColumn('show_mac_address');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
class ChangeLicenseNotesType extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
$prefix = DB::getTablePrefix();
|
||||
DB::statement('ALTER TABLE '.$prefix.'licenses MODIFY COLUMN notes TEXT');
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
$prefix = DB::getTablePrefix();
|
||||
DB::statement('ALTER TABLE '.$prefix.'licenses MODIFY COLUMN notes VARCHAR(255)');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLocalonlyToSettings extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->boolean('load_remote')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('load_remote');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLogoAndColorsToSettings extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->string('logo')->nullable()->default(NULL);
|
||||
$table->string('header_color')->nullable()->default(NULL);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('logo');
|
||||
$table->dropColumn('header_color');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddAlertsToSettings extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->string('alert_email')->nullable()->default(NULL);
|
||||
$table->boolean('alerts_enabled')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('alert_email');
|
||||
$table->dropColumn('alerts_enabled');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEulaFields extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->longText('default_eula_text');
|
||||
});
|
||||
|
||||
Schema::table('categories', function ($table) {
|
||||
$table->longText('eula_text');
|
||||
$table->boolean('use_default_eula')->default(0);
|
||||
$table->boolean('require_acceptance')->default(0);
|
||||
});
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->dateTime('requested_at')->nullable()->default(NULL);
|
||||
$table->dateTime('accepted_at')->nullable()->default(NULL);
|
||||
});
|
||||
|
||||
|
||||
Schema::create('requested_assets', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('asset_id')->default(NULL);
|
||||
$table->integer('user_id')->default(NULL);
|
||||
$table->dateTime('accepted_at')->nullable()->default(NULL);
|
||||
$table->dateTime('denied_at')->nullable()->default(NULL);
|
||||
$table->string('notes')->default(NULL);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn('default_eula_text');
|
||||
});
|
||||
|
||||
Schema::table('categories', function ($table) {
|
||||
$table->dropColumn('eula_text');
|
||||
$table->dropColumn('use_default_eula');
|
||||
$table->dropColumn('require_acceptance');
|
||||
});
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->dropColumn('requested_at');
|
||||
$table->dropColumn('accepted_at');
|
||||
});
|
||||
|
||||
Schema::drop('requested_assets');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddAccessoriesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('accessories', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable()->default(NULL);
|
||||
$table->integer('category_id')->nullable()->default(NULL);
|
||||
$table->integer('user_id')->nullable()->default(NULL);
|
||||
$table->integer('qty')->default(0);
|
||||
$table->boolean('requestable')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->integer('accessory_id')->nullable()->default(NULL);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('accessories');
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->dropColumn('accessory_id');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddAccessoriesUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('accessories_users', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->nullable()->default(NULL);
|
||||
$table->integer('accessory_id')->nullable()->default(NULL);
|
||||
$table->integer('assigned_to')->nullable()->default(NULL);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::table('accessories', function ($table) {
|
||||
$table->integer('location_id')->nullable()->default(NULL);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('accessories_users');
|
||||
|
||||
Schema::table('accessories', function ($table) {
|
||||
$table->dropColumn('location_id');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDeletedAtModels extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function ($table){
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models', function ($table){
|
||||
$table->dropColumn('deleted_at');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddCategoryType extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('categories', function ($table) {
|
||||
$table->string('category_type')->nullable()->default('asset');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('categories', function ($table) {
|
||||
$table->dropColumn('category_type');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,53 +10,53 @@ class ActionlogSeeder extends Seeder
|
||||
|
||||
$date = new DateTime;
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$assetlog[] = array(
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkout',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => '3',
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'asset_type' => 'hardware',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$assetlog[] = array(
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkin from',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => NULL,
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'asset_type' => 'hardware',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$assetlog[] = array(
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkout',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '1',
|
||||
'location_id' => '3',
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'asset_type' => 'software',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$assetlog[] = array(
|
||||
'user_id' => '1',
|
||||
'action_type' => 'checkin from',
|
||||
'asset_id' => '1',
|
||||
'checkedout_to' => '2',
|
||||
'location_id' => NULL,
|
||||
'added_on' => $date->modify('-10 day'),
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'asset_type' => 'software',
|
||||
'note' => NULL,
|
||||
'filename' => NULL,
|
||||
|
||||
@@ -10,7 +10,7 @@ class AssetsSeeder extends Seeder
|
||||
|
||||
$date = new DateTime;
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Shanen MBP',
|
||||
'asset_tag' => 'NNY2878796',
|
||||
@@ -22,10 +22,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => NULL,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -45,10 +45,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => NULL,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -57,7 +57,7 @@ class AssetsSeeder extends Seeder
|
||||
);
|
||||
|
||||
|
||||
// RTD (status_id =0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Alison MBP',
|
||||
'asset_tag' => 'NNY287958796',
|
||||
@@ -69,10 +69,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 2,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -80,7 +80,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// RTD (status_id =0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Brady MBP',
|
||||
'asset_tag' => 'NNY78795566',
|
||||
@@ -92,10 +92,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -103,7 +103,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// RTD (status_id =0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Deborah MBP',
|
||||
'asset_tag' => 'NNY65756756775',
|
||||
@@ -115,10 +115,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 2,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 2,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -127,7 +127,7 @@ class AssetsSeeder extends Seeder
|
||||
);
|
||||
|
||||
|
||||
// Deployed (status_id =0, assigned_to > 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Sara MBP',
|
||||
'asset_tag' => 'NNY6897856775',
|
||||
@@ -142,7 +142,7 @@ class AssetsSeeder extends Seeder
|
||||
'assigned_to' => 2,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -150,7 +150,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Deployed (status_id =0, assigned_to > 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Ben MBP',
|
||||
'asset_tag' => 'NNY67567775',
|
||||
@@ -165,7 +165,7 @@ class AssetsSeeder extends Seeder
|
||||
'assigned_to' => 2,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
@@ -173,10 +173,10 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Undeployable (status_id > 0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Broke-Ass Laptop',
|
||||
'asset_tag' => 'NNY67567775',
|
||||
'name' => 'Broken Laptop',
|
||||
'asset_tag' => 'NNY6756756775',
|
||||
'model_id' => 2,
|
||||
'serial' => 'WS89080890',
|
||||
'purchase_date' => '2012-01-02',
|
||||
@@ -185,7 +185,7 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 2,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => '3',
|
||||
@@ -196,7 +196,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Undeployable (status_id > 0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Maybe Broke-Ass Laptop',
|
||||
'asset_tag' => 'NNY6755667775',
|
||||
@@ -208,7 +208,7 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => '2',
|
||||
@@ -219,7 +219,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Undeployable (status_id > 0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Completely Facacta Laptop',
|
||||
'asset_tag' => 'NNY6564567775',
|
||||
@@ -231,7 +231,7 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 1,
|
||||
'status_id' => '4',
|
||||
@@ -242,7 +242,7 @@ class AssetsSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Undeployable (status_id > 0, assigned_to = 0)
|
||||
|
||||
$asset[] = array(
|
||||
'name' => 'Drunken Shanenigans Laptop',
|
||||
'asset_tag' => 'NNY6564567775',
|
||||
@@ -254,7 +254,7 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 1,
|
||||
'status_id' => '3',
|
||||
@@ -277,10 +277,10 @@ class AssetsSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 2,
|
||||
'assigned_to' => 0,
|
||||
'assigned_to' => NULL,
|
||||
'physical' => 1,
|
||||
'archived' => 0,
|
||||
'status_id' => 0,
|
||||
'status_id' => 1,
|
||||
'notes' => '',
|
||||
'deleted_at' => NULL,
|
||||
'archived' => '0',
|
||||
|
||||
@@ -12,6 +12,8 @@ class CategoriesSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'use_default_eula' => 0,
|
||||
'require_acceptance' => 0,
|
||||
'deleted_at' => NULL,
|
||||
);
|
||||
|
||||
@@ -21,6 +23,8 @@ class CategoriesSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'use_default_eula' => 0,
|
||||
'require_acceptance' => 0,
|
||||
'deleted_at' => NULL,
|
||||
);
|
||||
|
||||
@@ -30,6 +34,8 @@ class CategoriesSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'use_default_eula' => 0,
|
||||
'require_acceptance' => 0,
|
||||
'deleted_at' => NULL,
|
||||
);
|
||||
|
||||
@@ -39,6 +45,8 @@ class CategoriesSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'use_default_eula' => 0,
|
||||
'require_acceptance' => 0,
|
||||
'deleted_at' => NULL,
|
||||
);
|
||||
|
||||
@@ -48,6 +56,8 @@ class CategoriesSeeder extends Seeder
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'use_default_eula' => 0,
|
||||
'require_acceptance' => 0,
|
||||
'deleted_at' => NULL,
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class LicenseSeatsSeeder extends Seeder
|
||||
|
||||
$date = new DateTime;
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$license_seats[] = array(
|
||||
'license_id' => '1',
|
||||
'assigned_to' => '1',
|
||||
@@ -46,7 +46,7 @@ class LicenseSeatsSeeder extends Seeder
|
||||
|
||||
$license_seats[] = array(
|
||||
'license_id' => '1',
|
||||
'assigned_to' => '0',
|
||||
'assigned_to' => NULL,
|
||||
'created_at' => $date->modify('-10 day')->format('Y-m-d H:i:s'),
|
||||
'updated_at' => $date->modify('-3 day')->format('Y-m-d H:i:s'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -77,10 +77,10 @@ class LicenseSeatsSeeder extends Seeder
|
||||
'asset_id' => NULL,
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$license_seats[] = array(
|
||||
'license_id' => '2',
|
||||
'assigned_to' => '0',
|
||||
'assigned_to' => NULL,
|
||||
'created_at' => $date->modify('-10 day')->format('Y-m-d H:i:s'),
|
||||
'updated_at' => $date->modify('-3 day')->format('Y-m-d H:i:s'),
|
||||
'deleted_at' => NULL,
|
||||
|
||||
@@ -10,12 +10,14 @@ class LicensesSeeder extends Seeder
|
||||
|
||||
$date = new DateTime;
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$license[] = array(
|
||||
'name' => 'Adobe Photoshop CS6',
|
||||
'serial' => 'ZOMG-WtF-BBQ-SRSLY',
|
||||
'purchase_date' => '2013-10-02',
|
||||
'purchase_cost' => '2435.99',
|
||||
'purchase_order' => '1',
|
||||
'maintained' => '0',
|
||||
'order_number' => '987698576946',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
@@ -29,12 +31,14 @@ class LicensesSeeder extends Seeder
|
||||
'depreciate' => '0',
|
||||
);
|
||||
|
||||
// Pending (status_id is null, assigned_to = 0)
|
||||
|
||||
$license[] = array(
|
||||
'name' => 'Git Tower',
|
||||
'serial' => '98049890394-340485934',
|
||||
'purchase_date' => '2013-10-02',
|
||||
'purchase_cost' => '2435.99',
|
||||
'purchase_order' => '1',
|
||||
'maintained' => '1',
|
||||
'order_number' => '987698576946',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
|
||||
@@ -10,12 +10,53 @@ class StatuslabelsSeeder extends Seeder
|
||||
|
||||
$date = new DateTime;
|
||||
|
||||
$status[] = array(
|
||||
'name' => 'Ready to Deploy',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 1,
|
||||
'pending' => 0,
|
||||
'archived' => 0,
|
||||
'notes' => ''
|
||||
);
|
||||
|
||||
$status[] = array(
|
||||
'name' => 'Pending',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 1,
|
||||
'archived' => 0,
|
||||
'notes' => ''
|
||||
);
|
||||
|
||||
$status[] = array(
|
||||
'name' => 'Archived',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 0,
|
||||
'archived' => 1,
|
||||
'notes' => 'These assets are permanently undeployable'
|
||||
);
|
||||
|
||||
|
||||
$status[] = array(
|
||||
'name' => 'Out for Diagnostics',
|
||||
'created_at' => $date->modify('-10 day'),
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 0,
|
||||
'archived' => 0,
|
||||
'notes' => ''
|
||||
);
|
||||
|
||||
|
||||
@@ -25,6 +66,10 @@ class StatuslabelsSeeder extends Seeder
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 0,
|
||||
'archived' => 0,
|
||||
'notes' => ''
|
||||
);
|
||||
|
||||
|
||||
@@ -34,6 +79,10 @@ class StatuslabelsSeeder extends Seeder
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 0,
|
||||
'archived' => 1,
|
||||
'notes' => ''
|
||||
);
|
||||
|
||||
$status[] = array(
|
||||
@@ -42,6 +91,10 @@ class StatuslabelsSeeder extends Seeder
|
||||
'updated_at' => $date->modify('-3 day'),
|
||||
'user_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'deployable' => 0,
|
||||
'pending' => 0,
|
||||
'archived' => 1,
|
||||
'notes' => '',
|
||||
);
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ Route::filter('admin-auth', function () {
|
||||
// Check if the user has access to the admin pages
|
||||
if ( ! Sentry::getUser()->hasAccess('admin')) {
|
||||
// Show the insufficient permissions page
|
||||
return Redirect::route('profile');
|
||||
return Redirect::route('view-assets');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_accessories_title' => 'About Accessories',
|
||||
'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.',
|
||||
'accessory_category' => 'Accessory Category',
|
||||
'accessory_name' => 'Accessory Name',
|
||||
'create' => 'Create Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'qty' => 'QTY',
|
||||
'total' => 'Total',
|
||||
'remaining' => 'Avail',
|
||||
'update' => 'Update Category',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
|
||||
);
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Category does not exist.',
|
||||
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Category was not created, please try again.',
|
||||
'success' => 'Category created successfully.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Category was not updated, please try again',
|
||||
'success' => 'Category updated successfully.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this category?',
|
||||
'error' => 'There was an issue deleting the category. Please try again.',
|
||||
'success' => 'The category was deleted successfully.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'Accessory was not checked out, please try again',
|
||||
'success' => 'Accessory checked out successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'Accessory was not checked in, please try again',
|
||||
'success' => 'Accessory checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'ID',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'Accessory Name',
|
||||
|
||||
);
|
||||
@@ -5,7 +5,17 @@ return array(
|
||||
'about_categories' => 'تصنيفات الأصول تساعدك على ترتيب الأصول. من الأمثلة على التصنيفات " مكاتب "، "أجهزة الكمبيوتر المحمولة "، "الهواتف النقالة "، "أجهزة لوحية " وهكذا، كما يمكنك استخدام التصنيفات بأي طريقة تناسبك. ',
|
||||
'asset_categories' => 'التصنيفات',
|
||||
'category_name' => 'اسم التصنيف',
|
||||
'clone' => 'Clone Category',
|
||||
'create' => 'إنشاء تصنيف',
|
||||
'edit' => 'Edit Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.',
|
||||
'required_eula' => 'This user will be emailed a copy of the EULA',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'update' => 'تحديث التصنيف',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
|
||||
);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'id' => 'الرقم',
|
||||
'parent' => 'التصنيف الأب',
|
||||
'title' => 'اسم التصنيف',
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'الرقم',
|
||||
'parent' => 'التصنيف الأب',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'اسم التصنيف',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
return array(
|
||||
|
||||
'bulk_update' => 'Bulk Update Assets',
|
||||
'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ',
|
||||
'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.',
|
||||
'checkedout_to' => 'Checked Out To',
|
||||
'checkout_to' => 'Checkout to',
|
||||
'cost' => 'Purchase Cost',
|
||||
@@ -15,6 +18,7 @@ return array(
|
||||
'expires' => 'Expires',
|
||||
'fully_depreciated' => 'Fully Depreciated',
|
||||
'help_checkout' => 'If you wish to assign this asset immediately, you should select "Ready to Deploy" from the status list above, or unexpected things may happen. ',
|
||||
'mac_address' => 'MAC Address',
|
||||
'manufacturer' => 'Manufacturer',
|
||||
'model' => 'Model',
|
||||
'months' => 'months',
|
||||
@@ -23,6 +27,7 @@ return array(
|
||||
'order' => 'Order Number',
|
||||
'qr' => 'QR Code',
|
||||
'requestable' => 'Users may request this asset',
|
||||
'select_statustype' => 'Select Status Type',
|
||||
'serial' => 'Serial',
|
||||
'status' => 'Status',
|
||||
'supplier' => 'Supplier',
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'archived' => 'Archived',
|
||||
'asset' => 'Asset',
|
||||
'checkin' => 'Checkin Asset',
|
||||
'checkout' => 'Checkout Asset to User',
|
||||
'clone' => 'Clone Asset',
|
||||
'deployable' => 'Deployable',
|
||||
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
|
||||
'edit' => 'Edit Asset',
|
||||
'pending' => 'Pending Asset',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
'view' => 'View Asset',
|
||||
);
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
return array(
|
||||
|
||||
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable. If this status has changed, please update the asset status.',
|
||||
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable.
|
||||
If this status has changed, please update the asset status.',
|
||||
'does_not_exist' => 'Asset does not exist.',
|
||||
'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ',
|
||||
|
||||
@@ -12,10 +13,29 @@ return array(
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Asset was not updated, please try again',
|
||||
'success' => 'Asset updated successfully.'
|
||||
'error' => 'Asset was not updated, please try again',
|
||||
'success' => 'Asset updated successfully.',
|
||||
'nothing_updated' => 'No fields were selected, so nothing was updated.',
|
||||
),
|
||||
|
||||
'restore' => array(
|
||||
'error' => 'Asset was not restored, please try again',
|
||||
'success' => 'Asset restored successfully.'
|
||||
),
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'File not deleted. Please try again.',
|
||||
'success' => 'File successfully deleted.',
|
||||
),
|
||||
|
||||
'upload' => array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
),
|
||||
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this asset?',
|
||||
'error' => 'There was an issue deleting the asset. Please try again.',
|
||||
|
||||
@@ -9,6 +9,7 @@ return array(
|
||||
'date' => 'Purchase Date',
|
||||
'depreciation' => 'Depreciation',
|
||||
'expiration' => 'Expiration Date',
|
||||
'maintained' => 'Maintained',
|
||||
'name' => 'Software Name',
|
||||
'no_depreciation' => 'Do Not Depreciate',
|
||||
'notes' => 'Notes',
|
||||
@@ -18,6 +19,7 @@ return array(
|
||||
'seats' => 'Seats',
|
||||
'serial' => 'Serial',
|
||||
'supplier' => 'Supplier',
|
||||
'termination_date' => 'Termination Date',
|
||||
'to_email' => 'Licensed to Email',
|
||||
'to_name' => 'Licensed to Name',
|
||||
'update' => 'Update License',
|
||||
|
||||
@@ -14,6 +14,18 @@ return array(
|
||||
'success' => 'License created successfully.'
|
||||
),
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'File not deleted. Please try again.',
|
||||
'success' => 'File successfully deleted.',
|
||||
),
|
||||
|
||||
'upload' => array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'License was not updated, please try again',
|
||||
'success' => 'License updated successfully.'
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
);
|
||||
@@ -20,6 +20,11 @@ return array(
|
||||
'confirm' => 'Are you sure you wish to delete this asset model?',
|
||||
'error' => 'There was an issue deleting the model. Please try again.',
|
||||
'success' => 'The model was deleted successfully.'
|
||||
)
|
||||
),
|
||||
|
||||
'restore' => array(
|
||||
'error' => 'Model was not restored, please try again',
|
||||
'success' => 'Model restored successfully.'
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'alert_email' => 'Send alerts to',
|
||||
'alerts_enabled' => 'Alerts enabled',
|
||||
'auto_increment_assets' => 'Generate auto-incrementing asset IDs',
|
||||
'auto_increment_prefix' => 'Prefix (optional)',
|
||||
'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this',
|
||||
'default_eula_text' => 'Default EULA',
|
||||
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
|
||||
'display_asset_name' => 'Display Asset Name',
|
||||
'display_checkout_date' => 'Display Checkout Date',
|
||||
'display_eol' => 'Display EOL in table view',
|
||||
'display_qr' => 'Display QR Codes',
|
||||
'eula_markdown' => 'This EULA allows <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
|
||||
'header_color' => 'Header Color',
|
||||
'info' => 'These settings let you customize certain aspects of your installation.',
|
||||
'laravel' => 'Laravel Version',
|
||||
'load_remote' => 'This Snipe-IT install can load scripts from the outside world.',
|
||||
'logo' => 'Logo',
|
||||
'per_page' => 'Results Per Page',
|
||||
'php' => 'PHP Version',
|
||||
'php_gd_info' => 'You must install php-gd to display QR codes, see install instructions.',
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'name' => 'Status Name',
|
||||
'title' => 'Status Labels',
|
||||
'update' => 'Update Status Label',
|
||||
'create' => 'Create Status Label',
|
||||
'about' => 'About Status Labels',
|
||||
'info' => 'Status labels are used to describe the various reasons why an asset <strong><em>cannot</em></strong> be deployed. It could be broken, out for diagnostics, out for repair, lost or stolen, etc. Status labels allow your team to show the progression.',
|
||||
'archived' => 'Archived',
|
||||
'create' => 'Create Status Label',
|
||||
'deployable' => 'Deployable',
|
||||
'info' => 'Status labels are used to describe the various states your assets could be in. They may be out for repair, lost/stolen, etc. You can create new status labels for deployable, pending and archived assets.',
|
||||
'name' => 'Status Name',
|
||||
'pending' => 'Pending',
|
||||
'status_type' => 'Status Type',
|
||||
'title' => 'Status Labels',
|
||||
'undeployable' => 'Undeployable',
|
||||
'update' => 'Update Status Label',
|
||||
);
|
||||
|
||||
@@ -11,4 +11,5 @@ return array(
|
||||
'last_login' => 'Last Login',
|
||||
'software_user' => 'Software Checked out to :name',
|
||||
'view_user' => 'View User :name',
|
||||
'usercsv' => 'CSV file',
|
||||
);
|
||||
|
||||
@@ -18,14 +18,16 @@ return array(
|
||||
'unban' => 'User was successfully unbanned.',
|
||||
'suspend' => 'User was successfully suspended.',
|
||||
'unsuspend' => 'User was successfully unsuspended.',
|
||||
'restored' => 'User was successfully restored.'
|
||||
'restored' => 'User was successfully restored.',
|
||||
+ 'import' => 'Users imported successfully.',
|
||||
),
|
||||
|
||||
'error' => array(
|
||||
'create' => 'There was an issue creating the user. Please try again.',
|
||||
'update' => 'There was an issue updating the user. Please try again.',
|
||||
'delete' => 'There was an issue deleting the user. Please try again.',
|
||||
'unsuspend' => 'There was an issue unsuspending the user. Please try again.'
|
||||
'unsuspend' => 'There was an issue unsuspending the user. Please try again.',
|
||||
'import' => 'There was an issue importing users. Please try again.',
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -18,6 +18,7 @@ return array(
|
||||
'last_login' => 'Last Login',
|
||||
'last_name' => 'Last Name',
|
||||
'location' => 'Location',
|
||||
'lock_passwords' => 'Login details cannot be changed on this installation.',
|
||||
'manager' => 'Manager',
|
||||
'name' => 'Name',
|
||||
'password_confirm' => 'Confirm Password',
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
return array(
|
||||
|
||||
'edit' => 'تعديل',
|
||||
'delete' => 'حذف',
|
||||
'restore' => 'إستعادة',
|
||||
'actions' => 'الإجراءات',
|
||||
'submit' => 'إرسال',
|
||||
'actions' => 'الإجراءات',
|
||||
'add' => 'Add New',
|
||||
'cancel' => 'Cancel',
|
||||
'delete' => 'حذف',
|
||||
'edit' => 'تعديل',
|
||||
'restore' => 'إستعادة',
|
||||
'submit' => 'إرسال',
|
||||
'upload' => 'Upload',
|
||||
|
||||
);
|
||||
|
||||
+11
-2
@@ -2,10 +2,14 @@
|
||||
|
||||
return array(
|
||||
|
||||
|
||||
'accessories' => 'Accessories',
|
||||
'accessory' => 'Accessory',
|
||||
'address' => 'العنوان',
|
||||
'admin' => 'الإدارة',
|
||||
'all_assets' => 'كل الأصول',
|
||||
'all' => 'الكل',
|
||||
'archived' => 'Archived',
|
||||
'asset_models' => 'نماذج الأصول',
|
||||
'asset' => 'الأصول',
|
||||
'asset_report' => 'Asset Report',
|
||||
@@ -30,22 +34,26 @@ return array(
|
||||
'currency' => '$',
|
||||
'current' => 'الحالي',
|
||||
'custom_report' => 'Custom Asset Report',
|
||||
'dashboard' => 'Dashboard',
|
||||
'date' => 'التاريخ',
|
||||
'delete' => 'حذف',
|
||||
'deleted' => 'تم حذفها',
|
||||
'deployed' => 'مُوزعة',
|
||||
'depreciation_report' => 'تقرير الإستهلاك',
|
||||
'download' => 'Download',
|
||||
'depreciation' => 'الإستهلاك',
|
||||
'editprofile' => 'تعديل الملف الشخصي',
|
||||
'eol' => 'الحياة',
|
||||
'first_name' => 'الإسم الأول',
|
||||
'file_name' => 'File',
|
||||
'file_uploads' => 'File Uploads',
|
||||
'generate' => 'Generate',
|
||||
'groups' => 'المجموعات',
|
||||
'gravatar_email' => 'البريد الإلكتروني لخدمة Gravatar',
|
||||
'history_for' => 'السجل لـ',
|
||||
'id' => 'الرقم',
|
||||
'image_delete' => 'حذف الصورة',
|
||||
'image_upload' => 'رفع صورة',
|
||||
'image_delete' => 'حذف الصورة',
|
||||
'image_upload' => 'رفع صورة',
|
||||
'last_name' => 'الإسم الأخير',
|
||||
'license' => 'الرخص',
|
||||
'license_report' => 'License Report',
|
||||
@@ -81,6 +89,7 @@ return array(
|
||||
'suppliers' => 'الموردون',
|
||||
'total_assets' => 'إجمالي الأصول',
|
||||
'total_licenses' => 'إجمالي الرخص',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'غير قابلة للتوزيع',
|
||||
'unknown_admin' => 'إداري غير معروف',
|
||||
'user' => 'المستخدم',
|
||||
|
||||
@@ -5,5 +5,6 @@ return array(
|
||||
'actions' => 'الإجراءات',
|
||||
'action' => 'Action',
|
||||
'by' => 'By',
|
||||
'item' => 'Item',
|
||||
|
||||
);
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_accessories_title' => 'About Accessories',
|
||||
'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.',
|
||||
'accessory_category' => 'Accessory Category',
|
||||
'accessory_name' => 'Accessory Name',
|
||||
'create' => 'Create Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'qty' => 'QTY',
|
||||
'total' => 'Total',
|
||||
'remaining' => 'Avail',
|
||||
'update' => 'Update Category',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
|
||||
);
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Category does not exist.',
|
||||
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Category was not created, please try again.',
|
||||
'success' => 'Category created successfully.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Category was not updated, please try again',
|
||||
'success' => 'Category updated successfully.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this category?',
|
||||
'error' => 'There was an issue deleting the category. Please try again.',
|
||||
'success' => 'The category was deleted successfully.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'Accessory was not checked out, please try again',
|
||||
'success' => 'Accessory checked out successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'Accessory was not checked in, please try again',
|
||||
'success' => 'Accessory checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'ID',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'Accessory Name',
|
||||
|
||||
);
|
||||
@@ -1,11 +1,21 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_asset_categories' => 'About Asset Categories',
|
||||
'about_categories' => 'Asset categories help you organize your assets. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use asset categories any way that makes sense for you. ',
|
||||
'asset_categories' => 'Asset Categories',
|
||||
'category_name' => 'Category Name',
|
||||
'create' => 'Create Category',
|
||||
'update' => 'Update Category',
|
||||
'about_asset_categories' => 'O kategoriích majetku',
|
||||
'about_categories' => 'Kategorie pomáhají organizovat majetek. Takovou kategorii může být např. "Desktopy", "Notebooky", "Mobilní telefony", "Tablety", apod., kategorie můžete ale používat jakkoliv Vám to bude dávat smysl. ',
|
||||
'asset_categories' => 'Kategorie majetku',
|
||||
'category_name' => 'Jméno kategorie',
|
||||
'clone' => 'Clone Category',
|
||||
'create' => 'Vytvořit kategorii',
|
||||
'edit' => 'Edit Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.',
|
||||
'required_eula' => 'This user will be emailed a copy of the EULA',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'update' => 'Upravit kategorii',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Category does not exist.',
|
||||
'does_not_exist' => 'Kategorie neexistuje.',
|
||||
'assoc_users' => 'This category is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this category and try again. ',
|
||||
|
||||
'create' => array(
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'parent' => 'Parent',
|
||||
'title' => 'Asset Category Name',
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'ID',
|
||||
'parent' => 'Nadřazená složka',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'Jméno kategorie majetku',
|
||||
|
||||
);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_asset_depreciations' => 'About Asset Depreciations',
|
||||
'about_depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.',
|
||||
'asset_depreciations' => 'Asset Depreciations',
|
||||
'create_depreciation' => 'Create Depreciation',
|
||||
'depreciation_name' => 'Depreciation Name',
|
||||
'number_of_months' => 'Number of Months',
|
||||
'update_depreciation' => 'Update Depreciation',
|
||||
'about_asset_depreciations' => 'O amortizaci majetku',
|
||||
'about_depreciations' => 'Můžete nastavit amortizaci majetku pro jeho rovnoměrné odepisování.',
|
||||
'asset_depreciations' => 'Amortizace majetku',
|
||||
'create_depreciation' => 'Vytvořit amortizaci',
|
||||
'depreciation_name' => 'Jméno amortizace',
|
||||
'number_of_months' => 'Počet měsíců',
|
||||
'update_depreciation' => 'Upravit amortizaci',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Depreciation class does not exist.',
|
||||
'does_not_exist' => 'Amortizační skupina neexistuje.',
|
||||
'assoc_users' => 'This depreciation is currently associated with one or more models and cannot be deleted. Please delete the models, and then try deleting again. ',
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'months' => 'Months',
|
||||
'term' => 'Term',
|
||||
'title' => 'Name ',
|
||||
'months' => 'Měsíců',
|
||||
'term' => 'Podmínka',
|
||||
'title' => 'Název ',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
return array(
|
||||
|
||||
'group_exists' => 'Group already exists!',
|
||||
'group_not_found' => 'Group [:id] does not exist.',
|
||||
'group_name_required' => 'The name field is required',
|
||||
'group_exists' => 'Skupina již existuje!',
|
||||
'group_not_found' => 'Skupina [:id] neexistuje.',
|
||||
'group_name_required' => 'Název je vyžadován',
|
||||
|
||||
'success' => array(
|
||||
'create' => 'Group was successfully created.',
|
||||
'update' => 'Group was successfully updated.',
|
||||
'delete' => 'Group was successfully deleted.',
|
||||
'create' => 'Skupina byla úspěšně vytvořena.',
|
||||
'update' => 'Skupina byla úspěšně upravena.',
|
||||
'delete' => 'Skupina byla úspěšně odstraněna.',
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this group?',
|
||||
'confirm' => 'Určitě chcete odstranit tuto skupinu?',
|
||||
'create' => 'There was an issue creating the group. Please try again.',
|
||||
'update' => 'There was an issue updating the group. Please try again.',
|
||||
'delete' => 'There was an issue deleting the group. Please try again.',
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
return array(
|
||||
|
||||
'id' => 'Id',
|
||||
'name' => 'Name',
|
||||
'users' => '# of Users',
|
||||
'id' => 'ID',
|
||||
'name' => 'Název',
|
||||
'users' => '# z uživatelů',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
return array(
|
||||
|
||||
'group_management' => 'Group Management',
|
||||
'create_group' => 'Create New Group',
|
||||
'edit_group' => 'Edit Group',
|
||||
'group_name' => 'Group Name',
|
||||
'group_admin' => 'Group Admin',
|
||||
'allow' => 'Allow',
|
||||
'deny' => 'Deny',
|
||||
'group_management' => 'Správa skupin',
|
||||
'create_group' => 'Vytvořit novou skupinu',
|
||||
'edit_group' => 'Upravit skupinu',
|
||||
'group_name' => 'Název skupiny',
|
||||
'group_admin' => 'Správce skupiny',
|
||||
'allow' => 'Povolit',
|
||||
'deny' => 'Zakázat',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,33 +2,38 @@
|
||||
|
||||
return array(
|
||||
|
||||
'checkedout_to' => 'Checked Out To',
|
||||
'checkout_to' => 'Checkout to',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Asset',
|
||||
'date' => 'Purchase Date',
|
||||
'depreciates_on' => 'Depreciates On',
|
||||
'depreciation' => 'Depreciation',
|
||||
'default_location' => 'Default Location',
|
||||
'eol_date' => 'EOL Date',
|
||||
'eol_rate' => 'EOL Rate',
|
||||
'expires' => 'Expires',
|
||||
'fully_depreciated' => 'Fully Depreciated',
|
||||
'help_checkout' => 'If you wish to assign this asset immediately, you should select "Ready to Deploy" from the status list above, or unexpected things may happen. ',
|
||||
'manufacturer' => 'Manufacturer',
|
||||
'bulk_update' => 'Bulk Update Assets',
|
||||
'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ',
|
||||
'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.',
|
||||
'checkedout_to' => 'Vydané komu',
|
||||
'checkout_to' => 'Vydat někomu',
|
||||
'cost' => 'Pořizovací cena',
|
||||
'create' => 'Vytvořit záznam majetku',
|
||||
'date' => 'Datum pořízení',
|
||||
'depreciates_on' => 'Odepisuje se',
|
||||
'depreciation' => 'Amortizace',
|
||||
'default_location' => 'Výchozí umístění',
|
||||
'eol_date' => 'Konec životnosti',
|
||||
'eol_rate' => 'Míra ukončení životnosti',
|
||||
'expires' => 'Expiruje',
|
||||
'fully_depreciated' => 'Plně odepsané',
|
||||
'help_checkout' => 'Pokud si přejete přiřadit majetek okamžitě, měli by jste ze seznamu stavů zvolit "Připraveno k přiděleni", nebo se může něco pokazit. ',
|
||||
'mac_address' => 'MAC Address',
|
||||
'manufacturer' => 'Výrobce',
|
||||
'model' => 'Model',
|
||||
'months' => 'months',
|
||||
'name' => 'Asset Name',
|
||||
'notes' => 'Notes',
|
||||
'order' => 'Order Number',
|
||||
'qr' => 'QR Code',
|
||||
'requestable' => 'Users may request this asset',
|
||||
'serial' => 'Serial',
|
||||
'status' => 'Status',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Asset Tag',
|
||||
'update' => 'Asset Update',
|
||||
'warranty' => 'Warranty',
|
||||
'years' => 'years',
|
||||
'months' => 'měsíce',
|
||||
'name' => 'Název majetku',
|
||||
'notes' => 'Poznámky',
|
||||
'order' => 'Č. objednávky',
|
||||
'qr' => 'QR kód',
|
||||
'requestable' => 'Uživatelé můžou požádat o tento majetek',
|
||||
'select_statustype' => 'Select Status Type',
|
||||
'serial' => 'Sériové číslo',
|
||||
'status' => 'Stav',
|
||||
'supplier' => 'Dodavatel',
|
||||
'tag' => 'Označení majetku',
|
||||
'update' => 'Úprava majetku',
|
||||
'warranty' => 'Záruka',
|
||||
'years' => 'roky',
|
||||
)
|
||||
;
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'asset' => 'Asset',
|
||||
'checkin' => 'Checkin Asset',
|
||||
'checkout' => 'Checkout Asset to User',
|
||||
'clone' => 'Clone Asset',
|
||||
'edit' => 'Edit Asset',
|
||||
'pending' => 'Pending Asset',
|
||||
'view' => 'View Asset',
|
||||
'archived' => 'Archived',
|
||||
'asset' => 'Majetek',
|
||||
'checkin' => 'Převzít majetek',
|
||||
'checkout' => 'Předat majetek uživateli',
|
||||
'clone' => 'Klonovat majetek',
|
||||
'deployable' => 'Deployable',
|
||||
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
|
||||
'edit' => 'Upravit majetek',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
'view' => 'Zobrazit majetek',
|
||||
);
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
return array(
|
||||
|
||||
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable. If this status has changed, please update the asset status.',
|
||||
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable.
|
||||
If this status has changed, please update the asset status.',
|
||||
'does_not_exist' => 'Asset does not exist.',
|
||||
'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ',
|
||||
|
||||
@@ -12,10 +13,29 @@ return array(
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Asset was not updated, please try again',
|
||||
'success' => 'Asset updated successfully.'
|
||||
'error' => 'Asset was not updated, please try again',
|
||||
'success' => 'Asset updated successfully.',
|
||||
'nothing_updated' => 'No fields were selected, so nothing was updated.',
|
||||
),
|
||||
|
||||
'restore' => array(
|
||||
'error' => 'Asset was not restored, please try again',
|
||||
'success' => 'Asset restored successfully.'
|
||||
),
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'File not deleted. Please try again.',
|
||||
'success' => 'File successfully deleted.',
|
||||
),
|
||||
|
||||
'upload' => array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
),
|
||||
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this asset?',
|
||||
'error' => 'There was an issue deleting the asset. Please try again.',
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
|
||||
return array(
|
||||
|
||||
'asset_tag' => 'Asset Tag',
|
||||
'asset_tag' => 'Označení majetku',
|
||||
'asset_model' => 'Model',
|
||||
'book_value' => 'Value',
|
||||
'change' => 'In/Out',
|
||||
'checkout_date' => 'Checkout Date',
|
||||
'checkoutto' => 'Checked Out',
|
||||
'diff' => 'Diff',
|
||||
'dl_csv' => 'Download CSV',
|
||||
'eol' => 'EOL',
|
||||
'book_value' => 'Hodnota',
|
||||
'change' => 'Příjem/Výdej',
|
||||
'checkout_date' => 'Datum vydání',
|
||||
'checkoutto' => 'Vydané',
|
||||
'diff' => 'Rozdíl',
|
||||
'dl_csv' => 'Stáhnout CSV',
|
||||
'eol' => 'Konec životnosti',
|
||||
'id' => 'ID',
|
||||
'location' => 'Location',
|
||||
'purchase_cost' => 'Cost',
|
||||
'purchase_date' => 'Purchased',
|
||||
'serial' => 'Serial',
|
||||
'status' => 'Status',
|
||||
'title' => 'Asset ',
|
||||
'location' => 'Umístění',
|
||||
'purchase_cost' => 'Cena',
|
||||
'purchase_date' => 'Zakoupeno',
|
||||
'serial' => 'Sériové číslo',
|
||||
'status' => 'Stav',
|
||||
'title' => 'Majetek ',
|
||||
|
||||
);
|
||||
|
||||
@@ -9,6 +9,7 @@ return array(
|
||||
'date' => 'Purchase Date',
|
||||
'depreciation' => 'Depreciation',
|
||||
'expiration' => 'Expiration Date',
|
||||
'maintained' => 'Maintained',
|
||||
'name' => 'Software Name',
|
||||
'no_depreciation' => 'Do Not Depreciate',
|
||||
'notes' => 'Notes',
|
||||
@@ -18,6 +19,7 @@ return array(
|
||||
'seats' => 'Seats',
|
||||
'serial' => 'Serial',
|
||||
'supplier' => 'Supplier',
|
||||
'termination_date' => 'Termination Date',
|
||||
'to_email' => 'Licensed to Email',
|
||||
'to_name' => 'Licensed to Name',
|
||||
'update' => 'Update License',
|
||||
|
||||
@@ -14,6 +14,18 @@ return array(
|
||||
'success' => 'License created successfully.'
|
||||
),
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'File not deleted. Please try again.',
|
||||
'success' => 'File successfully deleted.',
|
||||
),
|
||||
|
||||
'upload' => array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'License was not updated, please try again',
|
||||
'success' => 'License updated successfully.'
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'city' => 'City',
|
||||
'state' => 'State',
|
||||
'country' => 'Country',
|
||||
'create' => 'Create Location',
|
||||
'update' => 'Update Location',
|
||||
'name' => 'Location Name',
|
||||
'address' => 'Address',
|
||||
'zip' => 'Postal Code',
|
||||
'locations' => 'Locations',
|
||||
'city' => 'Město',
|
||||
'state' => 'Stát',
|
||||
'country' => 'Země',
|
||||
'create' => 'Vytvořit umístění',
|
||||
'update' => 'Upravit umístění',
|
||||
'name' => 'Název umístění',
|
||||
'address' => 'Adresa',
|
||||
'zip' => 'PSČ',
|
||||
'locations' => 'Umístění',
|
||||
);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
return array(
|
||||
|
||||
'asset_manufacturers' => 'Asset Manufacturers',
|
||||
'create' => 'Create Manufacturer',
|
||||
'asset_manufacturers' => 'Výrobci',
|
||||
'create' => 'Vytvořit výrobce',
|
||||
'id' => 'ID',
|
||||
'name' => 'Manufacturer Name',
|
||||
'update' => 'Update Manufacturer',
|
||||
'name' => 'Název Výrobce',
|
||||
'update' => 'Upravit Výrobce',
|
||||
|
||||
);
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
);
|
||||
@@ -20,6 +20,11 @@ return array(
|
||||
'confirm' => 'Are you sure you wish to delete this asset model?',
|
||||
'error' => 'There was an issue deleting the model. Please try again.',
|
||||
'success' => 'The model was deleted successfully.'
|
||||
)
|
||||
),
|
||||
|
||||
'restore' => array(
|
||||
'error' => 'Model was not restored, please try again',
|
||||
'success' => 'Model restored successfully.'
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'alert_email' => 'Send alerts to',
|
||||
'alerts_enabled' => 'Alerts enabled',
|
||||
'auto_increment_assets' => 'Generate auto-incrementing asset IDs',
|
||||
'auto_increment_prefix' => 'Prefix (optional)',
|
||||
'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this',
|
||||
'default_eula_text' => 'Default EULA',
|
||||
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
|
||||
'display_asset_name' => 'Display Asset Name',
|
||||
'display_checkout_date' => 'Display Checkout Date',
|
||||
'display_eol' => 'Display EOL in table view',
|
||||
'display_qr' => 'Display QR Codes',
|
||||
'eula_markdown' => 'This EULA allows <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
|
||||
'header_color' => 'Header Color',
|
||||
'info' => 'These settings let you customize certain aspects of your installation.',
|
||||
'laravel' => 'Laravel Version',
|
||||
'load_remote' => 'This Snipe-IT install can load scripts from the outside world.',
|
||||
'logo' => 'Logo',
|
||||
'per_page' => 'Results Per Page',
|
||||
'php' => 'PHP Version',
|
||||
'php_gd_info' => 'You must install php-gd to display QR codes, see install instructions.',
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'name' => 'Status Name',
|
||||
'title' => 'Status Labels',
|
||||
'update' => 'Update Status Label',
|
||||
'create' => 'Create Status Label',
|
||||
'about' => 'About Status Labels',
|
||||
'info' => 'Status labels are used to describe the various reasons why an asset <strong><em>cannot</em></strong> be deployed. It could be broken, out for diagnostics, out for repair, lost or stolen, etc. Status labels allow your team to show the progression.',
|
||||
'about' => 'O označení stavu',
|
||||
'archived' => 'Archived',
|
||||
'create' => 'Vytvořit označení stavu',
|
||||
'deployable' => 'Deployable',
|
||||
'info' => 'Status labels are used to describe the various states your assets could be in. They may be out for repair, lost/stolen, etc. You can create new status labels for deployable, pending and archived assets.',
|
||||
'name' => 'Název stavu',
|
||||
'pending' => 'Pending',
|
||||
'status_type' => 'Status Type',
|
||||
'title' => 'Označení stavu',
|
||||
'undeployable' => 'Undeployable',
|
||||
'update' => 'Upravit označení stavu',
|
||||
);
|
||||
|
||||
@@ -11,4 +11,5 @@ return array(
|
||||
'last_login' => 'Last Login',
|
||||
'software_user' => 'Software Checked out to :name',
|
||||
'view_user' => 'View User :name',
|
||||
'usercsv' => 'CSV file',
|
||||
);
|
||||
|
||||
@@ -18,14 +18,16 @@ return array(
|
||||
'unban' => 'User was successfully unbanned.',
|
||||
'suspend' => 'User was successfully suspended.',
|
||||
'unsuspend' => 'User was successfully unsuspended.',
|
||||
'restored' => 'User was successfully restored.'
|
||||
'restored' => 'User was successfully restored.',
|
||||
+ 'import' => 'Users imported successfully.',
|
||||
),
|
||||
|
||||
'error' => array(
|
||||
'create' => 'There was an issue creating the user. Please try again.',
|
||||
'update' => 'There was an issue updating the user. Please try again.',
|
||||
'delete' => 'There was an issue deleting the user. Please try again.',
|
||||
'unsuspend' => 'There was an issue unsuspending the user. Please try again.'
|
||||
'unsuspend' => 'There was an issue unsuspending the user. Please try again.',
|
||||
'import' => 'There was an issue importing users. Please try again.',
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -18,6 +18,7 @@ return array(
|
||||
'last_login' => 'Last Login',
|
||||
'last_name' => 'Last Name',
|
||||
'location' => 'Location',
|
||||
'lock_passwords' => 'Login details cannot be changed on this installation.',
|
||||
'manager' => 'Manager',
|
||||
'name' => 'Name',
|
||||
'password_confirm' => 'Confirm Password',
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
return array(
|
||||
|
||||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'restore' => 'Restore',
|
||||
'actions' => 'Actions',
|
||||
'submit' => 'Submit',
|
||||
'actions' => 'Akce',
|
||||
'add' => 'Add New',
|
||||
'cancel' => 'Cancel',
|
||||
'delete' => 'Smazat',
|
||||
'edit' => 'Upravit',
|
||||
'restore' => 'Obnovit',
|
||||
'submit' => 'Odeslat',
|
||||
'upload' => 'Upload',
|
||||
|
||||
);
|
||||
|
||||
+95
-86
@@ -2,93 +2,102 @@
|
||||
|
||||
return array(
|
||||
|
||||
'address' => 'Address',
|
||||
|
||||
'accessories' => 'Accessories',
|
||||
'accessory' => 'Accessory',
|
||||
'address' => 'Adresa',
|
||||
'admin' => 'Admin',
|
||||
'all_assets' => 'All Assets',
|
||||
'all' => 'All',
|
||||
'asset_models' => 'Asset Models',
|
||||
'asset' => 'Asset',
|
||||
'asset_report' => 'Asset Report',
|
||||
'asset_tag' => 'Asset Tag',
|
||||
'assets_available' => 'assets available',
|
||||
'assets' => 'Assets',
|
||||
'avatar_delete' => 'Delete Avatar',
|
||||
'avatar_upload' => 'Upload Avatar',
|
||||
'back' => 'Back',
|
||||
'cancel' => 'Cancel',
|
||||
'categories' => 'Asset Categories',
|
||||
'category' => 'Asset Category',
|
||||
'changeemail' => 'Change Email Address',
|
||||
'changepassword' => 'Change Password',
|
||||
'checkin' => 'Checkin',
|
||||
'checkout' => 'Checkout',
|
||||
'city' => 'City',
|
||||
'country' => 'Country',
|
||||
'create' => 'Create New',
|
||||
'created_asset' => 'created asset',
|
||||
'created_at' => 'Created at',
|
||||
'currency' => '$',
|
||||
'current' => 'Current',
|
||||
'custom_report' => 'Custom Asset Report',
|
||||
'date' => 'Date',
|
||||
'delete' => 'Delete',
|
||||
'deleted' => 'Deleted',
|
||||
'deployed' => 'Deployed',
|
||||
'depreciation_report' => 'Depreciation Report',
|
||||
'depreciation' => 'Depreciation',
|
||||
'editprofile' => 'Edit Your Profile',
|
||||
'eol' => 'EOL',
|
||||
'first_name' => 'First Name',
|
||||
'generate' => 'Generate',
|
||||
'groups' => 'Groups',
|
||||
'gravatar_email' => 'Gravatar Email Address',
|
||||
'history_for' => 'History for',
|
||||
'all_assets' => 'Všechna zařízení',
|
||||
'all' => 'Vše',
|
||||
'archived' => 'Archived',
|
||||
'asset_models' => 'Modely majetku',
|
||||
'asset' => 'Zařízeni',
|
||||
'asset_report' => 'Report majetku',
|
||||
'asset_tag' => 'Označení majetku',
|
||||
'assets_available' => 'dostupných zařízení',
|
||||
'assets' => 'Zařízení',
|
||||
'avatar_delete' => 'Smazat avatara',
|
||||
'avatar_upload' => 'Nahrát avatara',
|
||||
'back' => 'Zpět',
|
||||
'cancel' => 'Storno',
|
||||
'categories' => 'Kategorie majetku',
|
||||
'category' => 'Kategorie majetku',
|
||||
'changeemail' => 'Změnit e-mailovou adresu',
|
||||
'changepassword' => 'Změnit heslo',
|
||||
'checkin' => 'Příjem',
|
||||
'checkout' => 'Výdej',
|
||||
'city' => 'Město',
|
||||
'country' => 'Země',
|
||||
'create' => 'Vytvořit nové',
|
||||
'created_asset' => 'vytvořit majetek',
|
||||
'created_at' => 'Vytvořeno',
|
||||
'currency' => 'Kč',
|
||||
'current' => 'Aktuální',
|
||||
'custom_report' => 'Vlastní report majetku',
|
||||
'dashboard' => 'Dashboard',
|
||||
'date' => 'Datum',
|
||||
'delete' => 'Odstranit',
|
||||
'deleted' => 'Odstraněno',
|
||||
'deployed' => 'Vydané',
|
||||
'depreciation_report' => 'Report zastarání',
|
||||
'download' => 'Download',
|
||||
'depreciation' => 'Amortizace',
|
||||
'editprofile' => 'Upravit profil',
|
||||
'eol' => 'Konec životnosti',
|
||||
'first_name' => 'Jméno',
|
||||
'file_name' => 'File',
|
||||
'file_uploads' => 'File Uploads',
|
||||
'generate' => 'Vytvořit',
|
||||
'groups' => 'Skupiny',
|
||||
'gravatar_email' => 'Emailová adresa Gravatar',
|
||||
'history_for' => 'Historie uživatele',
|
||||
'id' => 'ID',
|
||||
'image_delete' => 'Delete Image',
|
||||
'image_upload' => 'Upload Image',
|
||||
'last_name' => 'Last Name',
|
||||
'license' => 'License',
|
||||
'license_report' => 'License Report',
|
||||
'licenses_available' => 'licenses available',
|
||||
'licenses' => 'Licenses',
|
||||
'list_all' => 'List All',
|
||||
'location' => 'Location',
|
||||
'locations' => 'Locations',
|
||||
'logout' => 'Logout',
|
||||
'manufacturer' => 'Manufacturer',
|
||||
'manufacturers' => 'Manufacturers',
|
||||
'model_no' => 'Model No.',
|
||||
'months' => 'months',
|
||||
'moreinfo' => 'More Info',
|
||||
'name' => 'Name',
|
||||
'no_depreciation' => 'No Depreciation',
|
||||
'no_results' => 'No Results.',
|
||||
'no' => 'No',
|
||||
'notes' => 'Notes',
|
||||
'pending' => 'Pending',
|
||||
'people' => 'People',
|
||||
'per_page' => 'Results Per Page',
|
||||
'profile' => 'Your profile',
|
||||
'ready_to_deploy' => 'Ready to Deploy',
|
||||
'reports' => 'Reports',
|
||||
'save' => 'Save',
|
||||
'settings' => 'Settings',
|
||||
'sign_in' => 'Sign in',
|
||||
'site_name' => 'Site Name',
|
||||
'state' => 'State',
|
||||
'status_labels' => 'Status Labels',
|
||||
'status' => 'Status',
|
||||
'suppliers' => 'Suppliers',
|
||||
'total_assets' => 'total assets',
|
||||
'total_licenses' => 'total licenses',
|
||||
'undeployable' => 'Un-deployable',
|
||||
'unknown_admin' => 'Unknown Admin',
|
||||
'user' => 'User',
|
||||
'viewassets' => 'View Assigned Assets',
|
||||
'website' => 'Website',
|
||||
'welcome' => 'Welcome, :name',
|
||||
'years' => 'years',
|
||||
'yes' => 'Yes',
|
||||
'zip' => 'Zip',
|
||||
'image_delete' => 'Smazat obrázek',
|
||||
'image_upload' => 'Nahrát obrázek',
|
||||
'last_name' => 'Příjmení',
|
||||
'license' => 'Licence',
|
||||
'license_report' => 'Report licencí',
|
||||
'licenses_available' => 'dostupných licencí',
|
||||
'licenses' => 'Licence',
|
||||
'list_all' => 'Vypsat vše',
|
||||
'location' => 'Lokalita',
|
||||
'locations' => 'Umístění',
|
||||
'logout' => 'Odhlásit',
|
||||
'manufacturer' => 'Výrobce',
|
||||
'manufacturers' => 'Výrobci',
|
||||
'model_no' => 'Modelové č.',
|
||||
'months' => 'měsíce',
|
||||
'moreinfo' => 'Další informace',
|
||||
'name' => 'Název',
|
||||
'no_depreciation' => 'Žádná amortizace',
|
||||
'no_results' => 'Žádné výsledky.',
|
||||
'no' => 'Ne',
|
||||
'notes' => 'Poznámky',
|
||||
'pending' => 'Čeká na vyřízení',
|
||||
'people' => 'Lidé',
|
||||
'per_page' => 'Výsledků na stránku',
|
||||
'profile' => 'Váš profil',
|
||||
'ready_to_deploy' => 'Připraveno k přidělení',
|
||||
'reports' => 'Reporty',
|
||||
'save' => 'Uložit',
|
||||
'settings' => 'Nastavení',
|
||||
'sign_in' => 'Přihlásit se',
|
||||
'site_name' => 'Název lokality',
|
||||
'state' => 'Stát',
|
||||
'status_labels' => 'Označení stavu',
|
||||
'status' => 'Stav',
|
||||
'suppliers' => 'Dodavatelé',
|
||||
'total_assets' => 'celkem zařízení',
|
||||
'total_licenses' => 'celkem licencí',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'Ne-přiřaditelné',
|
||||
'unknown_admin' => 'Neznámy správce',
|
||||
'user' => 'Uživatel',
|
||||
'viewassets' => 'Zobrazit přiřazený majetek',
|
||||
'website' => 'Webová stránka',
|
||||
'welcome' => 'Vítej, :name',
|
||||
'years' => 'roky',
|
||||
'yes' => 'Ano',
|
||||
'zip' => 'PSČ',
|
||||
|
||||
);
|
||||
|
||||
@@ -13,8 +13,8 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'previous' => '« Předchozí',
|
||||
|
||||
'next' => 'Next »',
|
||||
'next' => 'Další »',
|
||||
|
||||
);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user