feat: add metadata table component for music production details and update localization labels

This commit is contained in:
Ümit Tunç
2026-06-01 09:02:02 +03:00
parent f77866faa5
commit 31e695cd3a
2 changed files with 69 additions and 41 deletions
+10 -1
View File
@@ -109,7 +109,16 @@ return [
'spotify_no_albums' => 'Spotify sanatçı hesabında albüm veya single bulunamadı.', 'spotify_no_albums' => 'Spotify sanatçı hesabında albüm veya single bulunamadı.',
'spotify_untitled_album' => 'İsimsiz Albüm', 'spotify_untitled_album' => 'İsimsiz Albüm',
// YouTube // Metadata table labels
'field' => 'Alan',
'value' => 'Değer',
'track' => 'Parça',
'style' => 'Stil',
'contributors' => 'Katkıda Bulunanlar',
'released_on' => 'Yayın Tarihi',
'distributor' => 'Dağıtıcı',
'label' => 'Etiket',
'youtube_section' => 'YouTube Bilgileri', 'youtube_section' => 'YouTube Bilgileri',
'youtube_video_id_field' => 'YouTube Video ID', 'youtube_video_id_field' => 'YouTube Video ID',
'youtube_url_field' => 'YouTube URL', 'youtube_url_field' => 'YouTube URL',
@@ -185,46 +185,65 @@
</div> </div>
{{-- Sidebar - Date & Client --}} {{-- Sidebar - Date & Client --}}
<div class="xl:w-3/12 lg:w-3/12 md:w-3/12 w-full flex-[0_0_auto] max-w-full !ml-auto"> <div class="metadata-table w-full max-w-2xl mx-auto my-6">
<ul class="pl-0 list-none"> <table class="w-full border border-gray-200 rounded-md overflow-hidden">
@if($production->production_date) <thead class="bg-gray-100">
<li> <tr>
<h5 class="!mb-1">{!! t('Tarih') !!}</h5> <th class="px-4 py-2 text-left font-medium text-gray-700">Field</th>
<p>{{ $production->production_date->format('d M Y') }}</p> <th class="px-4 py-2 text-left font-medium text-gray-700">Value</th>
</li> </tr>
@endif </thead>
@if($production->client_name) <tbody class="bg-white">
<li> <tr class="border-t">
<h5 class="!mb-1">{!! t('Müşteri') !!}</h5> <td class="px-4 py-2">Track</td>
<p>{{ $production->translate('client_name') }}</p> <td class="px-4 py-2">{{ $trackNameParsed ?? $titlePart }}</td>
</li> </tr>
@endif @if($styleParsed)
@if($production->spotify_url) <tr class="border-t">
<li class="!mb-3"> <td class="px-4 py-2">Style</td>
<h5 class="!mb-1">Spotify</h5> <td class="px-4 py-2">{{ $styleParsed }}</td>
<p> </tr>
<a href="{{ $production->spotify_url }}" target="_blank" rel="noopener noreferrer" class="btn btn-sm btn-soft-primary !rounded-[50rem] w-full text-center"> @endif
{{ __('music_productions.spotify_listen_on_spotify') }} @if(!empty($contributors))
</a> <tr class="border-t">
</p> <td class="px-4 py-2">Contributors</td>
</li> <td class="px-4 py-2">{{ implode(', ', $contributors) }}</td>
@endif </tr>
@if($production->youtube_url) @endif
<li class="!mb-3"> @if($releasedOn)
<h5 class="!mb-1">YouTube</h5> <tr class="border-t">
<p> <td class="px-4 py-2">Released on</td>
<a href="{{ $production->youtube_url }}" target="_blank" rel="noopener noreferrer" class="btn btn-sm btn-soft-red !rounded-[50rem] w-full text-center" style="background-color: rgba(227, 30, 36, 0.1); color: #e31e24;"> <td class="px-4 py-2">{{ $releasedOn }}</td>
{{ __('music_productions.youtube_watch_on_youtube') }} </tr>
</a> @endif
</p> @if($distributor)
</li> <tr class="border-t">
@endif <td class="px-4 py-2">Distributor</td>
</ul> <td class="px-4 py-2">{{ $distributor }}</td>
<a href="{{ route('music-productions.index') }}" class="more hover mt-4 inline-block"> </tr>
<i class="uil uil-arrow-left before:content-['\e949'] !mr-1"></i> @endif
{{ __('music_productions.back_to_list') }} @if($label)
</a> <tr class="border-t">
</div> <td class="px-4 py-2">Label</td>
<td class="px-4 py-2">{{ $label }}</td>
</tr>
@endif
@if($production->spotify_url)
<tr class="border-t">
<td class="px-4 py-2">Spotify</td>
<td class="px-4 py-2"><a href="{{ $production->spotify_url }}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline">{{ __('music_productions.spotify_listen_on_spotify') }}</a></td>
</tr>
@endif
@if($production->youtube_url)
<tr class="border-t">
<td class="px-4 py-2">YouTube</td>
<td class="px-4 py-2"><a href="{{ $production->youtube_url }}" target="_blank" rel="noopener noreferrer" class="text-red-600 underline">{{ __('music_productions.youtube_watch_on_youtube') }}</a></td>
</tr>
@endif
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</div> </div>