Skip to content

Commit

Permalink
✨ Show Tags in admin panel (#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrLevin authored Aug 9, 2024
1 parent 2e09bf2 commit f7dcc93
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
30 changes: 15 additions & 15 deletions app/Models/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@

/**
* //properties
* @property int id
* @property int user_id
* @property string body
* @property Business business
* @property StatusVisibility visibility
* @property int event_id
* @property string tweet_id
* @property string mastodon_post_id
* @property int id
* @property int user_id
* @property string body
* @property Business business
* @property StatusVisibility visibility
* @property int event_id
* @property string tweet_id
* @property string mastodon_post_id
*
* //relations
* @property User $user
* @property Checkin $checkin
* @property Collection $likes
* @property OAuthClient $client
* @property Event $event
* @property Collection $tags
* @property Mention[] $mentions
* @property User $user
* @property Checkin $checkin
* @property Collection $likes
* @property OAuthClient $client
* @property Event $event
* @property Collection<StatusTag> $tags
* @property Mention[] $mentions
*
* @todo merge model with "Checkin" (later only "Checkin") because the difference between trip sources (HAFAS,
* User, and future sources) should be handled in the Trip model.
Expand Down
18 changes: 17 additions & 1 deletion resources/views/admin/status/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@php use App\Enum\Business; @endphp
@php use App\Enum\Business;use App\Models\Status; @endphp
@extends('admin.layout')

@section('title', 'Status: ' . $status->id)

@section('actions')
@php /** @var Status $status */ @endphp
<a class="btn btn-secondary float-end" href="{{ route('status', ['id' => $status->id]) }}">
<i class="fa-solid fa-person-walking-dashed-line-arrow-right"></i>
<span class="d-none d-md-inline">Frontend</span>
Expand Down Expand Up @@ -166,5 +167,20 @@
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header">
Tags
</div>
<div class="card-body">
@foreach($status->tags as $tag)
<span class="badge text-bg-danger">
{{ str_replace('tag.title.', '', __('tag.title.' . $tag->key)) }}:
<i>{{ $tag->value }}</i>
</span>
@endforeach
</div>
</div>
</div>
</div>
@endsection

0 comments on commit f7dcc93

Please sign in to comment.