blessing-skin-server/resources/views/user/player.tpl

154 lines
7.5 KiB
PHP
Raw Normal View History

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>
2018-07-17 11:06:55 +08:00
@lang('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>
2018-07-17 11:06:55 +08:00
<th>@lang('user.player.player-name')</th>
<th>
2018-07-17 11:06:55 +08:00
@lang('user.player.preference.title')
<i class="fa fa-question-circle" title="@lang('user.player.preference.description')" data-toggle="tooltip" data-placement="right"></i>
</th>
2018-07-17 11:06:55 +08:00
<th>@lang('user.player.edit')</th>
<th>@lang('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 (Steve)</option>
<option {{ ($player['preference'] == "slim") ? 'selected="selected"' : '' }} value="slim">Slim (Alex)</option>
2016-07-21 22:01:57 +08:00
</select>
</td>
<td>
2018-07-17 11:06:55 +08:00
<a class="btn btn-default btn-sm" onclick="changePlayerName('{{ $player['pid'] }}', '{{ $player['player_name'] }}')">@lang('user.player.edit-pname')</a>
2016-07-21 22:01:57 +08:00
</td>
<td>
2018-07-17 11:06:55 +08:00
<a class="btn btn-warning btn-sm" onclick="clearTexture('{{ $player['pid'] }}');">@lang('user.player.delete-texture')</a>
<a class="btn btn-danger btn-sm" onclick="deletePlayer('{{ $player['pid'] }}');">@lang('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">
2018-07-17 11:06:55 +08:00
<i class="fa fa-plus" aria-hidden="true"></i> &nbsp;@lang('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">
2018-07-17 11:06:55 +08:00
<h3 class="box-title">@lang('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">
2018-07-17 11:06:55 +08:00
<p>@lang('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;">
2018-07-17 11:06:55 +08:00
<p>@lang('user.player.textures.steve')<a href=""><img id="steve" class="skin2d" /></a>
<span class="skin2d">@lang('user.player.textures.empty')</span>
2018-02-23 21:56:03 +08:00
</p>
2018-07-17 11:06:55 +08:00
<p>@lang('user.player.textures.alex')<a href=""><img id="alex" class="skin2d" /></a>
<span class="skin2d">@lang('user.player.textures.empty')</span>
2018-02-23 21:56:03 +08:00
</p>
2018-07-17 11:06:55 +08:00
<p>@lang('user.player.textures.cape')<a href=""><img id="cape" class="skin2d" /></a>
<span class="skin2d">@lang('user.player.textures.empty')</span>
2018-02-23 21:56:03 +08:00
</p>
2016-07-21 22:01:57 +08:00
</div>
</div><!-- /.box-body -->
<div class="box-footer">
2018-07-17 11:06:55 +08:00
<button id="preview-switch" class="btn btn-default">@lang('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">&times;</span></button>
2018-07-17 11:06:55 +08:00
<h4 class="modal-title">@lang('user.player.add-player')</h4>
2016-07-21 22:01:57 +08:00
</div>
<div class="modal-body">
<table class="table">
<tbody>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('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>
<div class="callout callout-info">
<ul style="padding: 0 0 0 20px; margin: 0;">
2018-07-17 11:06:55 +08:00
<li>@lang('user.player.player-name-rule.'.option('player_name_rule'))</li>
<li>@lang('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">
2018-07-17 11:06:55 +08:00
<button type="button" class="btn btn-default" data-dismiss="modal">@lang('general.close')</button>
<a onclick="addNewPlayer();" class="btn btn-primary">@lang('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