mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-25 22:53:14 +00:00
60 lines
2.4 KiB
HTML
60 lines
2.4 KiB
HTML
{{ if not .XHR }}
|
|
{{ template "header.html" . }}
|
|
{{ template "nav.html" . }}
|
|
{{ end }}
|
|
<form method="POST" class="blockpost"{{ if not .XHR }} action="./"{{ end }}>
|
|
<fieldset>
|
|
<legend>block</legend>
|
|
<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>
|
|
</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) }}
|
|
<div>
|
|
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
|
|
<label for="blockuserinstance">{{ instance (index .Posts 0).Creator.ActorID }}</label>
|
|
</div>
|
|
{{ end }}
|
|
{{ if .Community }}
|
|
<div>
|
|
<input type="checkbox" id="blockcommunity" name="blockcommunity">
|
|
<label for="blockcommunity">c/{{ fullcname .Community.CommunityView.Community }}</label>
|
|
</div>
|
|
{{ 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>
|
|
<div>
|
|
{{ if .Posts }}
|
|
<input type="hidden" name="op" value="block_post">
|
|
<input type="hidden" name="postid" value="{{(index .Posts 0).Post.ID}}">
|
|
<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">
|
|
<input type="submit" value="cancel" name="submit">
|
|
</div>
|
|
</form>
|
|
{{ if not .XHR }}
|
|
{{ template "footer.html" . }}
|
|
{{ end }}
|