extend('../cp_admin/_layout') ?> section('title') ?> endSection() ?> section('pageTitle') ?> endSection() ?> section('headerRight') ?> endSection() ?> section('content') ?>

lang('Subscription.list.number'), 'cell' => function ($subscription) { return '#' . $subscription->id; }, ], [ 'header' => lang('Subscription.list.email'), 'cell' => function ($subscription) { return esc($subscription->email); }, ], [ 'header' => lang('Subscription.list.expiration_date'), 'cell' => function ($subscription) { return $subscription->expires_at ? local_date($subscription->expires_at) : lang('Subscription.list.unlimited'); }, ], [ 'header' => lang('Subscription.list.downloads'), 'cell' => function ($subscription) { return $subscription->downloads_last_3_months; }, ], [ 'header' => lang('Subscription.list.status'), 'cell' => function ($subscription) { $statusMapping = [ 'active' => 'success', 'suspended' => 'warning', 'expired' => 'default', ]; return '' . lang('Subscription.status.' . $subscription->status) . ''; }, ], [ 'header' => lang('Common.actions'), 'cell' => function ($subscription, $podcast) { $items = [ [ 'type' => 'link', 'title' => lang('Subscription.view'), 'uri' => route_to('subscription-view', $podcast->id, $subscription->id), ], [ 'type' => 'link', 'title' => lang('Subscription.edit'), 'uri' => route_to('subscription-edit', $podcast->id, $subscription->id), ], [ 'type' => 'link', 'title' => lang('Subscription.regenerate_token'), 'uri' => route_to('subscription-regenerate-token', $podcast->id, $subscription->id), ], [ 'type' => 'separator', ], [ 'type' => 'link', 'title' => lang('Subscription.delete'), 'uri' => route_to('subscription-delete', $podcast->id, $subscription->id), 'class' => 'font-semibold text-red-600', ], ]; if ($subscription->status === 'suspended') { $suspendAction = [[ 'type' => 'link', 'title' => lang('Subscription.resume'), 'uri' => route_to('subscription-resume', $podcast->id, $subscription->id), ]]; } else { $suspendAction = [[ 'type' => 'link', 'title' => lang('Subscription.suspend'), 'uri' => route_to('subscription-suspend', $podcast->id, $subscription->id), ]]; } array_splice($items, 3, 0, $suspendAction); return '' . ''; }, ], ], $podcast->subscriptions, '', $podcast, ) ?> endSection() ?>