Handy contextual links on the admin change log page
This commit is contained in:
parent
ddd33aad91
commit
268a177412
|
@ -180,9 +180,61 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{$Root.Request.URL.Path}}?{{QueryPlus "table_name" .TableName}}">{{.TableName}}</a>
|
<a href="{{$Root.Request.URL.Path}}?{{QueryPlus "table_name" .TableName}}">{{.TableName}}</a>
|
||||||
|
|
||||||
|
<!-- Handy visitation links -->
|
||||||
|
{{if eq .TableName "blocks"}}
|
||||||
|
<a href="/admin/user-action?intent=insights&user_id={{.AboutUserID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="User insights">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{$Root.Request.URL.Path}}?{{QueryPlus "table_name" .TableName "table_id" .TableID}}">{{.TableID}}</a>
|
<a href="{{$Root.Request.URL.Path}}?{{QueryPlus "table_name" .TableName "table_id" .TableID}}">{{.TableID}}</a>
|
||||||
|
|
||||||
|
<!-- Handy visitation links -->
|
||||||
|
{{if eq .TableName "photos"}}
|
||||||
|
<a href="/photo/view?id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="Visit this photo">
|
||||||
|
<i class="fa fa-image"></i>
|
||||||
|
</a>
|
||||||
|
{{else if eq .TableName "comments"}}
|
||||||
|
<a href="/go/comment?id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="Visit this comment">
|
||||||
|
<i class="fa fa-comments"></i>
|
||||||
|
</a>
|
||||||
|
{{else if eq .TableName "blocks"}}
|
||||||
|
<a href="/admin/changelog?table_name=blocks&about_user_id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="View this user's blocks instead">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/admin/user-action?intent=insights&user_id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="User insights (ID: {{.TableID}})">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
</a>
|
||||||
|
{{else if eq .TableName "friends"}}
|
||||||
|
<a href="/admin/changelog?table_name=friends&about_user_id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="View this user's friends instead">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/admin/user-action?intent=insights&user_id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="User insights (ID: {{.TableID}})">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
</a>
|
||||||
|
{{else if and (eq .TableName "certification_photos") .AboutUserID}}
|
||||||
|
{{$User := $Root.UserMap.Get .AboutUserID}}
|
||||||
|
<a href="/admin/photo/certification?username={{$User.Username}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="Visit this comment">
|
||||||
|
<i class="fa fa-certificate"></i>
|
||||||
|
</a>
|
||||||
|
{{else if eq .TableName "users"}}
|
||||||
|
<a href="/admin/user-action?intent=insights&user_id={{.TableID}}" target="_blank" class="has-text-success mx-1"
|
||||||
|
title="User insights (ID: {{.TableID}})">
|
||||||
|
<i class="fa fa-info-circle"></i>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{define "title"}}Compose a Message{{end}}
|
{{define "title"}}Admin Action: {{.User.Username}}{{end}}
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<section class="hero is-info is-bold">
|
<section class="hero is-info is-bold">
|
||||||
|
|
|
@ -350,6 +350,15 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $Root.CurrentUser.IsAdmin}}
|
||||||
|
<div>
|
||||||
|
<span class="tag is-primary is-light">
|
||||||
|
<span class="icon"><i class="fa fa-database"></i></span>
|
||||||
|
<span>ID: {{.ID}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user