Files
lubo_comment_query/resources/views/program/construct/append/create.blade.php
2025-12-09 12:50:21 +08:00

134 lines
9.2 KiB
PHP

<html lang="zh">
<head>
<meta charset="UTF-8">
<title>录播节目点播信息修改 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
<script src="{{ mix('/js/manifest.js') }}" rel="script"></script>
<link href="{{ asset('/css/vendor/picomplete/picomplete.css') }}" rel="stylesheet"/>
</head>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
@include("common.header")
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="max-w-7xl mx-auto">
<div class="md:flex md:items-center md:justify-between mb-8">
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">
点播/追加信息修改
</h1>
<a href="{{ route('program.construct.append.list', ['program'=>$program->id]) }}" class="mt-4 md:mt-0 inline-flex items-center text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200">
<svg class="h-4 w-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
返回列表
</a>
</div>
<div class="flex flex-col lg:flex-row gap-8">
<!-- Left Column: Form -->
<div class="w-full lg:w-1/2">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
<form class="p-6 space-y-6" action="" method="post" enctype="multipart/form-data">
@csrf
<input type="hidden" name="id" value="{{$append->id}}">
@if($program)
<div>
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">结束图像预览</label>
@if(count($program->video_pivots) > 0 && $program->video_pivots->last()->stop_image)
<div class="rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden">
<img src="{{$program->video_pivots->last()->stop_image}}" alt="结束图片" class="w-full h-auto object-cover">
</div>
<p class="mt-1 text-xs text-gray-500">仅供参考,用于确认点播内容是否正确。</p>
@else
<div class="rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 p-6 text-center">
<span class="block text-sm text-gray-500 dark:text-gray-400 mb-2">暂无结束图像</span>
<a href="{{route("program.construct.video.list", ["program"=>$program->id])}}"
class="inline-flex items-center px-4 py-2 border border-transparent text-xs font-medium rounded-full shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none">
去关联视频建设
</a>
</div>
@endif
</div>
@endif
<div>
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">追加内容(点播可不填)</label>
<input type="text" name="name" id="name" autocomplete="off" value="{{ old('name', $append->name) }}"
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
</div>
<div id="from_select">
<label for="from" class="block text-sm font-medium text-gray-700 dark:text-gray-300">点播老板</label>
<input type="text" name="from" id="from" autocomplete="off" value="{{ old('from', $append->from) }}"
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
</div>
<div class="flex items-center">
<input id="is_original" name="is_original" type="checkbox" value="1" @if(old('is_original', $append->is_original) == 1) checked @endif
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
<label for="is_original" class="ml-2 block text-sm text-gray-900 dark:text-gray-300">
纯点播(非追加内容)
</label>
</div>
<div>
<label for="price" class="block text-sm font-medium text-gray-700 dark:text-gray-300">SC 金额 ()</label>
<div class="mt-1 relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">¥</span>
</div>
<input type="number" name="price" id="price" step="0.5" value="{{ old('price', $append->price) }}"
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 dark:border-gray-600 dark:bg-gray-700 rounded-md py-2" placeholder="0.00">
</div>
</div>
<div>
<label for="append" class="block text-sm font-medium text-gray-700 dark:text-gray-300">补充说明</label>
<input type="text" name="append" id="append" autocomplete="off" value="{{ old('append', $append->append) }}"
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
</div>
@include("common.form_error")
<div class="flex items-center justify-between pt-4 border-t border-gray-200 dark:border-gray-700">
@if(count($program->video_pivots) > 0)
<div class="flex space-x-2">
<a class="text-xs text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300" target="_blank"
href="https://www.bilibili.com/video/{{$program->video_pivots->first()->video_bvid}}?p={{$program->video_pivots->first()->start_part}}&t={{$program->video_pivots->first()->start_sec}}">
预览开始
</a>
<span class="text-gray-300">|</span>
<a class="text-xs text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300" target="_blank"
href="https://www.bilibili.com/video/{{$program->video_pivots->last()->video_bvid}}?p={{$program->video_pivots->last()->stop_part}}&t={{$program->video_pivots->last()->stop_sec}}">
预览结束
</a>
</div>
@else
<div></div>
@endif
<button type="submit" class="inline-flex justify-center py-2 px-6 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
提交
</button>
</div>
</form>
</div>
</div>
<!-- Right Column: Existing List -->
<div class="hidden lg:block lg:w-1/2">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden sticky top-24">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-white">已有记录</h3>
</div>
<div class="p-6 max-h-[80vh] overflow-y-auto">
<x-appends.append_list :appends="$program->appends" :enable-edit="false"></x-appends.append_list>
</div>
</div>
</div>
</div>
</div>
</main>
@include("common.footer")
<script src="{{ mix('/js/component/from_select.js') }}" rel="script"></script>
</body>
</html>