[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,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.schedule.header')
@endsection
@section('content-header')
<h1>@lang('server.schedule.header')<small>@lang('server.schedule.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 class="active">@lang('navigation.server.schedules')</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">@lang('server.schedule.current')</h3>
<div class="box-tools">
<a href="{{ route('server.schedules.new', $server->uuidShort) }}"><button class="btn btn-primary btn-sm">Create New</button></a>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tbody>
<tr>
<th>@lang('strings.name')</th>
<th class="text-center">@lang('strings.queued')</th>
<th class="text-center">@lang('strings.tasks')</th>
<th>@lang('strings.last_run')</th>
<th>@lang('strings.next_run')</th>
<th></th>
</tr>
@foreach($schedules as $schedule)
<tr @if(! $schedule->is_active)class="muted muted-hover"@endif>
<td class="middle">
@can('edit-schedule', $server)
<a href="{{ route('server.schedules.view', ['server' => $server->uuidShort, '$schedule' => $schedule->hashid]) }}">
{{ $schedule->name ?? trans('server.schedule.unnamed') }}
</a>
@else
{{ $schedule->name ?? trans('server.schedule.unnamed') }}
@endcan
</td>
<td class="middle text-center">
@if ($schedule->is_processing)
<span class="label label-success">@lang('strings.yes')</span>
@else
<span class="label label-default">@lang('strings.no')</span>
@endif
</td>
<td class="middle text-center"><span class="label label-primary">{{ $schedule->tasks_count }}</span></td>
<td class="middle">
@if($schedule->last_run_at)
{{ Carbon::parse($schedule->last_run_at)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($schedule->last_run_at)->diffForHumans() }})</span>
@else
<em class="text-muted">@lang('strings.not_run_yet')</em>
@endif
</td>
<td class="middle">
@if($schedule->is_active)
{{ Carbon::parse($schedule->next_run_at)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($schedule->next_run_at)->diffForHumans() }})</span>
@else
<em>n/a</em>
@endif
</td>
<td class="middle">
@can('delete-schedule', $server)
<a class="btn btn-xs btn-danger" href="#" data-action="delete-schedule" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('strings.delete')"><i class="fa fa-fw fa-trash-o"></i></a>
@endcan
@can('toggle-schedule', $server)
<a class="btn btn-xs btn-default" href="#" data-action="toggle-schedule" data-active="{{ $schedule->active }}" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('server.schedule.toggle')"><i class="fa fa-fw fa-eye-slash"></i></a>
<a class="btn btn-xs btn-default" href="#" data-action="trigger-schedule" data-schedule-id="{{ $schedule->hashid }}" data-toggle="tooltip" data-placement="top" title="@lang('server.schedule.run_now')"><i class="fa fa-fw fa-refresh"></i></a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('footer-scripts')
@parent
{!! Theme::js('js/frontend/server.socket.js') !!}
{!! Theme::js('js/frontend/tasks/management-actions.js') !!}
@endsection

View file

@ -0,0 +1,145 @@
{{-- 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.schedules.new.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.schedule.new.header')<small>@lang('server.schedule.new.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.schedules', $server->uuidShort) }}">@lang('navigation.server.schedules')</a></li>
<li class="active">@lang('server.schedule.new.header')</li>
</ol>
@endsection
@section('content')
<form action="{{ route('server.schedules.new', $server->uuidShort) }}" method="POST">
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.schedule.setup')</h3>
</div>
<div class="box-body">
<div class="row">
<div class="form-group col-xs-12">
<label class="control-label" for="scheduleName">@lang('strings.name') <span class="field-optional"></span></label>
<div>
<input type="text" name="name" id="scheduleName" class="form-control" value="{{ old('name') }}" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleDayOfWeek" class="control-label">@lang('server.schedule.day_of_week')</label>
<div>
<select data-action="update-field" data-field="cron_day_of_week" class="form-control" multiple>
<option value="0">@lang('strings.days.sun')</option>
<option value="1">@lang('strings.days.mon')</option>
<option value="2">@lang('strings.days.tues')</option>
<option value="3">@lang('strings.days.wed')</option>
<option value="4">@lang('strings.days.thurs')</option>
<option value="5">@lang('strings.days.fri')</option>
<option value="6">@lang('strings.days.sat')</option>
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleDayOfWeek" class="form-control" name="cron_day_of_week" value="{{ old('cron_day_of_week') }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleDayOfMonth" class="control-label">@lang('server.schedule.day_of_month')</label>
<div>
<select data-action="update-field" data-field="cron_day_of_month" class="form-control" multiple>
@foreach(range(1, 31) as $i)
<option value="{{ $i }}">{{ $i }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleDayOfMonth" class="form-control" name="cron_day_of_month" value="{{ old('cron_day_of_month') }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group col-md-12">
<label for="scheduleHour" class="control-label">@lang('server.schedule.hour')</label>
<div>
<select data-action="update-field" data-field="cron_hour" class="form-control" multiple>
@foreach(range(0, 23) as $i)
<option value="{{ $i }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}:00</option>
@endforeach
</select>
</div>
</div>
<div class="form-group col-md-12">
<input type="text" id="scheduleHour" class="form-control" name="cron_hour" value="{{ old('cron_hour') }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleMinute" class="control-label">@lang('server.schedule.minute')</label>
<div>
<select data-action="update-field" data-field="cron_minute" class="form-control" multiple>
@foreach(range(0, 55) as $i)
@if($i % 5 === 0)
<option value="{{ $i }}">_ _:{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
@endif
@endforeach
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleMinute" class="form-control" name="cron_minute" value="{{ old('cron_minute') }}" />
</div>
</div>
</div>
</div>
<div class="box-footer with-border">
<p class="small text-muted no-margin-bottom">@lang('server.schedule.time_help')</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box box-primary" id="containsTaskList">
@include('partials.schedules.task-template')
<div class="box-footer with-border" id="taskAppendBefore">
<div>
<p class="text-muted small">@lang('server.schedule.task_help')</p>
</div>
<div class="pull-right">
{!! csrf_field() !!}
<button type="button" class="btn btn-sm btn-default" data-action="add-new-task"><i class="fa fa-plus"></i> @lang('server.schedule.task.add_more')</button>
<button type="submit" class="btn btn-sm btn-success">@lang('server.schedule.new.submit')</button>
</div>
</div>
</div>
</div>
</div>
</form>
@endsection
@section('footer-scripts')
@parent
{!! Theme::js('js/frontend/server.socket.js') !!}
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
{!! Theme::js('js/frontend/tasks/view-actions.js') !!}
@endsection

View file

@ -0,0 +1,163 @@
{{-- 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.schedules.edit.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.schedule.manage.header')<small>{{ $schedule->name }}</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.schedules', $server->uuidShort) }}">@lang('navigation.server.schedules')</a></li>
<li class="active">@lang('server.schedule.manage.header')</li>
</ol>
@endsection
@section('content')
<form action="{{ route('server.schedules.view', ['server' => $server->uuidShort, 'schedule' => $schedule->hashid]) }}" method="POST">
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="form-group col-xs-12">
<label class="control-label" for="scheduleName">@lang('strings.name') <span class="field-optional"></span></label>
<div>
<input type="text" name="name" class="form-control" id="scheduleName" value="{{ old('name', $schedule->name) }}" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleDayOfWeek" class="control-label">@lang('server.schedule.day_of_week')</label>
<div>
<select data-action="update-field" data-field="cron_day_of_week" class="form-control" multiple>
<option value="0">@lang('strings.days.sun')</option>
<option value="1">@lang('strings.days.mon')</option>
<option value="2">@lang('strings.days.tues')</option>
<option value="3">@lang('strings.days.wed')</option>
<option value="4">@lang('strings.days.thurs')</option>
<option value="5">@lang('strings.days.fri')</option>
<option value="6">@lang('strings.days.sat')</option>
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleDayOfWeek" class="form-control" name="cron_day_of_week" value="{{ old('cron_day_of_week', $schedule->cron_day_of_week) }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleDayOfMonth" class="control-label">@lang('server.schedule.day_of_month')</label>
<div>
<select data-action="update-field" data-field="cron_day_of_month" class="form-control" multiple>
@foreach(range(1, 31) as $i)
<option value="{{ $i }}">{{ $i }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleDayOfMonth" class="form-control" name="cron_day_of_month" value="{{ old('cron_day_of_month', $schedule->cron_day_of_month) }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group col-md-12">
<label for="scheduleHour" class="control-label">@lang('server.schedule.hour')</label>
<div>
<select data-action="update-field" data-field="cron_hour" class="form-control" multiple>
@foreach(range(0, 23) as $i)
<option value="{{ $i }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}:00</option>
@endforeach
</select>
</div>
</div>
<div class="form-group col-md-12">
<input type="text" id="scheduleHour" class="form-control" name="cron_hour" value="{{ old('cron_hour', $schedule->cron_hour) }}" />
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="form-group">
<label for="scheduleMinute" class="control-label">@lang('server.schedule.minute')</label>
<div>
<select data-action="update-field" data-field="cron_minute" class="form-control" multiple>
@foreach(range(0, 55) as $i)
@if($i % 5 === 0)
<option value="{{ $i }}">_ _:{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
@endif
@endforeach
</select>
</div>
</div>
<div class="form-group">
<input type="text" id="scheduleMinute" class="form-control" name="cron_minute" value="{{ old('cron_minute', $schedule->cron_minute) }}" />
</div>
</div>
</div>
</div>
<div class="box-footer with-border">
<p class="small text-muted no-margin-bottom">@lang('server.schedule.time_help')</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box box-primary" id="containsTaskList">
@include('partials.schedules.task-template')
<div class="box-footer with-border" id="taskAppendBefore">
<div>
<p class="text-muted small">@lang('server.schedule.task_help')</p>
</div>
<div class="pull-right">
{!! csrf_field() !!}
<button type="button" class="btn btn-sm btn-default" data-action="add-new-task"><i class="fa fa-plus"></i> @lang('server.schedule.task.add_more')</button>
<button type="submit" class="btn btn-sm btn-success" name="_method" value="PATCH">@lang('server.schedule.manage.submit')</button>
</div>
<div class="pull-left">
<button type="submit" class="btn btn-sm btn-danger muted muted-hover" id="deleteButton" name="_method" value="DELETE"><i class="fa fa-trash-o"></i></button>
</div>
</div>
</div>
</div>
</div>
</form>
@endsection
@section('footer-scripts')
@parent
{!! Theme::js('js/frontend/server.socket.js') !!}
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
{!! Theme::js('js/frontend/tasks/view-actions.js') !!}
<script>
$(document).ready(function () {
$('#deleteButton').on('mouseenter', function () {
$(this).find('i').html(' @lang('server.schedule.manage.delete')');
}).on('mouseleave', function () {
$(this).find('i').html('');
});
$.each(Pterodactyl.tasks, function (index, value) {
var element = (index !== 0) ? $('button[data-action="add-new-task"]').trigger('click').data('element') : $('div[data-target="task-clone"]');
var timeValue = (value.time_offset > 59) ? value.time_offset / 60 : value.time_offset;
var timeInterval = (value.time_offset > 59) ? 'm' : 's';
element.find('select[name="tasks[time_value][]"]').val(timeValue).trigger('change');
element.find('select[name="tasks[time_interval][]"]').val(timeInterval).trigger('change');
element.find('select[name="tasks[action][]"]').val(value.action).trigger('change');
element.find('input[name="tasks[payload][]"]').val(value.payload);
});
});
</script>
@endsection