Path: blob/1.0-develop/resources/views/admin/servers/view/details.blade.php
7461 views
@extends('layouts.admin')12@section('title')3Server — {{ $server->name }}: Details4@endsection56@section('content-header')7<h1>{{ $server->name }}<small>Edit details for this server including owner and container.</small></h1>8<ol class="breadcrumb">9<li><a href="{{ route('admin.index') }}">Admin</a></li>10<li><a href="{{ route('admin.servers') }}">Servers</a></li>11<li><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></li>12<li class="active">Details</li>13</ol>14@endsection1516@section('content')17@include('admin.servers.partials.navigation')18<div class="row">19<div class="col-xs-12">20<div class="box box-primary">21<div class="box-header with-border">22<h3 class="box-title">Base Information</h3>23</div>24<form action="{{ route('admin.servers.view.details', $server->id) }}" method="POST">25<div class="box-body">26<div class="form-group">27<label for="name" class="control-label">Server Name <span class="field-required"></span></label>28<input type="text" name="name" value="{{ old('name', $server->name) }}" class="form-control" />29<p class="text-muted small">Character limits: <code>a-zA-Z0-9_-</code> and <code>[Space]</code>.</p>30</div>31<div class="form-group">32<label for="external_id" class="control-label">External Identifier</label>33<input type="text" name="external_id" value="{{ old('external_id', $server->external_id) }}" class="form-control" />34<p class="text-muted small">Leave empty to not assign an external identifier for this server. The external ID should be unique to this server and not be in use by any other servers.</p>35</div>36<div class="form-group">37<label for="pUserId" class="control-label">Server Owner <span class="field-required"></span></label>38<select name="owner_id" class="form-control" id="pUserId">39<option value="{{ $server->owner_id }}" selected>{{ $server->user->email }}</option>40</select>41<p class="text-muted small">You can change the owner of this server by changing this field to an email matching another use on this system. If you do this a new daemon security token will be generated automatically.</p>42</div>43<div class="form-group">44<label for="description" class="control-label">Server Description</label>45<textarea name="description" rows="3" class="form-control">{{ old('description', $server->description) }}</textarea>46<p class="text-muted small">A brief description of this server.</p>47</div>48</div>49<div class="box-footer">50{!! csrf_field() !!}51{!! method_field('PATCH') !!}52<input type="submit" class="btn btn-sm btn-primary" value="Update Details" />53</div>54</form>55</div>56</div>57</div>58@endsection5960@section('footer-scripts')61@parent62<script>63function escapeHtml(str) {64var div = document.createElement('div');65div.appendChild(document.createTextNode(str));66return div.innerHTML;67}6869$('#pUserId').select2({70ajax: {71url: '/admin/users/accounts.json',72dataType: 'json',73delay: 250,74data: function (params) {75return {76filter: { email: params.term },77page: params.page,78};79},80processResults: function (data, params) {81return { results: data };82},83cache: true,84},85escapeMarkup: function (markup) { return markup; },86minimumInputLength: 2,87templateResult: function (data) {88if (data.loading) return escapeHtml(data.text);8990return '<div class="user-block"> \91<img class="img-circle img-bordered-xs" src="https://www.gravatar.com/avatar/' + escapeHtml(data.md5) + '?s=120" alt="User Image"> \92<span class="username"> \93<a href="#">' + escapeHtml(data.name_first) + ' ' + escapeHtml(data.name_last) +'</a> \94</span> \95<span class="description"><strong>' + escapeHtml(data.email) + '</strong> - ' + escapeHtml(data.username) + '</span> \96</div>';97},98templateSelection: function (data) {99if (typeof data.name_first === 'undefined') {100data = {101md5: '{{ md5(strtolower($server->user->email)) }}',102name_first: '{{ $server->user->name_first }}',103name_last: '{{ $server->user->name_last }}',104email: '{{ $server->user->email }}',105id: {{ $server->owner_id }}106};107}108109return '<div> \110<span> \111<img class="img-rounded img-bordered-xs" src="https://www.gravatar.com/avatar/' + escapeHtml(data.md5) + '?s=120" style="height:28px;margin-top:-4px;" alt="User Image"> \112</span> \113<span style="padding-left:5px;"> \114' + escapeHtml(data.name_first) + ' ' + escapeHtml(data.name_last) + ' (<strong>' + escapeHtml(data.email) + '</strong>) \115</span> \116</div>';117}118});119</script>120@endsection121122123