ca271e2ac6
* Update comments.go * Update commentlist.jet.html * Update comments.go When you search a username and you have a userid in the url, the conditions string doesn't have "AND" in it. I made the username search a priority and if there is not username provided, it falls back to userid in url.
58 lignes
2 Kio
HTML
58 lignes
2 Kio
HTML
{{ extends "layouts/index_admin" }}
|
|
{{block title()}}{{ T("comments_list") }}{{end}}
|
|
{{block content_body()}}
|
|
<div class="results box">
|
|
<h1 style="margin-bottom: 0;">{{ T("comments_list") }}</h1>
|
|
|
|
<form action="/mod/comments">
|
|
<table style="margin-left: 5px; max-width: 30%; min-width: 100px;text-align:left;">
|
|
<tbody>
|
|
<tr>
|
|
<td>{{T("user_id")}}</td><td><input type="text" name="userid" class="form-input" placeholder="{{T("user_id")}}" value="{{if Search.UserID > 0}}{{Search.UserID}}{{end}}"><td/>
|
|
</tr>
|
|
<tr>
|
|
<td>{{T("username")}}</td><td><input type="text" name="username" class="form-input" placeholder="{{T("username")}}" value="{{Search.UserName}}"><td/>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<button style="display: none;"></button>
|
|
</form>
|
|
|
|
<table class="table">
|
|
<thead class="torrent-info">
|
|
<tr>
|
|
<th class="tr-name">{{ T("comments") }}</th>
|
|
<th class="tr-size">{{ T("torrents") }}</th>
|
|
<th class="tr-actions">{{ T("username") }}</th>
|
|
<th class="tr-actions">{{ T("actions") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range Models}}
|
|
<tr>
|
|
<!-- TODO: add href="/mod/comment?id={{.ID}}" for comment editing -->
|
|
<td class="tr-name home-td">
|
|
<a>{{ .Content }}</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
<a href="/view/{{.TorrentID }}">{{ .TorrentID }}</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
{{if .User }}
|
|
<a href="/user/{{ .User.ID }}/{{ .User.Username }}" title="{{ .User.Username }}">{{ .User.Username }}</a>
|
|
{{else}}
|
|
れんちょん
|
|
{{end}}
|
|
</td>
|
|
<td class="tr-actions home-td">
|
|
<form method="POST" action="/mod/comment/delete">
|
|
<input type="hidden" name="id" value="{{ .ID }}">
|
|
<button type="submit" class="form-input btn-red"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{end}}
|