credits.blade.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @extends('admin/public/layout')
  2. @section('title')积分设置@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>
  6. 积分设置
  7. <small>网站用户积分策略设置</small>
  8. </h1>
  9. </section>
  10. <section class="content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box box-primary">
  14. <form role="form" name="addForm" method="POST" action="{{ route('admin.setting.credits') }}">
  15. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  16. <div class="box-body">
  17. <div class="alert alert-info" role="alert">经验和金币都可以设置为负数,0,或者正数,负数表示扣分</div>
  18. <div class="table-responsive">
  19. <table class="table table-bordered table-striped dataTable text-center">
  20. <thead>
  21. <tr role="row">
  22. <th>用户行为</th>
  23. <th>经验值</th>
  24. <th>金币数</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <tr>
  29. <td>用户注册获得</td>
  30. <td>
  31. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_register')) has-error @endif "><input type="text" class="form-control" name="credits_register" value="{{ old('credits_register',Setting()->get('credits_register')) }}" /></div>
  32. </td>
  33. <td>
  34. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_register')) has-error @endif "><input type="text" class="form-control" name="coins_register" value="{{ old('coins_register',Setting()->get('coins_register')) }}" /></div>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td>每日登录系统获得</td>
  39. <td>
  40. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_login')) has-error @endif "><input type="text" class="form-control" name="credits_login" value="{{ old('credits_login',Setting()->get('credits_login')) }}" /></div>
  41. </td>
  42. <td>
  43. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_login')) has-error @endif "><input type="text" class="form-control" name="coins_login" value="{{ old('coins_login',Setting()->get('coins_login')) }}" /></div>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td>每日签到获得</td>
  48. <td>
  49. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_sign')) has-error @endif "><input type="text" class="form-control" name="credits_sign" value="{{ old('credits_sign',Setting()->get('credits_sign')) }}" /></div>
  50. </td>
  51. <td>
  52. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_sign')) has-error @endif "><input type="text" class="form-control" name="coins_sign" value="{{ old('coins_sign',Setting()->get('coins_sign')) }}" /></div>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td>提出问题获得</td>
  57. <td>
  58. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_ask')) has-error @endif "><input type="text" class="form-control" name="credits_ask" value="{{ old('credits_ask',Setting()->get('credits_ask')) }}" /></div>
  59. </td>
  60. <td>
  61. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_ask')) has-error @endif "><input type="text" class="form-control" name="coins_ask" value="{{ old('coins_ask',Setting()->get('coins_ask')) }}" /></div>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>回答问题获得</td>
  66. <td>
  67. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_answer')) has-error @endif "><input type="text" class="form-control" name="credits_answer" value="{{ old('credits_answer',Setting()->get('credits_answer')) }}" /></div>
  68. </td>
  69. <td>
  70. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_answer')) has-error @endif "><input type="text" class="form-control" name="coins_answer" value="{{ old('coins_answer',Setting()->get('coins_answer')) }}" /></div>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>回答被采纳获得</td>
  75. <td>
  76. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_adopted')) has-error @endif "><input type="text" class="form-control" name="credits_adopted" value="{{ old('credits_adopted',Setting()->get('credits_adopted')) }}" /></div>
  77. </td>
  78. <td>
  79. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_adopted')) has-error @endif "><input type="text" class="form-control" name="coins_adopted" value="{{ old('coins_adopted',Setting()->get('coins_adopted')) }}" /></div>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>撰写文章获得</td>
  84. <td>
  85. <div class="col-md-4 col-md-offset-4 @if ($errors->has('credits_write_article')) has-error @endif "><input type="text" class="form-control" name="credits_write_article" value="{{ old('credits_adopted',Setting()->get('credits_write_article')) }}" /></div>
  86. </td>
  87. <td>
  88. <div class="col-md-4 col-md-offset-4 @if ($errors->has('coins_write_article')) has-error @endif "><input type="text" class="form-control" name="coins_write_article" value="{{ old('coins_write_article',Setting()->get('coins_write_article')) }}" /></div>
  89. </td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. </div>
  94. </div>
  95. <div class="box-footer">
  96. <button type="submit" class="btn btn-primary">保存</button>
  97. <button type="reset" class="btn btn-success">重置</button>
  98. </div>
  99. </form>
  100. </div>
  101. </div>
  102. </div>
  103. </section>
  104. @endsection
  105. @section('script')
  106. <script type="text/javascript">
  107. set_active_menu('global',"{{ route('admin.setting.credits') }}");
  108. </script>
  109. @endsection