[L6] Move all of the template files into the new correct location
This commit is contained in:
parent
1c5b9dbb87
commit
c97461d602
83 changed files with 0 additions and 0 deletions
98
resources/views/server/files/add.blade.php
Normal file
98
resources/views/server/files/add.blade.php
Normal file
|
@ -0,0 +1,98 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.add.header')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
{{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}}
|
||||
{!! Theme::css('vendor/select2/select2.min.css') !!}
|
||||
@parent
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.add.header')<small>@lang('server.files.add.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.files.index', $server->uuidShort) }}">@lang('navigation.server.file_browser')</a></li>
|
||||
<li class="active">@lang('navigation.server.create_file')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><code>/home/container/</code></span>
|
||||
<input type="text" class="form-control" placeholder="@lang('server.files.add.name')" id="file_name" value="{{ $directory }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="height:500px;" id="editor"></div>
|
||||
<div class="box-footer with-border">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<button class="btn btn-sm btn-primary" id="create_file">@lang('server.files.add.create')</button>
|
||||
<a href="{{ route('server.files.index', [ 'server' => $server->uuidShort, 'dir' => $directory ]) }}"><button class="btn btn-default btn-sm">@lang('strings.cancel')</button></a>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select name="aceMode" id="aceMode" class="form-control">
|
||||
<option value="assembly_x86">Assembly x86</option>
|
||||
<option value="c_cpp">C/C++</option>
|
||||
<option value="coffee">CoffeeScript</option>
|
||||
<option value="csharp">C#</option>
|
||||
<option value="css">CSS</option>
|
||||
<option value="golang">Go</option>
|
||||
<option value="haml">HAML</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="ini">INI</option>
|
||||
<option value="java">Java</option>
|
||||
<option value="javascript">JavaScript</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="kotlin">Kotlin</option>
|
||||
<option value="lua">Lua</option>
|
||||
<option value="markdown">Markdown</option>
|
||||
<option value="mysql">MySQL</option>
|
||||
<option value="objectivec">Objective-C</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="php">PHP</option>
|
||||
<option value="plain_text" selected="selected">Plain Text</option>
|
||||
<option value="properties">Properties</option>
|
||||
<option value="python">Python</option>
|
||||
<option value="ruby">Ruby</option>
|
||||
<option value="rust">Rust</option>
|
||||
<option value="smarty">Smarty</option>
|
||||
<option value="sql">SQL</option>
|
||||
<option value="xml">XML</option>
|
||||
<option value="yaml">YAML</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/ace/ace.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-whitespace.js') !!}
|
||||
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
||||
{!! Theme::js('js/frontend/files/editor.js') !!}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#aceMode').select2();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
59
resources/views/server/files/edit.blade.php
Normal file
59
resources/views/server/files/edit.blade.php
Normal file
|
@ -0,0 +1,59 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.edit.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.edit.header')<small>@lang('server.files.edit.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li><a href="{{ route('server.files.index', $server->uuidShort) }}">@lang('navigation.server.file_browser')</a></li>
|
||||
<li class="active">@lang('navigation.server.edit_file')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $file }}</h3>
|
||||
<div class="pull-right box-tools">
|
||||
<a href="/server/{{ $server->uuidShort }}/files#{{ rawurlencode($directory) }}" class="pull-right"><button class="btn btn-default btn-sm">@lang('server.files.edit.return')</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="file" value="{{ $file }}" />
|
||||
<textarea id="editorSetContent" class="hidden">{{ $contents }}</textarea>
|
||||
<div class="overlay" id="editorLoadingOverlay"><i class="fa fa-refresh fa-spin"></i></div>
|
||||
<div class="box-body" style="height:500px;" id="editor"></div>
|
||||
<div class="box-footer with-border">
|
||||
<button class="btn btn-sm btn-primary" id="save_file"><i class="fa fa-fw fa-save"></i> @lang('server.files.edit.save')</button>
|
||||
<a href="/server/{{ $server->uuidShort }}/files#{{ rawurlencode($directory) }}" class="pull-right"><button class="btn btn-default btn-sm">@lang('server.files.edit.return')</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/ace/ace.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
|
||||
{!! Theme::js('vendor/ace/ext-whitespace.js') !!}
|
||||
{!! Theme::js('js/frontend/files/editor.js') !!}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
Editor.setValue($('#editorSetContent').val(), -1);
|
||||
Editor.getSession().setUndoManager(new ace.UndoManager());
|
||||
$('#editorLoadingOverlay').hide();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
54
resources/views/server/files/index.blade.php
Normal file
54
resources/views/server/files/index.blade.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
{{-- 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.master')
|
||||
|
||||
@section('title')
|
||||
@lang('server.files.header')
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>@lang('server.files.header')<small>@lang('server.files.header_sub')</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
|
||||
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
|
||||
<li>@lang('navigation.server.file_management')</li>
|
||||
<li class="active">@lang('navigation.server.file_browser')</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="overlay file-overlay"><i class="fa fa-refresh fa-spin"></i></div>
|
||||
<div id="load_files">
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<div class="callout callout-info" style="margin:10px;">@lang('server.files.loading')</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer with-border">
|
||||
<p class="text-muted small" style="margin: 0 0 2px;">@lang('server.files.path', ['path' => '<code>/home/container</code>', 'size' => '<code>' . $node->upload_size . ' MB</code>'])</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
{!! Theme::js('js/frontend/server.socket.js') !!}
|
||||
{!! Theme::js('vendor/async/async.min.js') !!}
|
||||
{!! Theme::js('vendor/lodash/lodash.js') !!}
|
||||
{!! Theme::js('vendor/siofu/client.min.js') !!}
|
||||
@if(App::environment('production'))
|
||||
{!! Theme::js('js/frontend/files/filemanager.min.js?hash=cd7ec731dc633e23ec36144929a237d18c07d2f0') !!}
|
||||
@else
|
||||
{!! Theme::js('js/frontend/files/src/index.js') !!}
|
||||
{!! Theme::js('js/frontend/files/src/contextmenu.js') !!}
|
||||
{!! Theme::js('js/frontend/files/src/actions.js') !!}
|
||||
@endif
|
||||
{!! Theme::js('js/frontend/files/upload.js') !!}
|
||||
@endsection
|
170
resources/views/server/files/list.blade.php
Normal file
170
resources/views/server/files/list.blade.php
Normal file
|
@ -0,0 +1,170 @@
|
|||
{{-- 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 --}}
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">/home/container{{ $directory['header'] }}</h3>
|
||||
<div class="box-tools">
|
||||
<a href="/server/{{ $server->uuidShort }}/files/add/@if($directory['header'] !== '')?dir={{ $directory['header'] }}@endif">
|
||||
<button class="btn btn-success btn-sm btn-icon">
|
||||
New File <i class="fa fa-fw fa-file-text-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
<button class="btn btn-sm btn-success btn-icon" data-action="add-folder">
|
||||
New Folder <i class="fa fa-fw fa-folder-open-o"></i>
|
||||
</button>
|
||||
<label class="btn btn-primary btn-sm btn-icon">
|
||||
Upload <i class="fa fa-fw fa-upload"></i><input type="file" id="files_touch_target" class="hidden">
|
||||
</label>
|
||||
<div class="btn-group hidden-xs">
|
||||
<button type="button" id="mass_actions" class="btn btn-sm btn-default dropdown-toggle disabled" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@lang('server.files.mass_actions') <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-massactions">
|
||||
<li><a href="#" id="selective-deletion" data-action="selective-deletion">@lang('server.files.delete') <i class="fa fa-fw fa-trash-o"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover" id="file_listing" data-current-dir="{{ rtrim($directory['header'], '/') . '/' }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="middle min-size">
|
||||
<input type="checkbox" class="select-all-files hidden-xs" data-action="selectAll"><i class="fa fa-refresh muted muted-hover use-pointer" data-action="reload-files" style="font-size:14px;"></i>
|
||||
</th>
|
||||
<th>@lang('server.files.file_name')</th>
|
||||
<th class="hidden-xs">@lang('server.files.size')</th>
|
||||
<th class="hidden-xs">@lang('server.files.last_modified')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="append_files_to">
|
||||
@if (isset($directory['first']) && $directory['first'] === true)
|
||||
<tr data-type="disabled">
|
||||
<td class="middle min-size"><i class="fa fa-folder" style="margin-left: 0.859px;"></i></td>
|
||||
<td><a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">←</a></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($directory['show']) && $directory['show'] === true)
|
||||
<tr data-type="disabled">
|
||||
<td class="middle min-size"><i class="fa fa-folder" style="margin-left: 0.859px;"></i></td>
|
||||
<td data-name="{{ rawurlencode($directory['link']) }}">
|
||||
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">← {{ $directory['link_show'] }}</a>
|
||||
</td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td class="hidden-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($folders as $folder)
|
||||
<tr data-type="folder">
|
||||
<td class="middle min-size" data-identifier="type">
|
||||
<input type="checkbox" class="select-folder hidden-xs" data-action="addSelection"><i class="fa fa-folder" style="margin-left: 0.859px;"></i>
|
||||
</td>
|
||||
<td data-identifier="name" data-name="{{ rawurlencode($folder['entry']) }}" data-path="@if($folder['directory'] !== ''){{ rawurlencode($folder['directory']) }}@endif/">
|
||||
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">{{ $folder['entry'] }}</a>
|
||||
</td>
|
||||
<td data-identifier="size" class="hidden-xs">{{ $folder['size'] }}</td>
|
||||
<td data-identifier="modified" class="hidden-xs">
|
||||
<?php $carbon = Carbon::createFromTimestamp($folder['date'])->timezone(config('app.timezone')); ?>
|
||||
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||
{{ $carbon->format('m/d/y H:i:s') }}
|
||||
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||
<em>@lang('server.files.seconds_ago')</em>
|
||||
@else
|
||||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="min-size">
|
||||
<button class="btn btn-xxs btn-default disable-menu-hide" data-action="toggleMenu" style="padding:2px 6px 0px;"><i class="fa fa-ellipsis-h disable-menu-hide"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($files as $file)
|
||||
<tr data-type="file" data-mime="{{ $file['mime'] }}">
|
||||
<td class="middle min-size" data-identifier="type"><input type="checkbox" class="select-file hidden-xs" data-action="addSelection">
|
||||
{{-- oh boy --}}
|
||||
@if(in_array($file['mime'], [
|
||||
'application/x-7z-compressed',
|
||||
'application/zip',
|
||||
'application/x-compressed-zip',
|
||||
'application/x-tar',
|
||||
'application/x-gzip',
|
||||
'application/x-bzip',
|
||||
'application/x-bzip2',
|
||||
'application/java-archive'
|
||||
]))
|
||||
<i class="fa fa-file-archive-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/json',
|
||||
'application/javascript',
|
||||
'application/xml',
|
||||
'application/xhtml+xml',
|
||||
'text/xml',
|
||||
'text/css',
|
||||
'text/html',
|
||||
'text/x-perl',
|
||||
'text/x-shellscript'
|
||||
]))
|
||||
<i class="fa fa-file-code-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'image'))
|
||||
<i class="fa fa-file-image-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'video'))
|
||||
<i class="fa fa-file-video-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'video'))
|
||||
<i class="fa fa-file-audio-o" style="margin-left: 2px;"></i>
|
||||
@elseif(starts_with($file['mime'], 'application/vnd.ms-powerpoint'))
|
||||
<i class="fa fa-file-powerpoint-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||
'application/msword'
|
||||
]) || starts_with($file['mime'], 'application/vnd.ms-word'))
|
||||
<i class="fa fa-file-word-o" style="margin-left: 2px;"></i>
|
||||
@elseif(in_array($file['mime'], [
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
||||
]) || starts_with($file['mime'], 'application/vnd.ms-excel'))
|
||||
<i class="fa fa-file-excel-o" style="margin-left: 2px;"></i>
|
||||
@elseif($file['mime'] === 'application/pdf')
|
||||
<i class="fa fa-file-pdf-o" style="margin-left: 2px;"></i>
|
||||
@else
|
||||
<i class="fa fa-file-text-o" style="margin-left: 2px;"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td data-identifier="name" data-name="{{ rawurlencode($file['entry']) }}" data-path="@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}@endif/">
|
||||
@if(in_array($file['mime'], $editableMime))
|
||||
@can('edit-files', $server)
|
||||
<a href="/server/{{ $server->uuidShort }}/files/edit/@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}/@endif{{ rawurlencode($file['entry']) }}" class="edit_file">{{ $file['entry'] }}</a>
|
||||
@else
|
||||
{{ $file['entry'] }}
|
||||
@endcan
|
||||
@else
|
||||
{{ $file['entry'] }}
|
||||
@endif
|
||||
</td>
|
||||
<td data-identifier="size" class="hidden-xs">{{ $file['size'] }}</td>
|
||||
<td data-identifier="modified" class="hidden-xs">
|
||||
<?php $carbon = Carbon::createFromTimestamp($file['date'])->timezone(config('app.timezone')); ?>
|
||||
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||
{{ $carbon->format('m/d/y H:i:s') }}
|
||||
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||
<em>@lang('server.files.seconds_ago')</em>
|
||||
@else
|
||||
{{ $carbon->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="min-size">
|
||||
<button class="btn btn-xxs btn-default disable-menu-hide" data-action="toggleMenu" style="padding:2px 6px 0px;"><i class="fa fa-ellipsis-h disable-menu-hide"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
Reference in a new issue