list.blade.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @extends('admin.frame_list')
  2. @section('content_btn')
  3. <a href="{{ route('activeTheme') }}">返回</a>
  4. <a href="{{ route('active_add', ['tid' => $actives['theme']->id]) }}">添加活动</a>
  5. <a>主题:{{ $actives['theme']->name }}</a>
  6. @stop
  7. @section('table_data')
  8. <tr>
  9. <th>活动名称</th>
  10. <th>活动时间</th>
  11. <th>人数</th>
  12. <th>操作</th>
  13. </tr>
  14. @foreach ($actives['actives'] as $active)
  15. <tr>
  16. <td>{{ $active->name }}</td>
  17. @if ( $active->start_time && $active->end_time )
  18. <td>{{ str_replace("T", " ", $active->start_time) }} ~ {{ str_replace("T", " ", $active->end_time) }}</td>
  19. @else
  20. <td></td>
  21. @endif
  22. <td>{{ $active_userNum = $active->activesUser->count() }}/{{ $active->user_num }}</td>
  23. <td>
  24. @if ($active_userNum)
  25. <a href="{{ route('active_user', ['tid' => $active->tid, 'id' => $active->id]) }}">报名列表</a> |
  26. @endif
  27. <!-- 已结束的不能编辑 -->
  28. @if (!$active->end_time || strtotime(date('Y-m-d H:i:s', time())) < strtotime($active->end_time))
  29. <a href="{{ route('active_upd', ['tid' => $active->tid, 'id' => $active->id]) }}">编辑</a>
  30. @endif
  31. <!-- 未开始的才能删除 -->
  32. @if ($active->start_time && strtotime(date('Y-m-d H:i:s', time())) < strtotime($active->start_time))
  33. | <a href="{{ route('active_del', ['tid' => $active->tid, 'id' => $active->id]) }}" onclick="if(!confirm('确定要删除吗?')) return false;">删除</a>
  34. @endif
  35. </td>
  36. </tr>
  37. @endforeach
  38. @stop
  39. @section('render_data')
  40. {{ $actives['actives']->render() }}
  41. @stop