index.blade.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @extends('theme::layout.public')
  2. @section('seo_title')我的通知 - {{ Setting()->get('website_name') }}@endsection
  3. @section('content')
  4. <div class="row">
  5. <div class="col-xs-12 col-md-9 main">
  6. <h2 class="h4 mt-10">
  7. 我的通知
  8. <a href="{{ route('auth.notification.readAll') }}" class="btn btn-default btn-xs ml-10">全部标记为已读</a>
  9. </h2>
  10. <div class="stream-list widget-notify border-top">
  11. @foreach($notifications as $notification)
  12. <section class="streams-item @if($notification->is_read==0) not_read @endif">
  13. <a href="{{ route('auth.space.index',['user_id'=>$notification->user_id]) }}">{{ $notification->user->name }}</a> {{ $notification->type_text }}
  14. @if(in_array($notification->type,['answer','follow_question','comment_question','invite_answer','adopt_answer']))
  15. <a href="{{ route('ask.question.detail',['question_id'=>$notification->source_id]) }}" target="_blank">{{ $notification->subject }}</a>
  16. @elseif(in_array($notification->type,['remove_question','remove_article','remove_answer']))
  17. {{ $notification->subject }}
  18. @elseif(in_array($notification->type,['comment_answer']))
  19. 回答 <a href="{{ route('ask.answer.detail',['question_id'=>$notification->refer_id,'id'=>$notification->source_id]) }}" target="_blank">{{ str_limit($notification->subject,80) }}</a>
  20. @elseif(in_array($notification->type,['comment_article']))
  21. <a href="{{ route('blog.article.detail',['id'=>$notification->source_id]) }}" target="_blank">{{ $notification->subject }}</a>
  22. @elseif(in_array($notification->type,['buy_video']))
  23. <a href="{{ route('live.course.show',['id'=>$notification->source_id]) }}" target="_blank">{{ $notification->subject }}</a>
  24. @elseif(in_array($notification->type,['reply_comment']))
  25. @if($notification->refer_type == 'question')
  26. 问题 <a href="{{ route('ask.question.detail',['question_id'=>$notification->source_id]) }}" target="_blank">{{ $notification->subject }}</a>
  27. @elseif($notification->refer_type == 'answer')
  28. 回答 <a href="{{ route('ask.answer.detail',['question_id'=>$notification->refer_id,'id'=>$notification->source_id]) }}" target="_blank">{{ str_limit($notification->subject,80) }}</a>
  29. @elseif($notification->refer_type == 'article')
  30. 文章 <a href="{{ route('blog.article.detail',['id'=>$notification->source_id]) }}" target="_blank">{{ $notification->subject }}</a>
  31. @endif
  32. 中你的评论
  33. @endif
  34. <span class="text-muted ml-10">{{ timestamp_format($notification->created_at) }}</span>
  35. @if($notification->content)
  36. <blockquote class="text-fmt">@if(in_array($notification->type,['remove_question','remove_article','remove_answer']))原因:@endif{{ str_limit(strip_tags($notification->content),450) }}</blockquote>
  37. @endif
  38. </section>
  39. @endforeach
  40. </div>
  41. <div class="text-center">
  42. {!! str_replace('/?', '?', $notifications->render()) !!}
  43. </div>
  44. </div>
  45. @include('theme::layout.right_menu')
  46. </div>
  47. @endsection