index.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 mt0 mb20">
  7. 我的草稿
  8. <a href="{{ route('auth.draft.cleanAll') }}">
  9. <button type="button" class="btn btn-default btn-xs ml10" id="delete-drafts" data-do="deleteAll"
  10. data-type="draft">舍弃全部草稿
  11. </button>
  12. </a>
  13. </h2>
  14. <div class="stream-list drafts-stream border-top">
  15. @foreach($drafts as $draft)
  16. @if($draft['source_type'] == 'answer')
  17. <section class="stream-list-item">
  18. <h2 class="small-title">
  19. <span class="label label-success pull-left mr-5">回答</span>
  20. <a href="{{ route('ask.question.detail',['id'=>$draft['source_id'],'draftId'=>$draft['id']]) }}">{{ $draft['subject'] }}</a>
  21. </h2>
  22. <p class="mb0">
  23. <span class="text-muted">保存于{{ timestamp_format($draft['created_at']) }} ·</span>
  24. <a href="{{ route('ask.question.detail',['id'=>$draft['source_id'],'draftId'=>$draft['id']]) }}">编辑</a>
  25. <a href="{{ route('auth.draft.destroy',['id'=>$draft['id']]) }}"
  26. class="pull-right delete text-muted" data-id="1220000015703819"
  27. data-title="{{ $draft['subject'] }}">舍弃</a>
  28. </p>
  29. </section>
  30. @elseif($draft['source_type'] == 'question')
  31. <section class="stream-list-item">
  32. <h2 class="small-title">
  33. <span class="label label-warning pull-left mr-5">问题</span>
  34. <a href="@if($draft['source_id'] == 0) {{ route('ask.question.create',['draftId'=>$draft['id']]) }} @else {{ route('ask.question.edit',['id'=>$draft['source_id'],'draftId'=>$draft['id']]) }} @endif">编辑{{ $draft['subject'] }}</a>
  35. </h2>
  36. <p class="mb0">
  37. <span class="text-muted">保存于{{ timestamp_format($draft['created_at']) }} ·</span>
  38. @if($draft['source_id'] == 0)
  39. <a href="{{ route('ask.question.create',['draftId'=>$draft['id']]) }}">编辑</a>
  40. @else
  41. <a href="{{ route('ask.question.edit',['id'=>$draft['source_id'],'draftId'=>$draft['id']]) }}">编辑</a>
  42. @endif
  43. <a href="{{ route('auth.draft.destroy',['id'=>$draft['id']]) }}"
  44. class="pull-right delete text-muted" data-id="1220000015703796"
  45. data-title="{{ $draft['subject'] }}">舍弃</a>
  46. </p>
  47. </section>
  48. @elseif($draft['source_type'] == 'article')
  49. <section class="stream-list-item">
  50. <h2 class="small-title">
  51. <span class="label label-success pull-left mr-5">文章</span>
  52. <a href="@if($draft['source_id'] == 0) {{ route('blog.article.create',['draftId'=>$draft['id']]) }} @else {{ route('ask.article.edit',['id'=>$draft['source_id'],'draftId'=>$draft['id']]) }} @endif">{{ $draft['subject'] }}</a>
  53. </h2>
  54. <p class="mb0">
  55. <span class="text-muted">保存于{{ timestamp_format($draft['created_at']) }} ·</span>
  56. <a href="{{ route('blog.article.create',['draftId'=>$draft['id']]) }}">编辑</a>
  57. <a href="{{ route('auth.draft.destroy',['id'=>$draft['id']]) }}"
  58. class="pull-right delete text-muted" data-id="1220000010033740"
  59. data-title="{{ $draft['subject'] }}">舍弃</a>
  60. </p>
  61. </section>
  62. @endif
  63. @endforeach
  64. </div><!-- /.stream-list -->
  65. <div class="text-center">
  66. </div>
  67. </div>
  68. @include('theme::layout.right_menu')
  69. </div>
  70. @endsection