2017-11-05 21:49:27 +09:00
|
|
|
|
@extends('layouts.base')
|
|
|
|
|
|
2019-01-08 23:27:48 +09:00
|
|
|
|
@if (!$user->isMe() && ($user->is_protected || $ejaculation->is_private))
|
|
|
|
|
@section('title', $user->display_name . ' さんのチェックイン')
|
|
|
|
|
@else
|
2019-01-10 01:39:10 +09:00
|
|
|
|
@section('title', $user->display_name . ' さんのチェックイン (' . $ejaculation->ejaculated_date->format('n月j日 H:i') . ')')
|
2019-01-08 23:27:48 +09:00
|
|
|
|
@endif
|
|
|
|
|
|
2017-11-05 21:49:27 +09:00
|
|
|
|
@section('content')
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-4">
|
|
|
|
|
@component('components.profile', ['user' => $user])
|
|
|
|
|
@endcomponent
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-lg-8">
|
2017-11-05 22:29:09 +09:00
|
|
|
|
@if ($user->is_protected && !$user->isMe())
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-11-05 22:29:09 +09:00
|
|
|
|
@elseif ($ejaculation->is_private && !$user->isMe())
|
2017-11-05 21:49:27 +09:00
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<span class="oi oi-lock-locked"></span> 非公開チェックインのため、表示できません
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@else
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<!-- span -->
|
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
|
<h5>{{ $ejaculatedSpan ?? '精通' }} <small class="text-muted">{{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}</small></h5>
|
2018-06-07 02:21:40 +09:00
|
|
|
|
<div>
|
|
|
|
|
<a class="text-secondary timeline-action-item" href="{{ route('checkin', ['link' => $ejaculation->link, 'tags' => $ejaculation->textTags()]) }}"><span class="oi oi-reload" data-toggle="tooltip" data-placement="bottom" title="同じオカズでチェックイン"></span></a>
|
|
|
|
|
@if ($user->isMe())
|
2018-01-04 16:53:33 +09:00
|
|
|
|
<a class="text-secondary timeline-action-item" href="{{ route('checkin.edit', ['id' => $ejaculation->id]) }}"><span class="oi oi-pencil" data-toggle="tooltip" data-placement="bottom" title="修正"></span></a>
|
2017-11-05 21:49:27 +09:00
|
|
|
|
<a class="text-secondary timeline-action-item" href="#" data-toggle="modal" data-target="#deleteCheckinModal" data-id="{{ $ejaculation->id }}" data-date="{{ $ejaculation->ejaculated_date }}"><span class="oi oi-trash" data-toggle="tooltip" data-placement="bottom" title="削除"></span></a>
|
2018-06-07 02:21:40 +09:00
|
|
|
|
@endif
|
|
|
|
|
</div>
|
2017-11-05 21:49:27 +09:00
|
|
|
|
</div>
|
|
|
|
|
<!-- tags -->
|
2018-01-08 08:50:22 +09:00
|
|
|
|
@if ($ejaculation->is_private || $ejaculation->tags->isNotEmpty())
|
2017-11-05 21:49:27 +09:00
|
|
|
|
<p class="mb-2">
|
|
|
|
|
@if ($ejaculation->is_private)
|
|
|
|
|
<span class="badge badge-warning"><span class="oi oi-lock-locked"></span> 非公開</span>
|
|
|
|
|
@endif
|
2018-01-08 08:50:22 +09:00
|
|
|
|
@foreach ($ejaculation->tags as $tag)
|
2018-09-11 23:05:01 +09:00
|
|
|
|
<a class="badge badge-secondary" href="{{ route('search', ['q' => $tag->name]) }}"><span class="oi oi-tag"></span> {{ $tag->name }}</a>
|
2018-01-08 08:50:22 +09:00
|
|
|
|
@endforeach
|
2017-11-05 21:49:27 +09:00
|
|
|
|
</p>
|
|
|
|
|
@endif
|
|
|
|
|
<!-- okazu link -->
|
2018-01-05 00:26:48 +09:00
|
|
|
|
@if (!empty($ejaculation->link))
|
2018-03-06 23:46:22 +09:00
|
|
|
|
<div class="row mx-0">
|
2019-02-23 22:29:53 +09:00
|
|
|
|
@component('components.card', ['link' => $ejaculation->link])
|
|
|
|
|
@endcomponent
|
2019-01-16 07:25:06 +09:00
|
|
|
|
<p class="d-flex align-items-baseline mb-2 col-12 px-0">
|
|
|
|
|
<span class="oi oi-link-intact mr-1"></span><a class="overflow-hidden" href="{{ $ejaculation->link }}" target="_blank" rel="noopener">{{ $ejaculation->link }}</a>
|
2018-03-06 23:46:22 +09:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2018-01-05 00:26:48 +09:00
|
|
|
|
@endif
|
2017-11-05 21:49:27 +09:00
|
|
|
|
<!-- note -->
|
|
|
|
|
@if (!empty($ejaculation->note))
|
|
|
|
|
<p class="mb-0 tis-word-wrap">
|
|
|
|
|
{!! Formatter::linkify(nl2br(e($ejaculation->note))) !!}
|
|
|
|
|
</p>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@component('components.modal', ['id' => 'deleteCheckinModal'])
|
|
|
|
|
@slot('title')
|
|
|
|
|
削除確認
|
|
|
|
|
@endslot
|
|
|
|
|
<span class="date-label"></span> のチェックインを削除してもよろしいですか?
|
|
|
|
|
<form action="{{ route('checkin.destroy', ['id' => '@']) }}" method="post">
|
|
|
|
|
{{ csrf_field() }}
|
|
|
|
|
{{ method_field('DELETE') }}
|
|
|
|
|
</form>
|
|
|
|
|
@slot('footer')
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">キャンセル</button>
|
|
|
|
|
<button type="button" class="btn btn-danger">削除</button>
|
|
|
|
|
@endslot
|
|
|
|
|
@endcomponent
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
|
@push('script')
|
2018-01-05 00:26:48 +09:00
|
|
|
|
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/holderjs@2.9.4/holder.min.js"></script>
|
2017-11-05 21:49:27 +09:00
|
|
|
|
<script>
|
|
|
|
|
$('#deleteCheckinModal').on('show.bs.modal', function (event) {
|
|
|
|
|
var target = $(event.relatedTarget);
|
|
|
|
|
var modal = $(this);
|
|
|
|
|
modal.find('.modal-body .date-label').text(target.data('date'));
|
|
|
|
|
modal.data('id', target.data('id'));
|
|
|
|
|
}).find('.btn-danger').on('click', function (event) {
|
|
|
|
|
var modal = $('#deleteCheckinModal');
|
|
|
|
|
var form = modal.find('form');
|
|
|
|
|
form.attr('action', form.attr('action').replace('@', modal.data('id')));
|
|
|
|
|
form.submit();
|
|
|
|
|
});
|
2018-01-05 00:26:48 +09:00
|
|
|
|
|
2019-02-10 20:48:16 +09:00
|
|
|
|
$('.link-card').linkCard({
|
|
|
|
|
endpoint: '{{ url('/api/checkin/card') }}'
|
2018-01-05 22:43:33 +09:00
|
|
|
|
});
|
2017-11-05 21:49:27 +09:00
|
|
|
|
</script>
|
|
|
|
|
@endpush
|