Merge branch 'develop' into bug/sc-15034

This commit is contained in:
Marcus Moore 2023-04-19 11:45:16 -07:00
commit 15280c435e
No known key found for this signature in database
52 changed files with 512 additions and 148 deletions

View file

@ -20,13 +20,14 @@ class CreateAdmin extends Command
* @property string $password * @property string $password
* @property boolean $activated * @property boolean $activated
* @property boolean $show_in_list * @property boolean $show_in_list
* @property boolean $autoassign_licenses
* @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $created_at
* @property mixed $created_by * @property mixed $created_by
*/ */
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?}'; protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?} {autoassign_licenses?}';
/** /**
* The console command description. * The console command description.
@ -54,6 +55,9 @@ class CreateAdmin extends Command
$email = $this->option('email'); $email = $this->option('email');
$password = $this->option('password'); $password = $this->option('password');
$show_in_list = $this->argument('show_in_list'); $show_in_list = $this->argument('show_in_list');
$autoassign_licenses = $this->argument('autoassign_licenses');
if (($first_name == '') || ($last_name == '') || ($username == '') || ($email == '') || ($password == '')) { if (($first_name == '') || ($last_name == '') || ($username == '') || ($email == '') || ($password == '')) {
$this->info('ERROR: All fields are required.'); $this->info('ERROR: All fields are required.');
@ -70,6 +74,11 @@ class CreateAdmin extends Command
if ($show_in_list == 'false') { if ($show_in_list == 'false') {
$user->show_in_list = 0; $user->show_in_list = 0;
} }
if ($autoassign_licenses == 'false') {
$user->autoassign_licenses = 0;
}
if ($user->save()) { if ($user->save()) {
$this->info('New user created'); $this->info('New user created');
$user->groups()->attach(1); $user->groups()->attach(1);

View file

@ -71,6 +71,7 @@ class UsersController extends Controller
'users.start_date', 'users.start_date',
'users.end_date', 'users.end_date',
'users.vip', 'users.vip',
'users.autoassign_licenses',
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',) ])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',)
->withCount('assets as assets_count', 'licenses as licenses_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');
@ -187,6 +188,10 @@ class UsersController extends Controller
$users->has('accessories', '=', $request->input('accessories_count')); $users->has('accessories', '=', $request->input('accessories_count'));
} }
if ($request->filled('autoassign_licenses')) {
$users->where('autoassign_licenses', '=', $request->input('autoassign_licenses'));
}
if ($request->filled('search')) { if ($request->filled('search')) {
$users = $users->TextSearch($request->input('search')); $users = $users->TextSearch($request->input('search'));
} }
@ -259,6 +264,7 @@ class UsersController extends Controller
'vip', 'vip',
'start_date', 'start_date',
'end_date', 'end_date',
'autoassign_licenses',
]; ];
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name'; $sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
@ -356,7 +362,7 @@ class UsersController extends Controller
$user->permissions = $permissions_array; $user->permissions = $permissions_array;
} }
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 20); $tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 40);
$user->password = bcrypt($request->get('password', $tmp_pass)); $user->password = bcrypt($request->get('password', $tmp_pass));
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar'); app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');

View file

@ -112,4 +112,54 @@ class LicenseCheckinController extends Controller
// Redirect to the license page with error // Redirect to the license page with error
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error')); return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
} }
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckin(Request $request, $licenseId) {
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
$licenseSeatsByUser = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('assigned_to')
->with('user')
->get();
foreach ($licenseSeatsByUser as $user_seat) {
$user_seat->assigned_to = null;
if ($user_seat->save()) {
\Log::debug('Checking in '.$license->name.' from user '.$user_seat->username);
$user_seat->logCheckin($user_seat->user, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
}
}
$licenseSeatsByAsset = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('asset_id')
->with('asset')
->get();
$count = 0;
foreach ($licenseSeatsByAsset as $asset_seat) {
$asset_seat->asset_id = null;
if ($asset_seat->save()) {
\Log::debug('Checking in '.$license->name.' from asset '.$asset_seat->asset_tag);
$asset_seat->logCheckin($asset_seat->asset, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
$count++;
}
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkin_all.success', 2, ['count' => $count] ));
}
} }

View file

@ -126,4 +126,70 @@ class LicenseCheckoutController extends Controller
return false; return false;
} }
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckout($licenseId) {
\Log::debug('Checking out '.$licenseId.' via bulk');
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
$avail_count = $license->getAvailSeatsCountAttribute();
$users = User::whereNull('deleted_at')->where('autoassign_licenses', '=', 1)->with('licenses')->get();
\Log::debug($avail_count.' will be assigned');
if ($users->count() > $avail_count) {
\Log::debug('You do not have enough free seats to complete this task, so we will check out as many as we can. ');
}
// If the license is valid, check that there is an available seat
if ($license->availCount()->count() < 1) {
return redirect()->back()->with('error', trans('admin/licenses/general.bulk.checkout_all.error_no_seats'));
}
$assigned_count = 0;
foreach ($users as $user) {
// Check to make sure this user doesn't already have this license checked out to them
if ($user->licenses->where('id', '=', $licenseId)->count()) {
\Log::debug($user->username.' already has this license checked out to them. Skipping... ');
continue;
}
$licenseSeat = $license->freeSeat();
// Update the seat with checkout info
$licenseSeat->assigned_to = $user->id;
if ($licenseSeat->save()) {
$avail_count--;
$assigned_count++;
$licenseSeat->logCheckout(trans('admin/licenses/general.bulk.checkout_all.log_msg'), $user);
\Log::debug('License '.$license->name.' seat '.$licenseSeat->id.' checked out to '.$user->username);
}
if ($avail_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_not_enough_seats', ['count' => $assigned_count]));
}
}
if ($assigned_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_no_avail_users', ['count' => $assigned_count]));
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] ));
}
} }

View file

@ -6,6 +6,8 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Company; use App\Models\Company;
use App\Models\License; use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
@ -232,17 +234,39 @@ class LicensesController extends Controller
public function show($licenseId = null) public function show($licenseId = null)
{ {
$license = License::with('assignedusers')->find($licenseId); $license = License::with('assignedusers')->find($licenseId);
$users_count = User::where('autoassign_licenses', '1')->count();
$total_seats_count = $license->totalSeatsByLicenseID();
$available_seats_count = $license->availCount()->count();
$checkedout_seats_count = ($total_seats_count - $available_seats_count);
\Log::debug('Total: '.$total_seats_count);
\Log::debug('Users: '.$users_count);
\Log::debug('Available: '.$available_seats_count);
\Log::debug('Checkedout: '.$checkedout_seats_count);
if ($license) { if ($license) {
$this->authorize('view', $license); $this->authorize('view', $license);
return view('licenses.view', compact('license'))
return view('licenses/view', compact('license')); ->with('users_count', $users_count)
->with('total_seats_count', $total_seats_count)
->with('available_seats_count', $available_seats_count)
->with('checkedout_seats_count', $checkedout_seats_count);
} }
return redirect()->route('licenses.index') return redirect()->route('licenses.view')
->with('error', trans('admin/licenses/message.does_not_exist')); ->with('error', trans('admin/licenses/message.does_not_exist'));
} }
/**
* Returns a view with prepopulated data for clone
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $licenseId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function getClone($licenseId = null) public function getClone($licenseId = null)
{ {
if (is_null($license_to_clone = License::find($licenseId))) { if (is_null($license_to_clone = License::find($licenseId))) {

View file

@ -113,7 +113,8 @@ class BulkUsersController extends Controller
->conditionallyAddItem('locale') ->conditionallyAddItem('locale')
->conditionallyAddItem('remote') ->conditionallyAddItem('remote')
->conditionallyAddItem('ldap_import') ->conditionallyAddItem('ldap_import')
->conditionallyAddItem('activated'); ->conditionallyAddItem('activated')
->conditionallyAddItem('autoassign_licenses');
// If the manager_id is one of the users being updated, generate a warning. // If the manager_id is one of the users being updated, generate a warning.

View file

@ -120,7 +120,7 @@ class UsersController extends Controller
$user->created_by = Auth::user()->id; $user->created_by = Auth::user()->id;
$user->start_date = $request->input('start_date', null); $user->start_date = $request->input('start_date', null);
$user->end_date = $request->input('end_date', null); $user->end_date = $request->input('end_date', null);
$user->autoassign_licenses= $request->input('autoassign_licenses', 1); $user->autoassign_licenses = $request->input('autoassign_licenses', 0);
// Strip out the superuser permission if the user isn't a superadmin // Strip out the superuser permission if the user isn't a superadmin
$permissions_array = $request->input('permission'); $permissions_array = $request->input('permission');
@ -275,7 +275,7 @@ class UsersController extends Controller
$user->website = $request->input('website', null); $user->website = $request->input('website', null);
$user->start_date = $request->input('start_date', null); $user->start_date = $request->input('start_date', null);
$user->end_date = $request->input('end_date', null); $user->end_date = $request->input('end_date', null);
$user->autoassign_licenses = $request->input('autoassign_licenses', 1); $user->autoassign_licenses = $request->input('autoassign_licenses', 0);
// Update the location of any assets checked out to this user // Update the location of any assets checked out to this user
Asset::where('assigned_type', User::class) Asset::where('assigned_type', User::class)

View file

@ -56,7 +56,7 @@ class LicensesTransformer
'checkin' => Gate::allows('checkin', License::class), 'checkin' => Gate::allows('checkin', License::class),
'clone' => Gate::allows('create', License::class), 'clone' => Gate::allows('create', License::class),
'update' => Gate::allows('update', License::class), 'update' => Gate::allows('update', License::class),
'delete' => Gate::allows('delete', License::class), 'delete' => (Gate::allows('delete', License::class) && ($license->seats == $license->availCount()->count())) ? true : false,
]; ];
$array += $permissions_array; $array += $permissions_array;

View file

@ -56,6 +56,7 @@ class UsersTransformer
'notes'=> e($user->notes), 'notes'=> e($user->notes),
'permissions' => $user->decodePermissions(), 'permissions' => $user->decodePermissions(),
'activated' => ($user->activated == '1') ? true : false, 'activated' => ($user->activated == '1') ? true : false,
'autoassign_licenses' => ($user->autoassign_licenses == '1') ? true : false,
'ldap_import' => ($user->ldap_import == '1') ? true : false, 'ldap_import' => ($user->ldap_import == '1') ? true : false,
'two_factor_enrolled' => ($user->two_factor_active_and_enrolled()) ? true : false, 'two_factor_enrolled' => ($user->two_factor_active_and_enrolled()) ? true : false,
'two_factor_optin' => ($user->two_factor_active()) ? true : false, 'two_factor_optin' => ($user->two_factor_active()) ? true : false,

View file

@ -58,7 +58,8 @@ class UserImporter extends ItemImporter
$this->item['department_id'] = $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')); $this->item['department_id'] = $this->createOrFetchDepartment($this->findCsvMatch($row, 'department'));
$this->item['manager_id'] = $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')); $this->item['manager_id'] = $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name'));
$this->item['remote'] =($this->fetchHumanBoolean($this->findCsvMatch($row, 'remote')) ==1 ) ? '1' : 0; $this->item['remote'] =($this->fetchHumanBoolean($this->findCsvMatch($row, 'remote')) ==1 ) ? '1' : 0;
$this->item['vip'] =($this->fetchHumanBoolean($this->findCsvMatch($row, 'vip')) ==1 ) ? '1' : 0; $this->item['vip'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'vip')) ==1 ) ? '1' : 0;
$this->item['autoassign_licenses'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'autoassign_licenses')) ==1 ) ? '1' : 0;
$user_department = $this->findCsvMatch($row, 'department'); $user_department = $this->findCsvMatch($row, 'department');

View file

@ -106,10 +106,10 @@ class License extends Depreciable
* @var array * @var array
*/ */
protected $searchableRelations = [ protected $searchableRelations = [
'manufacturer' => ['name'], 'manufacturer' => ['name'],
'company' => ['name'], 'company' => ['name'],
'category' => ['name'], 'category' => ['name'],
'depreciation' => ['name'], 'depreciation' => ['name'],
]; ];
/** /**
@ -425,7 +425,7 @@ class License extends Depreciable
public static function assetcount() public static function assetcount()
{ {
return LicenseSeat::whereNull('deleted_at') return LicenseSeat::whereNull('deleted_at')
->count(); ->count();
} }
@ -441,8 +441,8 @@ class License extends Depreciable
public function totalSeatsByLicenseID() public function totalSeatsByLicenseID()
{ {
return LicenseSeat::where('license_id', '=', $this->id) return LicenseSeat::where('license_id', '=', $this->id)
->whereNull('deleted_at') ->whereNull('deleted_at')
->count(); ->count();
} }
/** /**
@ -486,11 +486,12 @@ class License extends Depreciable
public static function availassetcount() public static function availassetcount()
{ {
return LicenseSeat::whereNull('assigned_to') return LicenseSeat::whereNull('assigned_to')
->whereNull('asset_id') ->whereNull('asset_id')
->whereNull('deleted_at') ->whereNull('deleted_at')
->count(); ->count();
} }
/** /**
* Returns the number of total available seats for this license * Returns the number of total available seats for this license
* *
@ -533,7 +534,7 @@ class License extends Depreciable
{ {
return $this->licenseSeatsRelation()->where(function ($query) { return $this->licenseSeatsRelation()->where(function ($query) {
$query->whereNotNull('assigned_to') $query->whereNotNull('assigned_to')
->orWhereNotNull('asset_id'); ->orWhereNotNull('asset_id');
}); });
} }
@ -621,13 +622,13 @@ class License extends Depreciable
public function freeSeat() public function freeSeat()
{ {
return $this->licenseseats() return $this->licenseseats()
->whereNull('deleted_at') ->whereNull('deleted_at')
->where(function ($query) { ->where(function ($query) {
$query->whereNull('assigned_to') $query->whereNull('assigned_to')
->whereNull('asset_id'); ->whereNull('asset_id');
}) })
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->first(); ->first();
} }
@ -657,11 +658,11 @@ class License extends Depreciable
$days = (is_null($days)) ? 60 : $days; $days = (is_null($days)) ? 60 : $days;
return self::whereNotNull('expiration_date') return self::whereNotNull('expiration_date')
->whereNull('deleted_at') ->whereNull('deleted_at')
->whereRaw(DB::raw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) ')) ->whereRaw(DB::raw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) '))
->where('expiration_date', '>', date('Y-m-d')) ->where('expiration_date', '>', date('Y-m-d'))
->orderBy('expiration_date', 'ASC') ->orderBy('expiration_date', 'ASC')
->get(); ->get();
} }
/** /**

View file

@ -79,23 +79,6 @@ class Supplier extends SnipeModel
return $this->hasMany(Asset::class)->whereNull('deleted_at')->selectRaw('supplier_id, count(*) as count')->groupBy('supplier_id'); return $this->hasMany(Asset::class)->whereNull('deleted_at')->selectRaw('supplier_id, count(*) as count')->groupBy('supplier_id');
} }
/**
* Sets the license seat count attribute
*
* @todo I don't see the licenseSeatsRelation here?
*
* @author A. Gianotto <snipe@snipe.net>
* @since [v1.0]
* @return \Illuminate\Database\Eloquent\Relations\Relation
*/
public function getLicenseSeatsCountAttribute()
{
if ($this->licenseSeatsRelation->first()) {
return $this->licenseSeatsRelation->first()->count;
}
return 0;
}
/** /**
* Establishes the supplier -> assets relationship * Establishes the supplier -> assets relationship

View file

@ -65,6 +65,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'avatar', 'avatar',
'gravatar', 'gravatar',
'vip', 'vip',
'autoassign_licenses',
]; ];
protected $casts = [ protected $casts = [
@ -76,6 +77,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'created_at' => 'datetime', 'created_at' => 'datetime',
'updated_at' => 'datetime', 'updated_at' => 'datetime',
'deleted_at' => 'datetime', 'deleted_at' => 'datetime',
'autoassign_licenses' => 'boolean',
]; ];
/** /**
@ -95,6 +97,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'location_id' => 'exists:locations,id|nullable', 'location_id' => 'exists:locations,id|nullable',
'start_date' => 'nullable|date_format:Y-m-d', 'start_date' => 'nullable|date_format:Y-m-d',
'end_date' => 'nullable|date_format:Y-m-d|after_or_equal:start_date', 'end_date' => 'nullable|date_format:Y-m-d|after_or_equal:start_date',
'autoassign_licenses' => 'boolean',
]; ];
/** /**

View file

@ -33,7 +33,7 @@ class LicensePresenter extends Presenter
'field' => 'name', 'field' => 'name',
'searchable' => true, 'searchable' => true,
'sortable' => true, 'sortable' => true,
'title' => trans('admin/licenses/table.title'), 'title' => trans('general.name'),
'formatter' => 'licensesLinkFormatter', 'formatter' => 'licensesLinkFormatter',
], [ ], [
'field' => 'product_key', 'field' => 'product_key',

View file

@ -294,6 +294,15 @@ class UserPresenter extends Presenter
'visible' => true, 'visible' => true,
'formatter' => 'trueFalseFormatter', 'formatter' => 'trueFalseFormatter',
], ],
[
'field' => 'autoassign_licenses',
'searchable' => false,
'sortable' => true,
'switchable' => true,
'title' => trans('general.autoassign_licenses'),
'visible' => false,
'formatter' => 'trueFalseFormatter',
],
[ [
'field' => 'created_by', 'field' => 'created_by',
'searchable' => false, 'searchable' => false,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,24 +1,24 @@
{ {
"/js/build/app.js": "/js/build/app.js?id=7caeae38608edd96421f8ef59d33f5f6", "/js/build/app.js": "/js/build/app.js?id=7caeae38608edd96421f8ef59d33f5f6",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
"/css/build/overrides.css": "/css/build/overrides.css?id=ce23fa22306439befbf49e8e63adb4e0", "/css/build/overrides.css": "/css/build/overrides.css?id=ce20eefb1895545e882840c480bca0dc",
"/css/build/app.css": "/css/build/app.css?id=2e40bdf6f6d3d6d6954c391a0a91285e", "/css/build/app.css": "/css/build/app.css?id=3afc900b0a697567f8285f46aded1c89",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=dc383f8560a8d4adb51d44fb4043e03b", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=dc383f8560a8d4adb51d44fb4043e03b",
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=6f0563e726c2fe4fab4026daaa5bfdf2", "/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=f343f659ca1d45534d2c2c3cc30fb619", "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=ca38553d041220a4296dda555940e056",
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=57e634d63101d3613f4c73aaa2e3f50a", "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=032f18fdd48936784cfcfe70712a68ae",
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=5120ce6a4b70d11bbc84a5125aa31949", "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=e5b6ec4691d8fd647d38722886f983e6",
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=713b1205aa2d7c9db282f8cd5754c0e4", "/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=7d92dea45d94be7e1d4e427c728d335d",
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=6fe68325d5356197672c27bc77cedcb4", "/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=6fe68325d5356197672c27bc77cedcb4",
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=6ea1eecb7f939256c373c92f58749e72", "/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=218c6d947f73c767d23a663a9859d97e",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=1c0f59079342d1a10099bf41d2e46f59", "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=87c6506e9aac3ebc68dfd99b6f983602",
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb", "/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e", "/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=28b36223cf7b1d6e5f236859a4ef2b45",
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=0a82a6ae6bb4e58fe62d162c4fb50397", "/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=da6c7997d9de2f8329142399f0ce50da", "/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=da6c7997d9de2f8329142399f0ce50da",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898", "/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898",
"/css/dist/all.css": "/css/dist/all.css?id=1faccd9b34013f9893ed467fa3ddcb39", "/css/dist/all.css": "/css/dist/all.css?id=2b87a5b5f1e6f09861732fa41d159bc4",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=2df05d4beaa48550d71234e8dca79141", "/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=2df05d4beaa48550d71234e8dca79141",
@ -34,18 +34,18 @@
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=7a506bf59323cf5b5fe97f7080fc5ee0", "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=7a506bf59323cf5b5fe97f7080fc5ee0",
"/js/dist/all.js": "/js/dist/all.js?id=97b1034b75e3ac29a2eb9770d66c3370", "/js/dist/all.js": "/js/dist/all.js?id=97b1034b75e3ac29a2eb9770d66c3370",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=28b36223cf7b1d6e5f236859a4ef2b45",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb", "/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=1c0f59079342d1a10099bf41d2e46f59", "/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=87c6506e9aac3ebc68dfd99b6f983602",
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f677207c6cf9678eb539abecb408c374", "/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f677207c6cf9678eb539abecb408c374",
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=57e634d63101d3613f4c73aaa2e3f50a", "/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=032f18fdd48936784cfcfe70712a68ae",
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=5120ce6a4b70d11bbc84a5125aa31949", "/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=e5b6ec4691d8fd647d38722886f983e6",
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=44bf834f2110504a793dadec132a5898", "/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=44bf834f2110504a793dadec132a5898",
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=6ea1eecb7f939256c373c92f58749e72", "/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=218c6d947f73c767d23a663a9859d97e",
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=6fe68325d5356197672c27bc77cedcb4", "/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=6fe68325d5356197672c27bc77cedcb4",
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=713b1205aa2d7c9db282f8cd5754c0e4", "/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=7d92dea45d94be7e1d4e427c728d335d",
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=6f0563e726c2fe4fab4026daaa5bfdf2", "/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=f343f659ca1d45534d2c2c3cc30fb619", "/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=ca38553d041220a4296dda555940e056",
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=da6c7997d9de2f8329142399f0ce50da" "/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=da6c7997d9de2f8329142399f0ce50da"
} }

View file

@ -141,6 +141,9 @@ a.accordion-header {
.dropdown-menu li a { .dropdown-menu li a {
//color: inherit; //color: inherit;
} }
.pull-text-right{
text-align: right !important;
}
.main-header .sidebar-toggle:before { .main-header .sidebar-toggle:before {
content: "\f0c9"; content: "\f0c9";

View file

@ -23,6 +23,7 @@ return [
'restore' => 'Restore Asset', 'restore' => 'Restore Asset',
'pending' => 'Pending', 'pending' => 'Pending',
'undeployable' => 'Undeployable', 'undeployable' => 'Undeployable',
'undeployable_tooltip' => 'This asset has a status label that is undeployable and cannot be checked out at this time.',
'view' => 'View Asset', 'view' => 'View Asset',
'csv_error' => 'You have an error in your CSV file:', 'csv_error' => 'You have an error in your CSV file:',
'import_text' => ' 'import_text' => '

View file

@ -1,8 +1,8 @@
<?php <?php
return array( return array(
'about_licenses_title' => 'About Licenses', 'about_licenses_title' => 'About Licenses',
'about_licenses' => 'Licenses are used to track software. They have a specified number of seats that can be checked out to individuals', 'about_licenses' => 'Licenses are used to track software. They have a specified number of seats that can be checked out to individuals',
'checkin' => 'Checkin License Seat', 'checkin' => 'Checkin License Seat',
'checkout_history' => 'Checkout History', 'checkout_history' => 'Checkout History',
'checkout' => 'Checkout License Seat', 'checkout' => 'Checkout License Seat',
@ -18,4 +18,30 @@ return array(
'software_licenses' => 'Software Licenses', 'software_licenses' => 'Software Licenses',
'user' => 'User', 'user' => 'User',
'view' => 'View License', 'view' => 'View License',
'delete_disabled' => 'This license cannot be deleted yet because some seats are still checked out.',
'bulk' =>
[
'checkin_all' => [
'button' => 'Checkin All Seats',
'modal' => 'This will action checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.',
'enabled_tooltip' => 'Checkin ALL seats for this license from both users and assets',
'disabled_tooltip' => 'This is disabled because there are no seats currently checked out',
'success' => 'License successfully checked in! | All licenses were successfully checked in!',
'log_msg' => 'Checked in via bulk license checkout in license GUI',
],
'checkout_all' => [
'button' => 'Checkout All Seats',
'modal' => 'This action will checkout one seat to the first available user. | This action will checkout all :available_seats_count seats to the first available users. A user is considered available for this seat if they do not already have this license checked out to them, and the Auto-Assign License property is enabled on their user account.',
'enabled_tooltip' => 'Checkout ALL seats (or as many as are available) to ALL users',
'disabled_tooltip' => 'This is disabled because there are no seats currently available',
'success' => 'License successfully checked out! | :count licenses were successfully checked out!',
'error_no_seats' => 'There are no remaining seats left for this license.',
'warn_not_enough_seats' => ':count users were assigned this license, but we ran out of available license seats.',
'warn_no_avail_users' => 'Nothing to do. There are no users who do not already have this license assigned to them.',
'log_msg' => 'Checked out via bulk license checkout in license GUI',
],
],
); );

View file

@ -439,4 +439,13 @@ return [
'setup_migration_output' => 'Migration output:', 'setup_migration_output' => 'Migration output:',
'setup_migration_create_user' => 'Next: Create User', 'setup_migration_create_user' => 'Next: Create User',
'importer_generic_error' => 'Your file import is complete, but we did receive an error. This is usually caused by third-party API throttling from a notification webhook (such as Slack) and would not have interfered with the import itself, but you should confirm this.', 'importer_generic_error' => 'Your file import is complete, but we did receive an error. This is usually caused by third-party API throttling from a notification webhook (such as Slack) and would not have interfered with the import itself, but you should confirm this.',
'confirm' => 'Confirm',
'autoassign_licenses' => 'Auto-Assign Licenses',
'autoassign_licenses_help' => 'Allow user to be have licenses assigned via the bulk-assign license UI or cli tools.',
'autoassign_licenses_help_long' => 'This allows a user to be have licenses assigned via the bulk-assign license UI or cli tools. (For example, you might not want contractors to be auto-assigned a license you would provide to only staff members. You can still individually assign licenses to those users, but they will not be included in the Checkout License to All Users functions.)',
'no_autoassign_licenses_help' => 'Do not include user for bulk-assigning through the license UI or cli tools.',
'modal_confirm_generic' => 'Are you sure?',
'cannot_be_deleted' => 'This item cannot be deleted',
'undeployable_tooltip' => 'This item cannot be checked out. Check the quantity remaining.',
]; ];

View file

@ -21,7 +21,7 @@
<h2 class="box-title">{{ trans('admin/custom_fields/general.fieldsets') }}</h2> <h2 class="box-title">{{ trans('admin/custom_fields/general.fieldsets') }}</h2>
<div class="box-tools pull-right"> <div class="box-tools pull-right">
@can('create', \App\Models\CustomFieldset::class) @can('create', \App\Models\CustomFieldset::class)
<a href="{{ route('fieldsets.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="{{ trans('admin/custom_fields/general.create_fieldset_title') }}">{{ trans('admin/custom_fields/general.create_fieldset') }}</a> <a href="{{ route('fieldsets.create') }}" class="btn btn-sm btn-primary" data-tooltip="true" title="{{ trans('admin/custom_fields/general.create_fieldset_title') }}">{{ trans('admin/custom_fields/general.create_fieldset') }}</a>
@endcan @endcan
</div> </div>
</div><!-- /.box-header --> </div><!-- /.box-header -->
@ -111,7 +111,7 @@
<h2 class="box-title">{{ trans('admin/custom_fields/general.custom_fields') }}</h2> <h2 class="box-title">{{ trans('admin/custom_fields/general.custom_fields') }}</h2>
<div class="box-tools pull-right"> <div class="box-tools pull-right">
@can('create', \App\Models\CustomField::class) @can('create', \App\Models\CustomField::class)
<a href="{{ route('fields.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="{{ trans('admin/custom_fields/general.create_field_title') }}">{{ trans('admin/custom_fields/general.create_field') }}</a> <a href="{{ route('fields.create') }}" class="btn btn-sm btn-primary" data-tooltip="true" title="{{ trans('admin/custom_fields/general.create_field_title') }}">{{ trans('admin/custom_fields/general.create_field') }}</a>
@endcan @endcan
</div> </div>

View file

@ -77,7 +77,7 @@
<tbody class="permissions-group"> <tbody class="permissions-group">
<tr class="header-row permissions-row"> <tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item" <td class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip" data-tooltip="true"
data-placement="right" data-placement="right"
title="{{ $localPermission['note'] }}"> title="{{ $localPermission['note'] }}">
@unless (empty($localPermission['label'])) @unless (empty($localPermission['label']))
@ -100,7 +100,7 @@
<tbody class="permission-group"> <tbody class="permission-group">
<tr class="header-row permissions-row"> <tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item header-name" <td class="col-md-5 tooltip-base permissions-item header-name"
data-toggle="tooltip" data-tooltip="true"
data-placement="right" data-placement="right"
title="{{ $localPermission['note'] }}"> title="{{ $localPermission['note'] }}">
<h2>{{ $area }}</h2> <h2>{{ $area }}</h2>
@ -122,7 +122,7 @@
<tr class="permissions-row"> <tr class="permissions-row">
<td <td
class="col-md-5 tooltip-base permissions-item" class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip" data-tooltip="true"
data-placement="right" data-placement="right"
title="{{ $this_permission['note'] }}"> title="{{ $this_permission['note'] }}">
{{ $this_permission['label'] }} {{ $this_permission['label'] }}

View file

@ -456,7 +456,7 @@
</div> </div>
<div class="col-md-6{{ (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) ? ' ellipsis': '' }}"> <div class="col-md-6{{ (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) ? ' ellipsis': '' }}">
@if ($field->field_encrypted=='1') @if ($field->field_encrypted=='1')
<i class="fas fa-lock" data-toggle="tooltip" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i> <i class="fas fa-lock" data-tooltip="true" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
@endif @endif
@if ($field->isFieldDecryptable($asset->{$field->db_column_name()} )) @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))

View file

@ -850,7 +850,6 @@
</section> </section>
</div><!-- /.content-wrapper --> </div><!-- /.content-wrapper -->
<footer class="main-footer hidden-print"> <footer class="main-footer hidden-print">
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
@ -892,6 +891,7 @@
</footer> </footer>
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
@ -974,7 +974,7 @@
$(function () { $(function () {
$('[data-toggle="tooltip"]').tooltip(); $('[data-tooltip="true"]').tooltip();
$('[data-toggle="popover"]').popover(); $('[data-toggle="popover"]').popover();
$('.select2 span').addClass('needsclick'); $('.select2 span').addClass('needsclick');
$('.select2 span').removeAttr('title'); $('.select2 span').removeAttr('title');

View file

@ -10,7 +10,7 @@
{{-- Page content --}} {{-- Page content --}}
@section('content') @section('content')
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-9">
<!-- Custom Tabs --> <!-- Custom Tabs -->
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
@ -57,20 +57,6 @@
</a> </a>
</li> </li>
@can('update', $license)
<li class="dropdown pull-right">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fas fa-cog" aria-hidden="true"></i> {{ trans('button.actions') }}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="{{ route('licenses.edit', $license->id) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
<li><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
</ul>
</li>
@endcan
@can('update', \App\Models\License::class) @can('update', \App\Models\License::class)
<li class="pull-right"><a href="#" data-toggle="modal" data-target="#uploadFileModal"> <li class="pull-right"><a href="#" data-toggle="modal" data-target="#uploadFileModal">
<i class="fas fa-paperclip" aria-hidden="true"></i> {{ trans('button.upload') }}</a> <i class="fas fa-paperclip" aria-hidden="true"></i> {{ trans('button.upload') }}</a>
@ -332,7 +318,7 @@
</strong> </strong>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! $license->maintained ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! $license->maintained ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -358,7 +344,7 @@
</strong> </strong>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! $license->reassignable ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! $license->reassignable ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -378,8 +364,10 @@
</div> <!-- end row-striped --> </div> <!-- end row-striped -->
</div> </div>
</div>
</div> <!-- end tab-pane -->
</div>
</div> <!-- end tab-pane -->
@ -550,13 +538,100 @@
</table> </table>
</div> </div>
</div> <!-- /.col-md-12--> </div> <!-- /.col-md-12-->
</div> <!-- /.row--> </div> <!-- /.row-->
</div> <!-- /.tab-pane --> </div> <!-- /.tab-pane -->
</div> <!-- /.tab-content --> </div> <!-- /.tab-content -->
</div> <!-- nav-tabs-custom --> </div> <!-- nav-tabs-custom -->
</div> <!-- /.col --> </div> <!-- /.col -->
<div class="col-md-3">
@can('update', $license)
<a href="{{ route('licenses.edit', $license->id) }}" class="btn btn-block btn-primary" style="margin-bottom: 10px;">{{ trans('admin/licenses/general.edit') }}</a>
<a href="{{ route('clone/license', $license->id) }}" class="btn btn-block btn-primary" style="margin-bottom: 10px;">{{ trans('admin/licenses/general.clone') }}</a>
@endcan
@can('checkout', $license)
@if ($license->availCount()->count() > 0)
<a href="{{ route('licenses.checkout', $license->id) }}" class="btn-block btn bg-maroon" style="margin-bottom: 10px;">
{{ trans('general.checkout') }}
</a>
<a href="#" class="btn-block btn bg-maroon" style="margin-bottom: 10px;" data-toggle="modal" data-tooltip="true" title="{{ trans('admin/licenses/general.bulk.checkout_all.enabled_tooltip') }}" data-target="#checkoutFromAllModal">
{{ trans('admin/licenses/general.bulk.checkout_all.button') }}
</a>
@else
<a href="{{ route('licenses.checkout', $license->id) }}" class="btn btn-block bg-maroon disabled" style="margin-bottom: 10px;">
{{ trans('general.checkout') }}
</a>
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkout_all.disabled_tooltip') }}">
<a href="#" class="btn btn-block bg-maroon disabled" style="margin-bottom: 10px;" data-tooltip="true" title="{{ trans('general.checkout') }}">
{{ trans('admin/licenses/general.bulk.checkout_all.button') }}
</a>
</span>
@endif
@endcan
@can('checkin', $license)
@if (($license->seats - $license->availCount()->count()) > 0 )
<a href="#" class="btn btn-block bg-purple" style="margin-bottom: 25px;" data-toggle="modal" data-tooltip="true" data-target="#checkinFromAllModal" data-content="{{ trans('general.sure_to_delete') }} data-title="{{ trans('general.delete') }}" onClick="return false;">
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
</a>
@else
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip') }}">
<a href="#" class="btn btn-block bg-purple disabled" style="margin-bottom: 25px;">
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
</a>
</span>
@endif
@endcan
@can('delete', $license)
@if ($license->availCount()->count() == $license->seats)
<button class="btn btn-block btn-danger delete-asset" data-toggle="modal" data-title="{{ trans('general.delete') }}" data-content="{{ trans('general.delete_confirm', ['item' => $license->name]) }}" data-target="#dataConfirmModal">
{{ trans('general.delete') }}
</button>
@else
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.delete_disabled') }}">
<a href="#" class="btn btn-block btn-danger disabled">
{{ trans('general.delete') }}
</a>
</span>
@endif
@endcan
</div>
</div> <!-- /.row --> </div> <!-- /.row -->
@can('checkin', \App\Models\License::class)
@include ('modals.confirm-action',
[
'modal_name' => 'checkinFromAllModal',
'route' => route('licenses.bulkcheckin', $license->id),
'title' => trans('general.modal_confirm_generic'),
'body' => trans_choice('admin/licenses/general.bulk.checkin_all.modal', 2, ['checkedout_seats_count' => $checkedout_seats_count])
])
@endcan
@can('checkout', \App\Models\License::class)
@include ('modals.confirm-action',
[
'modal_name' => 'checkoutFromAllModal',
'route' => route('licenses.bulkcheckout', $license->id),
'title' => trans('general.modal_confirm_generic'),
'body' => trans_choice('admin/licenses/general.bulk.checkout_all.modal', 2, ['available_seats_count' => $available_seats_count])
])
@endcan
@can('update', \App\Models\License::class) @can('update', \App\Models\License::class)
@include ('modals.upload-file', ['item_type' => 'license', 'item_id' => $license->id]) @include ('modals.upload-file', ['item_type' => 'license', 'item_id' => $license->id])
@endcan @endcan
@ -565,5 +640,15 @@
@section('moar_scripts') @section('moar_scripts')
<script>
$('#dataConfirmModal').on('show.bs.modal', function (event) {
var content = $(event.relatedTarget).data('content');
var title = $(event.relatedTarget).data('title');
$(this).find(".modal-body").text(content);
$(this).find(".modal-header").text(title);
});
</script>
@include ('partials.bootstrap-table') @include ('partials.bootstrap-table')
@stop @stop

View file

@ -0,0 +1,27 @@
<!-- Modal -->
<div class="modal fade" id="{{ $modal_name }}" tabindex="-1" role="dialog" aria-labelledby="{{ $modal_name }}Label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="{{ $modal_name }}Label">{{ $title }}</h4>
</div>
<form action="{{ $route }}" method="POST" class="form-horizontal">
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<div class="modal-body">
<div class="row">
<div class="col-md-12">
{{ $body }}
</div>
</div>
</div> <!-- /.modal-body-->
<div class="modal-footer">
<a href="#" class="pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-primary">{{ trans('general.confirm') }}</button>
</div>
</form>
</div>
</div>
</div>

View file

@ -4,7 +4,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h2 class="modal-title" id="uploadFileModalLabel">{{ trans('general.file_upload') }}</h4> <h4 class="modal-title" id="uploadFileModalLabel">{{ trans('general.file_upload') }}</h4>
</div> </div>
{{ Form::open([ {{ Form::open([
'method' => 'POST', 'method' => 'POST',

View file

@ -77,7 +77,7 @@
@if ($field->field_encrypted) @if ($field->field_encrypted)
<div class="col-md-1 col-sm-1 text-left"> <div class="col-md-1 col-sm-1 text-left">
<i class="fas fa-lock" data-toggle="tooltip" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i> <i class="fas fa-lock" data-tooltip="true" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
</div> </div>
@endif @endif

View file

@ -94,7 +94,7 @@
exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ], exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ],
onLoadSuccess: function () { onLoadSuccess: function () {
$('[data-toggle="tooltip"]').tooltip(); // Needed to attach tooltips after ajax call $('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call
} }
}); });
@ -215,7 +215,7 @@
text_help = ''; text_help = '';
} }
return '<nobr><a href="{{ config('app.url') }}/' + destination + '/' + value.id + '" data-toggle="tooltip" title="'+ status_meta[value.status_meta] + '"> <i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + value.name + ' ' + text_help + ' </a> </nobr>'; return '<nobr><a href="{{ config('app.url') }}/' + destination + '/' + value.id + '" data-tooltip="true" title="'+ status_meta[value.status_meta] + '"> <i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + value.name + ' ' + text_help + ' </a> </nobr>';
} else if ((value) && (value.name)) { } else if ((value) && (value.name)) {
// Add some overrides for any funny urls we have // Add some overrides for any funny urls we have
@ -270,20 +270,20 @@
if ((row.available_actions) && (row.available_actions.delete === true)) { if ((row.available_actions) && (row.available_actions.delete === true)) {
actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '" ' actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '" '
+ ' class="btn btn-danger btn-sm delete-asset" data-toggle="tooltip" ' + ' class="btn btn-danger btn-sm delete-asset" data-tooltip="true" '
+ ' data-toggle="modal" ' + ' data-toggle="modal" '
+ ' data-content="{{ trans('general.sure_to_delete') }} ' + row.name + '?" ' + ' data-content="{{ trans('general.sure_to_delete') }} ' + row.name + '?" '
+ ' data-title="{{ trans('general.delete') }}" onClick="return false;">' + ' data-title="{{ trans('general.delete') }}" onClick="return false;">'
+ '<i class="fas fa-trash" aria-hidden="true"></i><span class="sr-only">Delete</span></a>&nbsp;'; + '<i class="fas fa-trash" aria-hidden="true"></i><span class="sr-only">Delete</span></a>&nbsp;';
} else { } else {
actions += '<a class="btn btn-danger btn-sm delete-asset disabled" onClick="return false;"><i class="fas fa-trash"></i></a>&nbsp;'; actions += '<span data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}"><a class="btn btn-danger btn-sm delete-asset disabled" onClick="return false;"><i class="fas fa-trash"></i></a></span>&nbsp;';
} }
if ((row.available_actions) && (row.available_actions.restore === true)) { if ((row.available_actions) && (row.available_actions.restore === true)) {
actions += '<form style="display: inline;" method="POST" action="{{ config('app.url') }}/' + dest + '/' + row.id + '/restore"> '; actions += '<form style="display: inline;" method="POST" action="{{ config('app.url') }}/' + dest + '/' + row.id + '/restore"> ';
actions += '@csrf'; actions += '@csrf';
actions += '<button class="btn btn-sm btn-warning" data-toggle="tooltip" title="{{ trans('general.restore') }}"><i class="fas fa-retweet"></i></button>&nbsp;'; actions += '<button class="btn btn-sm btn-warning" data-tooltip="true" title="{{ trans('general.restore') }}"><i class="fas fa-retweet"></i></button>&nbsp;';
} }
actions +='</nobr>'; actions +='</nobr>';
@ -364,9 +364,9 @@
function licenseSeatInOutFormatter(value, row) { function licenseSeatInOutFormatter(value, row) {
// The user is allowed to check the license seat out and it's available // The user is allowed to check the license seat out and it's available
if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && ((!row.asset_id) && (!row.assigned_to))) { if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && ((!row.asset_id) && (!row.assigned_to))) {
return '<a href="{{ config('app.url') }}/licenses/' + row.license_id + '/checkout/'+row.id+'" class="btn btn-sm bg-maroon" data-toggle="tooltip" title="{{ trans('general.checkout_tooltip') }}">{{ trans('general.checkout') }}</a>'; return '<a href="{{ config('app.url') }}/licenses/' + row.license_id + '/checkout/'+row.id+'" class="btn btn-sm bg-maroon" data-tooltip="true" title="{{ trans('general.checkout_tooltip') }}">{{ trans('general.checkout') }}</a>';
} else { } else {
return '<a href="{{ config('app.url') }}/licenses/' + row.id + '/checkin" class="btn btn-sm bg-purple" data-toggle="tooltip" title="Check in this license seat.">{{ trans('general.checkin') }}</a>'; return '<a href="{{ config('app.url') }}/licenses/' + row.id + '/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="Check in this license seat.">{{ trans('general.checkin') }}</a>';
} }
} }
@ -376,18 +376,26 @@
// The user is allowed to check items out, AND the item is deployable // The user is allowed to check items out, AND the item is deployable
if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && ((!row.asset_id) && (!row.assigned_to))) { if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && ((!row.asset_id) && (!row.assigned_to))) {
return '<a href="{{ config('app.url') }}/' + destination + '/' + row.id + '/checkout" class="btn btn-sm bg-maroon" data-toggle="tooltip" title="{{ trans('general.checkout_tooltip') }}">{{ trans('general.checkout') }}</a>';
// The user is allowed to check items out, but the item is not deployable return '<a href="{{ config('app.url') }}/' + destination + '/' + row.id + '/checkout" class="btn btn-sm bg-maroon" data-tooltip="true" title="{{ trans('general.checkout_tooltip') }}">{{ trans('general.checkout') }}</a>';
// The user is allowed to check items out, but the item is not able to be checked out
} else if (((row.user_can_checkout == false)) && (row.available_actions.checkout == true) && (!row.assigned_to)) { } else if (((row.user_can_checkout == false)) && (row.available_actions.checkout == true) && (!row.assigned_to)) {
return '<div data-toggle="tooltip" title="This item has a status label that is undeployable and cannot be checked out at this time."><a class="btn btn-sm bg-maroon disabled">{{ trans('general.checkout') }}</a></div>';
// We use slightly different language for assets versus other things, since they are the only
// item that has a status label
if (destination =='hardware') {
return '<span data-tooltip="true" title="{{ trans('admin/hardware/general.undeployable_tooltip') }}"><a class="btn btn-sm bg-maroon disabled">{{ trans('general.checkout') }}</a></span>';
} else {
return '<span data-tooltip="true" title="{{ trans('general.undeployable_tooltip') }}"><a class="btn btn-sm bg-maroon disabled">{{ trans('general.checkout') }}</a></span>';
}
// The user is allowed to check items in // The user is allowed to check items in
} else if (row.available_actions.checkin == true) { } else if (row.available_actions.checkin == true) {
if (row.assigned_to) { if (row.assigned_to) {
return '<a href="{{ config('app.url') }}/' + destination + '/' + row.id + '/checkin" class="btn btn-sm bg-purple" data-toggle="tooltip" title="Check this item in so it is available for re-imaging, re-issue, etc.">{{ trans('general.checkin') }}</a>'; return '<a href="{{ config('app.url') }}/' + destination + '/' + row.id + '/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="Check this item in so it is available for re-imaging, re-issue, etc.">{{ trans('general.checkin') }}</a>';
} else if (row.assigned_pivot_id) { } else if (row.assigned_pivot_id) {
return '<a href="{{ config('app.url') }}/' + destination + '/' + row.assigned_pivot_id + '/checkin" class="btn btn-sm bg-purple" data-toggle="tooltip" title="Check this item in so it is available for re-imaging, re-issue, etc.">{{ trans('general.checkin') }}</a>'; return '<a href="{{ config('app.url') }}/' + destination + '/' + row.assigned_pivot_id + '/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="Check this item in so it is available for re-imaging, re-issue, etc.">{{ trans('general.checkin') }}</a>';
} }
} }
@ -401,11 +409,11 @@
// This is only used by the requestable assets section // This is only used by the requestable assets section
function assetRequestActionsFormatter (row, value) { function assetRequestActionsFormatter (row, value) {
if (value.assigned_to_self == true){ if (value.assigned_to_self == true){
return '<button class="btn btn-danger btn-sm disabled" data-toggle="tooltip" title="Cancel this item request">{{ trans('button.cancel') }}</button>'; return '<button class="btn btn-danger btn-sm disabled" data-tooltip="true" title="Cancel this item request">{{ trans('button.cancel') }}</button>';
} else if (value.available_actions.cancel == true) { } else if (value.available_actions.cancel == true) {
return '<form action="{{ config('app.url') }}/account/request-asset/'+ value.id + '" method="POST">@csrf<button class="btn btn-danger btn-sm" data-toggle="tooltip" title="Cancel this item request">{{ trans('button.cancel') }}</button></form>'; return '<form action="{{ config('app.url') }}/account/request-asset/'+ value.id + '" method="POST">@csrf<button class="btn btn-danger btn-sm" data-tooltip="true" title="Cancel this item request">{{ trans('button.cancel') }}</button></form>';
} else if (value.available_actions.request == true) { } else if (value.available_actions.request == true) {
return '<form action="{{ config('app.url') }}/account/request-asset/'+ value.id + '" method="POST">@csrf<button class="btn btn-primary btn-sm" data-toggle="tooltip" title="Request this item">{{ trans('button.request') }}</button></form>'; return '<form action="{{ config('app.url') }}/account/request-asset/'+ value.id + '" method="POST">@csrf<button class="btn btn-primary btn-sm" data-tooltip="true" title="Request this item">{{ trans('button.request') }}</button></form>';
} }
} }
@ -537,7 +545,7 @@
if ((row) && (row!=undefined)) { if ((row) && (row!=undefined)) {
return '<a href="{{ config('app.url') }}/locations/' + row.id + '">' + row.name + '</a>'; return '<a href="{{ config('app.url') }}/locations/' + row.id + '">' + row.name + '</a>';
} else if (value.rtd_location) { } else if (value.rtd_location) {
return '<a href="{{ config('app.url') }}/locations/' + value.rtd_location.id + '" data-toggle="tooltip" title="Default Location">' + value.rtd_location.name + '</a>'; return '<a href="{{ config('app.url') }}/locations/' + value.rtd_location.id + '" data-tooltip="true" title="Default Location">' + value.rtd_location.name + '</a>';
} }
} }
@ -779,7 +787,7 @@
// This is necessary to make the bootstrap tooltips work inside of the // This is necessary to make the bootstrap tooltips work inside of the
// wenzhixin/bootstrap-table formatters // wenzhixin/bootstrap-table formatters
$('#table').on('post-body.bs.table', function () { $('#table').on('post-body.bs.table', function () {
$('[data-toggle="tooltip"]').tooltip({ $('[data-tooltip="true"]').tooltip({
container: 'body' container: 'body'
}); });

View file

@ -6,7 +6,7 @@
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" aria-label="min_amt" value="{{ old('min_amt', $item->min_amt) }}" /> <input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" aria-label="min_amt" value="{{ old('min_amt', $item->min_amt) }}" />
</div> </div>
<div class="col-md-7" style="margin-left: -15px;"> <div class="col-md-7" style="margin-left: -15px;">
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fas fa-info-circle" aria-hidden="true"></i> <a href="#" data-tooltip="true" title="{{ trans('general.min_amt_help') }}"><i class="fas fa-info-circle" aria-hidden="true"></i>
<span class="sr-only">{{ trans('general.min_amt_help') }}</span> <span class="sr-only">{{ trans('general.min_amt_help') }}</span>
</a> </a>

View file

@ -4,7 +4,7 @@
<tbody class="permissions-group"> <tbody class="permissions-group">
<tr class="header-row permissions-row"> <tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item" <td class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip" data-tooltip="true"
data-placement="right" data-placement="right"
title="{{ $localPermission['note'] }}" title="{{ $localPermission['note'] }}"
> >
@ -76,7 +76,7 @@
@if ($permission['display']) @if ($permission['display'])
<td <td
class="col-md-5 tooltip-base permissions-item" class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip" data-tooltip="true"
data-placement="right" data-placement="right"
title="{{ $permission['note'] }}" title="{{ $permission['note'] }}"
> >

View file

@ -119,6 +119,29 @@
</div> </div>
</div> <!--/form-group--> </div> <!--/form-group-->
<!-- activated -->
<div class="form-group">
<div class="col-sm-3 control-label">
{{ trans('general.autoassign_licenses') }}
</div>
<div class="col-sm-9">
<label for="no_change_autoassign_licenses" class="form-control">
{{ Form::radio('autoassign_licenses', '', true, ['id' => 'no_change_autoassign_licenses', 'aria-label'=>'no_change_autoassign_licenses']) }}
{{ trans('general.do_not_change') }}
</label>
<label for="autoassign_licenses" class="form-control">
{{ Form::radio('autoassign_licenses', '1', old('autoassign_licenses'), ['id' => 'autoassign_licenses', 'aria-label'=>'autoassign_licenses']) }}
{{ trans('general.autoassign_licenses_help')}}
</label>
<label for="dont_autoassign_licenses" class="form-control">
{{ Form::radio('autoassign_licenses', '0', old('autoassign_licenses'), ['id' => 'dont_autoassign_licenses', 'aria-label'=>'dont_autoassign_licenses']) }}
{{ trans('general.no_autoassign_licenses_help')}}
</label>
</div>
</div> <!--/form-group-->
<!-- activated --> <!-- activated -->
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 control-label"> <div class="col-sm-3 control-label">

View file

@ -370,6 +370,20 @@
</div> </div>
</div> </div>
<!-- Auto assign checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label class="form-control" for="autoassign_licenses">
<input type="checkbox" value="1" name="autoassign_licenses" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? " checked='checked'" : '' }} aria-label="autoassign_licenses">
{{ trans('general.autoassign_licenses') }}
</label>
<p class="help-block">{{ trans('general.autoassign_licenses_help_long') }}</p>
</div>
</div>
<!-- remote checkbox --> <!-- remote checkbox -->
<div class="form-group"> <div class="form-group">
@ -383,15 +397,6 @@
</div> </div>
</div> </div>
<!-- Auto Assign checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="autoassign_licenses" class="form-control">
<input type="checkbox" value="1" name="autoassign_licenses" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? ' checked="checked"' : '' }} aria-label="autoassign_licenses">
{{ trans('admin/users/general.auto_assign_label') }}
</label>
</div>
</div>
<!-- Location --> <!-- Location -->
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
@ -444,8 +449,8 @@
<!-- Country --> <!-- Country -->
<div class="form-group{{ $errors->has('country') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('country') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="country">{{ trans('general.country') }}</label> <label class="col-md-3 control-label" for="country">{{ trans('general.country') }}</label>
<div class="col-md-6"> <div class="col-md-9">
{!! Form::countries('country', old('country', $user->country), 'col-md-6 select2') !!} {!! Form::countries('country', old('country', $user->country), 'col-md-12 select2') !!}
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!} {!! $errors->first('country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -122,7 +122,8 @@
@endcan @endcan
@can('update', \App\Models\User::class) @can('update', \App\Models\User::class)
<li class="pull-right"><a href="#" data-toggle="modal" data-target="#uploadFileModal"> <li class="pull-right">
<a href="#" data-toggle="modal" data-target="#uploadFileModal">
<span class="hidden-xs"><i class="fas fa-paperclip" aria-hidden="true"></i></span> <span class="hidden-xs"><i class="fas fa-paperclip" aria-hidden="true"></i></span>
<span class="hidden-lg hidden-md hidden-xl"><i class="fas fa-paperclip fa-2x" aria-hidden="true"></i></span> <span class="hidden-lg hidden-md hidden-xl"><i class="fas fa-paperclip fa-2x" aria-hidden="true"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('button.upload') }}</span> <span class="hidden-xs hidden-sm">{{ trans('button.upload') }}</span>
@ -519,23 +520,23 @@
</div> </div>
@endif @endif
<!-- login enabled --> <!-- vip -->
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
{{ trans('admin/users/general.vip_label') }} {{ trans('admin/users/general.vip_label') }}
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! ($user->vip=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->vip=='1') ? '<i class="fas fa-check fa-fw fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
<!-- login enabled --> <!-- remote -->
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
{{ trans('admin/users/general.remote') }} {{ trans('admin/users/general.remote') }}
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! ($user->remote=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->remote=='1') ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -545,17 +546,28 @@
{{ trans('general.login_enabled') }} {{ trans('general.login_enabled') }}
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! ($user->activated=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->activated=='1') ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
<!-- LDAP --> <!-- auto assign license -->
<div class="row">
<div class="col-md-3">
{{ trans('general.autoassign_licenses') }}
</div>
<div class="col-md-9">
{!! ($user->autoassign_licenses=='1') ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div>
</div>
<!-- LDAP -->
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
LDAP LDAP
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! ($user->ldap_import=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->ldap_import=='1') ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -569,7 +581,7 @@
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
{!! ($user->two_factor_active()) ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->two_factor_active()) ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -580,7 +592,7 @@
{{ trans('admin/users/general.two_factor_enrolled') }} {{ trans('admin/users/general.two_factor_enrolled') }}
</div> </div>
<div class="col-md-9" id="two_factor_reset_toggle"> <div class="col-md-9" id="two_factor_reset_toggle">
{!! ($user->two_factor_active_and_enrolled()) ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!} {!! ($user->two_factor_active_and_enrolled()) ? '<i class="fas fa-check fa-fw text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times fa-fw text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div> </div>
</div> </div>
@ -592,9 +604,9 @@
<div class="col-md-3"> <div class="col-md-3">
</div> </div>
<div class="col-md-9" style="margin-top: 10px;"> <div class="col-md-9">
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> <a class="btn btn-default btn-sm" id="two_factor_reset" style="margin-right: 10px; margin-top: 10px;">
{{ trans('admin/settings/general.two_factor_reset') }} {{ trans('admin/settings/general.two_factor_reset') }}
</a> </a>
<span id="two_factor_reseticon"> <span id="two_factor_reseticon">
@ -1031,9 +1043,9 @@ $(function () {
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
$("#two_factor_reset_toggle").html('').html('<i class="fas fa-times text-danger" aria-hidden="true"></i> {{ trans('general.no') }}'); $("#two_factor_reset_toggle").html('').html('<span class="text-danger"><i class="fas fa-times" aria-hidden="true"></i> {{ trans('general.no') }}</span>');
$("#two_factor_reseticon").html(''); $("#two_factor_reseticon").html('');
$("#two_factor_resetstatus").html('<i class="fas fa-check text-success"></i>' + data.message); $("#two_factor_resetstatus").html('<span class="text-success"><i class="fas fa-check"></i> ' + data.message + '</span>');
}, },

View file

@ -25,10 +25,21 @@ Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
[Licenses\LicenseCheckinController::class, 'store'] [Licenses\LicenseCheckinController::class, 'store']
)->name('licenses.checkin.save'); )->name('licenses.checkin.save');
Route::post(
'{licenseId}/bulkcheckin',
[Licenses\LicenseCheckinController::class, 'bulkCheckin']
)->name('licenses.bulkcheckin');
Route::post(
'{licenseId}/bulkcheckout',
[Licenses\LicenseCheckoutController::class, 'bulkCheckout']
)->name('licenses.bulkcheckout');
Route::post( Route::post(
'{licenseId}/upload', '{licenseId}/upload',
[Licenses\LicenseFilesController::class, 'store'] [Licenses\LicenseFilesController::class, 'store']
)->name('upload/license'); )->name('upload/license');
Route::delete( Route::delete(
'{licenseId}/deletefile/{fileId}', '{licenseId}/deletefile/{fileId}',
[Licenses\LicenseFilesController::class, 'destroy'] [Licenses\LicenseFilesController::class, 'destroy']