mlmym/templates/block.html

60 lines
2.4 KiB
HTML
Raw Normal View History

2023-09-03 16:48:04 +00:00
{{ if not .XHR }}
{{ template "header.html" . }}
{{ template "nav.html" . }}
{{ end }}
<form method="POST" class="blockpost"{{ if not .XHR }} action="./"{{ end }}>
<fieldset>
<legend>block</legend>
2023-09-03 16:48:04 +00:00
<div>
<input type="checkbox" id="blockuser" name="blockuser" checked>
<label for="blockuser">u/{{ if .Posts }}{{ fullname (index .Posts 0).Creator }}{{ else }}{{ fullname (index .Comments 0).P.Creator }}{{ end }}</label>
2023-09-03 16:48:04 +00:00
</div>
{{ if and .Comments (not (index .Comments 0).P.Creator.Local) }}
<div>
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
<label for="blockuserinstance">{{ instance (index .Comments 0).P.Creator.ActorID }}</label>
</div>
{{ end }}
{{ if and .Posts (not (index .Posts 0).Creator.Local) (ne (index .Posts 0).Creator.InstanceID .Community.CommunityView.Community.InstanceID) }}
2023-12-17 02:24:26 +00:00
<div>
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
<label for="blockuserinstance">{{ instance (index .Posts 0).Creator.ActorID }}</label>
</div>
{{ end }}
{{ if .Community }}
2023-09-03 16:48:04 +00:00
<div>
<input type="checkbox" id="blockcommunity" name="blockcommunity">
<label for="blockcommunity">c/{{ fullcname .Community.CommunityView.Community }}</label>
</div>
2023-12-17 02:24:26 +00:00
{{ if not .Community.CommunityView.Community.Local }}
<div>
<input type="checkbox" id="blockpostinstance" name="blockpostinstance">
<label for="blockpostinstance">{{ instance .Community.CommunityView.Community.ActorID }}</label>
</div>
{{ end }}
{{ end }}
</fieldset>
<div>
<fieldset>
<legend>report {{ if .Posts }}post{{ else }}comment{{ end }}</legend>
<textarea name="reason"></textarea>
</fieldset>
</div>
2023-09-03 16:48:04 +00:00
<div>
{{ if .Posts }}
2023-09-03 16:48:04 +00:00
<input type="hidden" name="op" value="block_post">
<input type="hidden" name="postid" value="{{(index .Posts 0).Post.ID}}">
2023-12-17 02:24:26 +00:00
<input type="hidden" name="userinstanceid" value="{{(index .Posts 0).Creator.InstanceID}}">
<input type="hidden" name="postinstanceid" value="{{.Community.CommunityView.Community.InstanceID}}">
{{ else }}
<input type="hidden" name="op" value="block_comment">
<input type="hidden" name="commentid" value="{{(index .Comments 0).P.Comment.ID}}">
{{ end }}
<input type="submit" value="submit" name="submit">
2023-09-03 16:48:04 +00:00
<input type="submit" value="cancel" name="submit">
</div>
</form>
{{ if not .XHR }}
{{ template "footer.html" . }}
{{ end }}