1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-26 10:36:23 -07:00
gochan/templates/manage_ipsearch.html

63 lines
2.4 KiB
HTML
Raw Normal View History

2022-08-27 23:37:59 -07:00
{{define "uploadinfo" -}}
<div class="file-info">
{{- if .HasEmbed -}}
Embed: <a href="{{.UploadPath}}" target="_blank" class="embed-orig">{{.UploadPath}}</a>
{{- else -}}
File: <a href="{{.UploadPath}}" target="_blank">{{.Filename}}</a> - ({{formatFilesize .Filesize}}{{if and (gt .UploadHeight 0) (gt .UploadWidth 0)}}, {{.UploadWidth}}x{{.UploadHeight}}{{end}}, <a href="{{.UploadPath}}" class="file-orig" download="{{.OriginalFilename}}">{{.OriginalFilename}}</a>)
{{- end -}}
2022-08-27 23:37:59 -07:00
</div>
{{- end -}}
<fieldset>
<legend>Search</legend>
<form method="GET" action="{{webPath "manage/ipsearch"}}" class="staff-form">
2022-08-27 23:37:59 -07:00
<label for="ip">IP Address</label>
<input type="text" name="ip" id="ipquery" value="{{.ipQuery}}"><br />
<label for="number">Max results</label>
<input type="number" name="limit" min="1" max="200" value="{{.limit}}"/><br/>
<input type="submit" value="Search">
</form>
</fieldset>
{{with .reverseAddrs}}
<fieldset>
<legend>Info for IP address {{$.ipQuery}}</legend>
<b>Reverse address results:</b>
<ul>
{{range $a, $addr := .}}<li>{{$addr}}</li>{{end}}
</ul>
</fieldset>
{{- end -}}
{{with .posts -}}
<hr/>
<header><h2>Posts from IP</h2></header>
2022-11-29 10:23:51 -08:00
{{$global := .}}
2022-08-27 23:37:59 -07:00
{{range $p, $post := .}}
<div id="replycontainer{{.ID}}" class="reply-container">
<div id="reply{{.ID}}" class="reply">
<a class="anchor" id="{{.ID}}"></a>
<input type="checkbox" id="check{{.ID}}" name="check{{.ID}}">
<label class="post-info" for="check39">
<span class="subject">{{.Subject}}</span>
<span class="postername">
{{- if ne .Email ""}}<a href="mailto:{{.Email}}">{{end}}
{{- if and (eq .Name "") (eq .Tripcode "") -}}Anonymous{{else}}{{.Name}}{{end}}
{{- if ne .Email ""}}</a>{{end -}}
</span>
2022-11-29 10:23:51 -08:00
{{- if ne .Tripcode ""}}<span class="tripcode">!{{.Tripcode}}</span>{{end}} {{formatTimestamp .Timestamp}}</label>
<a href="{{.WebPath}}" target="_blank">No. {{.ID}}</a><br/>
2022-08-27 23:37:59 -07:00
{{- if eq .Filename "deleted" -}}
<div class="file-deleted-box" style="text-align:center;">File removed</div>
{{- else if ne .Filename "" -}}
{{- template "uploadinfo" . -}}
<a class="upload-container" href="{{.UploadPath}}">
{{- if .HasEmbed -}}
{{embedMedia .}}
{{- else -}}
<img src="{{getThumbnailWebPath .ID}}" alt="{{.UploadPath}}" width="{{.ThumbnailWidth}}" height="{{.ThumbnailHeight}}" class="upload thumb" />
{{- end -}}
</a>
2022-08-27 23:37:59 -07:00
{{- end -}}
2022-11-29 10:23:51 -08:00
{{.Message}}
2022-08-27 23:37:59 -07:00
</div>
</div>
{{- end}}{{end}}