Files
backend_v2/internal/handler/templates/pages/article-form.html
toom1996 1de1ec46a6 update
2026-10-18 17:42:10 +08:00

40 lines
2.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{define "title"}}新建文章 · 管理后台{{end}}
{{define "barLabel"}}管理后台 · 新建文章{{end}}
{{define "barRight"}}<a href="/admin/articles">← 返回列表</a>{{end}}
{{define "content"}}
{{template "bar" .}}
<div class="main">
<h1>新建文章</h1>
<p class="muted">走秀与街拍二选一:走秀填品牌/季节/系列,街拍填城市/年份;图片一步到位上传,创建后状态为「待审核」。</p>
{{if .Error}}<p class="badge rejected">{{.Error}}</p>{{end}}
<form method="post" action="/admin/articles" enctype="multipart/form-data">
<table>
<tbody>
<tr><th>类型</th><td>
<select name="kind">
<option value="runway"{{if ne .Kind "street"}} selected{{end}}>走秀</option>
<option value="street"{{if eq .Kind "street"}} selected{{end}}>街拍</option>
</select>
</td></tr>
<tr><th>品牌英文名</th><td><input name="brand_name" value="{{.BrandName}}" placeholder="如 Gucci(走秀必填,须与品牌管理里的英文名完全一致)"></td></tr>
<tr><th>标题(英文)</th><td><input name="title_en" value="{{.TitleEn}}"></td></tr>
<tr><th>标题(中文)</th><td><input name="title_cn" value="{{.TitleCn}}"></td></tr>
<tr><th>年份</th><td><input name="year" value="{{.Year}}" size="6" placeholder="如 2027"></td></tr>
<tr><th>季节</th><td>
<select name="season">{{range .Seasons}}<option value="{{.}}"{{if eq . $.Season}} selected{{end}}>{{.}}</option>{{end}}</select>
</td></tr>
<tr><th>系列</th><td>
<select name="collection_type">{{range .Collections}}<option value="{{.}}"{{if eq . $.CollectionType}} selected{{end}}>{{.}}</option>{{end}}</select>
</td></tr>
<tr><th>城市</th><td><input name="city" value="{{.City}}" placeholder="街拍必填,如 Paris"></td></tr>
<tr><th>图片</th><td>
<input type="file" name="images" multiple required accept="image/jpeg,image/png,image/webp">
<div class="muted">至少 1 张;JPG / PNG / WEBP;单张 ≤ 10MB。按选择顺序作为 Look 1..N,第一张作封面;同内容图片会自动去重。</div>
</td></tr>
</tbody>
</table>
<p><button type="submit" class="op op-primary">创建</button> <a href="/admin/articles">取消</a></p>
</form>
</div>
{{end}}