2017-11-03 17:48:58 +09:00
|
|
|
|
@extends('user.base')
|
2017-08-27 04:44:53 +09:00
|
|
|
|
|
2019-01-08 23:27:48 +09:00
|
|
|
|
@section('title', $user->display_name . ' (@' . $user->name . ')')
|
|
|
|
|
|
2020-05-24 19:03:15 +09:00
|
|
|
|
@push('head')
|
|
|
|
|
@if (Route::currentRouteName() === 'user.profile')
|
|
|
|
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.css" />
|
|
|
|
|
@endif
|
|
|
|
|
@endpush
|
|
|
|
|
|
2018-06-09 00:30:41 +09:00
|
|
|
|
@section('sidebar')
|
|
|
|
|
{{-- TODO: タイムラインとオカズのテンプレを分けたら条件外す --}}
|
|
|
|
|
@if (Route::currentRouteName() === 'user.profile')
|
|
|
|
|
@if (!empty($tags) && (!$user->is_protected || $user->isMe()))
|
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
よく使っているタグ
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
|
@foreach ($tags as $tag)
|
2018-09-11 23:08:11 +09:00
|
|
|
|
<a class="list-group-item d-flex justify-content-between align-items-center text-dark" href="{{ route('search', ['q' => $tag->name]) }}">
|
2018-06-09 00:30:41 +09:00
|
|
|
|
<div>
|
|
|
|
|
<span class="oi oi-tag text-secondary"></span>
|
|
|
|
|
{{ $tag->name }}
|
|
|
|
|
</div>
|
|
|
|
|
<span class="badge badge-secondary badge-pill">{{ $tag->count }}</span>
|
|
|
|
|
</a>
|
|
|
|
|
@endforeach
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
@endif
|
|
|
|
|
@endsection
|
|
|
|
|
|
2017-11-03 17:48:58 +09:00
|
|
|
|
@section('tab-content')
|
2017-11-05 22:29:09 +09:00
|
|
|
|
@if ($user->is_protected && !$user->isMe())
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<p class="mt-4">
|
|
|
|
|
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
|
|
|
|
</p>
|
|
|
|
|
@else
|
2020-05-24 21:44:18 +09:00
|
|
|
|
@if (Route::currentRouteName() === 'user.profile' && $ejaculations->count() !== 0 && $ejaculations->currentPage() === 1)
|
2020-05-24 19:03:15 +09:00
|
|
|
|
<h5 class="mx-4 my-3">Shikontributions</h5>
|
|
|
|
|
<div id="cal-heatmap" class="tis-contribution-graph mx-4 mt-3"></div>
|
|
|
|
|
<hr class="mt-4 mb-2">
|
|
|
|
|
@endif
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<ul class="list-group">
|
|
|
|
|
@forelse ($ejaculations as $ejaculation)
|
2019-03-10 16:28:38 +09:00
|
|
|
|
<li class="list-group-item border-bottom-only pt-3 pb-3 text-break">
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<!-- span -->
|
2019-04-07 20:48:29 +09:00
|
|
|
|
<div>
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<h5>{{ $ejaculation->ejaculated_span ?? '精通' }} <a href="{{ route('checkin.show', ['id' => $ejaculation->id]) }}" class="text-muted"><small>{{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}</small></a></h5>
|
2017-08-27 04:44:53 +09:00
|
|
|
|
</div>
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<!-- tags -->
|
2020-05-22 00:07:04 +09:00
|
|
|
|
@if ($ejaculation->is_private || $ejaculation->source === 'csv' || $ejaculation->tags->isNotEmpty())
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<p class="mb-2">
|
|
|
|
|
@if ($ejaculation->is_private)
|
|
|
|
|
<span class="badge badge-warning"><span class="oi oi-lock-locked"></span> 非公開</span>
|
|
|
|
|
@endif
|
2020-05-22 00:07:04 +09:00
|
|
|
|
@if ($ejaculation->source === 'csv')
|
|
|
|
|
<span class="badge badge-info"><span class="oi oi-cloud-upload"></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:59:01 +09:00
|
|
|
|
</p>
|
2017-11-03 17:48:58 +09:00
|
|
|
|
@endif
|
2017-11-05 21:59:01 +09:00
|
|
|
|
<!-- 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-09-07 19:57:44 +09:00
|
|
|
|
@component('components.link-card', ['link' => $ejaculation->link, 'is_too_sensitive' => $ejaculation->is_too_sensitive])
|
2019-02-23 22:29:53 +09:00
|
|
|
|
@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:59:01 +09:00
|
|
|
|
<!-- note -->
|
|
|
|
|
@if (!empty($ejaculation->note))
|
2019-04-07 20:48:29 +09:00
|
|
|
|
<p class="mb-2 text-break">
|
2017-11-05 21:59:01 +09:00
|
|
|
|
{!! Formatter::linkify(nl2br(e($ejaculation->note))) !!}
|
|
|
|
|
</p>
|
|
|
|
|
@endif
|
2019-04-07 23:27:24 +09:00
|
|
|
|
<!-- likes -->
|
|
|
|
|
@if ($ejaculation->likes_count > 0)
|
|
|
|
|
<div class="my-2 py-1 border-top border-bottom d-flex align-items-center">
|
2019-04-14 00:19:52 +09:00
|
|
|
|
<div class="ml-2 mr-3 text-secondary flex-shrink-0"><small><strong>{{ $ejaculation->likes_count }}</strong> 件のいいね</small></div>
|
2019-04-07 23:27:24 +09:00
|
|
|
|
<div class="like-users flex-grow-1 overflow-hidden">
|
|
|
|
|
@foreach ($ejaculation->likes as $like)
|
|
|
|
|
@if ($like->user !== null)
|
2020-01-28 01:36:59 +09:00
|
|
|
|
<a href="{{ route('user.profile', ['name' => $like->user->name]) }}"><img src="{{ $like->user->getProfileImageUrl(30) }}" srcset="{{ Formatter::profileImageSrcSet($like->user, 30) }}" width="30" height="30" class="rounded" data-toggle="tooltip" data-placement="bottom" title="{{ $like->user->display_name }}"></a>
|
2019-04-07 23:27:24 +09:00
|
|
|
|
@endif
|
|
|
|
|
@endforeach
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2019-04-07 20:48:29 +09:00
|
|
|
|
<!-- actions -->
|
|
|
|
|
<div class="ejaculation-actions">
|
2019-09-08 16:32:37 +09:00
|
|
|
|
<button type="button" class="btn btn-link text-secondary" data-toggle="tooltip" data-placement="bottom" title="同じオカズでチェックイン" data-href="{{ $ejaculation->makeCheckinURL() }}"><span class="oi oi-reload"></span></button>
|
2019-04-07 20:48:29 +09:00
|
|
|
|
<button type="button" class="btn btn-link text-secondary like-button" data-toggle="tooltip" data-placement="bottom" data-trigger="hover" title="いいね" data-id="{{ $ejaculation->id }}" data-liked="{{ (bool)$ejaculation->is_liked }}"><span class="oi oi-heart {{ $ejaculation->is_liked ? 'text-danger' : '' }}"></span><span class="like-count">{{ $ejaculation->likes_count ? $ejaculation->likes_count : '' }}</span></button>
|
|
|
|
|
@if ($user->isMe())
|
|
|
|
|
<button type="button" class="btn btn-link text-secondary" data-toggle="tooltip" data-placement="bottom" title="修正" data-href="{{ route('checkin.edit', ['id' => $ejaculation->id]) }}"><span class="oi oi-pencil"></span></button>
|
|
|
|
|
<button type="button" class="btn btn-link text-secondary" data-toggle="tooltip" data-placement="bottom" title="削除" data-target="#deleteCheckinModal" data-id="{{ $ejaculation->id }}" data-date="{{ $ejaculation->ejaculated_date }}"><span class="oi oi-trash"></span></button>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
2017-11-05 21:59:01 +09:00
|
|
|
|
</li>
|
|
|
|
|
@empty
|
|
|
|
|
<li class="list-group-item border-bottom-only">
|
|
|
|
|
<p>まだチェックインしていません。</p>
|
|
|
|
|
</li>
|
|
|
|
|
@endforelse
|
|
|
|
|
</ul>
|
2019-02-16 20:50:22 +09:00
|
|
|
|
{{ $ejaculations->links(null, ['className' => 'mt-4 justify-content-center']) }}
|
2017-11-05 21:59:01 +09:00
|
|
|
|
@endif
|
2017-11-03 17:48:58 +09:00
|
|
|
|
|
|
|
|
|
@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
|
2017-08-27 04:44:53 +09:00
|
|
|
|
@endsection
|
2020-05-24 19:03:15 +09:00
|
|
|
|
|
|
|
|
|
@push('script')
|
2020-05-24 21:44:18 +09:00
|
|
|
|
@if (Route::currentRouteName() === 'user.profile')
|
|
|
|
|
<script id="count-by-day" type="application/json">@json($countByDay)</script>
|
|
|
|
|
<script src="{{ mix('js/vendor/chart.js') }}"></script>
|
|
|
|
|
<script src="{{ mix('js/user/profile.js') }}"></script>
|
|
|
|
|
@endif
|
2020-05-24 19:03:15 +09:00
|
|
|
|
@endpush
|
|
|
|
|
|