dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

ignored.gohtml (1992B)


      1 {{ define "sub-content" }}
      2 <div class="pb-2 mt-4 mb-4 border-bottom">
      3     <h2>{{ .Data.IgnoredCount | comma }} Ignored</h2>
      4 </div>
      5 
      6 <form>
      7     <div class="input-group">
      8         <input type="text" name="q" class="form-control" value="{{ .Data.Query }}" placeholder="Search session" />
      9         <div class="input-group-append">
     10             <button class="btn btn-secondary"><i class="fa fa-search fa-fw"></i></button>
     11         </div>
     12     </div>
     13 </form>
     14 <table class="table table-striped table-sm table-novpadding table-dark">
     15     <thead>
     16         <tr>
     17             <th>User</th>
     18             <th>Ignored user</th>
     19             <th>Created at</th>
     20             <th>Actions</th>
     21         </tr>
     22     </thead>
     23     <tbody>
     24         {{ range .Data.Ignored }}
     25             <tr>
     26                 <td><span {{ .User.GenerateChatStyle | attr }}>{{ .User.Username }}</span></td>
     27                 <td><span {{ .IgnoredUser.GenerateChatStyle | attr }}>{{ .IgnoredUser.Username }}</span></td>
     28                 <td>{{ .CreatedAt.Format "Jan 02, 2006 - 15:04:05" }}</td>
     29                 <td class="text-right">
     30                     <form class="d-inline" action="/admin/ignored/delete" method="post">
     31                         <input type="hidden" name="csrf" value="{{ $.CSRF }}" />
     32                         <input type="hidden" name="user_id" value="{{ .UserID }}" />
     33                         <input type="hidden" name="ignored_user_id" value="{{ .IgnoredUserID }}" />
     34                         <button type="submit" class="btn btn-danger btn-sm" title="Delete user">X</button>
     35                     </form>
     36                 </td>
     37             </tr>
     38         {{ end }}
     39     </tbody>
     40 </table>
     41 
     42 <div class="mb-5">
     43     <a href="?p={{ add .Data.CurrentPage -1 }}" class="btn btn-light{{ if le .Data.CurrentPage 1 }} disabled{{ end }}">&laquo; {{ t "Prev" . }}</a>
     44     <a href="?p={{ add .Data.CurrentPage 1 }}" class="btn btn-light{{ if eq .Data.CurrentPage .Data.MaxPage }} disabled{{ end }}">{{ t "Next" . }} &raquo;</a>
     45 </div>
     46 {{ end }}