space.blade.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @extends('theme::layout.public')
  2. @section('css')
  3. <link href="{{ asset('/css/default/space.css')}}?v={{ config('tipask.release') }}" rel="stylesheet" />
  4. @endsection
  5. @section('jumbotron')
  6. <header class="space-header">
  7. <div class="container">
  8. <div class="row">
  9. <div class="col-md-2">
  10. <a class="text-left" href="{{ route('auth.space.index',['user_id'=>$userInfo->id]) }}"><img class="avatar-128" src="{{ $userInfo->qrcode }}" alt="{{ $userInfo->name }}"></a>
  11. </div>
  12. <div class="col-md-7">
  13. <div class="space-header-name h3">
  14. {{ $userInfo->name }} @if($userInfo->title)<small> - {{ $userInfo->title }}</small> @endif
  15. @if($userInfo->userData->authentication_status === 1)
  16. <div class="space-header-authentication pull-right">
  17. <span class="space-header-item"><i class="fa fa-user fa-border text-blue" aria-hidden="true"></i> 实名认证</span>
  18. <span class="space-header-item"><i class="fa fa-graduation-cap fa-border" aria-hidden="true"></i> 专业认证</span>
  19. </div>
  20. @endif
  21. </div>
  22. <hr />
  23. <div class="space-header-social">
  24. <span class="space-header-item">性别: @if($userInfo->gender===1) <i class="fa fa-mars"></i> @elseif($userInfo->gender===2) <i class="fa fa-venus"></i> @else <i class="fa fa-genderless"></i> @endif</span>
  25. <span class="space-header-item"><i class="fa fa-map-marker"></i> {{ Area()->getName($userInfo->province) }} @if($userInfo->city>0 && Area()->getName($userInfo->province)!=Area()->getName($userInfo->city)) - {{ Area()->getName($userInfo->city) }} @endif</span>
  26. <span class="space-header-item"><i class="fa fa-calendar"></i> 注册于 {{ $userInfo->created_at->toDateString() }}</span>
  27. </div>
  28. @if($userInfo->userData->authentication_status == 1)
  29. <div class="space-authentication-skill mt-15"><p>擅长:{{ $userInfo->authentication->skill }}</p></div>
  30. @endif
  31. <div class="space-header-desc mt-15"><p>{{ $userInfo->description }}</p></div>
  32. </div>
  33. <div class="col-md-3">
  34. <div class="mt-10">
  35. @if(Auth()->check() && Auth()->user()->id === $userInfo->id)
  36. <a href="{{ route('auth.profile.base') }}" class="btn mr-10 btn-default">编辑个人资料</a>
  37. @if(config('pay.open'))
  38. <a href="{{ route('auth.profile.charge') }}" class="btn mr-10 btn-warning">金币管理</a>
  39. @endif
  40. @else
  41. @if(Auth()->check() && Auth()->user()->isFollowed(get_class($userInfo),$userInfo->id))
  42. <button type="button" id="follow-button" class="btn mr-10 btn-success active" data-source_type = "user" data-source_id = "{{ $userInfo->id }}" data-show_num="true" data-toggle="tooltip" data-placement="right" title="" data-original-title="关注后将获得更新提醒">已关注</button>
  43. @else
  44. <button type="button" id="follow-button" class="btn mr-10 btn-success" data-source_type = "user" data-source_id = "{{ $userInfo->id }}" data-show_num="true" data-toggle="tooltip" data-placement="right" title="" data-original-title="关注后将获得更新提醒">关注</button>
  45. @endif
  46. <a class="btn btn-warning mr-10" href="{{ route('ask.question.create') }}?to_user_id={{ $userInfo->id }}">向TA求助</a>
  47. <button class="btn btn-default btnMessageTo" data-toggle="modal" data-target="#sendTo_message_model" data-to_user_id = "{{ $userInfo->id }}" data-to_user_name="{{ $userInfo->name }}" >发私信</button>
  48. @endif
  49. </div>
  50. <div class="space-header-info row mt-30">
  51. <div class="col-md-4">
  52. <span class="h3"><a href="{{ route('auth.space.coins',['user_id'=>$userInfo->id]) }}">{{ $userInfo->userData->coins }}</a></span><span>金币数</span>
  53. </div>
  54. <div class="col-md-4">
  55. <span class="h3"><a href="{{ route('auth.space.credits',['user_id'=>$userInfo->id]) }}">{{ $userInfo->userData->credits }}</a></span>
  56. <span>经验值</span>
  57. </div>
  58. <div class="col-md-4">
  59. <span class="h3"><a id="follower-num" href="{{ route('auth.space.followers',['user_id'=>$userInfo->id]) }}" >{{ $userInfo->userData->followers }}</a></span><span>个粉丝</span>
  60. </div>
  61. </div>
  62. <div class="mt-10 border-top" style="color:#999;padding-top:10px; ">
  63. <i class="fa fa-paw"></i> 主页被访问 {{ $userInfo->userData->views }} 次
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </header>
  69. @endsection
  70. @section('content')
  71. <div class="row mt-30">
  72. <div class="col-md-2">
  73. <ul class="nav nav-pills nav-stacked space-nav">
  74. @if(Auth()->check() && Auth()->user()->id === $userInfo->id)
  75. <li @if(request()->route()->getName() == 'auth.space.index') class="active" @endif ><a href="{{ route('auth.space.index',['user_id'=>$userInfo->id]) }}">我的主页</a></li>
  76. <li @if(request()->route()->getName() == 'auth.space.answers') class="active" @endif ><a href="{{ route('auth.space.answers',['user_id'=>$userInfo->id]) }}">我的回答</a></li>
  77. <li @if(request()->route()->getName() == 'auth.space.questions') class="active" @endif ><a href="{{ route('auth.space.questions',['user_id'=>$userInfo->id]) }}">我的提问</a></li>
  78. <li @if(request()->route()->getName() == 'auth.space.articles') class="active" @endif ><a href="{{ route('auth.space.articles',['user_id'=>$userInfo->id]) }}">我的文章</a></li>
  79. <li role="separator" class="divider"><a></a></li>
  80. <li @if(request()->route()->getName() == 'auth.space.coins') class="active" @endif ><a href="{{ route('auth.space.coins',['user_id'=>$userInfo->id]) }}">我的金币</a></li>
  81. <li @if(request()->route()->getName() == 'auth.space.credits') class="active" @endif ><a href="{{ route('auth.space.credits',['user_id'=>$userInfo->id]) }}">我的经验</a></li>
  82. <li @if(request()->route()->getName() == 'auth.space.followers') class="active" @endif ><a href="{{ route('auth.space.followers',['user_id'=>$userInfo->id]) }}">我的粉丝</a></li>
  83. <li @if(request()->route()->getName() == 'auth.space.attentions') class="active" @endif ><a href="{{ route('auth.space.attentions',['user_id'=>$userInfo->id,'source_type'=>'questions']) }}">我的关注</a></li>
  84. <li @if(request()->route()->getName() == 'auth.space.collections') class="active" @endif ><a href="{{ route('auth.space.collections',['user_id'=>$userInfo->id,'source_type'=>'questions']) }}">我的收藏</a></li>
  85. @else
  86. <li @if(request()->route()->getName() == 'auth.space.index') class="active" @endif ><a href="{{ route('auth.space.index',['user_id'=>$userInfo->id]) }}">TA的主页</a></li>
  87. <li @if(request()->route()->getName() == 'auth.space.answers') class="active" @endif ><a href="{{ route('auth.space.answers',['user_id'=>$userInfo->id]) }}">TA的回答</a></li>
  88. <li @if(request()->route()->getName() == 'auth.space.questions') class="active" @endif ><a href="{{ route('auth.space.questions',['user_id'=>$userInfo->id]) }}">TA的提问</a></li>
  89. <li @if(request()->route()->getName() == 'auth.space.articles') class="active" @endif ><a href="{{ route('auth.space.articles',['user_id'=>$userInfo->id]) }}">TA的文章</a></li>
  90. <li role="separator" class="divider"><a></a></li>
  91. <li @if(request()->route()->getName() == 'auth.space.coins') class="active" @endif ><a href="{{ route('auth.space.coins',['user_id'=>$userInfo->id]) }}">TA的金币</a></li>
  92. <li @if(request()->route()->getName() == 'auth.space.credits') class="active" @endif ><a href="{{ route('auth.space.credits',['user_id'=>$userInfo->id]) }}">TA的经验</a></li>
  93. <li @if(request()->route()->getName() == 'auth.space.followers') class="active" @endif ><a href="{{ route('auth.space.followers',['user_id'=>$userInfo->id]) }}">TA的粉丝</a></li>
  94. @endif
  95. </ul>
  96. </div>
  97. <!-- Nav tabs -->
  98. <div class="col-md-10 main">
  99. @yield('space_content')
  100. </div>
  101. </div>
  102. @endsection