create_and_edit.blade.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('layouts.app')
  2. @section('content')
  3. @include('shared._error')
  4. <div class="ui centered grid container stackable">
  5. <div class="sixteen wide column">
  6. <div class="ui segment">
  7. <a class="ui right corner label compose-help" href="javascript:;">
  8. <i class="info icon"></i>
  9. </a>
  10. <div class="content extra-padding">
  11. <div class="ui header text-center text gery" style="margin:10px 0 40px">
  12. @if($section->id)
  13. <i class="icon paint brush"></i>编辑章节 {{ $section->title }}
  14. @else
  15. <i class="icon paint brush"></i>新建章节
  16. @endif
  17. </div>
  18. @if($section->id)
  19. <form id="article-update-form"
  20. class="ui form"
  21. style="min-height: 50px;"
  22. action="{{ route('course.sections.update', [$book->id, $section->id]) }}" method="POST"
  23. accept-charset="UTF-8">
  24. <input type="hidden" name="_method" value="PUT">
  25. @else
  26. <form id="article-create-form"
  27. style="min-height: 50px;"
  28. class="ui form"
  29. action="{{ route('course.sections.store', $book->id) }}"
  30. method="POST" accept-charset="UTF-8">
  31. @endif
  32. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  33. <div class="field">
  34. <label>章节
  35. <a target="_blank" href="{{ route('course.sections.index', $book->id) }}">管理章节</a>
  36. </label>
  37. <input class="form-control" type="text" name="title"
  38. id="title-field" value="{{ old('title', $section->title ) }}"
  39. placeholder="请填写标题" required="">
  40. </div>
  41. <div class="ui message">
  42. <button type="submit" class="ui button primary publish-btn loading-on-clicked" id="">
  43. <i class="icon send"></i>
  44. 提交
  45. </button>
  46. </div>
  47. </form>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. @endsection