2018-01-01 04:00:45 +00:00
|
|
|
@extends('layouts.app')
|
2018-01-01 12:18:33 +00:00
|
|
|
@section('title', $topic->title)
|
|
|
|
@section('description', $topic->excerpt)
|
2018-01-01 04:00:45 +00:00
|
|
|
|
|
|
|
@section('content')
|
2018-01-01 12:18:33 +00:00
|
|
|
<div class="row">
|
2018-01-01 04:00:45 +00:00
|
|
|
|
2018-01-01 12:18:33 +00:00
|
|
|
<div class="col-lg-3 col-md-3 hidden-sm hidden-xs author-info">
|
2018-01-01 04:00:45 +00:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-body">
|
2018-01-01 12:18:33 +00:00
|
|
|
<div class="text-center">
|
|
|
|
作者:{{ $topic->user->name }}
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="media">
|
|
|
|
<div align="center">
|
|
|
|
<a href="{{ route('users.show', $topic->user->id) }}">
|
|
|
|
<img class="thumbnail img-responsive" src="{{ $topic->user->header }}" width="300px"
|
|
|
|
height="300px">
|
|
|
|
</a>
|
2018-01-01 04:00:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-01 12:18:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-01 04:00:45 +00:00
|
|
|
|
2018-01-01 12:18:33 +00:00
|
|
|
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 topic-content">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-body">
|
|
|
|
<h1 class="text-center">
|
2018-01-01 04:00:45 +00:00
|
|
|
{{ $topic->title }}
|
2018-01-01 12:18:33 +00:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="article-meta text-center">
|
|
|
|
{{ $topic->created_at->diffForHumans() }}
|
|
|
|
⋅
|
|
|
|
<span class="glyphicon glyphicon-comment" aria-hidden="true"></span>
|
2018-01-01 04:00:45 +00:00
|
|
|
{{ $topic->reply_count }}
|
2018-01-01 12:18:33 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="topic-body">
|
|
|
|
{!! $topic->body !!}
|
|
|
|
</div>
|
|
|
|
|
2018-01-01 13:22:16 +00:00
|
|
|
@can('update', $topic)
|
|
|
|
<div class="operate">
|
|
|
|
<hr>
|
|
|
|
<a href="{{ route('topics.edit', $topic->id) }}" class="btn btn-default btn-xs pull-left"
|
|
|
|
role="button">
|
|
|
|
<i class="glyphicon glyphicon-edit"></i> 编辑
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<form action="{{ route('topics.destroy', $topic->id) }}" method="post">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
{{ method_field('DELETE') }}
|
|
|
|
<button type="submit" class="btn btn-default btn-xs pull-left" style="margin-left: 6px">
|
|
|
|
<i class="glyphicon glyphicon-trash"></i>
|
|
|
|
删除
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
@endcan
|
2018-01-01 12:18:33 +00:00
|
|
|
|
2018-01-01 04:00:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-15 15:24:11 +00:00
|
|
|
|
|
|
|
{{-- 用户回复列表 --}}
|
|
|
|
<div class="panel panel-default topic-reply">
|
|
|
|
<div class="panel-body">
|
2018-01-15 15:59:30 +00:00
|
|
|
@includeWhen(Auth::check(),'topics._reply_box', ['topic' => $topic])
|
2018-01-15 15:24:11 +00:00
|
|
|
@include('topics._reply_list', ['replies' => $topic->replies()->with('user')->get()])
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-01 04:00:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|