fix up urls to follow a cleaner pattern

This commit is contained in:
Dane Everitt 2016-02-21 00:07:03 -05:00
parent d822811a5d
commit dcf2f6fa0a
5 changed files with 81 additions and 43 deletions

View file

@ -0,0 +1,42 @@
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.admin')
@section('title')
New Variable for {{ $option->name }}
@endsection
@section('content')
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="/admin">Admin Control</a></li>
<li><a href="/admin/services">Services</a></li>
<li><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></li>
<li><a href="{{ route('admin.services.option', $option->id) }}">{{ $option->name }}</a></li>
<li class="active">New Variable</li>
</ul>
<h3>New Option Variable</h3><hr />
</div>
<script>
$(document).ready(function () {
$('#sidebar_links').find("a[href='/admin/services']").addClass('active');
});
</script>
@endsection

View file

@ -33,7 +33,7 @@
</ul>
<div class="alert alert-warning"><strong>Warning!</strong> This page contains advanced settings that the panel and daemon use to control servers. Modifying information on this page is not recommended unless you are absolutely sure of what you are doing.</div>
<h3>Settings</h3><hr />
<form action="{{ route('admin.services.option', $option->id) }}" method="POST">
<form action="{{ route('admin.services.option', [$service->id, $option->id]) }}" method="POST">
<div class="row">
<div class="col-md-6 form-group">
<label class="control-label">Name:</label>
@ -90,7 +90,7 @@
</form>
<h3>Variables</h3><hr />
@foreach($variables as $variable)
<form action="{{ route('admin.services.option.variable', [ 'option' => $option->id, 'variable' => $variable->id ]) }}" method="POST">
<form action="{{ route('admin.services.option.variable', [$service->id, $option->id, $variable->id]) }}" method="POST">
<div class="well">
<div class="row">
<div class="col-md-6 form-group">
@ -185,7 +185,7 @@
@endforeach
</tbody>
</table>
<form action="{{ route('admin.services.option', $option->id) }}" method="POST">
<form action="{{ route('admin.services.option', [$service->id, $option->id]) }}" method="POST">
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger">

View file

@ -44,7 +44,7 @@
<tbody>
@foreach($options as $option)
<tr>
<td><a href="{{ route('admin.services.option', $option->id) }}">{{ $option->name }}</a></td>
<td><a href="{{ route('admin.services.option', [ $service->id, $option->id]) }}">{{ $option->name }}</a></td>
<td>{!! $option->description !!}</td>
<td><code>{{ $option->docker_image }}</code></td>
<td><code>{{ $option->tag }}</code></td>