2016-07-21 22:01:57 +08:00
|
|
|
@extends('user.master')
|
|
|
|
|
2016-09-15 23:03:58 +08:00
|
|
|
@section('title', trans('general.player-manage'))
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
|
|
<div class="content-wrapper">
|
|
|
|
<!-- Content Header (Page header) -->
|
|
|
|
<section class="content-header">
|
|
|
|
<h1>
|
2016-09-15 23:03:58 +08:00
|
|
|
{{ trans('general.player-manage') }}
|
2016-07-21 22:01:57 +08:00
|
|
|
</h1>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<!-- Main content -->
|
|
|
|
<section class="content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-body table-responsive no-padding">
|
|
|
|
<table class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>PID</th>
|
2016-09-15 23:03:58 +08:00
|
|
|
<th>{{ trans('user.player.player-name') }}</th>
|
2016-10-23 11:41:52 +08:00
|
|
|
<th>{{ trans('user.player.preference.title') }}</th>
|
2016-09-15 23:03:58 +08:00
|
|
|
<th>{{ trans('user.player.edit') }}</th>
|
|
|
|
<th>{{ trans('user.player.operation') }}</th>
|
2016-07-21 22:01:57 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@foreach ($players as $player)
|
|
|
|
<tr class="player" id="{{ $player['pid'] }}">
|
2016-12-17 18:07:29 +08:00
|
|
|
<td class="pid">{{ $player['pid'] }}</td>
|
|
|
|
<td class="player-name">{{ $player['player_name'] }}</td>
|
2016-07-21 22:01:57 +08:00
|
|
|
<td>
|
|
|
|
<select class="form-control" id="preference" pid="{{ $player['pid'] }}">
|
|
|
|
<option {{ ($player['preference'] == "default") ? 'selected="selected"' : '' }} value="default">Default</option>
|
|
|
|
<option {{ ($player['preference'] == "slim") ? 'selected="selected"' : '' }} value="slim">Slim</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-11-24 22:27:33 +08:00
|
|
|
<a class="btn btn-default btn-sm" onclick="changePlayerName('{{ $player['pid'] }}', '{{ $player['player_name'] }}')">{{ trans('user.player.edit-pname') }}</a>
|
2016-07-21 22:01:57 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
2017-11-24 22:27:33 +08:00
|
|
|
<a class="btn btn-warning btn-sm" onclick="clearTexture('{{ $player['pid'] }}');">{{ trans('user.player.delete-texture') }}</a>
|
|
|
|
<a class="btn btn-danger btn-sm" onclick="deletePlayer('{{ $player['pid'] }}');">{{ trans('user.player.delete-player') }}</a>
|
2016-07-21 22:01:57 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer clearfix">
|
|
|
|
<button class="btn btn-primary pull-left" data-toggle="modal" data-target="#modal-add-player">
|
2016-09-15 23:03:58 +08:00
|
|
|
<i class="fa fa-plus" aria-hidden="true"></i> {{ trans('user.player.add-player') }}
|
2016-07-21 22:01:57 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-17 17:00:52 +08:00
|
|
|
|
|
|
|
<div class="box box-default collapsed-box">
|
|
|
|
<div class="box-header with-border">
|
2016-09-15 23:03:58 +08:00
|
|
|
<h3 class="box-title">{{ trans('general.notice') }}</h3>
|
2016-08-17 17:00:52 +08:00
|
|
|
<div class="box-tools pull-right">
|
|
|
|
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
|
|
|
</div><!-- /.box-tools -->
|
|
|
|
</div><!-- /.box-header -->
|
|
|
|
<div class="box-body">
|
2016-09-15 23:03:58 +08:00
|
|
|
<p>{{ trans('user.player.login-notice') }}</p>
|
2016-08-17 17:00:52 +08:00
|
|
|
</div><!-- /.box-body -->
|
|
|
|
</div><!-- /.box -->
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="box">
|
2018-02-23 21:56:03 +08:00
|
|
|
<!-- 3D skin preview -->
|
|
|
|
@include('common.texture-preview', ['title' => trans('user.player.player-info') ])
|
|
|
|
<!-- 2D skin preview -->
|
2016-07-21 22:01:57 +08:00
|
|
|
<div class="box-body">
|
2018-02-23 21:56:03 +08:00
|
|
|
<div id="preview-2d-container" style="display: none;">
|
|
|
|
<p>{{ trans('user.player.textures.steve') }}<a href=""><img id="steve" class="skin2d" /></a>
|
|
|
|
<span class="skin2d">{{ trans('user.player.textures.empty') }}</span>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>{{ trans('user.player.textures.alex') }}<a href=""><img id="alex" class="skin2d" /></a>
|
|
|
|
<span class="skin2d">{{ trans('user.player.textures.empty') }}</span>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>{{ trans('user.player.textures.cape') }}<a href=""><img id="cape" class="skin2d" /></a>
|
|
|
|
<span class="skin2d">{{ trans('user.player.textures.empty') }}</span>
|
|
|
|
</p>
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.box-body -->
|
|
|
|
<div class="box-footer">
|
2017-01-20 21:23:24 +08:00
|
|
|
<button id="preview-switch" class="btn btn-default">{{ trans('general.switch-2d-preview') }}</button>
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.box -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section><!-- /.content -->
|
|
|
|
</div><!-- /.content-wrapper -->
|
|
|
|
|
|
|
|
<div id="modal-add-player" class="modal fade" tabindex="-1" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
2016-09-15 23:03:58 +08:00
|
|
|
<h4 class="modal-title">{{ trans('user.player.add-player') }}</h4>
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2018-06-19 11:51:34 +08:00
|
|
|
<td class="key">{{ trans('user.player.player-name') }}</td>
|
|
|
|
<td class="value">
|
|
|
|
<input type="text" class="form-control" id="player_name" value="">
|
2016-07-21 22:01:57 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-06-19 11:51:34 +08:00
|
|
|
|
|
|
|
<div class="callout callout-info">
|
|
|
|
<ul style="padding: 0 0 0 20px; margin: 0;">
|
|
|
|
<li>{{ trans('user.player.player-name-rule.'.option('player_name_rule')) }}</li>
|
|
|
|
<li>{{ trans('user.player.player-name-length', ['min' => option('player_name_length_min'), 'max' => option('player_name_length_max')]) }}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2016-09-15 23:03:58 +08:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.close') }}</button>
|
2017-11-24 22:27:33 +08:00
|
|
|
<a onclick="addNewPlayer();" class="btn btn-primary">{{ trans('general.submit') }}</a>
|
2016-07-21 22:01:57 +08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.modal-content -->
|
|
|
|
</div><!-- /.modal-dialog -->
|
|
|
|
</div><!-- /.modal -->
|
|
|
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('script')
|
|
|
|
<script>
|
2018-02-23 21:56:03 +08:00
|
|
|
$(document).ready(function () {
|
2018-02-23 23:17:29 +08:00
|
|
|
$.msp.config.skinUrl = defaultSteveSkin;
|
2018-02-23 21:56:03 +08:00
|
|
|
initSkinViewer();
|
|
|
|
registerAnimationController();
|
|
|
|
registerWindowResizeHandler();
|
|
|
|
});
|
2016-07-21 22:01:57 +08:00
|
|
|
</script>
|
|
|
|
@endsection
|