[L6] Move all of the template files into the new correct location

This commit is contained in:
Dane Everitt 2019-09-04 21:19:52 -07:00
parent 1c5b9dbb87
commit c97461d602
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
83 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,84 @@
{{-- Pterodactyl - Panel --}}
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- This software is licensed under the terms of the MIT license. --}}
{{-- https://opensource.org/licenses/MIT --}}
@extends('layouts.admin')
@section('title')
List Users
@endsection
@section('content-header')
<h1>Users<small>All registered users on the system.</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li class="active">Users</li>
</ol>
@endsection
@section('content')
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">User List</h3>
<div class="box-tools">
<form action="{{ route('admin.users') }}" method="GET">
<div class="input-group input-group-sm">
<input type="text" name="query" class="form-control pull-right" style="width:30%;" value="{{ request()->input('query') }}" placeholder="Search">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
<a href="{{ route('admin.users.new') }}"><button type="button" class="btn btn-sm btn-primary" style="border-radius: 0 3px 3px 0;margin-left:-1px;">Create New</button></a>
</div>
</div>
</form>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Client Name</th>
<th>Username</th>
<th class="text-center">2FA</th>
<th class="text-center"><span data-toggle="tooltip" data-placement="top" title="Servers that this user is marked as the owner of.">Servers Owned</span></th>
<th class="text-center"><span data-toggle="tooltip" data-placement="top" title="Servers that this user can access because they are marked as a subuser.">Can Access</span></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr class="align-middle">
<td><code>{{ $user->id }}</code></td>
<td><a href="{{ route('admin.users.view', $user->id) }}">{{ $user->email }}</a> @if($user->root_admin)<i class="fa fa-star text-yellow"></i>@endif</td>
<td>{{ $user->name_last }}, {{ $user->name_first }}</td>
<td>{{ $user->username }}</td>
<td class="text-center">
@if($user->use_totp)
<i class="fa fa-lock text-green-500"></i>
@else
<i class="fa fa-unlock text-red"></i>
@endif
</td>
<td class="text-center">
<a href="{{ route('admin.servers', ['query' => $user->email]) }}">{{ $user->servers_count }}</a>
</td>
<td class="text-center">{{ $user->subuser_of_count }}</td>
<td class="text-center"><img src="https://www.gravatar.com/avatar/{{ md5(strtolower($user->email)) }}?s=100" style="height:20px;" class="img-circle" /></td>
</tr>
@endforeach
</tbody>
</table>
</div>
@if($users->hasPages())
<div class="box-footer with-border">
<div class="col-md-12 text-center">{!! $users->appends(['query' => Request::input('query')])->render() !!}</div>
</div>
@endif
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,133 @@
{{-- Pterodactyl - Panel --}}
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- This software is licensed under the terms of the MIT license. --}}
{{-- https://opensource.org/licenses/MIT --}}
@extends('layouts.admin')
@section('title')
Create User
@endsection
@section('content-header')
<h1>Create User<small>Add a new user to the system.</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li><a href="{{ route('admin.users') }}">Users</a></li>
<li class="active">Create</li>
</ol>
@endsection
@section('content')
<div class="row">
<form method="post">
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Identity</h3>
</div>
<div class="box-body">
<div class="form-group">
<label for="email" class="control-label">Email</label>
<div>
<input type="text" autocomplete="off" name="email" value="{{ old('email') }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="username" class="control-label">Username</label>
<div>
<input type="text" autocomplete="off" name="username" value="{{ old('username') }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="name_first" class="control-label">Client First Name</label>
<div>
<input type="text" autocomplete="off" name="name_first" value="{{ old('name_first') }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="name_last" class="control-label">Client Last Name</label>
<div>
<input type="text" autocomplete="off" name="name_last" value="{{ old('name_last') }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="control-label">Default Language</label>
<div>
<select name="language" class="form-control">
@foreach($languages as $key => $value)
<option value="{{ $key }}" @if(config('app.locale') === $key) selected @endif>{{ $value }}</option>
@endforeach
</select>
<p class="text-muted"><small>The default language to use when rendering the Panel for this user.</small></p>
</div>
</div>
</div>
<div class="box-footer">
{!! csrf_field() !!}
<input type="submit" value="Create User" class="btn btn-success btn-sm">
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Permissions</h3>
</div>
<div class="box-body">
<div class="form-group col-md-12">
<label for="root_admin" class="control-label">Administrator</label>
<div>
<select name="root_admin" class="form-control">
<option value="0">@lang('strings.no')</option>
<option value="1">@lang('strings.yes')</option>
</select>
<p class="text-muted"><small>Setting this to 'Yes' gives a user full administrative access.</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Password</h3>
</div>
<div class="box-body">
<div class="alert alert-info">
<p>Providing a user password is optional. New user emails prompt users to create a password the first time they login. If a password is provided here you will need to find a different method of providing it to the user.</p>
</div>
<div id="gen_pass" class=" alert alert-success" style="display:none;margin-bottom: 10px;"></div>
<div class="form-group">
<label for="pass" class="control-label">Password</label>
<div>
<input type="password" name="password" class="form-control" />
</div>
</div>
</div>
</div>
</div>
</form>
</div>
@endsection
@section('footer-scripts')
@parent
<script>$("#gen_pass_bttn").click(function (event) {
event.preventDefault();
$.ajax({
type: "GET",
url: "/password-gen/12",
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
},
success: function(data) {
$("#gen_pass").html('<strong>Generated Password:</strong> ' + data).slideDown();
$('input[name="password"], input[name="password_confirmation"]').val(data);
return false;
}
});
return false;
});
</script>
@endsection

View file

@ -0,0 +1,172 @@
{{-- Pterodactyl - Panel --}}
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- This software is licensed under the terms of the MIT license. --}}
{{-- https://opensource.org/licenses/MIT --}}
@extends('layouts.admin')
@section('title')
Manager User: {{ $user->username }}
@endsection
@section('content-header')
<h1>{{ $user->name_first }} {{ $user->name_last}}<small>{{ $user->username }}</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li><a href="{{ route('admin.users') }}">Users</a></li>
<li class="active">{{ $user->username }}</li>
</ol>
@endsection
@section('content')
<div class="row">
<form action="{{ route('admin.users.view', $user->id) }}" method="post">
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Identity</h3>
</div>
<div class="box-body">
<div class="form-group">
<label for="email" class="control-label">Email</label>
<div>
<input readonly type="email" name="email" value="{{ $user->email }}" class="form-control form-autocomplete-stop">
</div>
</div>
<div class="form-group">
<label for="registered" class="control-label">Username</label>
<div>
<input readonly type="text" name="username" value="{{ $user->username }}" class="form-control form-autocomplete-stop">
</div>
</div>
<div class="form-group">
<label for="registered" class="control-label">Client First Name</label>
<div>
<input readonly type="text" name="name_first" value="{{ $user->name_first }}" class="form-control form-autocomplete-stop">
</div>
</div>
<div class="form-group">
<label for="registered" class="control-label">Client Last Name</label>
<div>
<input readonly type="text" name="name_last" value="{{ $user->name_last }}" class="form-control form-autocomplete-stop">
</div>
</div>
<div class="form-group">
<label class="control-label">Default Language</label>
<div>
<select name="language" class="form-control">
@foreach($languages as $key => $value)
<option value="{{ $key }}" @if($user->language === $key) selected @endif>{{ $value }}</option>
@endforeach
</select>
<p class="text-muted"><small>The default language to use when rendering the Panel for this user.</small></p>
</div>
</div>
</div>
<div class="box-footer">
{!! csrf_field() !!}
{!! method_field('PATCH') !!}
<input type="submit" value="Update User" class="btn btn-primary btn-sm">
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Password</h3>
</div>
<div class="box-body">
<div class="alert alert-success" style="display:none;margin-bottom:10px;" id="gen_pass"></div>
<div class="form-group no-margin-bottom">
<label for="password" class="control-label">Password <span class="field-optional"></span></label>
<div>
<input readonly type="password" id="password" name="password" class="form-control form-autocomplete-stop">
<p class="text-muted small">Leave blank to keep this user's password the same. User will not receive any notification if password is changed.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Permissions</h3>
</div>
<div class="box-body">
<div class="form-group">
<label for="root_admin" class="control-label">Administrator</label>
<div>
<select name="root_admin" class="form-control">
<option value="0">@lang('strings.no')</option>
<option value="1" {{ $user->root_admin ? 'selected="selected"' : '' }}>@lang('strings.yes')</option>
</select>
<p class="text-muted"><small>Setting this to 'Yes' gives a user full administrative access.</small></p>
</div>
<div class="checkbox checkbox-primary">
<input type="checkbox" id="pIgnoreConnectionError" value="1" name="ignore_connection_error">
<label for="pIgnoreConnectionError"> Ignore exceptions raised while revoking keys.</label>
<p class="text-muted small">If checked, any errors thrown while revoking keys across nodes will be ignored. You should avoid this checkbox if possible as any non-revoked keys could continue to be active for up to 24 hours after this account is changed. If you are needing to revoke account permissions immediately and are facing node issues, you should check this box and then restart any nodes that failed to be updated to clear out any stored keys.</p>
</div>
</div>
</div>
</div>
</div>
</form>
{{--<div class="col-xs-12">--}}
{{--<div class="box">--}}
{{--<div class="box-header with-border">--}}
{{--<h3 class="box-title">Associated Servers</h3>--}}
{{--</div>--}}
{{--<div class="box-body table-responsive no-padding">--}}
{{--<table class="table table-hover">--}}
{{--<thead>--}}
{{--<tr>--}}
{{--<th style="width:2%;"></th>--}}
{{--<th>Identifier</th>--}}
{{--<th>Server Name</th>--}}
{{--<th>Access</th>--}}
{{--<th>Node</th>--}}
{{--<th style="width:10%;"></th>--}}
{{--</tr>--}}
{{--</thead>--}}
{{--<tbody>--}}
{{--@foreach($user->setAccessLevel('subuser')->access()->get() as $server)--}}
{{--<tr>--}}
{{--<td><a href="{{ route('server.index', $server->uuidShort) }}/"><i class="fa fa-tachometer"></i></a></td>--}}
{{--<td><code>{{ $server->uuidShort }}</code></td>--}}
{{--<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>--}}
{{--<td>--}}
{{--@if($server->owner_id === $user->id)--}}
{{--<span class="label bg-purple">Owner</span>--}}
{{--@else--}}
{{--<span class="label bg-blue">Subuser</span>--}}
{{--@endif--}}
{{--</td>--}}
{{--<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>--}}
{{--<td class="centered">@if($server->suspended === 0)<span class="label muted muted-hover label-success">Active</span>@else<span class="label label-warning">Suspended</span>@endif</td>--}}
{{--</td>--}}
{{--@endforeach--}}
{{--</tbody>--}}
{{--</table>--}}
{{--</div>--}}
{{--</div>--}}
{{--</div>--}}
<div class="col-xs-12">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Delete User</h3>
</div>
<div class="box-body">
<p class="no-margin">There must be no servers associated with this account in order for it to be deleted.</p>
</div>
<div class="box-footer">
<form action="{{ route('admin.users.view', $user->id) }}" method="POST">
{!! csrf_field() !!}
{!! method_field('DELETE') !!}
<input id="delete" type="submit" class="btn btn-sm btn-danger pull-right" {{ $user->servers->count() < 1 ?: 'disabled' }} value="Delete User" />
</form>
</div>
</div>
</div>
</div>
@endsection