More fixes
This commit is contained in:
parent
17642bffe7
commit
c19c423568
14 changed files with 67 additions and 61 deletions
|
@ -43,7 +43,7 @@
|
|||
<th>Pack Name</th>
|
||||
<th>Version</th>
|
||||
<th>Description</th>
|
||||
<th>Option</td>
|
||||
<th>Egg</th>
|
||||
<th class="text-center">Servers</th>
|
||||
</tr>
|
||||
@foreach ($packs as $pack)
|
||||
|
@ -52,7 +52,7 @@
|
|||
<td class="middle"><a href="{{ route('admin.packs.view', $pack->id) }}">{{ $pack->name }}</a></td>
|
||||
<td class="middle"><code>{{ $pack->version }}</code></td>
|
||||
<td class="col-md-6">{{ str_limit($pack->description, 150) }}</td>
|
||||
<td class="middle"><a href="{{ route('admin.services.option.view', $pack->option->id) }}">{{ $pack->option->name }}</a></td>
|
||||
<td class="middle"><a href="{{ route('admin.nests.egg.view', $pack->egg->id) }}">{{ $pack->egg->name }}</a></td>
|
||||
<td class="middle text-center">{{ $pack->servers_count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
@ -10,17 +10,17 @@
|
|||
<div class="well" style="margin-bottom:0">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label for="pOptionIdModal" class="form-label">Associated Service Option:</label>
|
||||
<select id="pOptionIdModal" name="option_id" class="form-control">
|
||||
@foreach($services as $service)
|
||||
<optgroup label="{{ $service->name }}">
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}">{{ $option->name }}</option>
|
||||
<label for="pEggIdModal" class="form-label">Associated Egg:</label>
|
||||
<select id="pEggIdModal" name="egg_id" class="form-control">
|
||||
@foreach($nests as $nest)
|
||||
<optgroup label="{{ $nest->name }}">
|
||||
@foreach($nest->eggs as $egg)
|
||||
<option value="{{ $egg->id }}">{{ $egg->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">The option that this pack is assocaited with. Only servers that are assigned this option will be able to access this pack.</p>
|
||||
<p class="text-muted small">The Egg that this pack is assocaited with. Only servers that are assigned this Egg will be able to access this pack.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top:15px;">
|
||||
|
|
|
@ -52,12 +52,12 @@
|
|||
<p class="text-muted small">The version of this package, or the version of the files contained within the package.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pOptionId" class="form-label">Associated Option</label>
|
||||
<select id="pOptionId" name="option_id" class="form-control">
|
||||
@foreach($services as $service)
|
||||
<optgroup label="{{ $service->name }}">
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}">{{ $option->name }}</option>
|
||||
<label for="pEggId" class="form-label">Associated Egg</label>
|
||||
<select id="pEggId" name="egg_id" class="form-control">
|
||||
@foreach($nests as $nest)
|
||||
<optgroup label="{{ $nest->name }}">
|
||||
@foreach($nest->eggs as $egg)
|
||||
<option value="{{ $egg->id }}">{{ $egg->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
|
@ -124,7 +124,7 @@
|
|||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pOptionId').select2();
|
||||
$('#pEggId').select2();
|
||||
$('#toggleModal').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
|
@ -135,9 +135,9 @@
|
|||
}).fail(function (jqXhr) {
|
||||
console.error(jqXhr);
|
||||
alert('There was an error trying to create the upload modal.');
|
||||
}).success(function (data) {
|
||||
}).done(function (data) {
|
||||
$(data).modal();
|
||||
$('#pOptionIdModal').select2();
|
||||
$('#pEggIdModal').select2();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pOptionId" class="form-label">Associated Option</label>
|
||||
<select id="pOptionId" name="option_id" class="form-control">
|
||||
@foreach($services as $service)
|
||||
<optgroup label="{{ $service->name }}">
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}" {{ $pack->option_id !== $option->id ?: 'selected' }}>{{ $option->name }}</option>
|
||||
<label for="pEggId" class="form-label">Associated Option</label>
|
||||
<select id="pEggId" name="egg_id" class="form-control">
|
||||
@foreach($nests as $nest)
|
||||
<optgroup label="{{ $nest->name }}">
|
||||
@foreach($nest->eggs as $egg)
|
||||
<option value="{{ $egg->id }}" {{ $pack->egg_id !== $egg->id ?: 'selected' }}>{{ $egg->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
|
@ -173,6 +173,6 @@
|
|||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pOptionId').select2();
|
||||
$('#pEggId').select2();
|
||||
</script>
|
||||
@endsection
|
||||
|
|
Reference in a new issue