expert.blade.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @extends('theme::layout.public')
  2. @section('seo_title')专家 @if($experts->currentPage()>1))- 第{{ $experts->currentPage() }}页 @endif - {{ Setting()->get('website_name') }}@endsection
  3. @section('content')
  4. <div class="row">
  5. <div class="col-xs-12 col-md-9 main">
  6. <div class="widget-streams users">
  7. <div class="search-expert mt-20">
  8. <div class="row">
  9. <div class="company-func-detail">
  10. <form name="searchForm" action="{{ route('website.experts') }}" method="GET">
  11. <div class="col-md-10">
  12. <div class="form-group">
  13. <input name="word" class="form-control" type="text" value="{{ $word }}" placeholder="搜索关键字">
  14. </div>
  15. </div>
  16. <div class="col-md-2 search-btn-warp">
  17. <div class="form-group">
  18. <button type="submit" class="btn btn-primary search-btn">搜索专家</button>
  19. </div>
  20. </div>
  21. </form>
  22. </div>
  23. </div>
  24. <div class="row">
  25. <div class="col-md-12 expert-search-opt">
  26. <div class="expert-search-opt-item"><span class="expert-search-opt-label">分类:</span>
  27. <div class="expert-search-opt-detail expert-search-opt-label-detail">
  28. <a href="{{ route('website.experts',['categorySlug'=>'all']) }}">不限</a>
  29. @foreach( $categories as $category )
  30. - <a href="{{ route('website.experts',['categorySlug'=>$category->slug]) }}" @if($category->slug == $categorySlug) class="active" @endif>{{ $category->name }}</a>
  31. @endforeach
  32. </div>
  33. </div>
  34. <div class="expert-search-opt-item mt-10"><span class="expert-search-opt-label">城市:</span>
  35. <div class="expert-search-opt-detail">
  36. <a href="{{ route('website.experts',['categorySlug'=>$categorySlug,'provinceId'=>'all']) }}">不限</a>
  37. @foreach( $hotProvinces as $hotProvince)
  38. @if($hotProvince->province > 0)
  39. - <a href="{{ route('website.experts',['categorySlug'=>$categorySlug,'provinceId'=>$hotProvince->province]) }}" @if($hotProvince->province == $provinceId) class="active" @endif>{{ Area()->getName($hotProvince->province) }}</a>
  40. @endif
  41. @endforeach
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <h2 class="h4 mt-30">专家列表<a href="{{ route('auth.authentication.index') }}" class="pull-right text-danger" target="_blank">申请成为专家 <i class="fa fa-external-link-square text-green" aria-hidden="true"></i></a></h2>
  48. <div class="widget-streams border-top">
  49. @foreach($experts as $expert)
  50. <section class="hover-show streams-item">
  51. <div class="stream-wrap media">
  52. <div class="col-md-9">
  53. <div class="pull-left mr-10">
  54. <a href="{{ route('auth.space.index',['id'=>$expert->user_id]) }}" target="_blank">
  55. <img class="media-object avatar-64" src="{{ get_user_avatar($expert->user_id,'middle') }}" alt="{{ $expert->real_name }}">
  56. </a>
  57. </div>
  58. <div class="media-body">
  59. <h4 class="media-heading">
  60. <a href="{{ route('auth.space.index',['id'=>$expert->user_id]) }}">{{ $expert->real_name }}</a>
  61. @if($expert->authentication_status==1)<span class="text-gold"><i class="fa fa-graduation-cap" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="" data-original-title="已通过行家认证"></i></span> @endif
  62. </h4>
  63. <p class="text-muted">{{ $expert->title }}</p>
  64. <p class="text-muted">{{ $expert->answers }}回答 / {{ $expert->answers }}赞同 / {{ $expert->followers }}关注 </p>
  65. <ul class="taglist-inline ib">
  66. <li class="tagPopup text-muted">认证领域:</li>
  67. @if($expert->hotTags())
  68. @foreach( $expert->hotTags() as $tag)
  69. <li class="tagPopup"><a class="tag" data-toggle="popover" href="{{ route('ask.tag.index',['id'=>$tag->id,'source_type'=>'questions']) }}">{{ $tag->name }}</a></li>
  70. @endforeach
  71. @endif
  72. </ul>
  73. <p class="text-muted mt-10">简介:{{ str_limit($expert->description,200) }} </p>
  74. </div>
  75. </div>
  76. <div class="col-md-3 text-center">
  77. <ul class="action-list list-unstyled mt-20">
  78. <li>
  79. @if(Auth()->guest())
  80. <a href="{{ route('ask.question.create') }}?to_user_id={{ $expert->user_id }}" class="btn btn-warning btn-sm">向TA求助</a>
  81. @elseif(Auth()->user()->id != $expert->user_id)
  82. <a href="{{ route('ask.question.create') }}?to_user_id={{ $expert->user_id }}" class="btn btn-warning btn-sm">向TA求助</a>
  83. @endif
  84. </li>
  85. </ul>
  86. </div>
  87. </div>
  88. </section>
  89. @endforeach
  90. </div>
  91. </div>
  92. <div class="text-center">
  93. </div>
  94. </div>
  95. @include('theme::layout.top_user_menu')
  96. </div>
  97. @endsection