同じオカズでチェックインする際にセンシティブフラグを継承する
This commit is contained in:
parent
2b98267fa8
commit
22150d0e7a
@ -79,4 +79,17 @@ class Ejaculation extends Model
|
||||
->addSelect(DB::raw('0 as is_liked'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* このチェックインと同じ情報を流用してチェックインするためのURLを生成
|
||||
* @return string
|
||||
*/
|
||||
public function makeCheckinURL(): string
|
||||
{
|
||||
return route('checkin', [
|
||||
'link' => $this->link,
|
||||
'tags' => $this->textTags(),
|
||||
'is_too_sensitive' => $this->is_too_sensitive,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,8 @@
|
||||
<div class="ejaculation-actions">
|
||||
<button type="button" class="btn btn-link text-secondary"
|
||||
data-toggle="tooltip" data-placement="bottom"
|
||||
title="同じオカズでチェックイン" data-href="{{ route('checkin', ['link' => $ejaculation->link, 'tags' => $ejaculation->textTags()]) }}"><span class="oi oi-reload"></span></button>
|
||||
title="同じオカズでチェックイン" data-href="{{ $ejaculation->makeCheckinURL() }}"><span class="oi oi-reload"></span></button>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@
|
||||
@endif
|
||||
<!-- actions -->
|
||||
<div class="ejaculation-actions">
|
||||
<button type="button" class="btn btn-link text-secondary" data-toggle="tooltip" data-placement="bottom" title="同じオカズでチェックイン" data-href="{{ route('checkin', ['link' => $ejaculation->link, 'tags' => $ejaculation->textTags()]) }}"><span class="oi oi-reload"></span></button>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -81,7 +81,7 @@
|
||||
@endif
|
||||
<!-- actions -->
|
||||
<div class="ejaculation-actions">
|
||||
<button type="button" class="btn btn-link text-secondary" data-toggle="tooltip" data-placement="bottom" title="同じオカズでチェックイン" data-href="{{ route('checkin', ['link' => $ejaculation->link, 'tags' => $ejaculation->textTags()]) }}"><span class="oi oi-reload"></span></button>
|
||||
<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>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user