Change "suspend" to "silence" where user-facing

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
pull/174/head
Matt Baer 5 years ago
parent f7550a0da8
commit c3f76a3ab8
  1. 2
      errors.go
  2. 2
      templates/pad.tmpl
  3. 2
      templates/user/admin/users.tmpl
  4. 12
      templates/user/admin/view-user.tmpl
  5. 2
      templates/user/include/suspended.tmpl

@ -48,7 +48,7 @@ var (
ErrUserNotFound = impart.HTTPError{http.StatusNotFound, "User doesn't exist."}
ErrUserNotFoundEmail = impart.HTTPError{http.StatusNotFound, "Please enter your username instead of your email address."}
ErrUserSuspended = impart.HTTPError{http.StatusForbidden, "Account is suspended, contact the administrator."}
ErrUserSuspended = impart.HTTPError{http.StatusForbidden, "Account is silenced."}
)
// Post operation errors

@ -134,7 +134,7 @@
var suspended = {{.Suspended}};
var publish = function(content, font) {
if (suspended === true) {
alert("Your account is currently suspended, posting is disabled.");
alert("Your account is silenced, so you can't publish or update posts.");
return;
}
{{if and (and .Post.Id (not .Post.Slug)) (not .User)}}

@ -18,7 +18,7 @@
<td><a href="/admin/user/{{.Username}}">{{.Username}}</a></td>
<td>{{.CreatedFriendly}}</td>
<td style="text-align:center">{{if .IsAdmin}}Admin{{else}}User{{end}}</td>
<td style="text-align:center">{{if .IsSuspended}}Suspended{{else}}Active{{end}}</td>
<td style="text-align:center">{{if .IsSilenced}}Silenced{{else}}Active{{end}}</td>
</tr>
{{end}}
</table>

@ -57,16 +57,16 @@ td.active-suspend > input[type="submit"] {
<td>{{if .LastPost}}{{.LastPost}}{{else}}Never{{end}}</td>
</tr>
<tr>
<form action="/admin/user/{{.User.Username}}/status" method="POST" {{if not .User.IsSuspended}}onsubmit="return confirmSuspend()"{{end}}>
<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>Suspended</p>
<input type="submit" value="Activate"/>
<p>Silenced</p>
<input type="submit" value="Unsilence"/>
{{else}}
<p>Active</p>
<input class="danger" type="submit" value="Suspend" {{if .User.IsAdmin}}disabled{{end}}/>
<input class="danger" type="submit" value="Silence" {{if .User.IsAdmin}}disabled{{end}}/>
{{end}}
</td>
</form>
@ -117,8 +117,8 @@ td.active-suspend > input[type="submit"] {
</div>
<script type="text/javascript">
function confirmSuspend() {
return confirm("Suspend 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.");
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>

@ -1,5 +1,5 @@
{{define "user-suspended"}}
<div class="alert info">
<p><strong>Your account is suspended.</strong> You can still access all of your posts and blogs, but no one else can currently see them.</p>
<p><strong>Your account has been silenced.</strong> You can still access all of your posts and blogs, but no one else can currently see them.</p>
</div>
{{end}}

Loading…
Cancel
Save