diff --git a/.all-contributorsrc b/.all-contributorsrc index 1b38ea278c..8a2330391d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1839,6 +1839,15 @@ "contributions": [ "code" ] + }, + { + "login": "mskrip", + "name": "Marián Skrip", + "avatar_url": "https://avatars0.githubusercontent.com/u/17459600?v=4", + "profile": "https://github.com/mskrip", + "contributions": [ + "code" + ] } ] } diff --git a/.env.example b/.env.example index 347570b795..b7684b9174 100644 --- a/.env.example +++ b/.env.example @@ -43,6 +43,7 @@ MAIL_FROM_ADDR=you@example.com MAIL_FROM_NAME='Snipe-IT' MAIL_REPLYTO_ADDR=you@example.com MAIL_REPLYTO_NAME='Snipe-IT' +MAIL_BACKUP_NOTIFICATION_ADDRESS=you@example.com MAIL_AUTO_EMBED=true MAIL_AUTO_EMBED_METHOD=base64 @@ -66,8 +67,11 @@ SESSION_PATH=null # -------------------------------------------- # OPTIONAL: SECURITY HEADER SETTINGS # -------------------------------------------- +APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1 +ALLOW_IFRAMING=false REFERRER_POLICY=same-origin ENABLE_CSP=false +CORS_ALLOWED_ORIGINS=null # -------------------------------------------- # OPTIONAL: CACHE SETTINGS @@ -113,8 +117,6 @@ APP_LOG=single APP_LOG_MAX_FILES=10 APP_LOG_LEVEL=debug FILESYSTEM_DISK=local -APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1 -ALLOW_IFRAMING=false APP_CIPHER=AES-256-CBC GOOGLE_MAPS_API= BACKUP_ENV=true diff --git a/README.md b/README.md index bbb1d2a3bc..9ed53724fe 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ [![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=master)](https://travis-ci.org/snipe/snipe-it) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) -[![All Contributors](https://img.shields.io/badge/all_contributors-180-orange.svg?style=flat-square)](#contributors) [![Open Source Helpers](https://www.codetriage.com/snipe/snipe-it/badges/users.svg)](https://www.codetriage.com/snipe/snipe-it) +[![All Contributors](https://img.shields.io/badge/all_contributors-182-orange.svg?style=flat-square)](#contributors) [![Open Source Helpers](https://www.codetriage.com/snipe/snipe-it/badges/users.svg)](https://www.codetriage.com/snipe/snipe-it) ## Snipe-IT - Open Source Asset Management System 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 5.4](http://laravel.com). +It is built on [Laravel 5.5](http://laravel.com). -Snipe-IT is actively developed and we're [releasing quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](https://snipeitapp.com/demo/).) +Snipe-IT is actively developed and we [release quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](https://snipeitapp.com/demo/).) __This is web-based software__. This means there is no executable file (aka no .exe files), and it must be run on a web server and accessed through a web browser. It runs on any Mac OSX, flavor of Linux, as well as Windows, and we have a [Docker image](https://snipe-it.readme.io/docs/docker) available if that's what you're into. @@ -58,8 +58,10 @@ Since the release of the JSON REST API, several third-party developers have been - [SnipeSharp - .NET module in C#](https://github.com/barrycarey/SnipeSharp) by [@barrycarey](https://github.com/barrycarey) - [InQRy](https://github.com/Microsoft/InQRy) by [@Microsoft](https://github.com/Microsoft) - [SnipeitPS](https://github.com/snazy2000/SnipeitPS) by [@snazy2000](https://github.com/snazy2000) - Powershell API Wrapper for Snipe-it -- [jamf2snipe](https://github.com/ParadoxGuitarist/jamf2snipe) by [@ParadoxGuitarist](https://github.com/ParadoxGuitarist) - Python script to sync assets between a JAMFPro instance and a Snipe-II instance +- [jamf2snipe](https://github.com/ParadoxGuitarist/jamf2snipe) by [@ParadoxGuitarist](https://github.com/ParadoxGuitarist) - Python script to sync assets between a JAMFPro instance and a Snipe-IT instance - [Marksman](https://github.com/Scope-IT/marksman) - A Windows agent for Snipe-IT +- [Snipe-IT plugin for Jira Service Desk (beta)](https://marketplace.atlassian.com/apps/1220379/snipe-it-for-jira-service-desk-beta?hosting=cloud&tab=overview) - for the upcoming Snipe-IT v5 only +- [Python 3 CSV importer](https://github.com/gastamper/snipeit-csvimporter) - allows importing assets into Snipe-IT based on Item Name rather than Asset Tag. As these were created by third-parties, Snipe-IT cannot provide support for these project, and you should contact the developers directly if you need assistance. Additionally, Snipe-IT makes no guarantees as to the reliability, accuracy or maintainability of these libraries. Use at your own risk. :) diff --git a/app/Console/Commands/ImportLocations.php b/app/Console/Commands/ImportLocations.php new file mode 100644 index 0000000000..b037b011bf --- /dev/null +++ b/app/Console/Commands/ImportLocations.php @@ -0,0 +1,160 @@ +argument('filename'); + $csv = Reader::createFromPath(storage_path('private_uploads/imports/').$filename, 'r'); + $this->info('Attempting to process: '.storage_path('private_uploads/imports/').$filename); + $csv->setHeaderOffset(0); //because we don't want to insert the header + $results = $csv->getRecords(); + + // Import parent location names first if they don't exist + foreach ($results as $parent_index => $parent_row) { + + if (array_key_exists('Parent Name', $parent_row)) { + $parent_name = trim($parent_row['Parent Name']); + if (array_key_exists('Name', $parent_row)) { + $this->info('- Parent: ' . $parent_name . ' in row as: ' . trim($parent_row['Parent Name'])); + } + + // Save parent location name + // This creates a sort of name-stub that we'll update later on in this script + $parent_location = Location::firstOrCreate(array('name' => $parent_name)); + if (array_key_exists('Name', $parent_row)) { + $this->info('Parent for ' . $parent_row['Name'] . ' is ' . $parent_name . '. Attempting to save ' . $parent_name . '.'); + } + + // Check if the record was updated or created. + // This is mostly for clearer debugging. + if ($parent_location->exists) { + $this->info('- Parent location '.$parent_name.' already exists.'); + } else { + $this->info('- Parent location '.$parent_name.' was created.'); + } + + } else { + $this->info('- No Parent Name provided, so no parent location will be created.'); + } + + } + + $this->info('----- Parents Created.... backfilling additional details... --------'); + // Loop through ALL records and add/update them if there are additional fields + // besides name + foreach ($results as $index => $row) { + + if (array_key_exists('Parent Name', $row)) { + $parent_name = trim($row['Parent Name']); + } + + // Set the location attributes to save + if (array_key_exists('Name', $row)) { + $location = Location::firstOrNew(array('name' => trim($row['Name']))); + $location->name = trim($row['Name']); + $this->info('Checking location: '.$location->name); + } else { + $this->error('Location name is required and is missing from at least one row in this dataset. Check your CSV for extra trailing rows and try again.'); + return false; + } + if (array_key_exists('Currency', $row)) { + $location->currency = trim($row['Currency']); + } + if (array_key_exists('Address 1', $row)) { + $location->address = trim($row['Address 1']); + } + if (array_key_exists('Address 2', $row)) { + $location->address2 = trim($row['Address 2']); + } + if (array_key_exists('City', $row)) { + $location->city = trim($row['City']); + } + if (array_key_exists('State', $row)) { + $location->state = trim($row['State']); + } + if (array_key_exists('Zip', $row)) { + $location->zip = trim($row['Zip']); + } + if (array_key_exists('Country', $row)) { + $location->country = trim($row['Country']); + } + if (array_key_exists('Country', $row)) { + $location->ldap_ou = trim($row['OU']); + } + + + // If a parent name is provided, we created it earlier in the script, + // so let's grab that ID + if ($parent_name) { + $this->info('-- Searching for Parent Name: '.$parent_name); + $parent = Location::where('name', '=', $parent_name)->first(); + $location->parent_id = $parent->id; + $this->info('Parent: '.$parent_name.' - ID: '.$parent->id); + } + + // Make sure the more advanced (non-name) fields pass validation + if (($location->isValid()) && ($location->save())) { + + // Check if the record was updated or created. + // This is mostly for clearer debugging. + if ($location->exists) { + $this->info('Location ' . $location->name . ' already exists. Updating...'); + } else { + $this->info('- Location '.$location->name.' was created. '); + } + + // If there's a validation error, display that + } else { + $this->error('- Non-parent Location '.$location->name.' could not be created: '.$location->getErrors() ); + } + + + + + } + + + } +} diff --git a/app/Console/Commands/Purge.php b/app/Console/Commands/Purge.php index 0c4829c94c..a9f1da7374 100644 --- a/app/Console/Commands/Purge.php +++ b/app/Console/Commands/Purge.php @@ -30,7 +30,7 @@ class Purge extends Command * * @var string */ - protected $description = 'Purge all soft-deleted deleted records in the database. This will rewrite history for items that have been edited, or checked in or out. It will also reqrite history for users associated with deleted items.'; + protected $description = 'Purge all soft-deleted deleted records in the database. This will rewrite history for items that have been edited, or checked in or out. It will also rewrite history for users associated with deleted items.'; /** * Create a new command instance. diff --git a/app/Console/Commands/ReEncodeCustomFieldNames.php b/app/Console/Commands/ReEncodeCustomFieldNames.php new file mode 100644 index 0000000000..14276b1bd3 --- /dev/null +++ b/app/Console/Commands/ReEncodeCustomFieldNames.php @@ -0,0 +1,126 @@ +convertUnicodeDbSlug() is + * - the actual db_column name in the customfields table + * - the physical column name that was created on the assets table + * + * For some people who upgraded their version of PHP, the unicode converter now behaves + * differently in than it did when their custom fields were first created, specifically as it + * relates to handling slashes, ampersands, etc. This can result in the field names no longer + * matching up, as an older version of the PHP extension simply dropped slashes, etc, while the + * newer version of the PHP extension will convert them to underscores. + * + * @return mixed + */ + public function handle() + { + + if ($this->confirm('This will regenerate all of the custom field database fieldnames in your database. THIS WILL CHANGE YOUR SCHEMA AND SHOULD NOT BE DONE WITHOUT MAKING A BACKUP FIRST. Do you wish to continue?')) + { + + /** Get all of the custom fields */ + $fields = CustomField::get(); + + $asset_columns = \DB::getSchemaBuilder()->getColumnListing('assets'); + $custom_field_columns = array(); + + /** Loop through the columns on the assets table */ + foreach ($asset_columns as $asset_column) { + + /** Add ones that start with _snipeit_ to an array for handling */ + if (strpos($asset_column, '_snipeit_') === 0) { + + /** + * Get the ID of the custom field based on the fieldname. + * For example, in _snipeit_mac_address_1, we grab the 1 because we know + * that's the ID of the custom field that created the column. + * Then use that ID as the array key for use comparing the actual assets field name + * and the db_column value from the custom fields table. + */ + $last_part = substr(strrchr($asset_column, "_snipeit_"), 1); + $custom_field_columns[$last_part] = $asset_column; + } + } + + foreach ($fields as $field) { + + $this->info($field->name .' ('.$field->id.') column should be '. $field->convertUnicodeDbSlug().''); + + /** The assets table has the column it should have, all is well */ + if (\Schema::hasColumn('assets', $field->convertUnicodeDbSlug())) + { + $this->info('-- ✓ This field exists - all good'); + + /** + * There is a mismatch between the fieldname on the assets table and + * what $field->convertUnicodeDbSlug() is *now* expecting. + */ + } else { + $this->warn('-- X Field mismatch: updating... '); + + /** Make sure the custom_field_columns array has the ID */ + if (array_key_exists($field->id, $custom_field_columns)) { + + /** + * Update the asset schema to the corrected fieldname that will be recognized by the + * system elsewhere that we use $field->convertUnicodeDbSlug() + */ + \Schema::table('assets', function($table) use ($custom_field_columns, $field) { + $table->renameColumn($custom_field_columns[$field->id], $field->convertUnicodeDbSlug()); + }); + + $this->warn('-- ✓ Field updated from '.$custom_field_columns[$field->id].' to '.$field->convertUnicodeDbSlug()); + + } else { + $this->warn('-- X WARNING: There is no field on the assets table ending in '.$field->id.'. This may require more in-depth investigation and may mean the schema was altered manually.'); + } + } + + /** Update the db_column property in the custom fields table, just in case it doesn't match the other + * things. + */ + $field->db_column = $field->convertUnicodeDbSlug(); + $field->save(); + + + } + + } + + + } +} diff --git a/app/Console/Commands/SyncAssetLocations.php b/app/Console/Commands/SyncAssetLocations.php index e5fb76bbd7..b5d3cd33e0 100644 --- a/app/Console/Commands/SyncAssetLocations.php +++ b/app/Console/Commands/SyncAssetLocations.php @@ -62,7 +62,7 @@ class SyncAssetLocations extends Command $output['info'][] = 'There are '.$assigned_user_assets->count().' assets checked out to users.'; foreach ($assigned_user_assets as $assigned_user_asset) { if (($assigned_user_asset->assignedTo) && ($assigned_user_asset->assignedTo->userLoc)) { - $new_location=$assigned_user_asset->assignedTo->userloc->id; + $new_location = $assigned_user_asset->assignedTo->userLoc->id; $output['info'][] ='Setting User Asset ' . $assigned_user_asset->id . ' ('.$assigned_user_asset->asset_tag.') to ' . $assigned_user_asset->assignedTo->userLoc->name . ' which is id: ' . $new_location; } else { $output['warn'][] ='Asset ' . $assigned_user_asset->id . ' ('.$assigned_user_asset->asset_tag.') still has no location! '; diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 7ca813351d..bafa469d0f 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,7 +2,6 @@ namespace App\Console; -use App\Console\Commands\RestoreDeletedUsers; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -35,6 +34,8 @@ class Kernel extends ConsoleKernel Commands\SendCurrentInventoryToUsers::class, Commands\MoveUploadsToNewDisk::class, Commands\SendUpcomingAuditReport::class, + Commands\ImportLocations::class, + Commands\ReEncodeCustomFieldNames::class, ]; /** @@ -60,5 +61,6 @@ class Kernel extends ConsoleKernel protected function commands() { require base_path('routes/console.php'); + $this->load(__DIR__.'/Commands'); } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8d9e71bb28..f6449b25de 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -22,6 +22,7 @@ class Handler extends ExceptionHandler \Illuminate\Database\Eloquent\ModelNotFoundException::class, \Illuminate\Session\TokenMismatchException::class, \Illuminate\Validation\ValidationException::class, + \Intervention\Image\Exception\NotSupportedException::class, ]; /** @@ -65,10 +66,6 @@ class Handler extends ExceptionHandler return response()->json(Helper::formatStandardApiResponse('error', null, $className . ' not found'), 200); } - if ($e instanceof \Illuminate\Validation\ValidationException) { - return response()->json(Helper::formatStandardApiResponse('error', null, $e->response['messages'], 400)); - } - if ($this->isHttpException($e)) { $statusCode = $e->getStatusCode(); @@ -83,11 +80,6 @@ class Handler extends ExceptionHandler } } - // Try to parse 500 Errors in a bit nicer way when debug is enabled. - if (config('app.debug')) { - return response()->json(Helper::formatStandardApiResponse('error', null, "An Error has occured! " . $e->getMessage()), 500); - } - } @@ -116,4 +108,16 @@ class Handler extends ExceptionHandler return redirect()->guest('login'); } + + /** + * Convert a validation exception into a JSON response. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Validation\ValidationException $exception + * @return \Illuminate\Http\JsonResponse + */ + protected function invalidJson($request, ValidationException $exception) + { + return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors(), 400)); + } } diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php index a0743c16c2..bb7e8271e7 100644 --- a/app/Http/Controllers/Api/AccessoriesController.php +++ b/app/Http/Controllers/Api/AccessoriesController.php @@ -8,6 +8,10 @@ use App\Http\Transformers\AccessoriesTransformer; use App\Http\Transformers\SelectlistTransformer; use App\Models\Accessory; use App\Models\Company; +use App\Models\User; +use Carbon\Carbon; +use Auth; +use DB; use Illuminate\Http\Request; class AccessoriesController extends Controller @@ -210,7 +214,96 @@ class AccessoriesController extends Controller return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.delete.success'))); } - + + /** + * Save the Accessory checkout information. + * + * If Slack is enabled and/or asset acceptance is enabled, it will also + * trigger a Slack message and send an email. + * + * @author [A. Gianotto] [] + * @param int $accessoryId + * @return Redirect + */ + public function checkout(Request $request, $accessoryId) + { + // Check if the accessory exists + if (is_null($accessory = Accessory::find($accessoryId))) { + return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist'))); + } + + $this->authorize('checkout', $accessory); + + + if ($accessory->numRemaining() > 0) { + + if (!$user = User::find($request->input('assigned_to'))) { + return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.checkout.user_does_not_exist'))); + } + + // Update the accessory data + $accessory->assigned_to = $request->input('assigned_to'); + + $accessory->users()->attach($accessory->id, [ + 'accessory_id' => $accessory->id, + 'created_at' => Carbon::now(), + 'user_id' => Auth::id(), + 'assigned_to' => $request->get('assigned_to') + ]); + + $accessory->logCheckout($request->input('note'), $user); + + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkout.success'))); + } + + return response()->json(Helper::formatStandardApiResponse('error', null, 'No accessories remaining')); + + } + + /** + * Check in the item so that it can be checked out again to someone else + * + * @uses Accessory::checkin_email() to determine if an email can and should be sent + * @author [A. Gianotto] [] + * @param Request $request + * @param integer $accessoryUserId + * @param string $backto + * @return Redirect + * @internal param int $accessoryId + */ + public function checkin(Request $request, $accessoryUserId = null) + { + if (is_null($accessory_user = DB::table('accessories_users')->find($accessoryUserId))) { + return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist'))); + } + + $accessory = Accessory::find($accessory_user->accessory_id); + $this->authorize('checkin', $accessory); + + $logaction = $accessory->logCheckin(User::find($accessoryUserId), $request->input('note')); + + // Was the accessory updated? + if (DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) { + if (!is_null($accessory_user->assigned_to)) { + $user = User::find($accessory_user->assigned_to); + } + + $data['log_id'] = $logaction->id; + $data['first_name'] = $user->first_name; + $data['last_name'] = $user->last_name; + $data['item_name'] = $accessory->name; + $data['checkin_date'] = $logaction->created_at; + $data['item_tag'] = ''; + $data['note'] = $logaction->note; + + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success'))); + } + + return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.checkin.error'))); + + } + + /** * Gets a paginated collection for the select2 menus * @@ -234,4 +327,7 @@ class AccessoriesController extends Controller return (new SelectlistTransformer)->transformSelectlist($accessories); } + + + } diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index ed51044751..a07f186620 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -464,7 +464,13 @@ class AssetsController extends Controller $model = AssetModel::find($request->get('model_id')); if (($model) && ($model->fieldset)) { foreach ($model->fieldset->fields as $field) { - $asset->{$field->convertUnicodeDbSlug()} = e($request->input($field->convertUnicodeDbSlug(), null)); + if ($field->field_encrypted=='1') { + if (Gate::allows('admin')) { + $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug())); + } + } else { + $asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug()); + } } } @@ -514,7 +520,7 @@ class AssetsController extends Controller ($request->filled('company_id')) ? $asset->company_id = Company::getIdForCurrentUser($request->get('company_id')) : ''; - if ($request->has('image_source')) { + if ($request->filled('image_source')) { if ($request->input('image_source') == "") { $asset->image = null; } else { @@ -537,8 +543,14 @@ class AssetsController extends Controller // Update custom fields if (($model = AssetModel::find($asset->model_id)) && (isset($model->fieldset))) { foreach ($model->fieldset->fields as $field) { - if ($request->filled($field->convertUnicodeDbSlug())) { - $asset->{$field->convertUnicodeDbSlug()} = e($request->input($field->convertUnicodeDbSlug())); + if ($request->has($field->convertUnicodeDbSlug())) { + if ($field->field_encrypted=='1') { + if (Gate::allows('admin')) { + $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug())); + } + } else { + $asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug()); + } } } } @@ -706,7 +718,11 @@ class AssetsController extends Controller $asset->assigned_to = null; $asset->assignedTo()->disassociate($asset); $asset->accepted = null; - $asset->name = Input::get('name'); + + if ($request->filled('name')) { + $asset->name = $request->input('name'); + } + $asset->location_id = $asset->rtd_location_id; if ($request->filled('location_id')) { diff --git a/app/Http/Controllers/Api/ConsumablesController.php b/app/Http/Controllers/Api/ConsumablesController.php index 46f36c58ba..221255ce2d 100644 --- a/app/Http/Controllers/Api/ConsumablesController.php +++ b/app/Http/Controllers/Api/ConsumablesController.php @@ -166,7 +166,7 @@ class ConsumablesController extends Controller { $consumable = Consumable::with(array('consumableAssignments'=> function ($query) { - $query->orderBy('created_at', 'DESC'); + $query->orderBy($query->getModel()->getTable().'.created_at', 'DESC'); }, 'consumableAssignments.admin'=> function ($query) { }, diff --git a/app/Http/Controllers/Api/LocationsController.php b/app/Http/Controllers/Api/LocationsController.php index 10cca5dc8d..3410a880b7 100644 --- a/app/Http/Controllers/Api/LocationsController.php +++ b/app/Http/Controllers/Api/LocationsController.php @@ -124,9 +124,9 @@ class LocationsController extends Controller 'locations.image', 'locations.currency' ]) - ->withCount('assignedAssets') - ->withCount('assets') - ->withCount('users')->findOrFail($id); + ->withCount('assignedAssets as assigned_assets_count') + ->withCount('assets as assets_count') + ->withCount('users as users_count')->findOrFail($id); return (new LocationsTransformer)->transformLocation($location); } diff --git a/app/Http/Controllers/Api/ManufacturersController.php b/app/Http/Controllers/Api/ManufacturersController.php index a1cf9027ba..b4e8d71753 100644 --- a/app/Http/Controllers/Api/ManufacturersController.php +++ b/app/Http/Controllers/Api/ManufacturersController.php @@ -83,7 +83,7 @@ class ManufacturersController extends Controller public function show($id) { $this->authorize('view', Manufacturer::class); - $manufacturer = Manufacturer::withCount('assets as assets_count', 'licenses as licenses_count', 'consumables as consumables_count', 'accessories as accessories_count', 'models as models_count' )->findOrFail($id); + $manufacturer = Manufacturer::withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('consumables as consumables_count')->withCount('accessories as accessories_count')->findOrFail($id); return (new ManufacturersTransformer)->transformManufacturer($manufacturer); } diff --git a/app/Http/Controllers/Api/SuppliersController.php b/app/Http/Controllers/Api/SuppliersController.php index 17b2b36beb..9e7d7b546a 100644 --- a/app/Http/Controllers/Api/SuppliersController.php +++ b/app/Http/Controllers/Api/SuppliersController.php @@ -25,7 +25,7 @@ class SuppliersController extends Controller $allowed_columns = ['id','name','address','phone','contact','fax','email','image','assets_count','licenses_count', 'accessories_count','url']; $suppliers = Supplier::select( - array('id','name','address','address2','city','state','country','fax', 'phone','email','contact','created_at','updated_at','deleted_at','image','notes', 'url') + array('id','name','address','address2','city','state','country','fax', 'phone','email','contact','created_at','updated_at','deleted_at','image','notes') )->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('accessories as accessories_count'); diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index ea01ec9c2e..85182ed3b4 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -60,12 +60,12 @@ class UsersController extends Controller 'users.zip', ])->with('manager', 'groups', 'userloc', 'company', 'department','assets','licenses','accessories','consumables') - ->withCount('assets as assets_count','licenses as licneses_count','accessories as accessories_count','consumables as consumables_count'); + ->withCount('assets as assets_count','licenses as licenses_count','accessories as accessories_count','consumables as consumables_count'); $users = Company::scopeCompanyables($users); if (($request->filled('deleted')) && ($request->input('deleted')=='true')) { - $users = $users->onlyTrashed(); + $users = $users->GetDeleted(); } if ($request->filled('company_id')) { @@ -102,6 +102,9 @@ class UsersController extends Controller case 'department': $users = $users->OrderDepartment($order); break; + case 'company': + $users = $users->OrderCompany($order); + break; default: $allowed_columns = [ @@ -204,7 +207,7 @@ class UsersController extends Controller if ($user->save()) { - if ($request->has('groups')) { + if ($request->filled('groups')) { $user->groups()->sync($request->input('groups')); } else { $user->groups()->sync(array()); @@ -269,9 +272,22 @@ class UsersController extends Controller ->where('assigned_to', $user->id)->update(['location_id' => $request->input('location_id', null)]); if ($user->save()) { + + // Sync group memberships: + // This was changed in Snipe-IT v4.6.x to 4.7, since we upgraded to Laravel 5.5 + // which changes the behavior of has vs filled. + // The $request->has method will now return true even if the input value is an empty string or null. + // A new $request->filled method has was added that provides the previous behavior of the has method. + + // Check if the request has groups passed and has a value if ($request->filled('groups')) { $user->groups()->sync($request->input('groups')); + // The groups field has been passed but it is null, so we should blank it out + } elseif ($request->has('groups')) { + $user->groups()->sync(array()); } + + return response()->json(Helper::formatStandardApiResponse('success', (new UsersTransformer)->transformUser($user), trans('admin/users/message.success.update'))); } @@ -293,20 +309,32 @@ class UsersController extends Controller $this->authorize('delete', $user); - if ($user->assets()->count() > 0) { + if (($user->assets) && ($user->assets->count() > 0)) { return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.error.delete_has_assets'))); } - // Remove the user's avatar if they have one - if (Storage::disk('public')->exists('avatars/'.$user->avatar)) { - try { - Storage::disk('public')->delete('avatars/'.$user->avatar); - } catch (\Exception $e) { - \Log::debug($e); - } + if (($user->licenses) && ($user->licenses->count() > 0)) { + return response()->json(Helper::formatStandardApiResponse('error', null, 'This user still has ' . $user->licenses->count() . ' license(s) associated with them and cannot be deleted.')); + } + + if (($user->accessories) && ($user->accessories->count() > 0)) { + return response()->json(Helper::formatStandardApiResponse('error', null, 'This user still has ' . $user->accessories->count() . ' accessories associated with them.')); + } + + if (($user->managedLocations()) && ($user->managedLocations()->count() > 0)) { + return response()->json(Helper::formatStandardApiResponse('error', null, 'This user still has ' . $user->managedLocations()->count() . ' locations that they manage.')); } if ($user->delete()) { + + // Remove the user's avatar if they have one + if (Storage::disk('public')->exists('avatars/'.$user->avatar)) { + try { + Storage::disk('public')->delete('avatars/'.$user->avatar); + } catch (\Exception $e) { + \Log::debug($e); + } + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.success.delete'))); } return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.error.delete'))); diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index 491de8325d..29698a04f6 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -292,6 +292,145 @@ class AssetModelsController extends Controller } + + + /** + * Returns a view that allows the user to bulk edit model attrbutes + * + * @author [A. Gianotto] [] + * @since [v1.7] + * @return \Illuminate\Contracts\View\View + */ + public function postBulkEdit(Request $request) + { + + $models_raw_array = Input::get('ids'); + + // Make sure some IDs have been selected + if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) { + + + $models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets as assets_count')->orderBy('assets_count', 'ASC')->get(); + + // If deleting.... + if ($request->input('bulk_actions')=='delete') { + $valid_count = 0; + foreach ($models as $model) { + if ($model->assets_count == 0) { + $valid_count++; + } + } + return view('models/bulk-delete', compact('models'))->with('valid_count', $valid_count); + + // Otherwise display the bulk edit screen + } else { + + $nochange = ['NC' => 'No Change']; + $fieldset_list = $nochange + Helper::customFieldsetList(); + $depreciation_list = $nochange + Helper::depreciationList(); + + return view('models/bulk-edit', compact('models')) + ->with('fieldset_list', $fieldset_list) + ->with('depreciation_list', $depreciation_list); + } + + } + + return redirect()->route('models.index') + ->with('error', 'You must select at least one model to edit.'); + + } + + + + /** + * Returns a view that allows the user to bulk edit model attrbutes + * + * @author [A. Gianotto] [] + * @since [v1.7] + * @return \Illuminate\Contracts\View\View + */ + public function postBulkEditSave(Request $request) + { + + $models_raw_array = Input::get('ids'); + $update_array = array(); + + + if (($request->filled('manufacturer_id') && ($request->input('manufacturer_id')!='NC'))) { + $update_array['manufacturer_id'] = $request->input('manufacturer_id'); + } + if (($request->filled('category_id') && ($request->input('category_id')!='NC'))) { + $update_array['category_id'] = $request->input('category_id'); + } + if ($request->input('fieldset_id')!='NC') { + $update_array['fieldset_id'] = $request->input('fieldset_id'); + } + if ($request->input('depreciation_id')!='NC') { + $update_array['depreciation_id'] = $request->input('depreciation_id'); + } + + + + if (count($update_array) > 0) { + AssetModel::whereIn('id', $models_raw_array)->update($update_array); + return redirect()->route('models.index') + ->with('success', trans('admin/models/message.bulkedit.success')); + } + + return redirect()->route('models.index') + ->with('warning', trans('admin/models/message.bulkedit.error')); + + } + + /** + * Validate and delete the given Asset Models. An Asset Model + * cannot be deleted if there are associated assets. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @param int $modelId + * @return Redirect + */ + public function postBulkDelete(Request $request) + { + $models_raw_array = Input::get('ids'); + + if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) { + + $models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets as assets_count')->get(); + + $del_error_count = 0; + $del_count = 0; + + foreach ($models as $model) { + \Log::debug($model->id); + + if ($model->assets_count > 0) { + $del_error_count++; + } else { + $model->delete(); + $del_count++; + } + } + + \Log::debug($del_count); + \Log::debug($del_error_count); + + if ($del_error_count == 0) { + return redirect()->route('models.index') + ->with('success', trans('admin/models/message.bulkdelete.success',['success_count'=> $del_count] )); + } + + return redirect()->route('models.index') + ->with('warning', trans('admin/models/message.bulkdelete.success_partial', ['fail_count'=>$del_error_count, 'success_count'=> $del_count])); + } + + return redirect()->route('models.index') + ->with('error', trans('admin/models/message.bulkdelete.error')); + + } + /** * Returns true if a fieldset is set, 'add default values' is ticked and if * any default values were entered into the form. diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index c573389c9b..8526de08fd 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -70,7 +70,7 @@ class AssetCheckinController extends Controller $asset->assignedTo()->disassociate($asset); $asset->assigned_type = null; $asset->accepted = null; - $asset->name = e($request->get('name')); + $asset->name = $request->get('name'); if ($request->filled('status_id')) { $asset->status_id = e($request->get('status_id')); @@ -92,7 +92,7 @@ class AssetCheckinController extends Controller event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at)); - if ($backto=='user') { + if ((isset($user)) && ($backto =='user')) { return redirect()->route("users.show", $user->id)->with('success', trans('admin/hardware/message.checkin.success')); } return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.checkin.success')); diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index f9fc0032e6..a6d049874a 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -27,7 +27,6 @@ class AssetCheckoutController extends Controller { // Check if the asset exists if (is_null($asset = Asset::find(e($assetId)))) { - // Redirect to the asset management page with error return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist')); } @@ -38,7 +37,6 @@ class AssetCheckoutController extends Controller } return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.checkout.not_available')); - // Get the dropdown of users and then pass it to the checkout view } diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 98e8dbdacd..8f67158acf 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -144,11 +144,9 @@ class AssetsController extends Controller $asset->location_id = $request->input('rtd_location_id', null); } - $asset->asset_tag = $asset_tags[$a]; - - // Create the image (if one was chosen.) - if ($request->hasFile('image')) { - $image = $request->input('image'); + // Create the image (if one was chosen.) + if ($request->has('image')) { + $image = $request->input('image'); $asset = $request->handleImages($asset); } @@ -157,17 +155,17 @@ class AssetsController extends Controller // Validation for these fields is handled through the AssetRequest form request $model = AssetModel::find($request->get('model_id')); - if (($model) && ($model->fieldset)) { - foreach ($model->fieldset->fields as $field) { - if ($field->field_encrypted=='1') { - if (Gate::allows('admin')) { - $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug())); - } - } else { - $asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug()); + if ($model->fieldset) { + foreach ($model->fieldset->fields as $field) { + if ($field->field_encrypted=='1') { + if (Gate::allows('admin')) { + $asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug())); } + } else { + $asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug()); } } + } // Validate the asset before saving if ($asset->isValid() && $asset->save()) { @@ -333,7 +331,7 @@ class AssetsController extends Controller // FIXME: No idea why this is returning a Builder error on db_column_name. // Need to investigate and fix. Using static method for now. $model = AssetModel::find($request->get('model_id')); - if ($model->fieldset) { + if (($model) && ($model->fieldset)) { foreach ($model->fieldset->fields as $field) { if ($field->field_encrypted=='1') { if (Gate::allows('admin')) { @@ -530,6 +528,11 @@ class AssetsController extends Controller */ public function postImportHistory(Request $request) { + + if (!$request->hasFile('user_import_csv')) { + return back()->with('error', 'No file provided. Please select a file for import and try again. '); + } + if (!ini_get("auto_detect_line_endings")) { ini_set("auto_detect_line_endings", '1'); } @@ -558,49 +561,105 @@ class AssetsController extends Controller foreach ($results as $record) { - $asset_tag = $record['Asset Tag']; - - try { - $checkoutdate = Carbon::parse($record['Checkout Date'])->format('Y-m-d H:i:s'); - $checkindate = Carbon::parse($record['Checkin Date'])->format('Y-m-d H:i:s'); - } - catch (\Exception $err) { - $status['error'][]['asset'][$asset_tag]['msg'] = 'Your dates are screwed up. Format needs to be Y-m-d H:i:s'; - continue; - } - - if($asset = Cache::remember('asset:' . $asset_tag, $cachetime, function () use( &$asset_tag) { - $tocache = Asset::where('asset_tag', '=', $asset_tag)->value('id'); - return is_null($tocache) ? false : $tocache;})) - { - //we've found our asset, now lets look for a user - if($base_username != User::generateFormattedNameFromFullName($record['Full Name'], Setting::getSettings()->username_format)) { - - $base_username = User::generateFormattedNameFromFullName($record['Full Name'], Setting::getSettings()->username_format); - - if(!$user = Cache::remember('user:' . $base_username['username'], $cachetime, function () use( &$base_username) { - $tocache = User::where('username', '=', $base_username['username'])->value('id'); - return is_null($tocache) ? false : $tocache;})) - { - $status['error'][]['asset'][$asset_tag]['msg'] = 'Asset was found but user (' . $record['Full Name'] . ') not matched'; - $base_username = null; - continue; - } + foreach ($results as $row) { + if (is_array($row)) { + $row = array_change_key_case($row, CASE_LOWER); + $asset_tag = Helper::array_smart_fetch($row, "asset tag"); + if (!array_key_exists($asset_tag, $item)) { + $item[$asset_tag] = array(); } + $batch_counter = count($item[$asset_tag]); - if($checkoutdate < $checkindate) { + $item[$asset_tag][$batch_counter]['checkout_date'] = Carbon::parse(Helper::array_smart_fetch($row, "checkout date"))->format('Y-m-d H:i:s'); + $item[$asset_tag][$batch_counter]['checkin_date'] = Carbon::parse(Helper::array_smart_fetch($row, "checkin date"))->format('Y-m-d H:i:s'); + \Log::debug($item[$asset_tag][$batch_counter]['checkin_date']); + + $item[$asset_tag][$batch_counter]['asset_tag'] = Helper::array_smart_fetch($row, "asset tag"); + $item[$asset_tag][$batch_counter]['name'] = Helper::array_smart_fetch($row, "name"); + $item[$asset_tag][$batch_counter]['email'] = Helper::array_smart_fetch($row, "email"); + + if ($asset = Asset::where('asset_tag', '=', $asset_tag)->first()) { + $item[$asset_tag][$batch_counter]['asset_id'] = $asset->id; + + $base_username = User::generateFormattedNameFromFullName(Setting::getSettings()->username_format, $item[$asset_tag][$batch_counter]['name']); + $user = User::where('username', '=', $base_username['username']); + $user_query = ' on username '.$base_username['username']; + + if ($request->input('match_firstnamelastname')=='1') { + $firstnamedotlastname = User::generateFormattedNameFromFullName('firstname.lastname', $item[$asset_tag][$batch_counter]['name']); + $item[$asset_tag][$batch_counter]['username'][] = $firstnamedotlastname['username']; + $user->orWhere('username', '=', $firstnamedotlastname['username']); + $user_query .= ', or on username '.$firstnamedotlastname['username']; + } + + if ($request->input('match_flastname')=='1') { + $flastname = User::generateFormattedNameFromFullName('filastname', $item[$asset_tag][$batch_counter]['name']); + $item[$asset_tag][$batch_counter]['username'][] = $flastname['username']; + $user->orWhere('username', '=', $flastname['username']); + $user_query .= ', or on username '.$flastname['username']; + } + if ($request->input('match_firstname')=='1') { + $firstname = User::generateFormattedNameFromFullName('firstname', $item[$asset_tag][$batch_counter]['name']); + $item[$asset_tag][$batch_counter]['username'][] = $firstname['username']; + $user->orWhere('username', '=', $firstname['username']); + $user_query .= ', or on username '.$firstname['username']; + } + if ($request->input('match_email')=='1') { + if ($item[$asset_tag][$batch_counter]['email']=='') { + $item[$asset_tag][$batch_counter]['username'][] = $user_email = User::generateEmailFromFullName($item[$asset_tag][$batch_counter]['name']); + $user->orWhere('username', '=', $user_email); + $user_query .= ', or on username '.$user_email; + } + } + + // A matching user was found + if ($user = $user->first()) { + $item[$asset_tag][$batch_counter]['checkedout_to'] = $user->id; + $item[$asset_tag][$batch_counter]['user_id'] = $user->id; Actionlog::firstOrCreate(array( - 'item_id' => $asset, + 'item_id' => $asset->id, 'item_type' => Asset::class, - 'user_id' => Auth::user()->id, - 'note' => 'Historical record added by ' . Auth::user()->present()->fullName(), - 'target_id' => $user, + 'user_id' => Auth::user()->id, + 'note' => 'Checkout imported by '.Auth::user()->present()->fullName().' from history importer', + 'target_id' => $item[$asset_tag][$batch_counter]['user_id'], 'target_type' => User::class, - 'created_at' => $checkoutdate, - 'action_type' => 'checkout', + 'created_at' => $item[$asset_tag][$batch_counter]['checkout_date'], + 'action_type' => 'checkout', )); + $asset->assigned_to = $user->id; + + if ($asset->save()) { + $status['success'][]['asset'][$asset_tag]['msg'] = 'Asset successfully matched for '.Helper::array_smart_fetch($row, "name").$user_query.' on '.$item[$asset_tag][$batch_counter]['checkout_date']; + } else { + $status['error'][]['asset'][$asset_tag]['msg'] = 'Asset and user was matched but could not be saved.'; + } + } else { + $item[$asset_tag][$batch_counter]['checkedout_to'] = null; + $status['error'][]['user'][Helper::array_smart_fetch($row, "name")]['msg'] = 'User does not exist so no checkin log was created.'; + } + } else { + $item[$asset_tag][$batch_counter]['asset_id'] = null; + $status['error'][]['asset'][$asset_tag]['msg'] = 'Asset does not exist so no match was attempted.'; + } + } + } + + // Loop through and backfill the checkins + foreach ($item as $key => $asset_batch) { + $total_in_batch = count($asset_batch); + for ($x = 0; $x < $total_in_batch; $x++) { + $next = $x + 1; + + // Only do this if a matching user was found + if ((array_key_exists('checkedout_to', $asset_batch[$x])) && ($asset_batch[$x]['checkedout_to']!='')) { + if (($total_in_batch > 1) && ($x < $total_in_batch) && (array_key_exists($next, $asset_batch))) { + $checkin_date = Carbon::parse($asset_batch[$next]['checkin_date'])->format('Y-m-d H:i:s'); + $asset_batch[$x]['real_checkin'] = $checkin_date; + + \Log::debug($asset_batch[$next]['checkin_date']); + \Log::debug($checkin_date); Actionlog::firstOrCreate(array( 'item_id' => $asset, 'item_type' => Asset::class, @@ -678,11 +737,6 @@ class AssetsController extends Controller return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list'); } - public function dueForAudit() - { - $this->authorize('audit', Asset::class); - return view('hardware/audit-due'); - } public function overdueForAudit() { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index ff1c93f383..6dc691be92 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -179,8 +179,8 @@ class LoginController extends Controller } if ($user = Auth::user()) { - $user->last_login = Carbon::now(); - Log::debug('Last login:'.$user->last_login); + $user->last_login = \Carbon::now(); + \Log::debug('Last login:'.$user->last_login); $user->save(); } // Redirect to the users page @@ -277,7 +277,7 @@ class LoginController extends Controller return redirect()->route('login')->with('error', trans('auth/general.login_prompt')); } - if (!$request->has('two_factor_secret')) { + if (!$request->filled('two_factor_secret')) { return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.code_required')); } @@ -320,7 +320,7 @@ class LoginController extends Controller return redirect()->away($customLogoutUrl); } - return redirect()->route('login')->with('success', trans('auth/general.logout.success')); + return redirect()->route('login')->with('success', trans('auth/message.logout.success')); } diff --git a/app/Http/Controllers/CustomFieldsetsController.php b/app/Http/Controllers/CustomFieldsetsController.php index 785b221db5..18323f03bb 100644 --- a/app/Http/Controllers/CustomFieldsetsController.php +++ b/app/Http/Controllers/CustomFieldsetsController.php @@ -44,19 +44,18 @@ class CustomFieldsetsController extends Controller $maxid = 0; - foreach ($cfset->fields() as $field) { - - if ($field) { - if ($field->pivot->order > $maxid) { - $maxid=$field->pivot->order; - } - if (isset($custom_fields_list[$field->id])) { - unset($custom_fields_list[$field->id]); - } + foreach ($cfset->fields as $field) { + if ($field->pivot->order > $maxid) { + $maxid=$field->pivot->order; + } + if (isset($custom_fields_list[$field->id])) { + unset($custom_fields_list[$field->id]); } - } + return view("custom_fields.fieldsets.view")->with("custom_fieldset", $cfset)->with("maxid", $maxid+1)->with("custom_fields_list", $custom_fields_list); + } + return view("custom_fields.fieldsets.view") ->with("custom_fieldset", $cfset) ->with("maxid", $maxid+1) @@ -176,14 +175,13 @@ class CustomFieldsetsController extends Controller /** - * Associate the custom field with a custom fieldset. - * - * @author [Brady Wetherington] [] - * @since [v1.8] - * @return View - * @throws \Illuminate\Auth\Access\AuthorizationException - */ - public function associate($id) + * Associate the custom field with a custom fieldset. + * + * @author [Brady Wetherington] [] + * @since [v1.8] + * @return View + */ + public function associate(Request $request, $id) { $set = CustomFieldset::find($id); @@ -191,12 +189,12 @@ class CustomFieldsetsController extends Controller $this->authorize('update', $set); foreach ($set->fields as $field) { - if ($field->id == Input::get('field_id')) { + if ($field->id == $request->input('field_id')) { return redirect()->route("fieldsets.show", [$id])->withInput()->withErrors(['field_id' => trans('admin/custom_fields/message.field.already_added')]); } } - $results=$set->fields()->attach(Input::get('field_id'), ["required" => (Input::get('required') == "on"),"order" => Input::get('order')]); + $results = $set->fields()->attach(Input::get('field_id'), ["required" => ($request->input('required') == "on"),"order" => $request->input('order', 1)]); return redirect()->route("fieldsets.show", [$id])->with("success", trans('admin/custom_fields/message.field.create.assoc_success')); } diff --git a/app/Http/Controllers/DepartmentsController.php b/app/Http/Controllers/DepartmentsController.php index 9c0cd8d4bb..434ccc26dc 100644 --- a/app/Http/Controllers/DepartmentsController.php +++ b/app/Http/Controllers/DepartmentsController.php @@ -52,8 +52,8 @@ class DepartmentsController extends Controller $this->authorize('create', Department::class); $department = new Department; $department->fill($request->all()); - $department->user_id = Auth::id(); - $department->manager_id = $request->input('manager_id', null); + $department->user_id = Auth::user()->id; + $department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null); $department = $request->handleImages($department); diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 147ee0808b..d9f4f3deb8 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -320,7 +320,8 @@ class SettingsController extends Controller $setting->modellist_displays = ''; - if (($request->filled('show_in_model_list')) && (count($request->input('show_in_model_list')) > 0)) { + if (($request->has('show_in_model_list')) && (count($request->input('show_in_model_list')) > 0)) + { $setting->modellist_displays = implode(',', $request->input('show_in_model_list')); } @@ -577,8 +578,9 @@ class SettingsController extends Controller $setting->pwd_secure_min = (int) $request->input('pwd_secure_min'); $setting->pwd_secure_complexity = ''; - if ($request->filled('pwd_secure_complexity')) { - $setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity')); + + if ($request->has('pwd_secure_complexity')) { + $setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity')); } if ($setting->save()) { @@ -884,7 +886,9 @@ class SettingsController extends Controller $setting->labels_pageheight = $request->input('labels_pageheight'); $setting->labels_display_company_name = $request->input('labels_display_company_name', '0'); - if ($request->filled('labels_display_name')) { + + + if ($request->has('labels_display_name')) { $setting->labels_display_name = 1; } else { $setting->labels_display_name = 0; @@ -900,13 +904,8 @@ class SettingsController extends Controller $setting->labels_display_tag = 1; } else { $setting->labels_display_tag = 0; - } + } - if ($request->filled('labels_display_tag')) { - $setting->labels_display_tag = 1; - } else { - $setting->labels_display_tag = 0; - } if ($request->filled('labels_display_model')) { $setting->labels_display_model = 1; diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.php index 9efb9d24d4..918b76e62c 100755 --- a/app/Http/Controllers/ViewAssetsController.php +++ b/app/Http/Controllers/ViewAssetsController.php @@ -36,13 +36,19 @@ class ViewAssetsController extends Controller 'licenses', 'userloc', 'userlog' - )->withTrashed()->find(Auth::id()); + )->withTrashed()->find(Auth::user()->id); $userlog = $user->userlog->load('item', 'user', 'target'); if (isset($user->id)) { return view('account/view-assets', compact('user', 'userlog')); + } else { + // Prepare the error message + $error = trans('admin/users/message.user_not_found', compact('id')); + + // Redirect to the user management page + return redirect()->route('users.index')->with('error', $error); } // Redirect to the user management page return redirect()->route('users.index') @@ -117,15 +123,17 @@ class ViewAssetsController extends Controller return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.canceled')); - } - $item->request(); - if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!config('app.lock_passwords'))) { - $logaction->logaction('requested'); - $settings->notify(new RequestAssetNotification($data)); - } + } else { + $item->request(); + if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!config('app.lock_passwords'))) { + $logaction->logaction('requested'); + $settings->notify(new RequestAssetNotification($data)); + } - return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.success')); + + return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.success')); + } } @@ -197,6 +205,124 @@ class ViewAssetsController extends Controller // Get the acceptance screen public function getAcceptAsset($logID = null) { - return redirect()->route('account.accept'); + + $findlog = Actionlog::where('id', $logID)->first(); + + if (!$findlog) { + return redirect()->to('account/view-assets')->with('error', 'No matching record.'); + } + + if ($findlog->accepted_id!='') { + return redirect()->to('account/view-assets')->with('error', trans('admin/users/message.error.asset_already_accepted')); + } + + $user = Auth::user(); + + + // TODO - Fix this for non-assets + if (($findlog->item_type==Asset::class) && ($user->id != $findlog->item->assigned_to)) { + return redirect()->to('account/view-assets')->with('error', trans('admin/users/message.error.incorrect_user_accepted')); + } + + + $item = $findlog->item; + + // Check if the asset exists + if (is_null($item)) { + // Redirect to the asset management page + return redirect()->to('account')->with('error', trans('admin/hardware/message.does_not_exist')); + } elseif (!Company::isCurrentUserHasAccess($item)) { + return redirect()->route('requestable-assets')->with('error', trans('general.insufficient_permissions')); + } else { + return view('account/accept-asset', compact('item'))->with('findlog', $findlog)->with('item', $item); + } + } + + // Save the acceptance + public function postAcceptAsset(Request $request, $logID = null) + { + + // Check if the asset exists + if (is_null($findlog = Actionlog::where('id', $logID)->first())) { + // Redirect to the asset management page + return redirect()->to('account/view-assets')->with('error', trans('admin/hardware/message.does_not_exist')); + } + + + if ($findlog->accepted_id!='') { + // Redirect to the asset management page + return redirect()->to('account/view-assets')->with('error', trans('admin/users/message.error.asset_already_accepted')); + } + + if (!Input::has('asset_acceptance')) { + return redirect()->back()->with('error', trans('admin/users/message.error.accept_or_decline')); + } + + $user = Auth::user(); + + if (($findlog->item_type==Asset::class) && ($user->id != $findlog->item->assigned_to)) { + return redirect()->to('account/view-assets')->with('error', trans('admin/users/message.error.incorrect_user_accepted')); + } + + if ($request->filled('signature_output')) { + $path = config('app.private_uploads').'/signatures'; + $sig_filename = "siglog-".$findlog->id.'-'.date('Y-m-d-his').".png"; + $data_uri = e($request->get('signature_output')); + $encoded_image = explode(",", $data_uri); + $decoded_image = base64_decode($encoded_image[1]); + file_put_contents($path."/".$sig_filename, $decoded_image); + } + + + $logaction = new Actionlog(); + + if (Input::get('asset_acceptance')=='accepted') { + $logaction_msg = 'accepted'; + $accepted="accepted"; + $return_msg = trans('admin/users/message.accepted'); + } else { + $logaction_msg = 'declined'; + $accepted="rejected"; + $return_msg = trans('admin/users/message.declined'); + } + $logaction->item_id = $findlog->item_id; + $logaction->item_type = $findlog->item_type; + + // Asset + if (($findlog->item_id!='') && ($findlog->item_type==Asset::class)) { + if (Input::get('asset_acceptance')!='accepted') { + DB::table('assets') + ->where('id', $findlog->item_id) + ->update(array('assigned_to' => null)); + } + } + + $logaction->target_id = $findlog->target_id; + $logaction->target_type = User::class; + $logaction->note = e(Input::get('note')); + $logaction->updated_at = date("Y-m-d H:i:s"); + + + if (isset($sig_filename)) { + $logaction->accept_signature = $sig_filename; + } + $log = $logaction->logaction($logaction_msg); + + $update_checkout = DB::table('action_logs') + ->where('id', $findlog->id) + ->update(array('accepted_id' => $logaction->id)); + + if (($findlog->item_id!='') && ($findlog->item_type==Asset::class)) { + $affected_asset = $logaction->item; + $affected_asset->accepted = $accepted; + $affected_asset->save(); + } + + if ($update_checkout) { + return redirect()->to('account/view-assets')->with('success', $return_msg); + + } else { + return redirect()->to('account/view-assets')->with('error', 'Something went wrong '); + } } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 4b46e1dd9c..da3c5092b9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -44,7 +44,8 @@ class Kernel extends HttpKernel ], 'api' => [ - 'throttle:60,1', + \Barryvdh\Cors\HandleCors::class, + 'throttle:120,1', 'auth:api', ], ]; diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index e3fe0f8b69..01de91fbe8 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -18,4 +18,13 @@ class EncryptCookies extends BaseEncrypter protected $except = [ // ]; + + /** + * Indicates if cookies should be serialized. + * + * @var bool + */ + protected static $serialize = true; + + } diff --git a/app/Http/Requests/SaveUserRequest.php b/app/Http/Requests/SaveUserRequest.php index fac0acdc60..0de6a3bc02 100644 --- a/app/Http/Requests/SaveUserRequest.php +++ b/app/Http/Requests/SaveUserRequest.php @@ -3,8 +3,11 @@ namespace App\Http\Requests; use App\Models\Setting; +use Illuminate\Http\Exceptions\HttpResponseException; +use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Contracts\Validation\Validator; -class SaveUserRequest extends Request +class SaveUserRequest extends FormRequest { /** * Determine if the user is authorized to make this request. @@ -61,4 +64,5 @@ class SaveUserRequest extends Request return $rules; } + } diff --git a/app/Http/Transformers/UsersTransformer.php b/app/Http/Transformers/UsersTransformer.php index 3a690704b4..07b5fc1809 100644 --- a/app/Http/Transformers/UsersTransformer.php +++ b/app/Http/Transformers/UsersTransformer.php @@ -34,6 +34,7 @@ class UsersTransformer ] : null, 'jobtitle' => ($user->jobtitle) ? e($user->jobtitle) : null, 'phone' => ($user->phone) ? e($user->phone) : null, + 'website' => ($user->website) ? e($user->website) : null, 'address' => ($user->address) ? e($user->address) : null, 'city' => ($user->city) ? e($user->city) : null, 'state' => ($user->state) ? e($user->state) : null, diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index e917974f8f..2aeaf7db91 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -5,6 +5,7 @@ use App\Models\CustomField; use App\Models\Department; use App\Models\Setting; use App\Models\User; +use Illuminate\Support\Facades\Auth; use ForceUTF8\Encoding; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; @@ -126,8 +127,8 @@ abstract class Importer public function import() { $headerRow = $this->csv->fetchOne(); - $this->csv->setHeaderOffset(0); - $results = $this->normalizeInputArray($this->csv->getRecords()); + $this->csv->setHeaderOffset(0); //explicitly sets the CSV document header record + $results = $this->normalizeInputArray($this->csv->getRecords($headerRow)); $this->populateCustomFields($headerRow); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index e5ff4156eb..0741734778 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -82,7 +82,7 @@ class Asset extends Depreciable 'model_id' => 'required|integer|exists:models,id', 'status_id' => 'required|integer|exists:status_labels,id', 'company_id' => 'integer|nullable', - 'warranty_months' => 'numeric|nullable', + 'warranty_months' => 'numeric|nullable|digits_between:0,240', 'physical' => 'numeric|max:1|nullable', 'checkout_date' => 'date|max:10|min:10|nullable', 'checkin_date' => 'date|max:10|min:10|nullable', @@ -1069,7 +1069,7 @@ class Asset extends Depreciable public function scopeDueOrOverdueForAudit($query, $settings) { $interval = $settings->audit_warning_days ?? 0; - + return $query->whereNotNull('assets.next_audit_date') ->whereRaw("DATE_SUB(assets.next_audit_date, INTERVAL $interval DAY) <= '".Carbon::now()."'") ->where('assets.archived', '=', 0) @@ -1388,7 +1388,7 @@ class Asset extends Depreciable * * In short, this set of statements tells the query builder to ONLY query against an * actual field that's being passed if it doesn't meet known relational fields. This - * allows us to query custom fields directly in the assets table + * allows us to query custom fields directly in the assetsv table * (regardless of their name) and *skip* any fields that we already know can only be * searched through relational searches that we do earlier in this method. * @@ -1397,10 +1397,9 @@ class Asset extends Depreciable * assets.location would fail, as that field doesn't exist -- plus we're already searching * against those relationships earlier in this method. * - * - snipe + * - snipe * */ - if (($fieldname!='category') && ($fieldname!='model_number') && ($fieldname!='rtd_location') && ($fieldname!='location') && ($fieldname!='supplier') && ($fieldname!='status_label') && ($fieldname!='model') && ($fieldname!='company') && ($fieldname!='manufacturer')) { $query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%'); diff --git a/app/Models/Company.php b/app/Models/Company.php index 0cbdbd5671..a1094b60ea 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -78,7 +78,13 @@ final class Company extends SnipeModel } $table = ($table_name) ? DB::getTablePrefix().$table_name."." : ''; - return $query->where($table.$column, '=', $company_id); + + if(\Schema::hasColumn($query->getModel()->getTable(), $column)){ + return $query->where($table.$column, '=', $company_id); + } else { + return $query->join('users as users_comp', 'users_comp.id', 'user_id')->where('users_comp.company_id', '=', $company_id); + } + } public static function getIdFromInput($unescaped_input) diff --git a/app/Models/Department.php b/app/Models/Department.php index c054f66371..eecf5712cd 100644 --- a/app/Models/Department.php +++ b/app/Models/Department.php @@ -21,7 +21,6 @@ class Department extends SnipeModel protected $rules = [ 'name' => 'required|max:255', - 'user_id' => 'nullable|exists:users,id', 'location_id' => 'numeric|nullable', 'company_id' => 'numeric|nullable', 'manager_id' => 'numeric|nullable', diff --git a/app/Models/Group.php b/app/Models/Group.php index 0c492b7752..25c2505101 100755 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -6,10 +6,10 @@ use Watson\Validating\ValidatingTrait; class Group extends SnipeModel { - protected $table = 'groups'; + protected $table = 'permission_groups'; public $rules = array( - 'name' => 'required|min:3|max:255', + 'name' => 'required|min:2|max:255', ); /** diff --git a/app/Models/User.php b/app/Models/User.php index 34268be455..c17128d940 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -70,7 +70,6 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'email' => 'email|nullable', 'password' => 'required|min:6', 'locale' => 'max:10|nullable', - 'manager_id' => 'exists:users,id|nullable' ]; use Searchable; @@ -635,7 +634,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo */ public function scopeByGroup($query, $id) { return $query->whereHas('groups', function ($query) use ($id) { - $query->where('groups.id', '=', $id); + $query->where('permission_groups.id', '=', $id); }); } @@ -681,7 +680,22 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo return $query->leftJoin('departments as departments_users', 'users.department_id', '=', 'departments_users.id')->orderBy('departments_users.name', $order); } + /** + * Query builder scope to order on company + * + * @param Illuminate\Database\Query\Builder $query Query builder instance + * @param text $order Order + * + * @return Illuminate\Database\Query\Builder Modified query builder + */ + public function scopeOrderCompany($query, $order) + { + return $query->leftJoin('companies as companies_user', 'users.company_id', '=', 'companies_user.id')->orderBy('companies_user.name', $order); + } + public function preferredLocale(){ return $this->locale; } + + } diff --git a/app/Policies/LicensePolicy.php b/app/Policies/LicensePolicy.php index 2667b5e119..0fc097e4d8 100644 --- a/app/Policies/LicensePolicy.php +++ b/app/Policies/LicensePolicy.php @@ -12,16 +12,27 @@ class LicensePolicy extends CheckoutablePermissionsPolicy return 'licenses'; } - /** - * Determine whether the user can view license keys - * - * @param \App\Models\User $user - * @param \App\Models\License $license - * @return mixed - */ + /** + * Determine whether the user can view license keys. + * This gets a little tricky, UX/logic-wise. If a user has the ability + * to create a license (which requires a product key), shouldn't they + * have the ability to see the product key as well? + * + * Example: I create the license, realize I need to change + * something (maybe I got the product key wrong), and now I can never + * see/edit that product key. + * + * @see https://github.com/snipe/snipe-it/issues/6956 + * @param \App\Models\User $user + * @param \App\Models\License $license + * @return mixed + */ public function viewKeys(User $user, License $license = null) { - return $user->hasAccess('licenses.keys'); + if ($user->hasAccess('licenses.keys') || $user->hasAccess('licenses.create') || $user->hasAccess('licenses.edit')) { + return true; + } + return false; } } diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index 689a87201a..144ed4d75b 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -492,9 +492,13 @@ class AssetPresenter extends Presenter */ public function warrantee_expires() { - $date = date_create($this->purchase_date); - date_add($date, date_interval_create_from_date_string($this->warranty_months . ' months')); - return date_format($date, 'Y-m-d'); + if (($this->purchase_date) && ($this->warranty_months)) { + $date = date_create($this->purchase_date); + date_add($date, date_interval_create_from_date_string($this->warranty_months . ' months')); + return date_format($date, 'Y-m-d'); + } + + return false; } /** diff --git a/app/Providers/SettingsServiceProvider.php b/app/Providers/SettingsServiceProvider.php index bcdd5a49c4..e636846e32 100644 --- a/app/Providers/SettingsServiceProvider.php +++ b/app/Providers/SettingsServiceProvider.php @@ -118,6 +118,34 @@ class SettingsServiceProvider extends ServiceProvider return 'storage/public_uploads/companies/'; }); + // Accessories paths and URLs + \App::singleton('accessories_upload_path', function(){ + return public_path('/uploads/accessories/'); + }); + + \App::singleton('accessories_upload_url', function(){ + return url('/').'/uploads/accessories/'; + }); + + // Consumables paths and URLs + \App::singleton('consumables_upload_path', function(){ + return public_path('/uploads/consumables/'); + }); + + \App::singleton('consumables_upload_url', function(){ + return url('/').'/uploads/consumables/'; + }); + + + // Components paths and URLs + \App::singleton('components_upload_path', function(){ + return public_path('/uploads/components/'); + }); + + \App::singleton('components_upload_url', function(){ + return url('/').'/uploads/components/'; + }); + // Set the monetary locale to the configured locale to make helper::parseFloat work. diff --git a/composer.json b/composer.json index 027998a3c4..22ac3087c3 100644 --- a/composer.json +++ b/composer.json @@ -13,49 +13,50 @@ "ext-pdo": "*", "adldap2/adldap2": "^9.1", "bacon/bacon-qr-code": "^1.0", - "doctrine/cache": "^1.6", - "doctrine/common": "^2.7", - "doctrine/dbal": "^2.8.0", + "barryvdh/laravel-cors": "^0.11.3", + "barryvdh/laravel-debugbar": "^3.2", + "doctrine/cache": "^1.8", + "doctrine/common": "^2.10", + "doctrine/dbal": "^2.9.0", "doctrine/inflector": "1.3.*", - "doctrine/instantiator": "1.1.*", + "doctrine/instantiator": "^1.2", "eduardokum/laravel-mail-auto-embed": "^1.0", - "erusev/parsedown": "^1.6", - "fideloper/proxy": "~4.0", - "intervention/image": "^2.3", + "erusev/parsedown": "^1.7", + "fideloper/proxy": "^4.1", + "guzzlehttp/guzzle": "^6.3", + "intervention/image": "^2.4", "javiereguiluz/easyslugger": "^1.0", "laravel/framework": "5.7.*", - "laravel/passport": "~6.0", + "laravel/passport": ~6.0", "laravel/tinker": "^1.0", - "laravelcollective/html": "^5.3", - "league/csv": "^9.0", + "laravelcollective/html": "^5.5", + "league/csv": "^9.2", "league/flysystem-aws-s3-v3": "~1.0", "league/flysystem-cached-adapter": "^1.0", "league/flysystem-rackspace": "^1.0", - "league/flysystem-sftp": "~1.0", + "league/flysystem-sftp": "~1.0", "maknz/slack": "^1.7", "neitanod/forceutf8": "^2.0", "paragonie/constant_time_encoding": "^1.0", - "patchwork/utf8": "~1.2", + "patchwork/utf8": "^1.3", "phpdocumentor/reflection-docblock": "3.2.2", - "phpspec/prophecy": "1.7.5", + "phpspec/prophecy": "^1.8", "pragmarx/google2fa": "^5.0", - "pragmarx/google2fa-laravel": "^0.3.0", + "pragmarx/google2fa-laravel": "^1.0", "predis/predis": "^1.1", "rollbar/rollbar-laravel": "^4.0", "schuppo/password-strength": "~1.5", - "spatie/laravel-backup": "^5.6", + "spatie/laravel-backup": "^5.12",, "tecnickcom/tc-lib-barcode": "^1.15", - "tightenco/ziggy": "^0.6.3", + "tightenco/ziggy": "^0.7.1", "unicodeveloper/laravel-password": "^1.0", "watson/validating": "3.1.7" }, - "require-dev": { - "barryvdh/laravel-debugbar": "^3.2", - "barryvdh/laravel-ide-helper": "^2.6", + "require-dev": { "codeception/codeception": "^2.4", - "filp/whoops": "~2.0", "fzaninotto/faker": "~1.4", - "roave/security-advisories": "dev-master", + "phpunit/php-token-stream": "1.4.11", + "phpunit/phpunit": "~6.0", "squizlabs/php_codesniffer": "*", "symfony/css-selector": "4.0.*", "symfony/dom-crawler": "4.0.*" @@ -100,6 +101,7 @@ "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, + "process-timeout":3000, "platform": { "php": "7.1.3" } diff --git a/config/app.php b/config/app.php index bad512be5f..d8a0a57f0a 100755 --- a/config/app.php +++ b/config/app.php @@ -117,6 +117,54 @@ return [ 'cipher' => env('APP_CIPHER', 'AES-256-CBC'), + /* + |-------------------------------------------------------------------------- + | Logging Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure the log settings for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Settings: "single", "daily", "syslog", "errorlog" + | + */ + + 'log' => env('APP_LOG', 'single'), + + /* + |-------------------------------------------------------------------------- + | Logging Max Files + |-------------------------------------------------------------------------- + | + | When using the daily log mode, Laravel will only retain 5 + | days of log files by default. + | + | To change this, set the APP_LOG_MAX_FILES option in your .env. + | + */ + + 'log_max_files' => env('APP_LOG_MAX_FILES', 5), + + /* + |-------------------------------------------------------------------------- + | Logging Detail + |-------------------------------------------------------------------------- + | + | By default, Laravel writes all log levels to storage. However, in your + | production environment, you may wish to configure the minimum severity that + | should be logged by editing your APP_LOG_LEVEL env config. + | + | Laravel will log all levels greater than or equal to the specified severity. + | For example, a default log_level of error will log error, critical, alert, + | and emergency messages. + | + | APP_LOG_LEVEL options are: + | "debug", "info", "notice", "warning", "error", "critical", "alert", "emergency" + | + */ + + 'log_level' => env('APP_LOG_LEVEL', 'error'), /* @@ -250,7 +298,7 @@ return [ * Package Service Providers... */ - // Barryvdh\Debugbar\ServiceProvider::class, // should be auto-discovered + Barryvdh\Debugbar\ServiceProvider::class, Intervention\Image\ImageServiceProvider::class, Collective\Html\HtmlServiceProvider::class, Spatie\Backup\BackupServiceProvider::class, diff --git a/config/backup.php b/config/backup.php index 898f467ff2..f4d0f3b975 100644 --- a/config/backup.php +++ b/config/backup.php @@ -9,12 +9,27 @@ */ +// This is janky, but necessary to figure out whether to include the .env in the backup +$included_dirs = [ + base_path('public/uploads'), + base_path('config'), + base_path('storage/private_uploads'), + base_path('storage/oauth-private.key'), + base_path('storage/oauth-public.key'), + +]; + +if (env('BACKUP_ENV')=='true') { + $included_dirs[] = base_path('.env'); +} + return [ 'backup' => [ /* - * I don't know why they call it name - it's used in the path for uploads + * The name of this application. You can use this name to monitor + * the backups. */ 'name' => 'backups', @@ -25,12 +40,7 @@ return [ /* * The list of directories and files that will be included in the backup. */ - 'include' => [ - storage_path('oauth-private.key'), - storage_path('oauth-public.key'), - (env('BACKUP_ENV')=='true') ? base_path('.env') : base_path('.env.example'), - - ], + 'include' => $included_dirs, /* * These directories and files will be excluded from the backup. @@ -38,8 +48,8 @@ return [ * Directories used by the backup process will automatically be excluded. */ 'exclude' => [ - // base_path('vendor'), - // base_path('node_modules'), + base_path('vendor'), + base_path('node_modules'), ], /* @@ -51,6 +61,21 @@ return [ /* * The names of the connections to the databases that should be backed up * MySQL, PostgreSQL, SQLite and Mongo databases are supported. + * + * The content of the database dump may be customized for each connection + * by adding a 'dump' key to the connection settings in config/database.php. + * E.g. + * 'mysql' => [ + * ... + * 'dump' => [ + * 'excludeTables' => [ + * 'table_to_exclude_from_backup', + * 'another_table_to_exclude' + * ] + * ] + * ], + * + * For a complete list of available customization options, see https://github.com/spatie/db-dumper */ 'databases' => [ 'mysql', @@ -58,24 +83,37 @@ return [ ], /* - * The database dump can be gzipped to decrease diskspace usage. + * The database dump can be compressed to decrease diskspace usage. + * + * Out of the box Laravel-backup supplies + * Spatie\DbDumper\Compressors\GzipCompressor::class. + * + * You can also create custom compressor. More info on that here: + * https://github.com/spatie/db-dumper#using-compression + * + * If you do not want any compressor at all, set it to null. */ - 'gzip_database_dump' => true, + 'database_dump_compressor' => null, 'destination' => [ /* * The filename prefix used for the backup zip file. */ - 'filename_prefix' => 'snipe-it-backup-', + 'filename_prefix' => 'snipe-it-', /* * The disk names on which the backups will be stored. */ 'disks' => [ - env('FILESYSTEM_DISK'), + 'local', ], ], + + /* + * The directory where the temporary files will be stored. + */ + 'temporary_directory' => storage_path('app/backup-temp'), ], /* @@ -103,7 +141,7 @@ return [ 'notifiable' => \Spatie\Backup\Notifications\Notifiable::class, 'mail' => [ - 'to' => null, + 'to' => env('MAIL_BACKUP_NOTIFICATION_ADDRESS', null), ], 'slack' => [ @@ -113,6 +151,11 @@ return [ * If this is set to null the default channel of the webhook will be used. */ 'channel' => null, + + 'username' => null, + + 'icon' => null, + ], ], @@ -123,7 +166,7 @@ return [ */ 'monitorBackups' => [ [ - 'name' => env('APP_NAME'), + 'name' => config('app.name'), 'disks' => ['local'], 'newestBackupsShouldNotBeOlderThanDays' => 1, 'storageUsedMayNotBeHigherThanMegabytes' => 5000, @@ -186,4 +229,3 @@ return [ ], ], ]; - diff --git a/config/cors.php b/config/cors.php new file mode 100644 index 0000000000..0aa4b8cef4 --- /dev/null +++ b/config/cors.php @@ -0,0 +1,48 @@ + false, + 'allowedOrigins' => $allowed_origins, + 'allowedOriginsPatterns' => [], + 'allowedHeaders' => ['*'], + 'allowedMethods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], + 'exposedHeaders' => [], + 'maxAge' => 0, + +]; diff --git a/database/migrations/2012_12_06_225929_migration_cartalyst_sentry_install_groups.php b/database/migrations/2012_12_06_225929_migration_cartalyst_sentry_install_groups.php index 034a6a16d8..d929a62707 100644 --- a/database/migrations/2012_12_06_225929_migration_cartalyst_sentry_install_groups.php +++ b/database/migrations/2012_12_06_225929_migration_cartalyst_sentry_install_groups.php @@ -29,7 +29,7 @@ class MigrationCartalystSentryInstallGroups extends Migration { */ public function up() { - Schema::create('groups', function($table) + Schema::create('permission_groups', function($table) { $table->increments('id'); $table->string('name'); @@ -46,7 +46,7 @@ class MigrationCartalystSentryInstallGroups extends Migration { */ public function down() { - Schema::drop('groups'); + Schema::drop('permission_groups'); } } diff --git a/database/migrations/2014_11_04_231416_update_group_field_for_reporting.php b/database/migrations/2014_11_04_231416_update_group_field_for_reporting.php index 80b23f8124..248e26dde2 100644 --- a/database/migrations/2014_11_04_231416_update_group_field_for_reporting.php +++ b/database/migrations/2014_11_04_231416_update_group_field_for_reporting.php @@ -2,39 +2,44 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use App\Models\Group; class UpdateGroupFieldForReporting extends Migration { - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - // - // Schema::table('groups', function(Blueprint $table) - // { - // // - // }); + /** + * Run the migrations. + * + * @return void + */ + public function up() + { - DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"admin":1,"users":1,"reports":1}', 1]); + // This is janky because we had to do a back in time change to handle a MySQL 8+ + // compatibility issue. - DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"users":1,"reports":1}', 2]); + // Ideally we'd be using the model here, but since we can't really know whether this is an upgrade + // or a fresh install, we have to check which table is being used. + + if (Schema::hasTable('permission_groups')) { - // DB::statement('UPDATE '.$prefix.'groups SET permissions="{\"admin\":1,\"users\":1,\"reports\":1}" where id=1'); - // DB::statement('UPDATE '.$prefix.'groups SET permissions="{\"users\":1,\"reports\":1}" where id=2'); + Group::where('id', 1)->update(['permissions' => '{"users-poop":1,"reports":1}']); + Group::where('id', 2)->update(['permissions' => '{"users-pop":1,"reports":1}']); - } + } elseif (Schema::hasTable('groups')) { + DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"admin-farts":1,"users":1,"reports":1}', 1]); + DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"users-farts":1,"reports":1}', 2]); + } - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - // - } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } } diff --git a/database/migrations/2019_06_12_184327_rename_groups_table.php b/database/migrations/2019_06_12_184327_rename_groups_table.php new file mode 100644 index 0000000000..3c50971614 --- /dev/null +++ b/database/migrations/2019_06_12_184327_rename_groups_table.php @@ -0,0 +1,44 @@ +=0.18.1", "babel-preset-latest": "^6.24.1", "cross-env": "^5.0.5", "jquery": "^3.1.1", diff --git a/public/js/build/all.js b/public/js/build/all.js index 116840800b..ad10edb1d7 100644 Binary files a/public/js/build/all.js and b/public/js/build/all.js differ diff --git a/public/js/dist/all.js b/public/js/dist/all.js index cb8780018e..cd667c50c7 100644 Binary files a/public/js/dist/all.js and b/public/js/dist/all.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index af3abf3d08..888f9a782f 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,17 +1,14 @@ { - "/js/app.js": "/js/app.js?id=fe7b07afde38e7f94c81", - "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=f7a5d783fef321018f4c", - "/css/build/app.css": "/css/build/app.css?id=0dfc05b0fe1dcc9b6e3d", - "/css/all.css": "/css/all.css?id=9399418f7ce5805e3571", - "/css/blue.png": "/css/blue.png?id=4c85d6a97173123bd14a", - "/css/blue@2x.png": "/css/blue@2x.png?id=62c67c6a822439e8a4ac", - "/css/skins/skin-green-dark.min.css": "/css/skins/skin-green-dark.min.css?id=1039ae0e198a7f3d8da7", - "/css/skins/skin-orange-dark.min.css": "/css/skins/skin-orange-dark.min.css?id=9a461970f7ab07f40847", - "/css/skins/skin-red-dark.min.css": "/css/skins/skin-red-dark.min.css?id=99f90bbd653d7db10795", - "/css/signature-pad.css": "/css/signature-pad.css?id=6a89d3cd901305e66ced", - "/css/signature-pad.min.css": "/css/signature-pad.min.css?id=6a89d3cd901305e66ced", - "/js/vendor.js": "/js/vendor.js?id=8bf903b80600aa42a9cb", - "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=bc5e33610f678021cc48", - "/js/dist/bootstrap-table-simple-view.js": "/js/dist/bootstrap-table-simple-view.js?id=3926b8f4aaad6ca20d31", - "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=6b4ccfd094c065f065ae" + "/js/build/vue.js": "/js/build/vue.js?id=96f90510b797ac27a94b", + "/css/AdminLTE.css": "/css/AdminLTE.css?id=5e72463a66acbcc740d5", + "/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405", + "/css/overrides.css": "/css/overrides.css?id=2d81c3704393bac77011", + "/js/build/vue.js.map": "/js/build/vue.js.map?id=423f16f63b86abd6b196", + "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=0be7790b84909dca6a0a", + "/css/app.css.map": "/css/app.css.map?id=96b5c985e860716e6a16", + "/css/overrides.css.map": "/css/overrides.css.map?id=f7ce9ca49027594ac402", + "/css/dist/all.css": "/css/dist/all.css?id=98db4e9b7650453c8b00", + "/js/dist/all.js": "/js/dist/all.js?id=114f1025a1b3e8975476", + "/css/build/all.css": "/css/build/all.css?id=98db4e9b7650453c8b00", + "/js/build/all.js": "/js/build/all.js?id=114f1025a1b3e8975476" } diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index ae22d560d9..d8486ce5c2 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -73,7 +73,7 @@ pieOptions = { //- END PIE CHART - //----------------- - +var baseUrl = $('meta[name="baseUrl"]').attr('content'); (function($, settings) { var Components = {}; @@ -126,7 +126,6 @@ $(document).ready(function () { * Slideout help menu */ $('.slideout-menu-toggle').on('click', function(event){ - console.log('clicked'); event.preventDefault(); // create menu variables var slideoutMenu = $('.slideout-menu'); diff --git a/resources/assets/js/snipeit_modals.js b/resources/assets/js/snipeit_modals.js index 30791ce425..f937851511 100644 --- a/resources/assets/js/snipeit_modals.js +++ b/resources/assets/js/snipeit_modals.js @@ -179,5 +179,8 @@ function formatDatalist (datalist) { } function formatDataSelection (datalist) { - return datalist.text; + return datalist.text.replace(/>/g, '>') + .replace(/ 'Please click on the following link to confirm your :web account:', 'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.', 'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.', - 'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.', - 'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.', - 'Confirm_accessory_delivery' => 'Confirm accessory delivery.', - 'Confirm_license_delivery' => 'Confirm license delivery.', - 'Confirm_asset_delivery' => 'Confirm asset delivery.', - 'Confirm_consumable_delivery' => 'Confirm consumable delivery.', + 'Confirm_Asset_Checkin' => 'Asset checkin confirmation', + 'Confirm_Accessory_Checkin' => 'Accessory checkin confirmation', + 'Confirm_accessory_delivery' => 'Accessory delivery confirmation', + 'Confirm_license_delivery' => 'License delivery confirmation', + 'Confirm_asset_delivery' => 'Asset delivery confirmation', + 'Confirm_consumable_delivery' => 'Consumable delivery confirmation', 'current_QTY' => 'Current QTY', 'Days' => 'Days', 'days' => 'Days', diff --git a/resources/lang/es-MX/admin/settings/general.php b/resources/lang/es-MX/admin/settings/general.php index 6ce3ff80f3..b6a04d0d73 100644 --- a/resources/lang/es-MX/admin/settings/general.php +++ b/resources/lang/es-MX/admin/settings/general.php @@ -86,10 +86,10 @@ return array( 'login_common_disabled_text' => 'Deshabilitar otros mecanismos de autenticación', 'login_common_disabled_help' => 'Esta opción desactiva otros mecanismos de autenticación. Simplemente habilite esta opción si está seguro de que su inicio de sesión REMOTE_USER ya está funcionando', 'login_remote_user_custom_logout_url_text' => 'URL de cierre de sesión personalizado', - 'login_remote_user_custom_logout_url_help' => 'Si se proporciona una url aquí, los usuarios serán redirigidos a esta URL después de que el usuario cierre la sesión de Snipe-IT. Esto es útil para cerrar correctamente las sesiones de usuario de su proveedor de autenticación.', + 'login_remote_user_custom_logout_url_help' => 'Sí se especifica un URL, los usuarios serán redireccionados a este URL una vez que cierren sesión en Snipe-TI. Esto es útil para cerrar sesiones de usuario de su Authentication Provider de forma correcta.', 'logo' => 'Logo', - 'logo_print_assets' => 'Utilizar en impresión', - 'logo_print_assets_help' => 'Utilice la marca en las listas de activos imprimibles ', + 'logo_print_assets' => 'Usar en Impresión', + 'logo_print_assets_help' => 'Usar marca en la lista imprimible de equipos', 'full_multiple_companies_support_help_text' => 'Usuarios restringidos (incluidos administradores) asignados a compañías de sus bienes de compañía.', 'full_multiple_companies_support_text' => 'Soporte completo múltiple de compañías', 'show_in_model_list' => 'Mostrar en Desplegado de Modelos', @@ -124,8 +124,8 @@ return array( 'snipe_version' => 'Version de Snipe-IT', 'support_footer' => 'Enlaces de Soporte de Pie de Página ', 'support_footer_help' => 'Especifica quien ve los enlaces de información de Soporte y Manual de Usuarios de Snipe-IT', - 'version_footer' => 'Version in Footer ', - 'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.', + 'version_footer' => 'Versión en pie de página ', + 'version_footer_help' => 'Especificar quién ve la versión Snipe-IT y el número de compilación.', 'system' => 'Información del Sistema', 'update' => 'Actualizar Parámetros', 'value' => 'Valor', @@ -181,7 +181,7 @@ return array( 'bottom' => 'fondo', 'vertical' => 'vertical', 'horizontal' => 'horizontal', - 'unique_serial' => 'Unique serial numbers', - 'unique_serial_help_text' => 'Checking this box will enforce a uniqueness constraint on asset serials', + 'unique_serial' => 'Números de serie únicos', + 'unique_serial_help_text' => 'Al marcar esta casilla se aplicará una restricción única en los seriales de los equipos', 'zerofill_count' => 'Longitud de etiquetas de activos, incluyendo relleno de ceros', ); diff --git a/resources/lang/es-MX/admin/users/general.php b/resources/lang/es-MX/admin/users/general.php index a4f36bdb30..1c4f8542b4 100644 --- a/resources/lang/es-MX/admin/users/general.php +++ b/resources/lang/es-MX/admin/users/general.php @@ -2,8 +2,8 @@ return array( - 'activated_help_text' => 'Este usuario puede ingresar', - 'activated_disabled_help_text' => 'No puedes editar el estado de activación de tu propia cuenta.', + 'activated_help_text' => 'Este usuario puede iniciar sesión', + 'activated_disabled_help_text' => 'No puedes editar el estado de activación para tu propia cuenta.', 'assets_user' => 'Equipos asignados a :name', 'bulk_update_warn' => 'Estás a punto de modificar las propiedades de :user_count usuarios. Por favor, ten en cuenta que no puedes modificar las propiedades de tu propio usuario con este formulario, y debes realizar las modificaciones a tu propio usuario de forma individual.', 'bulk_update_help' => 'Este formulario permite actualizar múltiples usuarios simultáneamente. Rellena únicamente los campos que necesites cambiar. Cualquier campo que quede en blanco no se actualizará.', diff --git a/resources/lang/es-MX/general.php b/resources/lang/es-MX/general.php index bfcd3fd0a0..7089ba749b 100644 --- a/resources/lang/es-MX/general.php +++ b/resources/lang/es-MX/general.php @@ -206,7 +206,7 @@ 'unknown_admin' => 'Admin Desconocido', 'username_format' => 'Formato del nombre de usuario', 'update' => 'Actualizar', - 'upload_filetypes_help' => 'Algunos tipos de archivos permitidos son png, gif, jpg, jpeg, doc, docx, pdf, xls, txt, lic, zip, rtf y rar. Tamaño máximo permitido: :size.', + 'upload_filetypes_help' => 'Tipos de archivo permitidos son png, gif, jpg, jpeg, doc, docx, pdf, xls, txt, lic, zip y rar. Tamaño máximo de carga permitido es: tamaño.', 'uploaded' => 'Subido', 'user' => 'Usuario', 'accepted' => 'aceptado', diff --git a/resources/lang/es-MX/mail.php b/resources/lang/es-MX/mail.php index 9ce04a11c1..d99717c610 100644 --- a/resources/lang/es-MX/mail.php +++ b/resources/lang/es-MX/mail.php @@ -58,8 +58,8 @@ return array( 'test_email' => 'Email de prueba de Snipe-IT', 'test_mail_text' => 'Esto es una prueba desde el sistema de gestión de activos de Snipe-IT. Si tienes esto, correo está funcionando :)', 'the_following_item' => 'El siguiente artículo ha sido devuelto: ', - 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', - 'assets_warrantee_alert' => 'There is :count asset with a warrantee expiring in the next :threshold days.|There are :count assets with warrantees expiring in the next :threshold days.', + 'low_inventory_alert' => 'Hay :count item por debajo del inventario mínimo o próximo a bajar.|Hay are :count elementos por debajo del inventario mínimo o próximos a bajar.', + 'assets_warrantee_alert' => 'Hay :count asiento de licencia que expira en los próximos :threshold días. | Hay :count asientos de licencias que expiran en los próximos :threshold días.', 'license_expiring_alert' => 'Hay :count licencia que expira en los próximos :threshold días. | Hay :count licencias que expiran en los próximos :threshold días.', 'to_reset' => 'Para restaurar tu contraseña de :web, rellena este formulario:', 'type' => 'Tipo', diff --git a/resources/lang/fa/admin/categories/general.php b/resources/lang/fa/admin/categories/general.php index 57ef271889..6caa55c824 100644 --- a/resources/lang/fa/admin/categories/general.php +++ b/resources/lang/fa/admin/categories/general.php @@ -5,8 +5,8 @@ return array( 'about_categories' => 'دستهها به شما کمک می کنند که موارد خود را سازماندهی کنید. بعضی از دسته های مثال ممکن است "Desktops"، "Laptops"، " تلفنهای موبایل"، "Tablets" و غیره باشد، اما شما می توانید از هر نوع دسته ای استفاده کنید که برای شما مناسب است.', 'asset_categories' => 'دسته بندی های دارایی', 'category_name' => 'نام دسته بندی', - 'checkin_email' => 'Send email to user on checkin/checkout.', - 'checkin_email_notification' => 'This user will be sent an email on checkin/checkout.', + 'checkin_email' => 'ارسال ایمیل به کاربر در تحویل و استرداد.', + 'checkin_email_notification' => 'به این کاربر در تحویل و استرداد ایمیل ارسال خواهد شد.', 'clone' => 'دسته بندی کلون', 'create' => 'ایجاد دسته جدید', 'edit' => 'ویرایش دسته‌ بندی', diff --git a/resources/lang/fa/admin/hardware/general.php b/resources/lang/fa/admin/hardware/general.php index 22a1a77b4e..ccd54537c8 100644 --- a/resources/lang/fa/admin/hardware/general.php +++ b/resources/lang/fa/admin/hardware/general.php @@ -5,7 +5,7 @@ return array( 'about_assets_text' => 'دارایی ها مواردی هستند که توسط شماره سریال یا برچسب دارایی دنبال می شوند. آنها تمایل دارند که مقادیر ارزش بیشتری داشته باشند که در آن شناسایی یک مورد خاص موردنیاز باشد.', 'archived' => 'بایگانی شد', 'asset' => 'دارایی', - 'bulk_checkout' => 'Checkout Assets', + 'bulk_checkout' => 'خروج دارایی ها', 'checkin' => 'دارایی checkin', 'checkout' => 'دارایی پرداخت', 'clone' => 'دارایی شگرف', diff --git a/resources/lang/fa/admin/hardware/message.php b/resources/lang/fa/admin/hardware/message.php index 65516c7265..3754e0baa7 100644 --- a/resources/lang/fa/admin/hardware/message.php +++ b/resources/lang/fa/admin/hardware/message.php @@ -62,7 +62,7 @@ return array( 'success' => 'دارایی را بررسی کنید موفقیت.', 'user_does_not_exist' => 'کاربر نامعتبر است لطفا دوباره امتحان کنید.', 'not_available' => 'این دارایی برای پرداخت در دسترس نیست!', - 'no_assets_selected' => 'You must select at least one asset from the list' + 'no_assets_selected' => 'شما حداقل باید یک دارایی از لیست انتخاب کنید' ), 'checkin' => array( diff --git a/resources/lang/fa/mail.php b/resources/lang/fa/mail.php index 01e7836ce2..e92710db54 100644 --- a/resources/lang/fa/mail.php +++ b/resources/lang/fa/mail.php @@ -21,7 +21,7 @@ return array( 'Confirm_Asset_Checkin' => 'تأیید بازرسی دارایی', 'Confirm_Accessory_Checkin' => 'تأیید تأیید تأیید', 'Confirm_accessory_delivery' => 'تأیید تحویل کالا', - 'Confirm_license_delivery' => 'Confirm license delivery.', + 'Confirm_license_delivery' => 'تأیید تحویل سریال.', 'Confirm_asset_delivery' => 'تأیید تحویل دارایی', 'Confirm_consumable_delivery' => 'تأیید تحویل قابل مصرف', 'current_QTY' => 'QTY فعلی', @@ -52,7 +52,7 @@ return array( 'requested' => 'درخواست شده:', 'reset_link' => 'رمز عبور خود را بازنشانی کنید', 'reset_password' => 'برای تغییر رمز عبور اینجا کلیک کنید:', - 'serial' => 'Serial', + 'serial' => 'سریال', 'supplier' => 'تامین کننده', 'tag' => 'برچسب', 'test_email' => 'ایمیل تست از Snipe-IT', @@ -63,8 +63,8 @@ return array( 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'to_reset' => 'برای بازنشانی: رمز عبور وب، این فرم را تکمیل کنید:', 'type' => 'تایپ کنید', - 'user' => 'User', - 'username' => 'Username', + 'user' => 'کاربر', + 'username' => 'نام کاربری', 'welcome' => 'خوش آمدید نام', 'welcome_to' => 'به وب سایت خوش آمدید', 'your_credentials' => 'مدارک Snipe-IT شما', diff --git a/resources/lang/fa/passwords.php b/resources/lang/fa/passwords.php index 4bab9cc886..a8cbcbfba4 100644 --- a/resources/lang/fa/passwords.php +++ b/resources/lang/fa/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'لینک رمز عبور شما ارسال شده است!', - 'user' => 'No matching active user found with that email.', + 'user' => 'هیچ کاربر فعالی با این آدرس ایمیل یافت نشد.', ]; diff --git a/resources/lang/fr/admin/categories/general.php b/resources/lang/fr/admin/categories/general.php index d6d3e4b4e0..14706e6e7c 100644 --- a/resources/lang/fr/admin/categories/general.php +++ b/resources/lang/fr/admin/categories/general.php @@ -5,8 +5,8 @@ return array( 'about_categories' => 'Les catégories vous aident à organiser vos items. Des exemples de catégories peuvent être "Ordinateurs de bureau", "Ordinateurs portables", "Téléphones portables", "Tablettes", etc..., mais vous pouvez utiliser les catégories comme cela vous convient.', 'asset_categories' => 'Catégories', 'category_name' => 'Catégorie', - 'checkin_email' => 'Send email to user on checkin/checkout.', - 'checkin_email_notification' => 'This user will be sent an email on checkin/checkout.', + 'checkin_email' => 'Envoyer un courriel à l\'utilisateur lors de l\'association/dissociation.', + 'checkin_email_notification' => 'Un courriel sera envoyé à l\'utilisateur lors de l\'association/dissociation.', 'clone' => 'Cloner la catégorie', 'create' => 'Créer Catégorie', 'edit' => 'Modifier la catégorie', diff --git a/resources/lang/fr/admin/settings/general.php b/resources/lang/fr/admin/settings/general.php index e22d510cd1..42e7c90390 100644 --- a/resources/lang/fr/admin/settings/general.php +++ b/resources/lang/fr/admin/settings/general.php @@ -5,7 +5,7 @@ return array( 'ad_domain' => 'Domaine du service d\'annuaire', 'ad_domain_help' => 'C\'est parfois le même que votre domaine d\'e-mail, mais pas toujours.', 'admin_cc_email' => 'CC Email', - 'admin_cc_email_help' => 'If you would like to send a copy of checkin/checkout emails that are sent to users to an additional email account, enter it here. Otherwise leave this field blank.', + 'admin_cc_email_help' => 'Si vous souhaitez envoyer une copie des courriels d\'association/dissociation qui sont envoyés aux utilisateurs à un compte de messagerie supplémentaire, entrez-le ici. Sinon, laissez ce champ vide.', 'is_ad' => 'C\'est un serveur Active Directory', 'alert_email' => 'Envoyer les alertes à', 'alerts_enabled' => 'Alertes activées', @@ -26,9 +26,9 @@ return array( 'custom_css' => 'CSS personnalisé', 'custom_css_help' => 'Entrez les codes CSS personnalisé que vous souhaitez utiliser . Ne pas inclure les balises <style></style>.', 'custom_forgot_pass_url' => 'URL personnalisé de réinitialisation du mot de passe', - 'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.', + 'custom_forgot_pass_url_help' => 'Ceci remplace l\'URL de mot de passe intégré oublié sur la page d\'accueil, utile pour rediriger les utilisateurs vers la fonctionnalité de réinitialisation de mot de passe interne ou de serveur LDAP. Cela va désactiver la fonctionnalité du mot de passe oublié au niveau local.', 'dashboard_message' => 'Message du tableau de bord', - 'dashboard_message_help' => 'This text will appear on the dashboard for anyone with permission to view the dashboard.', + 'dashboard_message_help' => 'Ce texte apparaît sur le tableau de bord pour toute personne ayant le droit de le voir.', 'default_currency' => 'Devise par défaut', 'default_eula_text' => 'Licence d\'utilisation par défaut', 'default_language' => 'Langue par défaut', @@ -43,7 +43,7 @@ return array( 'eula_settings' => 'Configuration pour les licences d\'utilisation', 'eula_markdown' => 'Cette licence d\'utilisation permet l\'utilisation des "Github flavored markdown".', 'footer_text' => 'Texte supplémentaire en pied de page ', - 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', + 'footer_text_help' => 'Ce texte apparaîtra dans le pied de page de droitre. Les liens sont autorisés en utilisant Github flavored markdown. Les sauts de ligne, les en-têtes, les images, etc. peuvent entraîner des résultats imprévisibles.', 'general_settings' => 'Configuration générale', 'generate_backup' => 'Générer une sauvegarde', 'header_color' => 'Couleur de l\'en-tête', @@ -52,8 +52,8 @@ return array( 'ldap_enabled' => 'LDAP activé', 'ldap_integration' => 'Intégration LDAP', 'ldap_settings' => 'Paramètres LDAP', - 'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', - 'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', + 'ldap_login_test_help' => 'Entrez un nom d\'utilisateur et mot de passe LDAP valide depuis la base DN que vous avez spécifié ci-dessus afin de tester si votre configuration LDAP est correcte. VOUS DEVEZ D\'ABORD ENREGISTRER VOS PARAMÈTRES LDAP MIS À JOUR.', + 'ldap_login_sync_help' => 'Ceci vérifie uniquement que LDAP se synchronise correctement. Si votre requête d\'authentification LDAP est incorrecte, les utilisateurs peuvent ne pas pouvoir se connecter. VOUS DEVEZ D\'ABORD ENREGISTRER VOS PARAMÈTRES LDAP MIS À JOUR.', 'ldap_server' => 'Serveur LDAP', 'ldap_server_help' => 'Ca devrait commencer par ldap:// (non crypté ou TLS) ou ldaps:// (SSL)', 'ldap_server_cert' => 'Validation du certificat SSL LDAP', @@ -81,18 +81,18 @@ return array( 'login_note' => 'Note de connexion', 'login_note_help' => 'Ajoutez éventuellement quelques phrases sur votre écran de connexion, par exemple pour aider les personnes ayant trouvé un appareil perdu ou volé. Ce champ accepte Github aromatisé markdown', 'login_remote_user_text' => 'Options de connexion de l\'utilisateur à distance', - 'login_remote_user_enabled_text' => 'Enable Login with Remote User Header', - 'login_remote_user_enabled_help' => 'This option enables Authentication via the REMOTE_USER header according to the "Common Gateway Interface (rfc3875)"', - 'login_common_disabled_text' => 'Disable other authentication mechanisms', - 'login_common_disabled_help' => 'This option disables other authentication mechanisms. Just enable this option if you are sure that your REMOTE_USER login is already working', + 'login_remote_user_enabled_text' => 'Activer la connexion avec l\'en-tête utilisateur distant', + 'login_remote_user_enabled_help' => 'Cette option active l\'authentification via l\'en-tête REMOTE_USER selon l\'interface "Common Gateway Interface" (rfc3875)"', + 'login_common_disabled_text' => 'Désactiver les autres mécanismes d\'authentification', + 'login_common_disabled_help' => 'Cette option désactive les autres mécanismes d\'authentification. N\'activez cette option que si vous êtes sûr que votre login REMOTE_USER fonctionne déjà', 'login_remote_user_custom_logout_url_text' => 'URL personnalisé de déconnexion', - 'login_remote_user_custom_logout_url_help' => 'If a url is provided here, users will get redirected to this URL after the user logs out of Snipe-IT. This is useful to close the user sessions of your Authentication provider correctly.', + 'login_remote_user_custom_logout_url_help' => 'Si une URL est spécifiée ici, les utilisateurs seront redirigés vers cette URL après la déconnexion de Snipe-IT. Ceci est utile pour fermer correctement les sessions utilisateur de votre fournisseur d\'authentification.', 'logo' => 'Logo', - 'logo_print_assets' => 'Use in Print', - 'logo_print_assets_help' => 'Use branding on printable asset lists ', + 'logo_print_assets' => 'Utiliser dans les impressions', + 'logo_print_assets_help' => 'Utiliser la marque dans les listes imprimables des actifs ', 'full_multiple_companies_support_help_text' => 'Restreindre les utilisateurs (admins compris) assignés à des organisations aux biens de leur propre organisation.', 'full_multiple_companies_support_text' => 'Support complet des organisations multiples', - 'show_in_model_list' => 'Show in Model Dropdowns', + 'show_in_model_list' => 'Afficher dans la liste déroulante des modèles', 'optional' => 'facultatif', 'per_page' => 'Résultats par page', 'php' => 'Version de PHP', @@ -108,24 +108,24 @@ return array( 'qr_text' => 'Texte du QR Code', 'setting' => 'Paramètre', 'settings' => 'Paramètres', - 'show_alerts_in_menu' => 'Show alerts in top menu', - 'show_archived_in_list' => 'Archived Assets', - 'show_archived_in_list_text' => 'Show archived assets in the "all assets" listing', - 'show_images_in_email' => 'Show images in emails', - 'show_images_in_email_help' => 'Uncheck this box if your Snipe-IT installation is behind a VPN or closed network and users outside the network will not be able to load images served from this installation in their emails.', + 'show_alerts_in_menu' => 'Afficher les alertes dans le menu du haut', + 'show_archived_in_list' => 'Actifs archivés', + 'show_archived_in_list_text' => 'Afficher les actifs archivés dans la liste "Tous les actifs"', + 'show_images_in_email' => 'Afficher les images dans les courriels', + 'show_images_in_email_help' => 'Décocher cette case si votre installation de Snipe-IT est derrière un VPN ou un réseau fermé et que les utilisateurs en dehors du réseau ne peuvent pas charger les images servies depuis cette installation dans leurs courriels.', 'site_name' => 'Nom du site', 'slack_botname' => 'Slack Botname', 'slack_channel' => 'Slack Channel', 'slack_endpoint' => 'Slack Endpoint', 'slack_integration' => 'Configuration "Slack"', 'slack_integration_help' => 'L\'intégration de Slack est facultative, mai le "endpoint" et le "channel" sont nécessaires pour son utilisation. Pour configurer l\'intégration Slack, vous devez d\'abord créer un "incoming webhook" dans votre compte Slack.', - 'slack_integration_help_button' => 'Once you have saved your Slack information, a test button will appear.', - 'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.', + 'slack_integration_help_button' => 'Une fois que vous avez enregistré vos informations Slack, un bouton de test apparaîtra.', + 'slack_test_help' => 'Testez si votre intégration Slack est correctement configurée. VOUS DEVEZ D\'ABORD ENREGISTRER LES PARAMÈTRES DE SLACK MIS À JOUR.', 'snipe_version' => 'Version de Snipe-IT', - 'support_footer' => 'Support Footer Links ', - 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', - 'version_footer' => 'Version in Footer ', - 'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.', + 'support_footer' => 'Support des liens de pied de page ', + 'support_footer_help' => 'Spécifiez qui voit les liens vers les manuels de support utilisateur Snipe-IT', + 'version_footer' => 'Version en pied de page ', + 'version_footer_help' => 'Spécifiez qui peut voir la version de Snipe-IT.', 'system' => 'Information du système', 'update' => 'Mettre à jour les paramètres', 'value' => 'Valeur', @@ -136,9 +136,9 @@ return array( 'label_dimensions' => 'Dimensions de l\'étiquette (en pouces)', 'next_auto_tag_base' => 'Incrément automatique suivant', 'page_padding' => 'Marges de la page (en pouces)', - 'privacy_policy_link' => 'Link to Privacy Policy', - 'privacy_policy' => 'Privacy Policy', - 'privacy_policy_link_help' => 'If a url is included here, a link to your privacy policy will be included in the app footer and in any emails that the system sends out, in compliance with GDPR. ', + 'privacy_policy_link' => 'Lien vers la politique de confidentialité', + 'privacy_policy' => 'Politique de confidentialité', + 'privacy_policy_link_help' => 'Si une url est incluse ici, un lien vers votre politique de confidentialité sera inclus dans le pied de page de l\'application et dans tous les courriels que le système envoie, conformément au RGPD. ', 'purge' => 'Purger les enregistrements supprimés', 'labels_display_bgutter' => 'Etiquette de la gouttière du bas', 'labels_display_sgutter' => 'Etiquette de la gouttière latérale', @@ -181,7 +181,7 @@ return array( 'bottom' => 'bas', 'vertical' => 'veritcal', 'horizontal' => 'horizontal', - 'unique_serial' => 'Unique serial numbers', - 'unique_serial_help_text' => 'Checking this box will enforce a uniqueness constraint on asset serials', + 'unique_serial' => 'Numéros de série uniques', + 'unique_serial_help_text' => 'Cocher cette case forcera une contrainte d\'unicité sur les identifiants d\'actif', 'zerofill_count' => 'Longueur des étiquettes de bien, incluant le remplissage de zéros', ); diff --git a/resources/lang/fr/admin/statuslabels/table.php b/resources/lang/fr/admin/statuslabels/table.php index 272ccce9e0..0ef604e3b5 100644 --- a/resources/lang/fr/admin/statuslabels/table.php +++ b/resources/lang/fr/admin/statuslabels/table.php @@ -6,7 +6,7 @@ return array( 'create' => 'Créé une étiquette de statut', 'color' => 'Couleur du graphique', 'default_label' => 'Libellé par défaut', - 'default_label_help' => 'This is used to ensure your most commonly used status labels appear at the top of the select box when creating/editing assets.', + 'default_label_help' => 'Ceci est utilisé pour s\'assurer que vos étiquettes de statut les plus couramment utilisées apparaissent en haut de la case de sélection lors de la création/l\'édition des actifs.', 'deployable' => 'Déployable', 'info' => 'Les étiquettes d\'état sont utilisés pour décrire les différents états de vos actifs. Ils peuvent être pour réparation , perdu / volé , etc. Vous pouvez créer de nouvelles étiquettes d\'état pour déployable , en attente et actifs retirés.', 'name' => 'Nom du statut', diff --git a/resources/lang/fr/general.php b/resources/lang/fr/general.php index 31b5999898..726b7af04f 100644 --- a/resources/lang/fr/general.php +++ b/resources/lang/fr/general.php @@ -39,8 +39,8 @@ 'checkin' => 'Dissocier', 'checkin_from' => 'Dissocier de', 'checkout' => 'Associer', - 'checkouts_count' => 'Checkouts', - 'checkins_count' => 'Checkins', + 'checkouts_count' => 'Associations', + 'checkins_count' => 'Dissociations', 'user_requests_count' => 'Demandes', 'city' => 'Ville', 'click_here' => 'Cliquez ici', @@ -94,7 +94,7 @@ 'file_name' => 'Fichier', 'file_uploads' => 'Uploads de fichiers', 'generate' => 'Générer', - 'github_markdown' => 'This field accepts Github flavored markdown.', + 'github_markdown' => 'Ce champ accepte Github flavored markdown.', 'groups' => 'Groupes', 'gravatar_email' => 'E-mail adresse Gravatar', 'history' => 'Historique', @@ -103,7 +103,7 @@ 'image' => 'Image', 'image_delete' => 'Supprimer l\'image', 'image_upload' => 'Charger une image', - 'image_filetypes_help' => 'Accepted filetypes are jpg, png, gif, and svg. Max upload size allowed is :size.', + 'image_filetypes_help' => 'Les types de fichiers acceptés sont jpg, png, gif et svg. La taille maximale autorisée est :size.', 'import' => 'Importer', 'import-history' => 'Importer l\'historique', 'asset_maintenance' => 'Gestion des actifs', @@ -185,7 +185,7 @@ 'show_current' => 'Show Current', 'sign_in' => 'Connexion', 'signature' => 'Signature', - 'skin' => 'Skin', + 'skin' => 'Habillage', 'some_features_disabled' => 'MODE DEMO: Certaines fonctionnalités sont désactivées pour cette installation.', 'site_name' => 'Nom du Site', 'state' => 'État', diff --git a/resources/lang/fr/mail.php b/resources/lang/fr/mail.php index 2b986b680c..0efd59c0fb 100644 --- a/resources/lang/fr/mail.php +++ b/resources/lang/fr/mail.php @@ -58,9 +58,9 @@ return array( 'test_email' => 'Email test de Snipe-IT', 'test_mail_text' => 'Il s\'agit d\'un test du système de gestion d\'actifs Snipe-IT. Si vous avez obtenu cela, le courrier fonctionne :)', 'the_following_item' => 'L\'élément suivant a été enregistré : ', - 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', - 'assets_warrantee_alert' => 'There is :count asset with a warrantee expiring in the next :threshold days.|There are :count assets with warrantees expiring in the next :threshold days.', - 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', + 'low_inventory_alert' => 'Il y a :count item qui est en dessous du minimum d\'inventaire ou qui sera bas sous peu.|Il y a :count articles qui sont en dessous du minimum d\'inventaire ou qui seront bas sous peu.', + 'assets_warrantee_alert' => 'Il y a :count actifs avec une garantie expirant dans les prochains :threshold jours.|Il y a :count actifs avec des garanties expirant dans les prochains :threshold jours.', + 'license_expiring_alert' => 'Il y a :count licence expirant dans les prochains :threshold jours.|Il y a :count licences expirant dans les prochains :threshold jours.', 'to_reset' => 'Pour réinitialiser votre mot de passe :web, complétez ce formulaire:', 'type' => 'Type ', 'user' => 'Utilisateur', diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php index 1fa34758ee..5c8c96b70e 100644 --- a/resources/lang/fr/passwords.php +++ b/resources/lang/fr/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'Le lien vers votre mot de passe a bien été envoyé!', - 'user' => 'No matching active user found with that email.', + 'user' => 'Aucun utilisateur actif correspondant trouvé avec ce courriel.', ]; diff --git a/resources/lang/hu/admin/categories/general.php b/resources/lang/hu/admin/categories/general.php index 81dafb97a3..2c441f63a3 100644 --- a/resources/lang/hu/admin/categories/general.php +++ b/resources/lang/hu/admin/categories/general.php @@ -5,8 +5,8 @@ return array( 'about_categories' => 'A kategóriák segítenek rendezni a dolgait. Néhány példa kategória lehet "Desktop-ok", "Laptopok", "Mobiltelefonok", "Tabletek", és így tovább, de bármilyen más kategóriát használhat, ami releváns önnek.', 'asset_categories' => 'Eszköz kategóriák', 'category_name' => 'Kategória név', - 'checkin_email' => 'E-mail küldés a felhasználónak, eszköz kiadás / visszavétel esetén.', - 'checkin_email_notification' => 'Ez afelhasználó e-mailben lesz értesítve eszköz kiadás / visszavétel esetén.', + 'checkin_email' => 'E-mail küldése a felhasználónak, eszköz kiadás / visszavétel esetén.', + 'checkin_email_notification' => 'Ez a felhasználó e-mailben lesz értesítve eszköz kiadás / visszavétel esetén.', 'clone' => 'Kategória klónozása', 'create' => 'Kategória létrehozása', 'edit' => 'Kategória szerkesztése', diff --git a/resources/lang/ja/admin/settings/general.php b/resources/lang/ja/admin/settings/general.php index dc8cb861b8..e353b2b316 100644 --- a/resources/lang/ja/admin/settings/general.php +++ b/resources/lang/ja/admin/settings/general.php @@ -89,8 +89,8 @@ return array( 'login_remote_user_custom_logout_url_help' => 'ユーザがログアウトした場合、このURLにリダイレクトします。 これは認証プロバイダのセッションを正しく終了させる場合に便利です。', 'logo' => 'ロゴ', - 'logo_print_assets' => 'Use in Print', - 'logo_print_assets_help' => 'Use branding on printable asset lists ', + 'logo_print_assets' => '印刷に使用', + 'logo_print_assets_help' => '印刷可能な資産リストにブランドを使用する。 ', 'full_multiple_companies_support_help_text' => 'ユーザー (管理者を含む) に 資産の割り当て を制限します。', 'full_multiple_companies_support_text' => '複数企業をサポートします。', 'show_in_model_list' => 'モデルのドロップダウンに表示', diff --git a/resources/lang/lt/admin/categories/general.php b/resources/lang/lt/admin/categories/general.php index cf4a1ca58a..971e4c2beb 100644 --- a/resources/lang/lt/admin/categories/general.php +++ b/resources/lang/lt/admin/categories/general.php @@ -5,8 +5,8 @@ return array( 'about_categories' => 'Kategorijos padeda jums tvarkyti savo daiktus. Kai kurių pavyzdžių kategorijos gali būti "Desktops", "Laptops", "Mobilieji telefonai", "Tablets" ir tt, bet jūs galite naudoti kategorijas bet kokiu būdu, kuris jums yra naudingas.', 'asset_categories' => 'Įrangos kategorijos', 'category_name' => 'Kategorijos pavadinimas', - 'checkin_email' => 'Send email to user on checkin/checkout.', - 'checkin_email_notification' => 'This user will be sent an email on checkin/checkout.', + 'checkin_email' => 'Siųsti el. laišką vartotojui gavus/priskyrus.', + 'checkin_email_notification' => 'Šis vartotojas gaus el. Laišką registracijos / išrašymo metu (paskyrimas).', 'clone' => 'Kopijuoti kategoriją', 'create' => 'Sukurti kategoriją', 'edit' => 'Keisti kategoriją', diff --git a/resources/lang/lt/admin/custom_fields/general.php b/resources/lang/lt/admin/custom_fields/general.php index c8f5ecba62..17f20b3a30 100644 --- a/resources/lang/lt/admin/custom_fields/general.php +++ b/resources/lang/lt/admin/custom_fields/general.php @@ -20,7 +20,7 @@ return array( 'field_element_short' => 'Elementas', 'field_format' => 'Formatas', 'field_custom_format' => 'Pritaikomas formatas', - 'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use regex:/^[0-9]{15}$/.', + 'field_custom_format_help' => 'Šis laukelis leidžia Jums naudoti REGEX validaciją. Tai turėtų prasidėti "regax:" - pavyzdžiui norint validuoti pasirinkto laukelio reikšmę IMEI (15 skaičių), privalote naudoti regex:/^[0-9]{15}$/.', 'required' => 'Privalomas', 'req' => 'Privaloma.', 'used_by_models' => 'Naudojama modelių', @@ -28,5 +28,5 @@ return array( 'create_fieldset' => 'Nauja laukų grupė', 'create_field' => 'Naujas pritaikomas laukelis', 'value_encrypted' => 'Šio lauko vertė yra užkoduota duomenų bazėje. Tik admin vartotojai galės peržiūrėti iššifruotą vertę', - 'show_in_email' => 'Include the value of this field in checkout emails sent to the user? Encrypted fields cannot be included in emails.', + 'show_in_email' => 'Įterptos šio laukelio išdavimo reikšmės bus siunčiamos vartotojams? Užšifruoti laukai negali būti įterpti į el. laišką.', ); diff --git a/resources/lang/lt/admin/hardware/form.php b/resources/lang/lt/admin/hardware/form.php index 1522fc079f..6214e19623 100644 --- a/resources/lang/lt/admin/hardware/form.php +++ b/resources/lang/lt/admin/hardware/form.php @@ -38,7 +38,7 @@ return array( 'tag' => 'Įrangos pavadinimas', 'update' => 'Įrangos atnaujinimas', 'warranty' => 'Garantija', - 'warranty_expires' => 'Warranty Expires', + 'warranty_expires' => 'Garantija baigiasi', 'years' => 'metai', ) ; diff --git a/resources/lang/lt/admin/hardware/general.php b/resources/lang/lt/admin/hardware/general.php index 99fb9fb22f..d64fb96669 100644 --- a/resources/lang/lt/admin/hardware/general.php +++ b/resources/lang/lt/admin/hardware/general.php @@ -5,7 +5,7 @@ return array( 'about_assets_text' => 'Turtas - tai daiktai, kurie stebimi serijos numeriu arba turinio žyma. Jie dažniausiai būna vertingesni dalykai, kai svarbu nustatyti konkretų elementą.', 'archived' => 'Archyvuota', 'asset' => 'Įranga', - 'bulk_checkout' => 'Checkout Assets', + 'bulk_checkout' => 'Išduota įranga', 'checkin' => 'Išduota įranga', 'checkout' => 'Patikros turtas', 'clone' => 'Kopijuoti įrangą', diff --git a/resources/lang/lt/admin/hardware/message.php b/resources/lang/lt/admin/hardware/message.php index 165d67931b..45907a92ee 100644 --- a/resources/lang/lt/admin/hardware/message.php +++ b/resources/lang/lt/admin/hardware/message.php @@ -62,7 +62,7 @@ return array( 'success' => 'Įranga išduota sėkmingai.', 'user_does_not_exist' => 'Netinkamas naudotojas. Prašome bandykite dar kartą.', 'not_available' => 'Šis turtas negali būti išsiunčiamas!', - 'no_assets_selected' => 'You must select at least one asset from the list' + 'no_assets_selected' => 'Jūs turite pasirinkti bent vieną turtą iš sąrašo' ), 'checkin' => array( diff --git a/resources/lang/lt/admin/manufacturers/message.php b/resources/lang/lt/admin/manufacturers/message.php index d255145e2c..f3d4432c84 100644 --- a/resources/lang/lt/admin/manufacturers/message.php +++ b/resources/lang/lt/admin/manufacturers/message.php @@ -16,8 +16,8 @@ return array( ), 'restore' => array( - 'error' => 'Manufacturer was not restored, please try again', - 'success' => 'Manufacturer restored successfully.' + 'error' => 'Gamintojas nebuvo atkurtas, prašome bandyti dar kartą', + 'success' => 'Gamintojas buvo atkurtas sėkmingai.' ), 'delete' => array( diff --git a/resources/lang/lt/admin/models/general.php b/resources/lang/lt/admin/models/general.php index c610592072..a83a69214a 100644 --- a/resources/lang/lt/admin/models/general.php +++ b/resources/lang/lt/admin/models/general.php @@ -4,9 +4,9 @@ return array( 'about_models_title' => 'Apie turto modelius', 'about_models_text' => 'Turto modeliai yra būdas grupuoti identišką turtą. "MBP 2013", "IPhone 6s" ir kt.', 'deleted' => 'Šis modelis ištrintas. Spauskite atkurti modelį čia.', - 'bulk_delete' => 'Bulk Delete Asset Models', - 'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.', - 'bulk_delete_warn' => 'You are about to delete :model_count asset models.', + 'bulk_delete' => 'Ištrinti pažymėtus turto modelius', + 'bulk_delete_help' => '„Pažymėkite žemiau esantį langelį, kad patvirtintumėte pasirinktų turto modelių ištrynimą. Turto modeliai, kuriuose yra su jais susijęs turtas, negali būti ištrinti, išskyrus tuos atvejus, kai tas turtas yra susietas su kitu modeliu.“.', + 'bulk_delete_warn' => 'Ketinate ištrinti :model_count turto modelius.', 'restore' => 'Atkurti modelį', 'requestable' => 'Naudotojai gali užklausi šį modelį', 'show_mac_address' => 'Rodykite MAC adreso laukelį įrangoje šiam modeliui', @@ -14,5 +14,5 @@ return array( 'view_models' => 'Peržiūrėti modelius', 'fieldset' => 'Laukų grupė', 'no_custom_field' => 'Nėra pritaikytų laukų', - 'add_default_values' => 'Add default values', + 'add_default_values' => 'Pridėti numatytąją reikšmę', ); diff --git a/resources/lang/lt/admin/models/message.php b/resources/lang/lt/admin/models/message.php index 7bfbfebf0b..ff7495b781 100644 --- a/resources/lang/lt/admin/models/message.php +++ b/resources/lang/lt/admin/models/message.php @@ -34,9 +34,9 @@ return array( ), 'bulkdelete' => array( - 'error' => 'No models were selected, so nothing was deleted.', - 'success' => ':success_count model(s) deleted!', - 'success_partial' => ':success_count model(s) were deleted, however :fail_count were unable to be deleted because they still have assets associated with them.' + 'error' => 'Nepasirinktas modelis, nėra ką ištrinti.', + 'success' => ':success_count model(s) ištrinti!', + 'success_partial' => ':success_count model(s) buvo ištrinti, bet :fail_count negalima ištrinti todėl, kad turtas vis dar susietas.' ), ); diff --git a/resources/lang/lt/admin/settings/general.php b/resources/lang/lt/admin/settings/general.php index 20b4ecf84b..8b566fdcdc 100644 --- a/resources/lang/lt/admin/settings/general.php +++ b/resources/lang/lt/admin/settings/general.php @@ -4,8 +4,8 @@ return array( 'ad' => 'Active Directory', 'ad_domain' => '"Active Directory" domenas', 'ad_domain_help' => 'Tai kartais sutampa su jūsų el. Pašto domenu, bet ne visada.', - 'admin_cc_email' => 'CC Email', - 'admin_cc_email_help' => 'If you would like to send a copy of checkin/checkout emails that are sent to users to an additional email account, enter it here. Otherwise leave this field blank.', + 'admin_cc_email' => 'CC El. paštas', + 'admin_cc_email_help' => 'Jeigu Jūs norite siųsti išduoto/neišduoto turto sąrašo kopiją, įveskite čia el. pašto adresą. Kitu atveju palikite laukelį tuščią.', 'is_ad' => 'Tai yra "Active Directory" serveris', 'alert_email' => 'Siūsti įspėjimus', 'alerts_enabled' => 'Perspėjimai įjungti', @@ -25,9 +25,9 @@ return array( 'confirm_purge_help' => 'Žemiau esančiame laukelyje įveskite tekstą "DELETE", kad išvalykite ištrintus įrašus. Šis veiksmas negali būti panaikintas.', 'custom_css' => 'Užsakytas CSS', 'custom_css_help' => 'Įveskite bet kokį užsakytą CSS peržiūrėjimo norėtumėte naudoti. Neįtraukite <style></Stilius> žymės.', - 'custom_forgot_pass_url' => 'Custom Password Reset URL', - 'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.', - 'dashboard_message' => 'Dashboard Message', + 'custom_forgot_pass_url' => 'Pasirinktinio slaptažodžio atkūrimo nuoroda', + 'custom_forgot_pass_url_help' => 'Tai pakeičia pamiršto slaptažodžio nuorodą prisijungimo lange. Naudinga tiesiogiai nukreipti į LDAP slaptažodžio atkūrimo funkcionalumą. Būtų efektyviau išjungti vietinių vartotojų pamirštų slaptažodžių funkcionalumą.', + 'dashboard_message' => 'Prietaisų skydelio pranešimai', 'dashboard_message_help' => 'Šis tekstas bus rodomas valdymo skydelyje, kiekvienam turinčiam teisę peržiūrėti valdymo skydelį.', 'default_currency' => 'Numatytoji valiuta', 'default_eula_text' => 'Numatytasis EULA', @@ -42,8 +42,8 @@ return array( 'alt_barcode_type' => '1D barkodo tipas', 'eula_settings' => 'EULA nustatymai', 'eula_markdown' => 'Šis EULA leidžia Github flavored markdown.', - 'footer_text' => 'Additional Footer Text ', - 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', + 'footer_text' => 'Papildomas poraštė tekstas ', + 'footer_text_help' => 'Šis tekstas bus rodomas dešinėje poraštės pusėje. Nuorodos leidžiamos naudojant Github flavored markdown. Eilutės lūžei, antraštės, paveiksliukai etc gali sukelti nenuspėjamus rezultatus.', 'general_settings' => 'Bendrieji nustatymai', 'generate_backup' => 'Atsarginė kopija', 'header_color' => 'Atraštės spalva', @@ -52,8 +52,8 @@ return array( 'ldap_enabled' => 'LDAP įjungtas', 'ldap_integration' => 'LDAP integracija', 'ldap_settings' => 'LDAP nustatymai', - 'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', - 'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', + 'ldap_login_test_help' => 'Prašome įvesti tinkamą LDAP vartotojo vardą ir slaptažodį iš bazės DN. Jūs privalote patikrinti ar LDAP prisijungimas sukonfigūruotas tinkamai. PIRMIAUSIA JŪS PRIVALOTE IŠSAUGOTI LDAP NUSTATYMUS.', + 'ldap_login_sync_help' => 'Tai patikrina ar LDAP sinchronizacija teisinga. Jeigu Jūsų LADAP autentifikacijos užkalusa nėra teisinga, vartotojai gali negalėti prisijungti. PIRMIAUSIA JŪS PRIVALOTE IŠSAUGOTI LDAP NUSTATYMUS.', 'ldap_server' => 'LDAP serveris', 'ldap_server_help' => 'Tai turėtų prasidėti su ldap: // (nešifruotam arba TLS) arba ldaps: (jei tai SSL)', 'ldap_server_cert' => 'LDAP SSL sertifikato patvirtinimas', @@ -75,24 +75,24 @@ return array( 'ldap_active_flag' => 'LDAP aktyvios vėliavos', 'ldap_emp_num' => 'LDAP darbuotojų skaičius', 'ldap_email' => 'LDAP el.paštas', - 'license' => 'Software License', + 'license' => 'Programinės įrangos licenzija', 'load_remote_text' => 'Nuotoliniai skriptai', 'load_remote_help_text' => 'Šis Snipe-IT įdiegimas gali įtraukti programinius kodus iš interneto.', 'login_note' => 'Prisijungimo pastaba', 'login_note_help' => 'Pasirinktinai į savo prisijungimo ekraną įtraukite keletą sakinių, pavyzdžiui, kad padėtumėte žmonėms, kurie rasti pamestą ar pavogtą įrenginį. Šiame lauke pritariama "Github" skonio markdown', - 'login_remote_user_text' => 'Remote User login options', - 'login_remote_user_enabled_text' => 'Enable Login with Remote User Header', - 'login_remote_user_enabled_help' => 'This option enables Authentication via the REMOTE_USER header according to the "Common Gateway Interface (rfc3875)"', - 'login_common_disabled_text' => 'Disable other authentication mechanisms', - 'login_common_disabled_help' => 'This option disables other authentication mechanisms. Just enable this option if you are sure that your REMOTE_USER login is already working', - 'login_remote_user_custom_logout_url_text' => 'Custom logout URL', - 'login_remote_user_custom_logout_url_help' => 'If a url is provided here, users will get redirected to this URL after the user logs out of Snipe-IT. This is useful to close the user sessions of your Authentication provider correctly.', + 'login_remote_user_text' => 'Nuotolinio vartotojo prisijungimo parametrai', + 'login_remote_user_enabled_text' => 'Įjungti nuotolinį prisijungimą naudojant vartotojo antraštę', + 'login_remote_user_enabled_help' => 'Ši opcija įjungia autentifikaciją "REMOTE_USER" per "Cammon Gateway" vartotojo sąsają (rfc3875)', + 'login_common_disabled_text' => 'Išjungti kitus autentifikacijos mechanizmus', + 'login_common_disabled_help' => 'Ši opcija išjungia kitus autentifikacijos mechanizmus. Šią funkciją įjunkite jeigu esate tikri jog REMOTE_USER prisijungimas veikia', + 'login_remote_user_custom_logout_url_text' => 'Pasirinktinė atsijungimo URL', + 'login_remote_user_custom_logout_url_help' => 'Čia įveskite nuorodą į kurią bus nukreipti vartotojai prisijungę prie Snite-IT. Tai naudinga uždarant vartotojo sesiją.', 'logo' => 'Logotipas', - 'logo_print_assets' => 'Use in Print', - 'logo_print_assets_help' => 'Use branding on printable asset lists ', + 'logo_print_assets' => 'Naudoti spausdinimui', + 'logo_print_assets_help' => 'Naudoti turto sąrašą spausdinimą ', 'full_multiple_companies_support_help_text' => 'Apriboti vartotojai (įskaitant administratorius) priskirtus kompanijoms.', 'full_multiple_companies_support_text' => 'Pilnas kelių kompanijų palaikymas', - 'show_in_model_list' => 'Show in Model Dropdowns', + 'show_in_model_list' => 'Rodyti išskleidžiame modelyje', 'optional' => 'pasirinktinai', 'per_page' => 'Rezultatai puslapyje', 'php' => 'PHP versija', @@ -109,23 +109,23 @@ return array( 'setting' => 'Nustatymai', 'settings' => 'Nustatymai', 'show_alerts_in_menu' => 'Rodyti įspėjimus viršutiniame meniu', - 'show_archived_in_list' => 'Archived Assets', - 'show_archived_in_list_text' => 'Show archived assets in the "all assets" listing', - 'show_images_in_email' => 'Show images in emails', - 'show_images_in_email_help' => 'Uncheck this box if your Snipe-IT installation is behind a VPN or closed network and users outside the network will not be able to load images served from this installation in their emails.', + 'show_archived_in_list' => 'Archyvuotas turtas', + 'show_archived_in_list_text' => 'Rodyti archyvuotą turtą "visame turto" sąraše', + 'show_images_in_email' => 'Rodyti nuotraukas el. pašte', + 'show_images_in_email_help' => 'Nuimkite žymelę jeigu jūsų Snipe-IT instaliacija yra VPN arba uždarame tinkle ir vartotojai esantys už tinklo negalės įkrauti paveikslėlių jų el. paštuose.', 'site_name' => 'Interneto puslapio pavadinimas', 'slack_botname' => 'Slack\'o boto vardas', 'slack_channel' => 'Slack\'o kanalas', 'slack_endpoint' => 'Slack\'o galutinis taškas', 'slack_integration' => 'Slack\'o nustatymai', 'slack_integration_help' => 'Slack\'o integravimas yra pasirinktinis, tačiau kanalas ir galutinis taškas reikalingas jie jūs norite juos naudoti su Slack programėle. Norėdami konfigūruoti Slack\'o integraciją pirmiausia privalote sukurti įeinantį priedą savo turimoje Slack\'o paskyroje.', - 'slack_integration_help_button' => 'Once you have saved your Slack information, a test button will appear.', - 'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.', + 'slack_integration_help_button' => 'Jeigu jūs išsaugosite informaciją, testavimo mygtukas bus rodomas.', + 'slack_test_help' => 'Patikrinkite, ar tinkamai atlikta „Slack“ konfigūracija. Jūs privalote išsaugoti savo "SLACK" nustatymus pirmiausia.', 'snipe_version' => 'Snipe-IT versija', - 'support_footer' => 'Support Footer Links ', - 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', - 'version_footer' => 'Version in Footer ', - 'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.', + 'support_footer' => 'Palaikomos poraštė nuorodos ', + 'support_footer_help' => 'Nurodykite, kas matys nuorodas į „Snipe-IT“ palaikymo informacijos ir naudotojo vadovą', + 'version_footer' => 'Versija poraštėje ', + 'version_footer_help' => 'Nurodykite kad galės matyti Snipe-IT versijas ir versijos numerius.', 'system' => 'Sistemos informacija', 'update' => 'Atnaujinti nustatymus', 'value' => 'Vertė', @@ -136,9 +136,9 @@ return array( 'label_dimensions' => 'Etiketės išmatavimai (coliais)', 'next_auto_tag_base' => 'Kitas automatinis prieaugis', 'page_padding' => 'Puslapio maržos (coliais)', - 'privacy_policy_link' => 'Link to Privacy Policy', - 'privacy_policy' => 'Privacy Policy', - 'privacy_policy_link_help' => 'If a url is included here, a link to your privacy policy will be included in the app footer and in any emails that the system sends out, in compliance with GDPR. ', + 'privacy_policy_link' => 'Privatumo politikos nuorodos', + 'privacy_policy' => 'Privatumo politika', + 'privacy_policy_link_help' => 'Jeigu nuorodas įterpsite čia tai nuorodos privatumo politikos bus įterptas poraštėje ir kiekviename siunčiame el. laiške, palaikant GDPR. ', 'purge' => 'Išvalyti ištrintus įrašus', 'labels_display_bgutter' => 'Etiketės apatinis latakai', 'labels_display_sgutter' => 'Etiketės pusės latakai', @@ -181,7 +181,7 @@ return array( 'bottom' => 'apačioje', 'vertical' => 'vertikalus', 'horizontal' => 'horizontalus', - 'unique_serial' => 'Unique serial numbers', - 'unique_serial_help_text' => 'Checking this box will enforce a uniqueness constraint on asset serials', + 'unique_serial' => 'Unikalus serijinis numeris', + 'unique_serial_help_text' => 'Pažymėtas šis langelis reiškia unikalius serijinius kiekvienam turtui', 'zerofill_count' => 'Turto žymų ilgis, įskaitant "zerofill"', ); diff --git a/resources/lang/lt/admin/statuslabels/table.php b/resources/lang/lt/admin/statuslabels/table.php index c1517a195a..bf0319c249 100644 --- a/resources/lang/lt/admin/statuslabels/table.php +++ b/resources/lang/lt/admin/statuslabels/table.php @@ -5,8 +5,8 @@ return array( 'archived' => 'Archyvuota', 'create' => 'Sukurti būlės kortelę', 'color' => 'Diagramos spalva', - 'default_label' => 'Default Label', - 'default_label_help' => 'This is used to ensure your most commonly used status labels appear at the top of the select box when creating/editing assets.', + 'default_label' => 'Numatytoji etikėtė', + 'default_label_help' => 'Tai naudojama norint užtikrinti, kad dažniausiai naudotos būsenos etiketės būtų rodomos lango viršuje kuriant / redaguojant turtą.', 'deployable' => 'Naudojamas', 'info' => 'Būklės kortelės naudojamos apibūdinti įvairias jūsų įrangos būkles, kuriose ji randasi. Kortelės gali būti nurodančios, kad įranga remontuojama, prarasta, pavota ir t. t. Jūs galite suskurti naują būklės kortelę išduotiems, atnaujinamiems ir kitiems įrenginiams.', 'name' => 'Būklės pavadinimas', diff --git a/resources/lang/lt/admin/suppliers/message.php b/resources/lang/lt/admin/suppliers/message.php index cca89422ae..17db633f9e 100644 --- a/resources/lang/lt/admin/suppliers/message.php +++ b/resources/lang/lt/admin/suppliers/message.php @@ -19,9 +19,9 @@ return array( 'confirm' => 'Ar jūs tikrai norite ištrinti šį tiekėją?', 'error' => 'Nepavyko ištrinti tiekėjo. Prašome bandykite dar kartą.', 'success' => 'Tiekėjas ištrintas sėkmingai.', - 'assoc_assets' => 'This supplier is currently associated with :asset_count asset(s) and cannot be deleted. Please update your assets to no longer reference this supplier and try again. ', - 'assoc_licenses' => 'This supplier is currently associated with :licenses_count licences(s) and cannot be deleted. Please update your licenses to no longer reference this supplier and try again. ', - 'assoc_maintenances' => 'This supplier is currently associated with :asset_maintenances_count asset maintenances(s) and cannot be deleted. Please update your asset maintenances to no longer reference this supplier and try again. ', + 'assoc_assets' => 'Šis tiekėjas šiuo metu susietas su bent vienu modeliu ir negali būti ištrintas. Prašome atnaujinkite savo modelius, kad šie nebūtu susieti su šiuo tiekėju ir bandykite dar kartą. ', + 'assoc_licenses' => 'Šis tiekėjas šiuo metu susietas su licenzija ir negali būti ištrinti. Prašome atnaujinkite savo modelius, kad šie nebūtų susieti su šiuo tiekėjų ir bandykite dar kartą. ', + 'assoc_maintenances' => 'Šis tiekėjas šiuo metu susietas su bent vienu modeliu ir negali būti ištrintas. Prašome atnaujinkite savo modelius, kad šie nebūtu susieti su šiuo tiekėju ir bandykite dar kartą. ', ) ); diff --git a/resources/lang/lt/admin/users/general.php b/resources/lang/lt/admin/users/general.php index f8ef11ae1b..a2c4ad623c 100644 --- a/resources/lang/lt/admin/users/general.php +++ b/resources/lang/lt/admin/users/general.php @@ -2,8 +2,8 @@ return array( - 'activated_help_text' => 'This user can login', - 'activated_disabled_help_text' => 'You cannot edit activation status for your own account.', + 'activated_help_text' => 'Šis vartotojas gali prisijungti', + 'activated_disabled_help_text' => 'Jūs negalite keisti savosios pąskyros aktyvacijos statuso.', 'assets_user' => 'Priskirta įranga :name', 'bulk_update_warn' => 'Jūs ketinate redaguoti vartotojų: user_count savybes. Atminkite, kad negalėsite pakeisti savo naudotojo atributų naudodami šią formą ir savo pasirinkimą keisti individualiai.', 'bulk_update_help' => 'Ši forma leidžia vienu metu atnaujinti kelis naudotojus. Užpildykite tik tuos laukelius, kuriuos reikia keisti. Visi tušti laukai lieka nepakeisti.', @@ -17,7 +17,7 @@ return array( 'restore_user' => 'Spauskite čia norėdami juos atkurti.', 'last_login' => 'Paskutinis prisijungimas', 'ldap_config_text' => 'LDAP konfigūracijos parametrus galite rasti Administratorius> Nustatymai. Pasirinkta vieta (pasirinktinai) bus nustatyta visiems importuojamiems vartotojams.', - 'print_assigned' => 'Print All Assigned', + 'print_assigned' => 'Spausdinti visą turtą', 'software_user' => ':name išduota įranga', 'view_user' => 'Peržiūrėti :name vartotoją', 'usercsv' => 'CSV dokumentas', diff --git a/resources/lang/lt/button.php b/resources/lang/lt/button.php index 4a9a8efe79..a9623b0924 100644 --- a/resources/lang/lt/button.php +++ b/resources/lang/lt/button.php @@ -12,5 +12,5 @@ return array( 'submit' => 'Išsaugoti', 'upload' => 'Įkelti', 'select_file' => 'Pasirinkite failą ...', - 'select_files' => 'Select Files...', + 'select_files' => 'Pasirinkite failą...', ); diff --git a/resources/lang/lt/general.php b/resources/lang/lt/general.php index 5cecc8f8b8..cf6e8b94e8 100644 --- a/resources/lang/lt/general.php +++ b/resources/lang/lt/general.php @@ -9,7 +9,7 @@ 'activity_report' => 'Veiksmų ataskaita', 'address' => 'Adresas', 'admin' => 'Administratorius', - 'administrator' => 'Administrator', + 'administrator' => 'Administratorius', 'add_seats' => 'Prideta licenzijų', 'all_assets' => 'Visa įranga', 'all' => 'Viskas', @@ -39,9 +39,9 @@ 'checkin' => 'Pridėti', 'checkin_from' => 'Pridėti iš', 'checkout' => 'Išimti', - 'checkouts_count' => 'Checkouts', - 'checkins_count' => 'Checkins', - 'user_requests_count' => 'Requests', + 'checkouts_count' => 'Išduota', + 'checkins_count' => 'Pridėti', + 'user_requests_count' => 'Užklausos', 'city' => 'Miestas', 'click_here' => 'Paspauskite čia', 'clear_selection' => 'Išvalyti pasirinkimą', @@ -68,14 +68,14 @@ 'debug_warning' => 'Įspėjimas!', 'debug_warning_text' => 'Ši programa veikia gamybos režimu, įjungus derinimą. Tai gali atskleisti slaptus duomenis, jei jūsų programa yra prieinama išoriniam pasauliui. Išjunkite derinimo režimą nustatydami APP_DEBUG reikšmę savo .env byloje false.', 'delete' => 'Ištrinti', - 'delete_confirm' => 'Are you sure you wish to delete :item?', + 'delete_confirm' => 'Ar jūs norite tikrai ištrinti?', 'deleted' => 'Ištrinta', 'delete_seats' => 'Ištrintos licenzijos', 'departments' => 'Departamentai', 'department' => 'Departamentas', 'deployed' => 'Naudojama', 'depreciation_report' => 'Nusidėvėjimo ataskaita', - 'details' => 'Details', + 'details' => 'Detaliau', 'download' => 'Atsisiųsti', 'depreciation' => 'Nusidėvėjimas', 'editprofile' => 'Koreguoti profilį', @@ -85,16 +85,16 @@ 'email_domain_help' => 'Tai naudojama importuojant importuojamus el. Pašto adresus', 'filastname_format' => 'V. Pavardė (vpavarde@example.com)', 'firstname_lastname_format' => 'Vardas Pavardė (vpavarde@example.com)', - 'firstname_lastname_underscore_format' => 'First Name Last Name (jane_smith@example.com)', - 'lastnamefirstinitial_format' => 'Last Name First Initial (smithj@example.com)', + 'firstname_lastname_underscore_format' => 'Vardas Pavardė (vpavarde@example.com)', + 'lastnamefirstinitial_format' => 'Pavardė, vardo pirmoji raidė (pavardėV@example.com', 'first' => 'Pirmas', 'first_name' => 'Vardas', 'first_name_format' => 'Vardas (vpavarde@example.com)', - 'files' => 'Files', + 'files' => 'Failas', 'file_name' => 'Failas', 'file_uploads' => 'Failo Įkėlimas', 'generate' => 'Sukurti', - 'github_markdown' => 'This field accepts Github flavored markdown.', + 'github_markdown' => 'Šis laukas leidžia Github automatizuota žymėjimą.', 'groups' => 'Grupės', 'gravatar_email' => 'Gravatar el. paštas', 'history' => 'Istorija', @@ -103,7 +103,7 @@ 'image' => 'Paveikslėlis', 'image_delete' => 'Ištrinti nuotrauką', 'image_upload' => 'Įkelti nuotrauką', - 'image_filetypes_help' => 'Accepted filetypes are jpg, png, gif, and svg. Max upload size allowed is :size.', + 'image_filetypes_help' => 'Priimami failų tipai yra: jpg, png, gif, and svg. Didžiausias leidžiamas įkėlimo dydis :size.', 'import' => 'Įkelti', 'import-history' => 'Importuoti istoriją', 'asset_maintenance' => 'Įrangos priežiūra', @@ -127,7 +127,7 @@ 'locations' => 'Vietovės', 'logout' => 'Atsijungti', 'lookup_by_tag' => 'Paiešką pagal turto žymą', - 'maintenances' => 'Maintenances', + 'maintenances' => 'Techninis aptarnavimas', 'manufacturer' => 'Gamintojas', 'manufacturers' => 'Gamintojai', 'markdown' => 'Šis laukas leidžia Github skonio markdown.', @@ -181,11 +181,11 @@ 'select_company' => 'Pasirinkite kompaniją', 'select_asset' => 'Pasirinkite įrangą', 'settings' => 'Nustatymai', - 'show_deleted' => 'Show Deleted', - 'show_current' => 'Show Current', + 'show_deleted' => 'Peržiūrėti ištrintus', + 'show_current' => 'Rodyti dabartinį', 'sign_in' => 'Prisijungti', 'signature' => 'Parašas', - 'skin' => 'Skin', + 'skin' => 'Išvaizda', 'some_features_disabled' => 'DEMO MODE: kai kurios funkcijos yra išjungtos šio diegimo metu.', 'site_name' => 'Interneto puslapio pavadinimas', 'state' => 'Rajonas', @@ -206,7 +206,7 @@ 'unknown_admin' => 'Nežinomas administratorius', 'username_format' => 'Vartotojo vardas Formatas', 'update' => 'Atnaujinti', - 'upload_filetypes_help' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, xls, txt, lic, zip, and rar. Max upload size allowed is :size.', + 'upload_filetypes_help' => 'Priimami failų tipai yra: png, gif, jpg, jpeg, doc, docx, pdf, xls, txt, lic, zip, and rar.. Didžiausias leidžiamas įkėlimo dydis :size.', 'uploaded' => 'Įkeltas', 'user' => 'Naudotojas', 'accepted' => 'priimta', diff --git a/resources/lang/lt/mail.php b/resources/lang/lt/mail.php index 6112813217..96ca2bb376 100644 --- a/resources/lang/lt/mail.php +++ b/resources/lang/lt/mail.php @@ -21,7 +21,7 @@ return array( 'Confirm_Asset_Checkin' => 'Patvirtinkite turto registraciją.', 'Confirm_Accessory_Checkin' => 'Patvirtinkite priedų registraciją.', 'Confirm_accessory_delivery' => 'Patvirtinkite aksesuaro pristatymą.', - 'Confirm_license_delivery' => 'Confirm license delivery.', + 'Confirm_license_delivery' => 'Patvirtinti licenzijos pristatymą.', 'Confirm_asset_delivery' => 'Patvirtinkite įrangos gavimą.', 'Confirm_consumable_delivery' => 'Patvirtinkite vartojimo pristatymą.', 'current_QTY' => 'Esamas kiekis', @@ -52,19 +52,19 @@ return array( 'requested' => 'Užklausta:', 'reset_link' => 'Jūsų slaptažodžio atstatymo nuoroda', 'reset_password' => 'Paspauskite norėdami pakeisti savo slaptažodį:', - 'serial' => 'Serial', + 'serial' => 'Serija', 'supplier' => 'Tiekėjas', 'tag' => 'Žymė', 'test_email' => 'Išbandykite "Snipe-IT" el. Laišką', 'test_mail_text' => 'Tai yra "Snipe-IT Asset Management System" testas. Jei tai gavote, paštas dirba :)', 'the_following_item' => 'Šis elementas buvo pažymėtas:', - 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', - 'assets_warrantee_alert' => 'There is :count asset with a warrantee expiring in the next :threshold days.|There are :count assets with warrantees expiring in the next :threshold days.', - 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', + 'low_inventory_alert' => 'Tai yra reikšmė minimalaus inventoriaus arba greitai pasibaigiančio.:count | Tai yra reikšmė minimalaus inventoriaus arba greitai pasibaigiančio.:count.', + 'assets_warrantee_alert' => 'Tiek turto :count kurių garantinis aptarnavimas baigsis už :threshold days.|Tiek turto :count kurių garantinis aptarnavimas baigsis už :threshold days.', + 'license_expiring_alert' => 'Tiek licenzijų :count baigsis už :threshold days.|Tiek licenzijų :count baigsis už :threshold days.', 'to_reset' => 'Jei norite iš naujo nustatyti savo: žiniatinklio slaptažodį, užpildykite šią formą:', 'type' => 'Tipas', - 'user' => 'User', - 'username' => 'Username', + 'user' => 'Vartotojas', + 'username' => 'Vartotojo vardas', 'welcome' => 'Sveiki :vardas', 'welcome_to' => 'Sveiki atvykę į: internetą!', 'your_credentials' => 'Jūsų Snipe-IT įgaliojimai', diff --git a/resources/lang/lt/passwords.php b/resources/lang/lt/passwords.php index 73d3a05c9e..5e5ad6e5b2 100644 --- a/resources/lang/lt/passwords.php +++ b/resources/lang/lt/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'Nuoroda atkurti slaptažodį išsiųsta!', - 'user' => 'No matching active user found with that email.', + 'user' => 'Neaptikta vartotojo su šiuo elektroninio pašto adresu.', ]; diff --git a/resources/lang/lt/validation.php b/resources/lang/lt/validation.php index 3079317d87..f06df80533 100644 --- a/resources/lang/lt/validation.php +++ b/resources/lang/lt/validation.php @@ -67,7 +67,7 @@ return array( 'not_in' => 'Pasirinktas :attribute neteisingas.', 'numeric' => ':attribute privalo būti skaičius.', 'present' => 'Atributo laukas turi būti.', - 'valid_regex' => 'That is not a valid regex. ', + 'valid_regex' => 'Tai nėra tinkamas regex. ', 'regex' => ':attribute formatas neteisingas.', 'required' => ':attribute laukelis privalomas.', 'required_if' => ':attribute laukelis yra privalomas kai :other yra :value.', @@ -88,7 +88,7 @@ return array( 'unique' => ':attribute jau užimtas.', 'uploaded' => 'Nepavyko įkelti atributo.', 'url' => ':attribute formatas neteisingas.', - "unique_undeleted" => "The :attribute must be unique.", + "unique_undeleted" => ":attribute turi būti unikalus.", /* |-------------------------------------------------------------------------- diff --git a/resources/lang/mn/admin/categories/general.php b/resources/lang/mn/admin/categories/general.php index 06801a2e84..c9ad063c52 100644 --- a/resources/lang/mn/admin/categories/general.php +++ b/resources/lang/mn/admin/categories/general.php @@ -5,7 +5,7 @@ return array( 'about_categories' => 'Хөрөнгийн бүтэц зохион байгуулалтыг оновчтой болгоход Ангилал тус болно. Жишээлбэл "Ширээний компьютьер", "Ноутбүүк","Гар утас","Таблет" гэх мэт. Та өөрийн хүссэнээрээ ангиллаа зохиож болно.', 'asset_categories' => 'Хөрөнгийн ангиллууд', 'category_name' => 'Ангиллын нэр', - 'checkin_email' => 'Send email to user on checkin/checkout.', + 'checkin_email' => 'Олгох үед хэрэглэгч уруу имэйл илгээх.', 'checkin_email_notification' => 'This user will be sent an email on checkin/checkout.', 'clone' => 'Ангиллыг хуулж үүсгэх', 'create' => 'Ангилал үүсгэх', diff --git a/resources/lang/no/admin/custom_fields/general.php b/resources/lang/no/admin/custom_fields/general.php index d03641cab7..2bd097bb21 100644 --- a/resources/lang/no/admin/custom_fields/general.php +++ b/resources/lang/no/admin/custom_fields/general.php @@ -28,5 +28,5 @@ return array( 'create_fieldset' => 'Nytt Feltsett', 'create_field' => 'Nytt Egendefinert Felt', 'value_encrypted' => 'Verdien i dette feltet er kryptert i databasen. Bare administratorer kan se hva som står i dette feltet', - 'show_in_email' => 'Include the value of this field in checkout emails sent to the user? Encrypted fields cannot be included in emails.', + 'show_in_email' => 'Inkluder verdien i dette feltet i utsjekkseposter sendt til brukeren? Krypterte felter kan ikke inkluderes i eposter.', ); diff --git a/resources/lang/no/admin/manufacturers/message.php b/resources/lang/no/admin/manufacturers/message.php index 70cc320b45..936c63e353 100644 --- a/resources/lang/no/admin/manufacturers/message.php +++ b/resources/lang/no/admin/manufacturers/message.php @@ -16,8 +16,8 @@ return array( ), 'restore' => array( - 'error' => 'Manufacturer was not restored, please try again', - 'success' => 'Manufacturer restored successfully.' + 'error' => 'Produsent ble ikke gjenopprettet. Prøv igjen', + 'success' => 'Gjenopprettelse av produsent vellykket.' ), 'delete' => array( diff --git a/resources/lang/no/admin/models/general.php b/resources/lang/no/admin/models/general.php index 8638939f73..56005b47ca 100644 --- a/resources/lang/no/admin/models/general.php +++ b/resources/lang/no/admin/models/general.php @@ -5,7 +5,7 @@ return array( 'about_models_text' => 'Asset modeller er en måte å gruppere identiske eiendeler. "MBP 2013", "IPhone 6s", etc.', 'deleted' => 'Denne modellen er slettet. Klikk her for å gjenopprette.', 'bulk_delete' => 'Bulk slett modeller', - 'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.', + 'bulk_delete_help' => 'Bruk merkeboksene nedenfor til å bekrefte sletting av de merkede modellene. Modeller som har eiendeler tilknyttet kan ikke slettes før eiendelene har blitt tilknyttet en annen modell.', 'bulk_delete_warn' => 'Du er i ferd med å slette :model_count modeller.', 'restore' => 'Gjenopprett modell', 'requestable' => 'Brukere kan be om denne modellen', diff --git a/resources/lang/no/admin/settings/general.php b/resources/lang/no/admin/settings/general.php index 7a90dc4d5c..de0c36553a 100644 --- a/resources/lang/no/admin/settings/general.php +++ b/resources/lang/no/admin/settings/general.php @@ -5,7 +5,7 @@ return array( 'ad_domain' => 'Active Directory domene', 'ad_domain_help' => 'Dette er noen ganger det samme som e-post domene, men ikke alltid.', 'admin_cc_email' => 'CC e-post', - 'admin_cc_email_help' => 'If you would like to send a copy of checkin/checkout emails that are sent to users to an additional email account, enter it here. Otherwise leave this field blank.', + 'admin_cc_email_help' => 'Hvis du vil sende en kopi av innsjekk-/utsjekkeposter som sendes til brukere til en ekstra epostadresse, skriv den inn her. La ellers feltet stå tomt.', 'is_ad' => 'Dette er en Active Directory server', 'alert_email' => 'Send varslinger til', 'alerts_enabled' => 'Varslinger aktivert', @@ -26,7 +26,7 @@ return array( 'custom_css' => 'Egendefinert CSS', 'custom_css_help' => 'Legg til egendefinert CSS. Ikke ta med taggene <style></style>.', 'custom_forgot_pass_url' => 'Egendefinert passord tilbakestillings-URL', - 'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.', + 'custom_forgot_pass_url_help' => 'Erstatter den innebygde glemt passord-URLen i innloggingsbildet. Nyttig for å sende brukere til intern eller leid LDAP passordgjenopprettingsfunksjonalitet. Vil deaktivere den lokale glemt passord-funksjonaliteten.', 'dashboard_message' => 'Dashboardmelding', 'dashboard_message_help' => 'Denne teksten vises på dashbordet for alle som har tillatelse til å vise oversikten.', 'default_currency' => 'Standardvaluta', @@ -43,7 +43,8 @@ return array( 'eula_settings' => 'EULA-innstillinger', 'eula_markdown' => 'Denne EULAen tillater Github Flavored markdown.', 'footer_text' => 'Ekstra bunnteksttekst ', - 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', + 'footer_text_help' => 'Denne teksten vil fremstå i høyre del av bunnteksten. Lenker er tillatt ved å bruke Github flavored markdown. +Linjeskift, topptekst, bilder, osv. kan føre til uventede resultater.', 'general_settings' => 'Generelle innstillinger', 'generate_backup' => 'Generer Sikkerhetskopi', 'header_color' => 'Overskriftsfarge', @@ -52,8 +53,8 @@ return array( 'ldap_enabled' => 'LDAP aktivert', 'ldap_integration' => 'LDAP Integrering', 'ldap_settings' => 'LDAP Instillinger', - 'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', - 'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', + 'ldap_login_test_help' => 'Skriv inn et gyldig LDAP brukernavn og passord fra samme base DN som du anga ovenfor for å teste at LDAP-innlogging er riktig konfigurert. DU MÅ LAGRE DINE OPPDATERTE LDAP-INNSTILLINGER FØRST.', + 'ldap_login_sync_help' => 'Tester at LDAP kan synkronisere. Feil i LDAP autentiseringsspørringen din kan før til at brukere ikke kan logge inn. DU MÅ LAGRE DINE OPPDATERTE LDAP-INNSTILLINGER FØRST.', 'ldap_server' => 'LDAP Server', 'ldap_server_help' => 'Dette bør starte med ldap:// (for ukryptert eller TLS) eller ldaps:// (for SSL)', 'ldap_server_cert' => 'Validering av LDAP SSL sertifikat', @@ -81,15 +82,15 @@ return array( 'login_note' => 'Logg inn melding', 'login_note_help' => 'Eventuelt inkludere et par setninger på logg inn skjermen, for eksempel for å hjelpe mennesker som har funnet en mistet eller stjålet enhet. Dette feltet godtar Github flavored markdown', 'login_remote_user_text' => 'Fjernbruker pålogging valg', - 'login_remote_user_enabled_text' => 'Enable Login with Remote User Header', - 'login_remote_user_enabled_help' => 'This option enables Authentication via the REMOTE_USER header according to the "Common Gateway Interface (rfc3875)"', + 'login_remote_user_enabled_text' => 'Aktiver innlogging med Remote User Header', + 'login_remote_user_enabled_help' => 'Aktiverer autentisering via REMOTE_USER headeren som beskrevet i "Common Gateway Interface (rfc3875)"', 'login_common_disabled_text' => 'Deaktiver andre godkjenningsmekanismer', - 'login_common_disabled_help' => 'This option disables other authentication mechanisms. Just enable this option if you are sure that your REMOTE_USER login is already working', + 'login_common_disabled_help' => 'Deaktiverer andre autentiseringsmekanismer. Aktiver dette valget kun hvis du er sikker på at din REMOTE_USER innlogging allerede fungerer', 'login_remote_user_custom_logout_url_text' => 'Tilpasset utloggingsadresse', - 'login_remote_user_custom_logout_url_help' => 'If a url is provided here, users will get redirected to this URL after the user logs out of Snipe-IT. This is useful to close the user sessions of your Authentication provider correctly.', + 'login_remote_user_custom_logout_url_help' => 'Hvis en URL angis her blir brukerne videresendt til denne URLen etter utlogging fra Snipe-IT. Dette er nyttig for korrekt lukking av autentiseringssesjoner hos din autentiseringsleverandør.', 'logo' => 'Logo', 'logo_print_assets' => 'Bruk i Print', - 'logo_print_assets_help' => 'Use branding on printable asset lists ', + 'logo_print_assets_help' => 'Bruk branding på utskrivbare eiendelslister ', 'full_multiple_companies_support_help_text' => 'Vis kun eiendeler til bedriften brukere (inkl administratorer) er knyttet til.', 'full_multiple_companies_support_text' => 'Full støtte for flere bedrifter', 'show_in_model_list' => 'Vis i Model nedtrekksmeny', @@ -110,7 +111,7 @@ return array( 'settings' => 'Innstillinger', 'show_alerts_in_menu' => 'Vis varsler i toppmenyen', 'show_archived_in_list' => 'Arkiverte eiendeler', - 'show_archived_in_list_text' => 'Show archived assets in the "all assets" listing', + 'show_archived_in_list_text' => 'Vis arkiverte eiendeler i "alle eiendeler" utlisting', 'show_images_in_email' => 'Vis bilder i e-post', 'show_images_in_email_help' => 'Uncheck this box if your Snipe-IT installation is behind a VPN or closed network and users outside the network will not be able to load images served from this installation in their emails.', 'site_name' => 'Nettstedsnavn', @@ -119,13 +120,13 @@ return array( 'slack_endpoint' => 'Slack endepunkt', 'slack_integration' => 'Slack-innstillinger', 'slack_integration_help' => 'Slack-integrasjon er valgfritt, men endepunkt og kanal er påkrevd hvis du vil bruke det. For å konfigurere Slack-integrasjon må du først opprette en innkommende webhook på din Slack-konto.', - 'slack_integration_help_button' => 'Once you have saved your Slack information, a test button will appear.', - 'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.', + 'slack_integration_help_button' => 'Du vil se en testknapp etter at du lagrer Slack-informasjonen.', + 'slack_test_help' => 'Test om Slack-integrasjonen din er riktig konfigurert. DU MÅ LAGRE DINE OPPDATERTE SLACK-INNSTILLINGER FØRST.', 'snipe_version' => 'Snipe-IT-versjon', 'support_footer' => 'Støtte Footer Lenker ', - 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', + 'support_footer_help' => 'Angi hvem som kan se lenker til Snipe-IT supportinformasjon og brukermanual', 'version_footer' => 'Versjon i Footer ', - 'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.', + 'version_footer_help' => 'Angi hvem som kan se Snipe-IT versjon og build-nummer.', 'system' => 'Systeminformasjon', 'update' => 'Oppdater innstillinger', 'value' => 'Verdi', @@ -138,7 +139,7 @@ return array( 'page_padding' => 'Side marger (inches)', 'privacy_policy_link' => 'Link til personvernregler', 'privacy_policy' => 'Personvernerklæring', - 'privacy_policy_link_help' => 'If a url is included here, a link to your privacy policy will be included in the app footer and in any emails that the system sends out, in compliance with GDPR. ', + 'privacy_policy_link_help' => 'Angi en URL i dette feltet for å inkludere en lenke til personvern-policy i applikasjonsbunntekst og i alle eposter som dette systemet sender ut. Støtter GDPR. ', 'purge' => 'Tømme slettede poster', 'labels_display_bgutter' => 'Etikett bunnmarg', 'labels_display_sgutter' => 'Etikett sidemarg', @@ -182,6 +183,6 @@ return array( 'vertical' => 'vertikal', 'horizontal' => 'horisontal', 'unique_serial' => 'Unike serienumre', - 'unique_serial_help_text' => 'Checking this box will enforce a uniqueness constraint on asset serials', + 'unique_serial_help_text' => 'Håndhever at eiendelsserienumre er unike', 'zerofill_count' => 'Lengden på ID-merker, inkludert zerofill', ); diff --git a/resources/lang/no/admin/suppliers/message.php b/resources/lang/no/admin/suppliers/message.php index 0d1c45170f..3b23320d23 100644 --- a/resources/lang/no/admin/suppliers/message.php +++ b/resources/lang/no/admin/suppliers/message.php @@ -19,9 +19,9 @@ return array( 'confirm' => 'Er du sikker på at du vil slette denne leverandøren?', 'error' => 'Det oppstod et problem under sletting av leverandør. Prøv igjen.', 'success' => 'Sletting av leverandør vellykket.', - 'assoc_assets' => 'This supplier is currently associated with :asset_count asset(s) and cannot be deleted. Please update your assets to no longer reference this supplier and try again. ', - 'assoc_licenses' => 'This supplier is currently associated with :licenses_count licences(s) and cannot be deleted. Please update your licenses to no longer reference this supplier and try again. ', - 'assoc_maintenances' => 'This supplier is currently associated with :asset_maintenances_count asset maintenances(s) and cannot be deleted. Please update your asset maintenances to no longer reference this supplier and try again. ', + 'assoc_assets' => 'Denne leverandøren er tilknyttet med :asset_count eiendel(er), og kan ikke slettes. Oppdater eiendelene dine til ikke å bruke denne leverandøren og prøv igjen. ', + 'assoc_licenses' => 'Denne leverandøren er tilknyttet med :licenses_count lisens(er), og kan ikke slettes. Oppdater lisensene dine til ikke å bruke denne leverandøren og prøv igjen. ', + 'assoc_maintenances' => 'Denne leverandøren er tilknyttet med :asset_maintenances_count eiendelsvedlikehold, og kan ikke slettes. Oppdater dine eiendelsvedlikehold til ikke å bruke denne leverandøren og prøv igjen. ', ) ); diff --git a/resources/lang/no/general.php b/resources/lang/no/general.php index 6475292211..63fec82470 100644 --- a/resources/lang/no/general.php +++ b/resources/lang/no/general.php @@ -56,7 +56,7 @@ 'create' => 'Opprett ny', 'created' => 'Enhet opprettet', 'created_asset' => 'eiendel opprettet', - 'created_at' => 'Opprettet i', + 'created_at' => 'Opprettet', 'updated_at' => 'Oppdatert', 'currency' => '$', // this is deprecated 'current' => 'Nåværende', @@ -85,8 +85,8 @@ 'email_domain_help' => 'Brukes til å generere e-postadresser ved import', 'filastname_format' => 'Fornavn (kun initial) Etternavn (oladunk@example.com)', 'firstname_lastname_format' => 'Fornavn Etternavn (oladunk@example.com)', - 'firstname_lastname_underscore_format' => 'First Name Last Name (jane_smith@example.com)', - 'lastnamefirstinitial_format' => 'Last Name First Initial (smithj@example.com)', + 'firstname_lastname_underscore_format' => 'Fornavn Etternavn (oladunk@example.com)', + 'lastnamefirstinitial_format' => 'Etternavn Initialer (oladunk@example.com)', 'first' => 'Første', 'first_name' => 'Fornavn', 'first_name_format' => 'Fornavn (oladunk@example.com)', @@ -103,7 +103,7 @@ 'image' => 'Bilde', 'image_delete' => 'Slett bilde', 'image_upload' => 'Last opp bilde', - 'image_filetypes_help' => 'Accepted filetypes are jpg, png, gif, and svg. Max upload size allowed is :size.', + 'image_filetypes_help' => 'Tillatte filtyper er jpg, png, gif og svg. Maks tillatte filstørrelse er :size.', 'import' => 'Importer', 'import-history' => 'Importhistorikk', 'asset_maintenance' => 'Vedlikehold av eiendeler', diff --git a/resources/lang/no/mail.php b/resources/lang/no/mail.php index ffdde9e676..dc46322929 100644 --- a/resources/lang/no/mail.php +++ b/resources/lang/no/mail.php @@ -58,9 +58,9 @@ return array( 'test_email' => 'Test-epost fra Snipe-IT', 'test_mail_text' => 'Dette er en test fra Snipe-IT eiendelsadministrasjonssystem. Hvis du mottok denne meldingen fungerer e-post.', 'the_following_item' => 'Følgende enheter har blitt sjekket inn: ', - 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', - 'assets_warrantee_alert' => 'There is :count asset with a warrantee expiring in the next :threshold days.|There are :count assets with warrantees expiring in the next :threshold days.', - 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', + 'low_inventory_alert' => ':count enhet er under minimumnivå for beholdning, eller vil snart nå dette nivået.|:count enheter er under minimumnivå for beholdning, eller vil snart nå dette nivået.', + 'assets_warrantee_alert' => ':count eiendel har garanti som utløper de neste :threshold dagene.|:count eiendeler har garanti som utløper de neste :threshold dagene.', + 'license_expiring_alert' => ':count lisens utløper de neste :threshold dagene.|:count lisenser utløper de neste :threshold dagene.', 'to_reset' => 'Fullfør dette skjemaet for å tilbakestille ditt :web passord:', 'type' => 'Type', 'user' => 'Bruker', diff --git a/resources/lang/no/passwords.php b/resources/lang/no/passwords.php index b675d96a2f..49bb02e9fb 100644 --- a/resources/lang/no/passwords.php +++ b/resources/lang/no/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'Din passord link har blitt sendt!', - 'user' => 'No matching active user found with that email.', + 'user' => 'Ingen aktiv bruker med den epostadressen funnet.', ]; diff --git a/resources/lang/pt-PT/admin/models/general.php b/resources/lang/pt-PT/admin/models/general.php index 3b4549db05..098eab3525 100644 --- a/resources/lang/pt-PT/admin/models/general.php +++ b/resources/lang/pt-PT/admin/models/general.php @@ -14,5 +14,5 @@ return array( 'view_models' => 'Ver modelos', 'fieldset' => 'Conjunto de campos', 'no_custom_field' => 'Sem campos customizados', - 'add_default_values' => 'Add default values', + 'add_default_values' => 'Adicionar valores standard', ); diff --git a/resources/lang/pt-PT/passwords.php b/resources/lang/pt-PT/passwords.php index eafb3e3b93..6e8e65a4ef 100644 --- a/resources/lang/pt-PT/passwords.php +++ b/resources/lang/pt-PT/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'O link com a senha de acesso foi enviado com sucesso!', - 'user' => 'No matching active user found with that email.', + 'user' => 'Nenhum Utilizador activo encontrado com esse e-mail.', ]; diff --git a/resources/lang/sv-SE/admin/hardware/general.php b/resources/lang/sv-SE/admin/hardware/general.php index b4e80f99c4..39021a96c2 100644 --- a/resources/lang/sv-SE/admin/hardware/general.php +++ b/resources/lang/sv-SE/admin/hardware/general.php @@ -3,7 +3,7 @@ return array( 'about_assets_title' => 'Om tillgångar', 'about_assets_text' => 'Tillgångar är poster som spåras med serienummer eller tillgångstagg. De tenderar att vara mer värdefulla saker där identifiering av en viss sak är viktig.', - 'archived' => 'arkiveras', + 'archived' => 'Arkiverade', 'asset' => 'Tillgång', 'bulk_checkout' => 'Checkout tillgångar', 'checkin' => 'Checkin Asset', @@ -16,7 +16,7 @@ return array( 'requestable' => 'Requestable', 'requested' => 'Begärda', 'restore' => 'Återställ tillgången', - 'pending' => 'Avvaktan', + 'pending' => 'Väntande', 'undeployable' => 'Undeployable', 'view' => 'Visa tillgång', ); diff --git a/resources/lang/sv-SE/admin/settings/general.php b/resources/lang/sv-SE/admin/settings/general.php index e886725e93..b72ed688f3 100644 --- a/resources/lang/sv-SE/admin/settings/general.php +++ b/resources/lang/sv-SE/admin/settings/general.php @@ -120,7 +120,7 @@ return array( 'slack_integration' => 'Slack Settings', 'slack_integration_help' => 'Slak integration är valfri, men ändpunkten och kanalen krävs om du vill använda den. För att konfigurera Slack integration måste du först skapa en inkommande webhook på ditt Slack-konto.', 'slack_integration_help_button' => 'När du har sparat din Slack-information visas en testknapp.', - 'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.', + 'slack_test_help' => 'Testa om din Slack-integration är konfigurerad korrekt. DU MÅSTE SPARA DINA UPPDATERADE SLACK-INSTÄLLNINGAR FÖRST.', 'snipe_version' => 'Snipe-IT-versionen', 'support_footer' => 'Stöd länkar i sidfot ', 'support_footer_help' => 'Ange vem som kan se länkarna till Snipe-IT Support info och användarmanual', diff --git a/resources/lang/sv-SE/admin/statuslabels/table.php b/resources/lang/sv-SE/admin/statuslabels/table.php index f88a0d5fac..de64e6a3bf 100644 --- a/resources/lang/sv-SE/admin/statuslabels/table.php +++ b/resources/lang/sv-SE/admin/statuslabels/table.php @@ -2,7 +2,7 @@ return array( 'about' => 'Om statusetiketter', - 'archived' => 'arkiveras', + 'archived' => 'Arkiverade', 'create' => 'Skapa statusetikett', 'color' => 'Diagramfärg', 'default_label' => 'Standard etikett', @@ -10,7 +10,7 @@ return array( 'deployable' => 'Deployable', 'info' => 'Statusetiketter används för att beskriva de olika tillstånd som dina tillgångar kan vara i. De kan vara ute för reparation, förlorade / stulna etc. Du kan skapa nya statusetiketter för deployerbara, pågående och arkiverade tillgångar.', 'name' => 'Statusnamn', - 'pending' => 'Avvaktan', + 'pending' => 'Väntande', 'status_type' => 'Statustyp', 'show_in_nav' => 'Visa i sidnav', 'title' => 'Statusetiketter', diff --git a/resources/lang/sv-SE/admin/suppliers/message.php b/resources/lang/sv-SE/admin/suppliers/message.php index 5cb56e6a72..94fd26dc99 100644 --- a/resources/lang/sv-SE/admin/suppliers/message.php +++ b/resources/lang/sv-SE/admin/suppliers/message.php @@ -19,8 +19,8 @@ return array( 'confirm' => 'Är du säker på att du vill radera denna leverantör?', 'error' => 'Det var ett problem att ta bort leverantören. Var god försök igen.', 'success' => 'Leverantören har tagits bort.', - 'assoc_assets' => 'This supplier is currently associated with :asset_count asset(s) and cannot be deleted. Please update your assets to no longer reference this supplier and try again. ', - 'assoc_licenses' => 'This supplier is currently associated with :licenses_count licences(s) and cannot be deleted. Please update your licenses to no longer reference this supplier and try again. ', + 'assoc_assets' => 'Denna leverantör är för närvarande är associerade med: asset_count tillgång(ar) och kan inte tas bort. Vänligen uppdatera dina tillgångar för att inte längre referera denna leverantör och försök igen. ', + 'assoc_licenses' => 'Denna leverantör är för närvarande är associerade med: licenses_count licenser (s) och kan inte tas bort. Vänligen uppdatera dina licenser för att inte längre referera denna leverantör och försök igen. ', 'assoc_maintenances' => 'Denna leverantör är för närvarande associerad med: asset_maintenances_count asset maintenances (s) och kan inte raderas. Var vänlig uppdatera dina tillgångsinrättningar för att inte längre referera till denna leverantör och försök igen. ', ) diff --git a/resources/lang/sv-SE/general.php b/resources/lang/sv-SE/general.php index 181bd2f46c..4948c89e8e 100644 --- a/resources/lang/sv-SE/general.php +++ b/resources/lang/sv-SE/general.php @@ -148,7 +148,7 @@ 'order_number' => 'Order Nummer', 'page_menu' => 'Visar _MENU_ objekt', 'pagination_info' => 'Visar _START_ till _END_ av _TOTAL_ objekt', - 'pending' => 'Avvaktan', + 'pending' => 'Väntande', 'people' => 'Personer', 'per_page' => 'Resultat per sida', 'previous' => 'Föregående', @@ -202,7 +202,7 @@ 'total_accessories' => 'Totala tillbehör', 'total_consumables' => 'totala förbrukningsvaror', 'type' => 'Typ', - 'undeployable' => 'Un-utvecklingsbara', + 'undeployable' => 'Ej tillgängliga', 'unknown_admin' => 'Okänd Admin', 'username_format' => 'Användarnamn Format', 'update' => 'Uppdatering', diff --git a/resources/lang/th/admin/settings/general.php b/resources/lang/th/admin/settings/general.php index 2964ca7a45..409b1d2684 100644 --- a/resources/lang/th/admin/settings/general.php +++ b/resources/lang/th/admin/settings/general.php @@ -88,8 +88,8 @@ return array( 'login_remote_user_custom_logout_url_text' => 'URL ออกจากระบบแบบกำหนดเอง', 'login_remote_user_custom_logout_url_help' => 'หากมีการระบุ URL ไว้ที่นี่ผู้ใช้จะได้รับการเปลี่ยนเส้นทางไปยัง URL นี้หลังจากที่ผู้ใช้ล็อกออกจาก Snipe-IT ซึ่งจะเป็นประโยชน์ในการปิดเซสชันผู้ใช้ของผู้ให้บริการการรับรองความถูกต้องของคุณอย่างถูกต้อง', 'logo' => 'โลโก้', - 'logo_print_assets' => 'Use in Print', - 'logo_print_assets_help' => 'Use branding on printable asset lists ', + 'logo_print_assets' => 'ใช้ในการพิมพ์', + 'logo_print_assets_help' => 'ใช้ตราสินค้าบนสินทรัพย์สามารถพิมพ์รายการ ', 'full_multiple_companies_support_help_text' => 'จำกัด ผู้ใช้ (รวมทั้งผู้ดูแลระบบ) ที่มอบหมายให้ บริษัท ไปยังสินทรัพย์ของ บริษัท', 'full_multiple_companies_support_text' => 'การสนับสนุนหลาย บริษัท', 'show_in_model_list' => 'แสดงใน Dropdown แบบจำลอง', diff --git a/resources/lang/th/passwords.php b/resources/lang/th/passwords.php index 9cdf3db21f..0df2f352e2 100644 --- a/resources/lang/th/passwords.php +++ b/resources/lang/th/passwords.php @@ -2,6 +2,6 @@ return [ 'sent' => 'ลิงค์รหัสผ่านของคุณถูกส่ง!', - 'user' => 'No matching active user found with that email.', + 'user' => 'ไม่พบผู้ใช้งานดังกล่าวกับอีเมล์นี้', ]; diff --git a/resources/lang/vi/admin/settings/general.php b/resources/lang/vi/admin/settings/general.php index 9d0a427fde..4c3129c7be 100644 --- a/resources/lang/vi/admin/settings/general.php +++ b/resources/lang/vi/admin/settings/general.php @@ -42,8 +42,8 @@ return array( 'alt_barcode_type' => 'Loại mã vạch 1D', 'eula_settings' => 'Cài đặt EULA', 'eula_markdown' => 'Đây là EULA cho phép Github flavored markdown.', - 'footer_text' => 'Additional Footer Text ', - 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', + 'footer_text' => 'Văn bản thêm chân ', + 'footer_text_help' => 'Văn bản này sẽ xuất hiện trong chân trang bên phải. Liên kết được phép sử dụng Github mùi markdown. Ngắt dòng, tiêu đề, hình ảnh, vv có thể dẫn đến kết quả không thể đoán trước.', 'general_settings' => 'Cài đặt thường', 'generate_backup' => 'Tạo Sao lưu', 'header_color' => 'Màu Header', @@ -52,8 +52,8 @@ return array( 'ldap_enabled' => 'Bật LDAP', 'ldap_integration' => 'Tích hợp LDAP', 'ldap_settings' => 'Cài đặt LDAP', - 'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', - 'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', + 'ldap_login_test_help' => 'Nhập một ngày hợp lệ LDAP tên người dùng và mật khẩu từ cơ sở DN bạn đã nêu trên để kiểm tra xem LDAP đăng nhập của bạn được cấu hình đúng. BẠN PHẢI LƯU THIẾT ĐẶT CẬP NHẬT LDAP CỦA BẠN ĐẦU TIÊN.', + 'ldap_login_sync_help' => 'Này chỉ kiểm tra LDAP có thể đồng bộ một cách chính xác. Nếu truy vấn xác thực LDAP của bạn không đúng, người sử dụng vẫn không thể đăng nhập. BẠN PHẢI LƯU THIẾT ĐẶT CẬP NHẬT LDAP CỦA BẠN ĐẦU TIÊN.', 'ldap_server' => 'Máy chủ LDAP', 'ldap_server_help' => 'Điều này sẽ bắt đầu với ldap: // (cho không mã hóa hoặc TLS) hoặc ldaps: // (cho SSL)', 'ldap_server_cert' => 'Xác thực giấy chứng nhận LDAP SSL', @@ -75,17 +75,17 @@ return array( 'ldap_active_flag' => 'LDAP Active Flag', 'ldap_emp_num' => 'Số nhân viên LDAP', 'ldap_email' => 'Email LDAP', - 'license' => 'Software License', + 'license' => 'Bản quyền phần mềm', 'load_remote_text' => 'Remote Scripts', 'load_remote_help_text' => 'Cài đặt Snipe-IT này có thể tải các tập lệnh từ thế giới bên ngoài.', 'login_note' => 'Lưu ý đăng nhập', 'login_note_help' => 'Tùy chọn bao gồm một vài câu trên màn hình đăng nhập của bạn, ví dụ để hỗ trợ những người đã tìm thấy thiết bị bị mất hoặc bị đánh cắp. Trường này chấp nhận Bài nhãn hiệu có hương vị cố định', - 'login_remote_user_text' => 'Remote User login options', - 'login_remote_user_enabled_text' => 'Enable Login with Remote User Header', - 'login_remote_user_enabled_help' => 'This option enables Authentication via the REMOTE_USER header according to the "Common Gateway Interface (rfc3875)"', - 'login_common_disabled_text' => 'Disable other authentication mechanisms', - 'login_common_disabled_help' => 'This option disables other authentication mechanisms. Just enable this option if you are sure that your REMOTE_USER login is already working', - 'login_remote_user_custom_logout_url_text' => 'Custom logout URL', + 'login_remote_user_text' => 'Tùy chọn đăng nhập người dùng từ xa', + 'login_remote_user_enabled_text' => 'Cho phép đăng nhập với người dùng từ xa', + 'login_remote_user_enabled_help' => 'Lựa chọn này cho phép REMOTE_USER xác thực từ xa "Thông qua cổng (rfc3875)', + 'login_common_disabled_text' => 'Vô hiệu hóa xác thực', + 'login_common_disabled_help' => 'Với tùy chọn này vô hiệu hóa các xác thực. Chỉ cần kích hoạt tùy chọn này nếu bạn chắc chắn rằng thông tin đăng nhập REMOTE_USER của bạn đã hoạt động', + 'login_remote_user_custom_logout_url_text' => 'Tùy chỉnh URL đăng xuất ', 'login_remote_user_custom_logout_url_help' => 'If a url is provided here, users will get redirected to this URL after the user logs out of Snipe-IT. This is useful to close the user sessions of your Authentication provider correctly.', 'logo' => 'Logo', 'logo_print_assets' => 'Use in Print', diff --git a/resources/lang/vi/button.php b/resources/lang/vi/button.php index 4ec5298d79..b0b2f25505 100644 --- a/resources/lang/vi/button.php +++ b/resources/lang/vi/button.php @@ -12,5 +12,5 @@ return array( 'submit' => 'Gửi', 'upload' => 'Tải lên', 'select_file' => 'Chọn tập tin...', - 'select_files' => 'Select Files...', + 'select_files' => 'Chọn files...', ); diff --git a/resources/lang/vi/validation.php b/resources/lang/vi/validation.php index dfb3e82ad8..6ea232712f 100644 --- a/resources/lang/vi/validation.php +++ b/resources/lang/vi/validation.php @@ -67,7 +67,7 @@ return array( 'not_in' => ':attribute đã chọn không hợp lý.', 'numeric' => ':attribute phải là một số.', 'present' => 'Trường thuộc tính: phải có mặt.', - 'valid_regex' => 'That is not a valid regex. ', + 'valid_regex' => 'Đây không phải là một đơn hàng hợp lệ.', 'regex' => 'Định dạng :attribute thì không hợp lý.', 'required' => 'Trường :attribute thì bắt buộc.', 'required_if' => 'Trường :attribute thì bắt buộc khi :other là :value.', @@ -88,7 +88,7 @@ return array( 'unique' => ':attribute đã sẵn sàng.', 'uploaded' => 'Thuộc tính: không thể tải lên.', 'url' => 'Định dạng :attribute thì không hợp lý.', - "unique_undeleted" => "The :attribute must be unique.", + "unique_undeleted" => "Thuộc tính: phải là duy nhất.", /* |-------------------------------------------------------------------------- diff --git a/resources/macros/macros.php b/resources/macros/macros.php index 02f8917751..93887ff93c 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -26,6 +26,7 @@ Form::macro('locales', function ($name = "locale", $selected = null, $class = nu 'nl'=> "Dutch", 'en-ID'=> "English, Indonesia", 'et'=> "Estonian", + 'fil'=> "Filipino", 'fi'=> "Finnish", 'fr'=> "French", 'de'=> "German", @@ -40,9 +41,9 @@ Form::macro('locales', function ($name = "locale", $selected = null, $class = nu 'ko'=> "Korean", 'lv'=>'Latvian', 'lt'=> "Lithuanian", + 'mk'=> "Macedonian", 'ms'=> "Malay", 'mi'=> "Maori", - 'mk'=> "Macedonian", 'mn'=> "Mongolian", 'no'=> "Norwegian", 'fa'=> "Persian", @@ -55,6 +56,7 @@ Form::macro('locales', function ($name = "locale", $selected = null, $class = nu 'sl'=> "Slovenian", 'es-ES'=> "Spanish", 'es-CO'=> "Spanish, Colombia", + 'es-MX'=> "Spanish, Mexico", 'es-VE'=> "Spanish, Venezuela", 'sv-SE'=> "Swedish", 'tl'=> "Tagalog", diff --git a/resources/views/accessories/edit.blade.php b/resources/views/accessories/edit.blade.php index d92d06d2fb..3f6b6c3a17 100755 --- a/resources/views/accessories/edit.blade.php +++ b/resources/views/accessories/edit.blade.php @@ -22,6 +22,7 @@ @include ('partials.forms.edit.quantity') @include ('partials.forms.edit.minimum_quantity') + @if ($item->image) diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 94e2667422..15eb89c6cd 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -89,13 +89,22 @@
+ @if ($accessory->image!='') +
+ {{ $accessory->name }} +
+ @endif + +
+ @can('checkout', \App\Models\Accessory::class) + numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }} + @endcan +
+ +

{{ trans('admin/accessories/general.about_accessories_title') }}

{{ trans('admin/accessories/general.about_accessories_text') }}

-
- @can('checkout', \App\Models\Accessory::class) - numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }} - @endcan -
+
diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php index 7911d5a2d6..99e1a94476 100644 --- a/resources/views/components/view.blade.php +++ b/resources/views/components/view.blade.php @@ -86,9 +86,10 @@
@if ($component->image!='') -
- +
+ {{ $component->name }}
+ @endif @if ($component->serial!='') diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index dc4fae80ea..b217bca55f 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -69,14 +69,11 @@
@if ($consumable->image!='') -
- +
+ {{ $consumable->name }}
@endif -

{{ trans('admin/consumables/general.about_consumables_title') }}

-

{{ trans('admin/consumables/general.about_consumables_text') }}

- @if ($consumable->purchase_date)
{{ trans('general.purchase_date') }}: @@ -119,6 +116,10 @@ {{ $consumable->order_number }}
@endif +
+

{{ trans('admin/consumables/general.about_consumables_title') }}

+

{{ trans('admin/consumables/general.about_consumables_text') }}

+
diff --git a/resources/views/hardware/history.blade.php b/resources/views/hardware/history.blade.php index d42395a7b3..5204823566 100644 --- a/resources/views/hardware/history.blade.php +++ b/resources/views/hardware/history.blade.php @@ -49,114 +49,170 @@
-
- - + + + - @if (Session::get('message')) -

- You have an error in your CSV file:
- {{ Session::get('message') }} -

- @endif - -

- Use this tool to import asset history you may have in CSV format. This information likely will be extracted from your previous asset management system. -

-

- Asset history is defined as a checkout and subsequent checkin that has happened in the past. The assets and users MUST already exist in SNIPE, or they will be skipped. Matching assets for history import happens against the asset tag. We will try to find a matching user based on the user's full name you provide, based on the username format you configured in the Admin > General Settings. + @if (Session::get('message')) +

+ You have an error in your CSV file:
+ {{ Session::get('message') }}

+ @endif -

- Fields included in the CSV must match exactly these header values: Asset Tag, Checkout Date, Checkin Date, Full Name. Any additional fields will be ignored. -

+

+ Upload a CSV that contains asset history. The assets and users MUST already exist in the system, or they will be skipped. Matching assets for history import happens against the asset tag. We will try to find a matching user based on the user's name you provide, and the criteria you select below. If you do not select any criteria below, it will simply try to match on the username format you configured in the Admin > General Settings. +

-
- -
- -
+

Fields included in the CSV must match the headers: Asset Tag, Checkout Date, Checkin Date, Name. Any additional fields will be ignored.

+ + +

History should be ordered by date in ascending order.

+ +
+ +
+
+
- - + + + +
+ + + + +
+ +
+ + @if (isset($status)) + + + @if (count($status['error']) > 0) +
+
+
+
+

{{ count($status['error']) }} Error Messages

+
+
+ + @for ($x = 0; $x < count($status['error']); $x++) + @foreach($status['error'][$x] as $object_type => $message) + + + + + @endforeach + @endfor +
{{ ucwords($object_type) }} {{ key($message) }}:{{ $message[key($message)]['msg'] }}
+
+
+
+
+
- + @endif - - @if (isset($status)) - - - @if (count($status['error']) > 0) + @if (count($status['success']) > 0)
-

{{ count($status['error']) }} Error Messages

+

{{ count($status['success']) }} Success Messages

- @for ($x = 0; $x < count($status['error']); $x++) - @foreach($status['error'][$x] as $object_type => $message) - - - - + @for ($x = 0; $x < count($status['success']); $x++) + @foreach($status['success'][$x] as $object_type => $message) + + + + @endforeach @endfor
{{ ucwords($object_type) }} {{ key($message) }}:{{ $message[key($message)]['msg'] }}
{{ ucwords($object_type) }} {{ key($message) }}:{{ $message[key($message)]['msg'] }}
-
+
+ @endif + @endif - @endif +
+ +@stop diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 7e60bb33df..e814e249b3 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -496,6 +496,7 @@
+ @if ($asset->image) @elseif (($asset->model) && ($asset->model->image!='')) @@ -564,19 +565,21 @@ @foreach ($asset->licenseseats as $seat) - - {{ $seat->license->name }} - - @can('viewKeys', $seat->license) - {!! nl2br(e($seat->license->serial)) !!} - @else - ------------ - @endcan - - - {{ trans('general.checkin') }} - - + @if ($seat->license) + + {{ $seat->license->name }} + + @can('viewKeys', $seat->license) + {!! nl2br(e($seat->license->serial)) !!} + @else + ------------ + @endcan + + + {{ trans('general.checkin') }} + + + @endif @endforeach diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 49a20a200c..eabddf976c 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -10,8 +10,15 @@ - - + + + + + + + + +