mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-14 16:26:23 -07:00
Fix recent post checking
This commit is contained in:
parent
30b5a84aab
commit
fd6ca5d38c
3 changed files with 112 additions and 75 deletions
|
@ -1,24 +1,31 @@
|
|||
<!-- Limit by: <select id="limitby">
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
<option>200</option>
|
||||
</select><br /><br /> -->
|
||||
<form action="{{$.webroot}}manage" method="GET">
|
||||
<input type="hidden" name="action" value="recentposts">
|
||||
<label for="boardid">Board:</label>
|
||||
<select name="boardid" id="boardid">
|
||||
<option value="0">All boards</option>
|
||||
{{- range $b, $board := $.allBoards -}}
|
||||
<option value="{{$board.ID}}" {{if eq $.boardid $board.ID}}selected{{end}}>/{{$board.Dir}}/ - {{$board.Title}}</option>
|
||||
{{- end -}}
|
||||
</select><br />
|
||||
<label for="limit">Limit:</label>
|
||||
<input type="number" name="limit" id="limit" value="20" min="1">
|
||||
<input type="submit" />
|
||||
</form><hr />
|
||||
<table width="100%" border="1">
|
||||
<colgroup><col width="5%"><col width="15%"><col width="60%"><col width="15%"></colgroup>
|
||||
<tr><th></th><th>Name</th><th>Message</th><th>Thumb</th></tr>
|
||||
{{range $rp, $post := $.recentposts}}
|
||||
<tr><td><a href="{{$post.BoardName}}/res/{{if eq $post.ParentID 0}}{{$post.ID}}{{else}}{{$post.ParentID}}{{end}}.html#{{$post.PostID}}" class="centered">Post</a></td>
|
||||
<tr><td><a href="{{$post.WebPath}}" class="centered">Post</a></td>
|
||||
<td><b>Name: </b> {{- if and (eq $post.Name "") (eq $post.Tripcode "")}}<span class="postername">Anonymous</span>{{end}}
|
||||
{{- if ne $post.Name ""}}<span class="postername">{{$post.Name}}</span>{{end -}}
|
||||
{{- if ne $post.Tripcode ""}}!<span class="tripcode">{{$post.Tripcode}}</span>{{end -}}<br />
|
||||
<b>IP: </b> {{$post.IP}}</td>
|
||||
<b>IP: </b> {{$post.IP}}<br />
|
||||
<b>Board: </b>/{{$post.BoardDir}}/
|
||||
</td>
|
||||
<td>{{truncateMessage (stripHTML $post.Message) 300 16}}</td><td>
|
||||
{{- if eq $post.Filename "deleted" -}}
|
||||
<div class="file-deleted-box centered" style="text-align:center;">File removed</div>
|
||||
{{- else if ne $post.Filename "" -}}
|
||||
{{- $thumbURL := stringAppend $.webroot $post.BoardName "/thumb/" (getThreadThumbnail $post.Filename) -}}
|
||||
{{- $uploadURL := stringAppend $.webroot $post.BoardName "/src/" $post.Filename -}}
|
||||
<a href="{{$uploadURL}}" target="_blank" class="centered"><img src="{{$thumbURL}}"></a>
|
||||
<a href="{{$post.UploadPath}}" target="_blank" class="centered"><img src="{{$post.ThumbnailPath}}"></a>
|
||||
{{end}}</td></tr>{{end}}
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue