mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-06 11:46:24 -07:00
Organize uploads into a table
This commit is contained in:
parent
1953e97272
commit
2bac71f828
1 changed files with 21 additions and 4 deletions
|
@ -1,12 +1,29 @@
|
|||
<form action="{{webPath "manage/fixthumbnails"}}" method="GET">
|
||||
<form action="{{webPath "manage/fixthumbnails"}}" method="POST">
|
||||
<select name="board">
|
||||
{{- range $b, $board := $.allBoards -}}
|
||||
<option value="{{$board.Dir}}" {{if eq $.board $board.Dir}}selected{{end}}>/{{$board.Dir}}/ - {{$board.Title}}</option>
|
||||
{{- end -}}
|
||||
</select>
|
||||
<input type="submit" value="Select board"/>
|
||||
</form><br/><br/>
|
||||
{{if not (eq $.board "")}}
|
||||
<form action="{{webPath "manage/fixthumbnails"}}" method="POST">
|
||||
<input type="hidden" name="board" value="{{$.board}}">
|
||||
<input type="hidden" name="fixboard" value="{{$.board}}">
|
||||
<input type="submit" value="Regenerate thumbnails"/>
|
||||
</form>
|
||||
|
||||
{{range $_, $upload := $.uploads}}
|
||||
Post: <a href="{{webPath $.board "res" (intToString $upload.OpID)}}.html#{{$upload.PostID}}">/{{$.board}}/{{$upload.PostID}}</a>, Filename: <a href={{webPath $.board "src" $upload.Filename}}>{{$upload.Filename}}</a>, Spoiler: {{$upload.Spoilered}}, Image size: {{$upload.Width}}x{{$upload.Height}}, Thumb size: {{$upload.ThumbWidth}}x{{$upload.ThumbHeight}}<br/>
|
||||
<h2>Uploads in /{{$.board}}/</h2>
|
||||
<table>
|
||||
<tr><th>Post</th><th>Filename</th><th>Spoiler</th><th>Image size</th><th>Thumbnail size</th><th>Regenerate thumbnail</th></tr>
|
||||
{{range $_, $upload := $.uploads}}
|
||||
<tr>
|
||||
<td><a href="{{webPath $.board "res" (intToString $upload.OpID)}}.html#{{$upload.PostID}}">/{{$.board}}/{{$upload.PostID}}</a></td>
|
||||
<td>{{$upload.Filename}}</td>
|
||||
<td>{{if $upload.Spoilered}}Yes{{else}}No{{end}}</td>
|
||||
<td>{{$upload.Width}}x{{$upload.Height}}</td>
|
||||
<td>{{$upload.ThumbWidth}}x{{$upload.ThumbHeight}}</td>
|
||||
<td><a href="{{webPath "manage/fixthumbnails"}}?fixpost={{$upload.PostID}}">Regenerate</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{end}}
|
Loading…
Add table
Add a link
Reference in a new issue