72 lines
3.0 KiB
HTML
72 lines
3.0 KiB
HTML
<!doctype html>
|
|
<html dir="rtl" lang="fa">
|
|
{{template "head" .}}
|
|
<body>
|
|
{{template "nav" .}}
|
|
<div class="wrap">
|
|
<h1>بستههای چت</h1>
|
|
{{if .Saved}}<div class="saved">انجام شد ✓</div>{{end}}
|
|
|
|
<p style="color:#9aa;font-size:13px">
|
|
هر بسته شاملِ چند پیامِ آماده یا شکلک است. بسته با قیمتِ ۰ و بدونِ VIP برای
|
|
همه رایگان است؛ تیکِ VIP یعنی برای کاربرانِ VIP رایگان (و برای بقیه با قیمتِ سکه).
|
|
</p>
|
|
|
|
<h2>افزودن / ویرایش بسته</h2>
|
|
<table>
|
|
<tr><th>شناسه</th><th>عنوان</th><th>نوع</th><th>قیمت (سکه)</th><th>VIP رایگان</th><th>ترتیب</th><th></th></tr>
|
|
{{range .Packs}}
|
|
<tr><form method="post" action="/admin/chat/pack/add">
|
|
<td>{{.id}}<input type="hidden" name="id" value="{{.id}}"></td>
|
|
<td><input name="title" value="{{.title}}"></td>
|
|
<td>
|
|
<select name="kind">
|
|
<option value="text" {{if eq .kind "text"}}selected{{end}}>متن</option>
|
|
<option value="emoji" {{if eq .kind "emoji"}}selected{{end}}>شکلک</option>
|
|
</select>
|
|
</td>
|
|
<td><input name="price_coins" value="{{.price_coins}}" style="width:80px"></td>
|
|
<td><input type="checkbox" name="vip" {{if .vip}}checked{{end}}></td>
|
|
<td><input name="sort" value="{{.sort}}" style="width:50px"></td>
|
|
<td>
|
|
<button>ذخیره</button>
|
|
<button formaction="/admin/chat/pack/delete" formnovalidate class="del">حذف</button>
|
|
</td>
|
|
</form></tr>
|
|
{{end}}
|
|
<tr class="addrow"><form method="post" action="/admin/chat/pack/add">
|
|
<td><input name="id" placeholder="شناسه" required></td>
|
|
<td><input name="title" placeholder="عنوان"></td>
|
|
<td><select name="kind"><option value="text">متن</option><option value="emoji">شکلک</option></select></td>
|
|
<td><input name="price_coins" value="0" style="width:80px"></td>
|
|
<td><input type="checkbox" name="vip"></td>
|
|
<td><input name="sort" value="0" style="width:50px"></td>
|
|
<td><button>افزودن بسته</button></td>
|
|
</form></tr>
|
|
</table>
|
|
|
|
{{range .Packs}}
|
|
<h2>پیامهای «{{.title}}» <small style="color:#9aa">({{.id}})</small></h2>
|
|
<table>
|
|
<tr><th>متن / شکلک</th><th>ترتیب</th><th></th></tr>
|
|
{{range .messages}}
|
|
<tr><form method="post" action="/admin/chat/message/delete">
|
|
<td>{{.body}}</td>
|
|
<td>{{.sort}}</td>
|
|
<td>
|
|
<input type="hidden" name="id" value="{{.id}}">
|
|
<button class="del">حذف</button>
|
|
</td>
|
|
</form></tr>
|
|
{{end}}
|
|
<tr class="addrow"><form method="post" action="/admin/chat/message/add">
|
|
<td><input type="hidden" name="pack_id" value="{{.id}}"><input name="body" placeholder="متن یا شکلک" required style="width:100%"></td>
|
|
<td><input name="sort" value="0" style="width:50px"></td>
|
|
<td><button>افزودن پیام</button></td>
|
|
</form></tr>
|
|
</table>
|
|
{{end}}
|
|
</div>
|
|
</body>
|
|
</html>
|