mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
f00dcb57cf
|
@ -78,12 +78,7 @@ class ObjectImportCommand extends Command
|
||||||
|
|
||||||
$logFile = $this->option('logfile');
|
$logFile = $this->option('logfile');
|
||||||
\Log::useFiles($logFile);
|
\Log::useFiles($logFile);
|
||||||
if ($this->option('testrun')) {
|
|
||||||
$this->comment('====== TEST ONLY Item Import for '.$filename.' ====');
|
|
||||||
$this->comment('============== NO DATA WILL BE WRITTEN ==============');
|
|
||||||
} else {
|
|
||||||
$this->comment('======= Importing Items from '.$filename.' =========');
|
$this->comment('======= Importing Items from '.$filename.' =========');
|
||||||
}
|
|
||||||
$importer->import();
|
$importer->import();
|
||||||
|
|
||||||
$this->bar = null;
|
$this->bar = null;
|
||||||
|
|
|
@ -490,7 +490,7 @@ class LicensesController extends Controller
|
||||||
* @param int $licenseId
|
* @param int $licenseId
|
||||||
* @return \Illuminate\Http\RedirectResponse
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function postUpload($licenseId = null)
|
public function postUpload(Request $request, $licenseId = null)
|
||||||
{
|
{
|
||||||
$license = License::find($licenseId);
|
$license = License::find($licenseId);
|
||||||
// the license is valid
|
// the license is valid
|
||||||
|
|
|
@ -179,13 +179,14 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
public function getDetailedNameAttribute()
|
public function getDetailedNameAttribute()
|
||||||
{
|
{
|
||||||
if ($this->assignedTo) {
|
if ($this->assignedto) {
|
||||||
$user_name = $this->assignedTo->present()->name();
|
$user_name = $this->assignedto->present()->name();
|
||||||
} else {
|
} else {
|
||||||
$user_name = "Unassigned";
|
$user_name = "Unassigned";
|
||||||
}
|
}
|
||||||
return $this->asset_tag . ' - ' . $this->name . ' (' . $user_name . ') ' . $this->model->name;
|
return $this->asset_tag . ' - ' . $this->name . ' (' . $user_name . ') ' . $this->model->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validationRules($id = '0')
|
public function validationRules($id = '0')
|
||||||
{
|
{
|
||||||
return $this->rules;
|
return $this->rules;
|
||||||
|
|
|
@ -41,11 +41,13 @@ class CheckinNotification extends Notification
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
$item = $this->params['item'];
|
$item = $this->params['item'];
|
||||||
|
if (class_basename(get_class($this->params['item']))=='Asset') {
|
||||||
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|
||||||
|| (method_exists($item, 'getEula') && ($item->getEula()))
|
|| (method_exists($item, 'getEula') && ($item->getEula()))
|
||||||
) {
|
) {
|
||||||
$notifyBy[] = 'mail';
|
$notifyBy[] = 'mail';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $notifyBy;
|
return $notifyBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class CheckoutNotification extends Notification
|
||||||
}
|
}
|
||||||
$item = $this->params['item'];
|
$item = $this->params['item'];
|
||||||
|
|
||||||
if (class_basename(get_class($this->params['item']))!='License') {
|
if (class_basename(get_class($this->params['item']))=='Asset') {
|
||||||
$notifyBy[] = 'mail';
|
$notifyBy[] = 'mail';
|
||||||
}
|
}
|
||||||
// if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))
|
// if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
"barryvdh/laravel-debugbar": "^2.4",
|
"barryvdh/laravel-debugbar": "^2.4",
|
||||||
"doctrine/cache": "^1.6",
|
"doctrine/cache": "^1.6",
|
||||||
"doctrine/common": "^2.7",
|
"doctrine/common": "^2.7",
|
||||||
"doctrine/dbal": "v2.4.2",
|
"doctrine/dbal": "v2.5.13",
|
||||||
"erusev/parsedown": "^1.6",
|
"erusev/parsedown": "^1.6",
|
||||||
"fideloper/proxy": "^3.1",
|
"fideloper/proxy": "^3.1",
|
||||||
"intervention/image": "^2.3",
|
"intervention/image": "^2.3",
|
||||||
"javiereguiluz/easyslugger": "^1.0",
|
"javiereguiluz/easyslugger": "^1.0",
|
||||||
"laravel/framework": "5.4.20",
|
"laravel/framework": "5.4.*",
|
||||||
"laravel/passport": "^1.0",
|
"laravel/passport": "^1.0",
|
||||||
"laravel/tinker": "^1.0",
|
"laravel/tinker": "^1.0",
|
||||||
"laravelcollective/html": "^5.3",
|
"laravelcollective/html": "^5.3",
|
||||||
|
@ -29,15 +29,15 @@
|
||||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||||
"unicodeveloper/laravel-password": "^1.0",
|
"unicodeveloper/laravel-password": "^1.0",
|
||||||
"watson/validating": "^3.0",
|
"watson/validating": "^3.0",
|
||||||
"doctrine/instantiator": "1.0.5",
|
"doctrine/instantiator": "1.0.*",
|
||||||
"doctrine/inflector": "1.0.*"
|
"doctrine/inflector": "1.2.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
"phpunit/phpunit": "~5.7",
|
"phpunit/phpunit": "~5.7",
|
||||||
"symfony/css-selector": "3.1.*",
|
"symfony/css-selector": "3.1.*",
|
||||||
"symfony/dom-crawler": "3.1.*",
|
"symfony/dom-crawler": "3.1.*",
|
||||||
"codeception/codeception": "2.2.9",
|
"codeception/codeception": "2.3.6",
|
||||||
"squizlabs/php_codesniffer": "*",
|
"squizlabs/php_codesniffer": "*",
|
||||||
"phpunit/php-token-stream": "1.4.11"
|
"phpunit/php-token-stream": "1.4.11"
|
||||||
|
|
||||||
|
|
612
composer.lock
generated
612
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
# Redirect Trailing Slashes If Not A Folder...
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
# Handle Front Controller...
|
# Handle Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
|
@ -20,6 +20,13 @@ return array(
|
||||||
'confirm' => 'Are you sure you wish to delete this Status Label?',
|
'confirm' => 'Are you sure you wish to delete this Status Label?',
|
||||||
'error' => 'There was an issue deleting the Status Label. Please try again.',
|
'error' => 'There was an issue deleting the Status Label. Please try again.',
|
||||||
'success' => 'The Status Label was deleted successfully.'
|
'success' => 'The Status Label was deleted successfully.'
|
||||||
)
|
),
|
||||||
|
|
||||||
|
'help' => array(
|
||||||
|
'undeployable' => 'These assets cannot be assigned to anyone.',
|
||||||
|
'deployable' => 'These assets can be checked out. Once they are assigned, they will assume a meta status of <i class="fa fa-circle text-blue"></i> <strong>Deployed</strong>.',
|
||||||
|
'archived' => 'These assets cannot be checked out, and will only show up in the Archived view. This is useful for retaining information about assets for budgeting/historic purposes but keeping them out of the day-to-day asset list.',
|
||||||
|
'pending' => 'These assets can not yet be assigned to anyone, often used for items that are out for repair, but are expected to return to circulation.',
|
||||||
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -205,26 +205,34 @@ $('.snipe-table').bootstrapTable({
|
||||||
function polymorphicItemFormatter(value) {
|
function polymorphicItemFormatter(value) {
|
||||||
|
|
||||||
var item_destination = '';
|
var item_destination = '';
|
||||||
|
var item_icon;
|
||||||
|
|
||||||
if ((value) && (value.type)) {
|
if ((value) && (value.type)) {
|
||||||
|
|
||||||
if (value.type == 'asset') {
|
if (value.type == 'asset') {
|
||||||
item_destination = 'hardware';
|
item_destination = 'hardware';
|
||||||
|
item_icon = 'fa-barcode';
|
||||||
} else if (value.type == 'accessory') {
|
} else if (value.type == 'accessory') {
|
||||||
item_destination = 'accessories';
|
item_destination = 'accessories';
|
||||||
|
item_icon = 'fa-keyboard-o';
|
||||||
} else if (value.type == 'component') {
|
} else if (value.type == 'component') {
|
||||||
item_destination = 'components';
|
item_destination = 'components';
|
||||||
|
item_icon = 'fa-hdd-o';
|
||||||
} else if (value.type == 'consumable') {
|
} else if (value.type == 'consumable') {
|
||||||
item_destination = 'consumables';
|
item_destination = 'consumables';
|
||||||
|
item_icon = 'fa-tint';
|
||||||
} else if (value.type == 'license') {
|
} else if (value.type == 'license') {
|
||||||
item_destination = 'licenses';
|
item_destination = 'licenses';
|
||||||
|
item_icon = 'fa-floppy-o';
|
||||||
} else if (value.type == 'user') {
|
} else if (value.type == 'user') {
|
||||||
item_destination = 'users';
|
item_destination = 'users';
|
||||||
|
item_icon = 'fa-user';
|
||||||
} else if (value.type == 'location') {
|
} else if (value.type == 'location') {
|
||||||
item_destination = 'locations'
|
item_destination = 'locations'
|
||||||
|
item_icon = 'fa-map-marker';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<a href="{{ url('/') }}/' + item_destination +'/' + value.id + '"> ' + value.name + '</a>';
|
return '<a href="{{ url('/') }}/' + item_destination +'/' + value.id + '" data-tooltip="true" title="' + value.type + '"><i class="fa ' + item_icon + ' text-blue"></i> ' + value.name + '</a>';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -46,6 +46,12 @@
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h4>{{ trans('admin/statuslabels/table.about') }}</h4>
|
<h4>{{ trans('admin/statuslabels/table.about') }}</h4>
|
||||||
<p>{{ trans('admin/statuslabels/table.info') }}</p>
|
<p>{{ trans('admin/statuslabels/table.info') }}</p>
|
||||||
|
|
||||||
|
<p><i class="fa fa-circle text-green"></i> <strong>{{ trans('admin/statuslabels/table.deployable') }}</strong>: {!! trans('admin/statuslabels/message.help.deployable') !!}</p>
|
||||||
|
<p><i class="fa fa-circle text-orange"></i> <strong>Pending</strong>{{ trans('admin/statuslabels/message.help.pending') }}</p>
|
||||||
|
<p><i class="fa fa-times text-red"></i> <strong>Undeployable</strong>: {{ trans('admin/statuslabels/message.help.undeployable') }}</p>
|
||||||
|
<p><i class="fa fa-times text-red"></i> <strong>Archived</strong>: {{ trans('admin/statuslabels/message.help.archived') }}</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue