Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

agorakit/agorakit

434 stars
5 code files
View agorakit/agorakit on GitHub

app/Traits/HasStatus.php

Open in GitHub
trait HasStatus
{
public function isPinned(): bool
{
return $this->getStatus() === ContentStatus::PINNED;
}
}

app/File.php

Open in GitHub
use App\Traits\HasStatus;
use Illuminate\Database\Eloquent\Model;
 
class File extends Model
{
use HasStatus;
}

resources/views/files/file.blade.php

Open in GitHub
<div class="py-3 border-gray-300 border-b flex @if ($file->isArchived()) status-archived @endif @if ($file->isPinned()) status-pinned @endif"
up-expand>
 
<div class="relative">
@if ($file->isPinned())
<div
class="text-xs absolute right-0 w-6 h-6 rounded-full text-white bg-blue-700 flex items-center justify-center border-white border-2 shadow-md ">
<i class="fas fa-thumbtack" title="{{__('Pinned')}}"></i>
</div>
@endif
</div>
</div>

app/Group.php

Open in GitHub
use App\Traits\HasStatus;
use Illuminate\Database\Eloquent\Model;
 
class Group extends Model
{
use HasStatus;
}

resources/views/groups/group.blade.php

Open in GitHub
@if($group->isPinned())
<div class="absolute top-0 left-0 py-1 px-2 bg-gray-700 text-gray-200 capitalize rounded-full m-2 text-xs shadow"
title="{{ trans('group.pinned') }}">
<i class="far fa-star"></i>
</div>
@endif

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.