mirror of
https://github.com/writeas/writefreely
synced 2024-12-11 16:18:07 +01:00
c3f76a3ab8
This puts the verbiage more in line with what the feature does, and leaves room for other moderation controls in the future. NOTE: this includes no backend refactoring, which may be confusing. We should rename things to fit ASAP. Ref T661
127 lines
2.5 KiB
Cheetah
127 lines
2.5 KiB
Cheetah
{{define "view-user"}}
|
|
{{template "header" .}}
|
|
<style>
|
|
table.classy th {
|
|
text-align: left;
|
|
}
|
|
h3 {
|
|
font-weight: normal;
|
|
}
|
|
td.active-suspend {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
td.active-suspend > input[type="submit"] {
|
|
margin-left: auto;
|
|
margin-right: 5%;
|
|
}
|
|
|
|
@media only screen and (max-width: 500px) {
|
|
td.active-suspend {
|
|
flex-wrap: wrap;
|
|
}
|
|
td.active-suspend > input[type="submit"] {
|
|
margin: auto;
|
|
}
|
|
}
|
|
</style>
|
|
<div class="snug content-container">
|
|
{{template "admin-header" .}}
|
|
|
|
<h2 id="posts-header">{{.User.Username}}</h2>
|
|
|
|
<table class="classy export">
|
|
<tr>
|
|
<th>No.</th>
|
|
<td>{{.User.ID}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Type</th>
|
|
<td>{{if .User.IsAdmin}}Admin{{else}}User{{end}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Username</th>
|
|
<td>{{.User.Username}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Joined</th>
|
|
<td>{{.User.CreatedFriendly}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Total Posts</th>
|
|
<td>{{.TotalPosts}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Last Post</th>
|
|
<td>{{if .LastPost}}{{.LastPost}}{{else}}Never{{end}}</td>
|
|
</tr>
|
|
<tr>
|
|
<form action="/admin/user/{{.User.Username}}/status" method="POST" {{if not .User.IsSilenced}}onsubmit="return confirmSilence()"{{end}}>
|
|
<a id="status"/>
|
|
<th>Status</th>
|
|
<td class="active-suspend">
|
|
{{if .User.IsSuspended}}
|
|
<p>Silenced</p>
|
|
<input type="submit" value="Unsilence"/>
|
|
{{else}}
|
|
<p>Active</p>
|
|
<input class="danger" type="submit" value="Silence" {{if .User.IsAdmin}}disabled{{end}}/>
|
|
{{end}}
|
|
</td>
|
|
</form>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Blogs</h2>
|
|
|
|
{{range .Colls}}
|
|
<h3><a href="/{{.Alias}}/">{{.Title}}</a></h3>
|
|
<table class="classy export">
|
|
<tr>
|
|
<th>Alias</th>
|
|
<td>{{.Alias}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Title</th>
|
|
<td>{{.Title}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Description</th>
|
|
<td>{{.Description}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Visibility</th>
|
|
<td>{{.FriendlyVisibility}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Views</th>
|
|
<td>{{.Views}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Posts</th>
|
|
<td>{{.TotalPosts}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Last Post</th>
|
|
<td>{{if .LastPost}}{{.LastPost}}{{else}}Never{{end}}</td>
|
|
</tr>
|
|
{{if $.Config.Federation}}
|
|
<tr>
|
|
<th>Fediverse Followers</th>
|
|
<td>{{.Followers}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
{{end}}
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function confirmSilence() {
|
|
return confirm("Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time.");
|
|
}
|
|
</script>
|
|
|
|
{{template "footer" .}}
|
|
{{end}}
|