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

137 lines
6.5 KiB
PHP
Raw Normal View History

2016-08-28 10:05:21 +08:00
@extends('user.master')
2016-09-15 23:03:58 +08:00
@section('title', trans('general.dashboard'))
2016-08-28 10:05:21 +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.dashboard') }}
2016-08-28 10:05:21 +08:00
</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
</div><!-- /.row -->
<div class="row">
<div class="col-md-8">
<div class="box">
<div class="box-header with-border">
2016-09-15 23:03:58 +08:00
<h3 class="box-title">{{ trans('user.used.title') }}</h3>
2016-08-28 10:05:21 +08:00
</div><!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-8">
<div class="progress-group">
2016-09-15 23:03:58 +08:00
<span class="progress-text">{{ trans('user.used.players') }}</span>
<span class="progress-number"><b>{{ $statistics['players']['used'] }}</b>/ {{ $statistics['players']['total'] }}</span>
2016-08-28 10:05:21 +08:00
<div class="progress sm">
<div class="progress-bar progress-bar-aqua" style="width: {{ $statistics['players']['percentage'] }}%"></div>
2016-08-28 10:05:21 +08:00
</div>
</div><!-- /.progress-group -->
<div class="progress-group">
2016-09-15 23:03:58 +08:00
<span class="progress-text">{{ trans('user.used.storage') }}</span>
2017-01-22 16:28:58 +08:00
<?php
$used = $statistics['storage']['used'];
$total = $statistics['storage']['total'];
2017-01-22 16:28:58 +08:00
?>
@if ($used > 1024)
2016-08-28 10:05:21 +08:00
<span class="progress-number">
<b>{{ round($used / 1024, 1) }}</b>/ {{ is_string($total) ? $total : round($total / 1024, 1) }} MB
2016-08-28 10:05:21 +08:00
</span>
@else
<span class="progress-number">
<b>{{ $used }}</b>/ {{ $total }} KB
2016-08-28 10:05:21 +08:00
</span>
@endif
<div class="progress sm">
<div class="progress-bar progress-bar-yellow" style="width: {{ $statistics['storage']['percentage'] }}%"></div>
2016-08-28 10:05:21 +08:00
</div>
</div><!-- /.progress-group -->
</div><!-- /.col -->
<div class="col-md-4">
<p class="text-center">
2016-09-15 23:03:58 +08:00
<strong>{{ trans('user.cur-score') }}</strong>
2016-08-28 10:05:21 +08:00
</p>
<p id="score" data-toggle="modal" data-target="#modal-score-instruction">
{{ $user->getScore() }}
</p>
2016-09-15 23:03:58 +08:00
<p class="text-center" style="font-size: smaller; margin-top: 20px;">{{ trans('user.score-notice') }}</p>
2016-08-28 10:05:21 +08:00
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- ./box-body -->
<div class="box-footer">
@if ($user->canSignIn())
<button id="sign-in-button" class="btn btn-primary pull-left" onclick="signIn()">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;{{ trans('user.sign-in') }}
2016-08-28 10:05:21 +08:00
</button>
@else
<button class="btn btn-primary pull-left" title="{{ trans('user.last-sign-in', ['time' => $user->getLastSignInTime()]) }}" disabled="disabled">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;{{ trans('user.sign-in-remain-time', ['time' => round($user->getSignInRemainingTime() / 3600)]) }}
2016-08-28 10:05:21 +08:00
</button>
@endif
</div><!-- /.box-footer -->
</div><!-- /.box -->
</div><!-- /.col -->
<div class="col-md-4">
<div class="box box-primary">
<div class="box-header with-border">
2016-09-15 23:03:58 +08:00
<h3 class="box-title">{{ trans('user.announcement') }}</h3>
2016-08-28 10:05:21 +08:00
</div><!-- /.box-header -->
<div class="box-body">
{!! bs_announcement() !!}
2016-08-28 10:05:21 +08:00
</div><!-- /.box-body -->
</div>
</div>
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<div id="modal-score-instruction" 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>
2016-09-15 23:03:58 +08:00
<h4 class="modal-title">{{ trans('user.score-intro.title') }}</h4>
2016-08-28 10:05:21 +08:00
</div>
<div class="modal-body">
2016-09-15 23:03:58 +08:00
<?php list($from, $to) = explode(',', Option::get('sign_score')); ?>
{!! nl2br(trans('user.score-intro.introduction', [
'initial_score' => option('user_initial_score'),
'score-from' => $from,
'score-to' => $to
])) !!}
2016-08-28 10:05:21 +08:00
<hr />
<div class="row">
<div class="col-md-6">
2016-09-15 23:03:58 +08:00
<p class="text-center">{{ trans('user.score-intro.rates.storage', ['score' => option('score_per_storage')]) }}</p>
2016-08-28 10:05:21 +08:00
</div>
<div class="col-md-6">
2016-09-15 23:03:58 +08:00
<p class="text-center">{{ trans('user.score-intro.rates.player', ['score' => option('score_per_player')]) }}</p>
2016-08-28 10:05:21 +08:00
</div>
</div>
</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>
2016-08-28 10:05:21 +08:00
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
@endsection